* [linux-lvm] Imaged a drive, now kernel panics @ 2010-06-06 0:59 Digimer 2010-06-06 3:33 ` Ray Morris 0 siblings, 1 reply; 4+ messages in thread From: Digimer @ 2010-06-06 0:59 UTC (permalink / raw) To: LVM general discussion and development Hi all, I am sure this is a fairly common issue, but it's stumping me. I have an old server's drive (IDE) that has CentOS 4 on it. The mainboard fried, so I imaged the drive using 'dd' onto a new drive and tried booting from it. Not surprisingly, it failed to boot. Specifically: ------------------------------------------------------------- Uncompressing Linux... Ok, booting the kernel. Red Hat nash version 4.2.1.8 starting Reading all physical volumes. This may take a while... No volume groups found Volume group "VolGroup00" not found ERROR: /bin/lvm exited abnormally! (pid 321) mount: error 6 mounting ext3 mount: error 2 mounting none switchroot: mount failed: 22 umount /initrd/dev failed: 2 Kernel panic - not syncing: Attempted to kill init! ------------------------------------------------------------- When I boot off the DVD using 'linux rescue', it successfully finds the partitions and mounts them. I can 'chroot /mnt/sysimage' just fine. I also tried moving the current kernel out of the way and using 'mkinitrd' to rebuild the image (after chrooting and making sure everything looked fine). Any idea what I might be missing? Thanks! -- Digimer E-Mail: linux@alteeve.com AN!Whitepapers: http://alteeve.com Node Assassin: http://nodeassassin.org ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-lvm] Imaged a drive, now kernel panics 2010-06-06 0:59 [linux-lvm] Imaged a drive, now kernel panics Digimer @ 2010-06-06 3:33 ` Ray Morris 2010-06-06 3:59 ` Digimer 0 siblings, 1 reply; 4+ messages in thread From: Ray Morris @ 2010-06-06 3:33 UTC (permalink / raw) To: LVM general discussion and development You mentioned that the old drive is IDE. If so, You may be running into a couple problems I've had. I take it the new drive is SATA, SAS, or SCSI? Did you edit /etc/fstab to change hda to sda, hdb to sdb, etc., before running mkinitrd? The existing kernel may not have the needed drivers compiled in, the drivers for the particular chipset and whatever SCSI drivers or modules are needed. Assuming that rescue kernel matches the kernel on the failed drive, mkinitrd _should_ take care of that if /etc/fstab is correct. Might it might look at mtab? > I also tried moving the current kernel out of the > way and using 'mkinitrd' to rebuild the image (after > chrooting and making sure everything looked fine) Be sure to bind /proc, /sys, /dev, and /selinux into the chroot. We want to be able to see /dev/sda it order to set up to boot from it. Along the same lines, double check that any other partitions, primarily /boot, are mounted in the chroot. That should pretty much you, but before I figured out some of the possible failure modes I build modified several initrd by hand. You can debug the init script with simple echo statements much like you would debug any simple script. One last thing - on some motherboards the BIOS can be set to present a SATA drive as if it were IDE, I understand. qemu-kvm can also present a hard drive image as either SCSI or IDE, regardless of the actual underlying hardware. So you could present your SATA or SCSI drive as an IDE drive in order to make the old initrd and kernel happy. -- Ray Morris support@bettercgi.com Strongbox - The next generation in site security: http://www.bettercgi.com/strongbox/ Throttlebox - Intelligent Bandwidth Control http://www.bettercgi.com/throttlebox/ Strongbox / Throttlebox affiliate program: http://www.bettercgi.com/affiliates/user/register.php On 06/05/2010 07:59:49 PM, Digimer wrote: > Hi all, > > I am sure this is a fairly common issue, but it's stumping me. > > I have an old server's drive (IDE) that has CentOS 4 on it. The > mainboard fried, so I imaged the drive using 'dd' onto a new drive > and tried booting from it. Not surprisingly, it failed to boot. > Specifically: > > ------------------------------------------------------------- > Uncompressing Linux... Ok, booting the kernel. > Red Hat nash version 4.2.1.8 starting > Reading all physical volumes. This may take a while... > No volume groups found > Volume group "VolGroup00" not found > ERROR: /bin/lvm exited abnormally! (pid 321) > mount: error 6 mounting ext3 > mount: error 2 mounting none > switchroot: mount failed: 22 > umount /initrd/dev failed: 2 > Kernel panic - not syncing: Attempted to kill init! > ------------------------------------------------------------- > > When I boot off the DVD using 'linux rescue', it successfully finds > the partitions and mounts them. I can 'chroot /mnt/sysimage' just > fine. I also tried moving the current kernel out of the way and using > 'mkinitrd' to rebuild the image (after chrooting and making sure > everything looked fine). > > Any idea what I might be missing? > > Thanks! > >-- > Digimer > E-Mail: linux@alteeve.com > AN!Whitepapers: http://alteeve.com > Node Assassin: http://nodeassassin.org > > _______________________________________________ > linux-lvm mailing list > linux-lvm@redhat.com > https://www.redhat.com/mailman/listinfo/linux-lvm > read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/ > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-lvm] Imaged a drive, now kernel panics 2010-06-06 3:33 ` Ray Morris @ 2010-06-06 3:59 ` Digimer 2010-06-06 6:05 ` Luca Berra 0 siblings, 1 reply; 4+ messages in thread From: Digimer @ 2010-06-06 3:59 UTC (permalink / raw) To: LVM general discussion and development; +Cc: Ray Morris On 10-06-05 11:33 PM, Ray Morris wrote: > You mentioned that the old drive is IDE. If so, > You may be running into a couple problems I've had. > I take it the new drive is SATA, SAS, or SCSI? > Did you edit /etc/fstab to change hda to sda, hdb > to sdb, etc., before running mkinitrd? Yup, simple SATA. > The existing kernel may not have the needed drivers > compiled in, the drivers for the particular chipset > and whatever SCSI drivers or modules are needed. > Assuming that rescue kernel matches the kernel on > the failed drive, mkinitrd _should_ take care of that > if /etc/fstab is correct. Might it might look at > mtab? I just went through /etc grep'ing for and replace hda for sda. Also, the system has CentOS 4.4 and my rescue disk is CentOS 4.8... > Be sure to bind /proc, /sys, /dev, and /selinux > into the chroot. We want to be able to see /dev/sda > it order to set up to boot from it. Along the same lines, > double check that any other partitions, primarily /boot, > are mounted in the chroot. Sorry, how do I bind those fs into chroot? > That should pretty much you, but before I figured out > some of the possible failure modes I build modified several > initrd by hand. You can debug the init script with simple > echo statements much like you would debug any simple > script. > > One last thing - on some motherboards the BIOS can > be set to present a SATA drive as if it were IDE, I > understand. qemu-kvm can also present a hard drive image > as either SCSI or IDE, regardless of the actual underlying > hardware. So you could present your SATA or SCSI drive > as an IDE drive in order to make the old initrd and kernel > happy. I'll look at that if all else fails. -- Digimer E-Mail: linux@alteeve.com AN!Whitepapers: http://alteeve.com Node Assassin: http://nodeassassin.org ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-lvm] Imaged a drive, now kernel panics 2010-06-06 3:59 ` Digimer @ 2010-06-06 6:05 ` Luca Berra 0 siblings, 0 replies; 4+ messages in thread From: Luca Berra @ 2010-06-06 6:05 UTC (permalink / raw) To: linux-lvm On Sat, Jun 05, 2010 at 11:59:59PM -0400, Digimer wrote: > On 10-06-05 11:33 PM, Ray Morris wrote: >> You mentioned that the old drive is IDE. If so, >> You may be running into a couple problems I've had. >> I take it the new drive is SATA, SAS, or SCSI? >> Did you edit /etc/fstab to change hda to sda, hdb >> to sdb, etc., before running mkinitrd? > > Yup, simple SATA. > >> The existing kernel may not have the needed drivers >> compiled in, the drivers for the particular chipset >> and whatever SCSI drivers or modules are needed. >> Assuming that rescue kernel matches the kernel on >> the failed drive, mkinitrd _should_ take care of that >> if /etc/fstab is correct. Might it might look at >> mtab? > > I just went through /etc grep'ing for and replace hda for sda. Also, the > system has CentOS 4.4 and my rescue disk is CentOS 4.8... i think you need to add a scsi-hostadapter module_for_your_controller line to /etc/modprobe.conf to have mkinitrd understand that. >> Be sure to bind /proc, /sys, /dev, and /selinux >> into the chroot. We want to be able to see /dev/sda >> it order to set up to boot from it. Along the same lines, >> double check that any other partitions, primarily /boot, >> are mounted in the chroot. > > Sorry, how do I bind those fs into chroot? mount --bind /proc /chroot/proc ... -- Luca Berra -- bluca@comedia.it Communication Media & Services S.r.l. /"\ \ / ASCII RIBBON CAMPAIGN X AGAINST HTML MAIL / \ ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-06-06 6:05 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-06-06 0:59 [linux-lvm] Imaged a drive, now kernel panics Digimer 2010-06-06 3:33 ` Ray Morris 2010-06-06 3:59 ` Digimer 2010-06-06 6:05 ` Luca Berra
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox