Simen Thoresen
2007-Apr-30 11:15 UTC
[CentOS] CentOS 4.4 - added disk prevents system from booting past initrd
Hi people, I ran into one of these silly issues I'd like to share as I think the reason behind it may be a flaw in the current initrds. The setup; Dual-Xeon Intel-chipset motherboard. SATA-disk attached to ICH, onboard Adaptec SCSI-controller. Installed system, updated packages, no problems. Basic, non-LVM partition setup - OS-disk is /dev/sda, single filesystem-partition /dev/sda1 is labeled LABEL=/, and fstab uses the label to access the filesystem. I now add a SCSI-disk (previously used) to the onboard SCSI-controller, and the fun starts. The onboard controller is identified as scsi0 and scsi1, the SATA-disk sits on scsi2. SCSI-disk is thus /dev/sda, and SATA-disk becomes /dev/sdb. This should not be a problem as the fstab refers to the partition by label and not device name. And then disaster! While booting, the system issues 'Checking root filesystem' (I'm not 100% sure about the output here), and craps out on a badly broken /dev/sda1. On the SCSI-disk, /dev/sda1 is an extended partition, with /dev/sda5 being the partition that holds the filesystem. Thus fsck'ing /dev/sda1 does not bring any useful. But why? Why does the initrd insist on fsck'in /dev/sda1, when it should check LABEL=/? Is there something I'm not getting here? -S -- Simen Thoresen, Dolphin ICS Systems Administration and Wulfkit Support
Pierre Bourgin
2007-Apr-30 14:48 UTC
[CentOS] CentOS 4.4 - added disk prevents system from booting past initrd
Simen Thoresen a ?crit :> Hi people, > > I ran into one of these silly issues I'd like to share as I think the > reason behind it may be a flaw in the current initrds. > > The setup; > Dual-Xeon Intel-chipset motherboard. SATA-disk attached to ICH, onboard > Adaptec SCSI-controller. > > Installed system, updated packages, no problems. Basic, non-LVM > partition setup - OS-disk is /dev/sda, single filesystem-partition > /dev/sda1 is labeled LABEL=/, and fstab uses the label to access the > filesystem. > > I now add a SCSI-disk (previously used) to the onboard SCSI-controller, > and the fun starts. The onboard controller is identified as scsi0 and > scsi1, the SATA-disk sits on scsi2. SCSI-disk is thus /dev/sda, and > SATA-disk becomes /dev/sdb. This should not be a problem as the fstab > refers to the partition by label and not device name. > > And then disaster! While booting, the system issues 'Checking root > filesystem' (I'm not 100% sure about the output here), and craps out on > a badly broken /dev/sda1. On the SCSI-disk, /dev/sda1 is an extended > partition, with /dev/sda5 being the partition that holds the filesystem. > Thus fsck'ing /dev/sda1 does not bring any useful. But why? > > Why does the initrd insist on fsck'in /dev/sda1, when it should check > LABEL=/? > > Is there something I'm not getting here?it should be a grub problem: even if filesystems are now labelled, grub enumerates present hard drives ... and have the same problems than Lninux with sda becoming sdb. Its configuration file (SATA:/boot/grub/menu.lst) should be updated as well, especially the root keyword. grub is launched from the first bootable drive (/dev/sdb) that is saw as disk hd(1) I guess. So in its configuration file, you should duplicate the default entry (when installed on SATA standalone disk) and change "root hd(0,1)" into "root hd(1,1)" To achieve it, boot from CD/DVD in rescue mode, mount manually your /boot (in / perhaps) and edit /boot/grub/menu.lst my $0.02 Pierre Bourgin
Simen Timian Thoresen
2007-May-01 16:55 UTC
[CentOS] Re: CentOS 4.4 - added disk prevents system from booting past initrd
centos-request at centos.org wrote: ... > > Thus fsck'ing /dev/sda1 does not bring any useful. But why? > > > > Why does the initrd insist on fsck'in /dev/sda1, when it should check > > LABEL=/? > > > > Is there something I'm not getting here? > it should be a grub problem: even if filesystems are now labelled, > grub enumerates present hard drives ... and have the same problems > than Lninux with sda becoming sdb. > Its configuration file (SATA:/boot/grub/menu.lst) should be updated as > well, especially the root keyword. > > grub is launched from the first bootable drive (/dev/sdb) that is saw > as disk hd(1) I guess. > > So in its configuration file, you should duplicate the default entry > (when installed on SATA standalone disk) and change "root hd(0,1)" > into "root hd(1,1)" > > To achieve it, boot from CD/DVD in rescue mode, mount manually your > /boot (in / perhaps) and edit /boot/grub/menu.lst > > my $0.02 > > Pierre Bourgin Hi Pierre, I thought about grub (but have not tried changing anything there yet), but am a bit uncertain if grub is the issue as - the BIOS boots the SATA disk, and reads the grub bootloader. - The grub bootloader loads both the kernel and the correct initrd - The kernel is told to mount LABEL=/ as root - It is while executing something in the initrd that system decides to fsck /dev/sda1 - Once /dev/sda1 is fsck-able (ie after changing the partition layout), the system boots without issues. The filesystem on /dev/sda1 does not at any time contain anything useful (it started out as just being an extended partition, and now is completely empty. At no time did it have any label set). Yours, -S -- Simen Thoresen, Dolphin ICS Systems Administration and Wulfkit Support