Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Boot failure because of read-only root & initramfs [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
John Klug
Tux's lil' helper
Tux's lil' helper


Joined: 20 Nov 2007
Posts: 75
Location: Minnesota

PostPosted: Tue Jan 29, 2008 10:10 am    Post subject: Boot failure because of read-only root & initramfs [SOLV Reply with quote

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:
    mount /dev/sdb2 /newroot

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 Jan
    man page for genkernel says scandelay causes a pause before running devfsd which eliminates not finding root.

EDIT 30 Jan
    The 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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum