John Klug Tux's lil' helper
Joined: 20 Nov 2007 Posts: 75 Location: Minnesota
|
Posted: Tue Jan 29, 2008 10:10 am Post subject: Boot failure because of read-only root & initramfs [SOLV |
|
|
I used the 2007.0 minimal install to bootstrap from an IDE DVD/CDROM to install onto flash because my AHCI SATA doesn't work on 2007.0.
I used genkernel to create a kernel and initramfs.
After installing the new kernel on flash, it gets:
!!Block device /dev/sdb2 is not a valid root device.
Sometimes the flash is set to /dev/sda, but usually sdb. Then I go into the shell, and can verify the device, and mount it with:
Then I see that root is writable, looks good, and umount /newroot. Then I exit the shell and try /dev/sdb2 manually:
root block device() :: /dev/sdb2
>> Mounting root
mknod: /newroot/dev/console: Read-only file system
mknod: /newroot/dev/tty1: Read-only file system
>> Booting (initramfs)
switch_root: Bad Console '/dev/console'
Kernel panic ...
I added doscsi which didn't make any difference, and rootdelay did nothing too. I noticed that in the /init script it has a delay command (maybe sdelay) that says it is there to wait for USB devices. Maybe it isn't long enough?
grub.conf:
title=Gentoo Linux x86_64 2.6.23-r3
root (hd0,0)
kernel /boot/kernel-genkernel-x86_64-2.6.23-gentoo-r3 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sdb2 rootdelay=60 doscsi udev
initrd /boot/initramfs-genkernel-x86_64-2.6.23-gentoo-r3
EDIT 29 Janman page for genkernel says scandelay causes a pause before running devfsd which eliminates not finding root.
EDIT 30 JanThe real problem is that I removed everything under /dev a while back by mistake. linuxrc (or init) always mounts root read-only (comment in init says this is because fsck of root will fail if it is not read-only). The init script attempts to create /dev/tty1 and /dev/console. This problem happened because I booted the minimal CD many times, and one time I forgot to mount /mnt/gentoo/dev. I later noticed this, and noticed that /mnt/gentoo/dev was full of stuff, so I assumed I must have put it there by mistake, since the instructions say to mount the /dev from the true root onto /mnt/gentoo/dev, so why would anything be there? Once I realized that the mknod in init wouldn't happen in the first place if the device nodes were already there, I went back to my stage3, and got the /dev directory. |
|