PDA

View Full Version : K7.0.4 on pendrive, boot by UUID, stuck at kernel panic



cj_tomekk
10-23-2012, 05:21 PM
Hello,

I've installed Knoppix 7.0.4 on a pedrive. It boots fine with default GRUB (0.97). I want to boot the system in situations where there are no extra ata/sata drives (as it works after install) and if a drive is left attached. In that case I get kernel panic. I've read somewhere that booting by UUID may help but in GRUB2. I updated my installation to GRUB2. Now I have GRUB menu and chained GRUB2 menu. Original boot works with pendrive only. From GRUB2 entries none boots. I get message:

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0).

I've struggled with this for a few days now and seems reached timeout on digging this without help.

Anyone could route me to set this up correctly?

Some parts of setup


# df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
rootfs rootfs 6663664 2222080 4441584 34% /
/dev/root reiserfs 6663664 2222080 4441584 34% /
tmpfs tmpfs 2097152 8 2097144 1% /tmp
udev tmpfs 20480 4 20476 1% /dev
tmpfs tmpfs 2097152 0 2097152 0% /dev/shm


# ll /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 Oct 19 19:39 7265a1af-9120-4bea-a824-2f884e9fe30c -> ../../sda1
lrwxrwxrwx 1 root root 11 Oct 19 19:39 b53f110b-a202-45d0-ac7a-ac6615507484 -> ../../zram0
lrwxrwxrwx 1 root root 10 Oct 19 19:39 ebca161b-33b0-4a6e-9c9c-cc5d1868f6ca -> ../../sda2

grub.cfg

menuentry 'Knoppix' {
insmod gzio
insmod part_msdos
insmod reiserfs

search --no-floppy --fs-uuid ebca161b-33b0-4a6e-9c9c-cc5d1868f6ca --set root
echo 'Loading Linux 3.4.9 ...'
linux /boot/vmlinuz-3.4.9 root=UUID=ebca161b-33b0-4a6e-9c9c-cc5d1868f6ca ro quiet
}

My target is to have a hot-swapable station. Hot-Swap works like a charm as the system us running. The problem is that after reboot it won't boot from USB because of mentioned error. From my POV looks like SATA/ATA(/USB?) are logically before the booting pendrive and at position hd(0,1) drive is not the one expected.

klaus2008
10-29-2012, 10:18 PM
I think that you should create an initial ramdisk with an init script that translates the UUID to the physical device. There is a program called mkinitramfs that can help you create such a ramdisk.

cj_tomekk
11-04-2012, 05:19 PM
Indeed that helped :-) Creating initrd.img with mentioned tool, removing the 'root' line, and changing kernels root= to use UUID. Now it swings. No the issue is that hdd list seems rebuilding every boot and when addtional drives are in, the booted one is not /dev/sda but gets later letters.