Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to build a new workstation using a Mondo-created CentOS 5.8 image.
The reinstall worked but it fails to boot (the usual kernel panic messages).
If I boot from the CentOS 5.8 DVD linux rescue it fails to detect the OS, so I can't fix it using mkinitrd.
Is it possible to use, say, an Ubuntu Live CD to boot the workstation, chroot the new disk then run mkinitrd?
I tried it on a Virtual System but it failed to produce a bootable initrd.img.
As root I created mount points for the new drive, which has /boot and / partitions;
mkdir /mnt/sda1 /mnt/sda2
mount /dev/sda1 /mnt/sda1
mount /dev/sda2 /mnt/sda2
mount --bind /proc /mnt/sda2/proc
mount --bind /sys /mnt/sda2/sys
mount --bind /dev /mnt/sda2/dev
chroot /mnt/sda2
mount /dev/sda1 /boot
cd /boot
mkinitrd -v -f initrd-2.6.18-308.16.1.el5.img 2.6.18-308.16.1.el5
This all ran OK but it didn't boot, got kernel panic error.
... but it fails to boot (the usual kernel panic messages).
Not very informative.
As a general statement, if you have chroot'd successfully, you should be fine using the installed system. So, yes, mkinitrd tends to be specific to the environment, but you should be in your environment, so it shouldn't matter.
The rescue boot environments tend to be pretty lame - they generally only check the first disk, and usually only the first system on that disk. You should be able to chroot from the CentOS disk though, similar to what you did with the Ubuntu liveCD.
"switchroot: mount failed: No such file or directory
Kernel panic - not syncing: Attempted to kill init!"
during boot, but usually only when I've tried to clone a system to a new drive (and only with CentOS, and not always)
Anyway, the system I'm having issues with is a new Dell and the CentOS 5.8 x86_64 disk fails to find the OS on the only disk in the machine in Rescue mode. Which is why I was trying to use an Ubuntu CD.
Being new to Mondo Rescue and Mindi I'm only just realising its full potential.
I have only just discovered that during the rescue process Mindi will drop you to the command line with all the mount points of your rescued system in place and then you can run mkinitrd to ensure the system boots - NICE!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.