LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 08-16-2015, 01:34 AM   #1
kumaaran
LQ Newbie
 
Registered: Aug 2009
Posts: 18

Rep: Reputation: 1
Unable to boot into Centos 6.3 installation after grub corruption


Dear Friends,

I had a laptop installed with Centos6.3, Windows 7. Eventually this laptop had some graphic card issues and became unusable. However, the HDD containing the said OSes is intact.

A few months later while trying use this HDD on another laptop, I had trouble booting due to, corrupted grub, which used to say "kernel must be loaded first".

Later trying to recover the grub using live CDs, lead nowhere and I realised that the initramfs and vmlinuz files are not found to be anywhere in /boot or / and totally missing.

Tried booting from a Centos 6.3 installation DVD, in rescue mode and able to mount the drive and chroot to the Centos 6.3 installation.

But running dracut in order to rebuild initramfs...

"mount --bind /proc /mnt/sysimage/proc
mount --bind /dev /mnt/sysimage/dev
mount --bind /sys /mnt/sysimage/sys

chroot /mnt/sysimage

dracut -f"

produces the following error:

find: lib/modules/2.6.32-279.el6.i686': no such file or directory
find: lib/modules/2.6.32-279.el6.i686': no such file or directory
find: lib/modules/2.6.32-279.el6.i686': no such file or directory
find: lib/modules/2.6.32-279.el6.i686': no such file or directory
find: lib/modules/2.6.32-279.el6.i686': no such file or directory

Is there any way I can make this disk bootable?

How to generate the initramfs and vmlinuz files?

Since this installation was updated several times, I am really not sure what was the last kernel version, but it was one of the centosplus kernels, trying to remember.

I would highly appreciate your help.

Thanks and warm regards
 
Old 08-16-2015, 03:48 AM   #2
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Rep: Reputation: 164Reputation: 164
Do you need the data on the disk?
 
Old 08-21-2015, 11:46 PM   #3
kumaaran
LQ Newbie
 
Registered: Aug 2009
Posts: 18

Original Poster
Rep: Reputation: 1
Yes; of course. And together with the applications the disk contains. That's the main reason I am trying to recover the Centos installation.
 
Old 08-24-2015, 06:36 PM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,927
Blog Entries: 45

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Moderator response

Moved: This thread is more suitable in <Centos> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 08-24-2015, 11:39 PM   #5
kumaaran
LQ Newbie
 
Registered: Aug 2009
Posts: 18

Original Poster
Rep: Reputation: 1
Thank you onebuck. I have wondering the right place for this thread and you helped me find.
 
Old 09-10-2015, 08:54 AM   #6
mtsinc
LQ Newbie
 
Registered: Jan 2002
Location: Jacksonville, FL
Distribution: RedHat
Posts: 26

Rep: Reputation: 16
I haven't done this with dracut, but I think this still works on CentOS 6:

mount --bind /proc /mnt/sysimage/proc
mount --bind /dev /mnt/sysimage/dev
mount --bind /sys /mnt/sysimage/sys
chroot /mnt/sysimage
mkinitrd -f -v /boot/initrd-$(uname -r).img $(uname -r)

The main thing is that you need to specify an installed kernel version (which is what the uname -r does). So, for example:

2.6.32-573.3.1.el6.x86_64
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Path `/boot/grub' is not readable by GRUB on boot. Installation is impossible. alexhiram Linux From Scratch 2 01-29-2015 08:42 PM
Sabayon 8 Installation issues - Sata Raid unable to boot (via grub) leo_mancini Linux - Software 1 05-02-2012 09:32 PM
[SOLVED] Dual Boot Slackware with CentOS using CentOS GRUB frankbell Slackware 9 10-26-2011 11:04 AM
grub boot loader installation in dual boot machine after windows 7 installation sourabh.sinha Linux - Newbie 4 03-23-2010 09:22 AM
Redhat 4 on HP server unable to boot up. Shows grub grub message cghcgh Linux - Server 5 10-13-2009 09:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 05:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration