PDA

View Full Version : editing boot.img and miniroot.gz kernel panic



loonix
01-01-2008, 10:24 PM
Hi

I want to have knoppix start of a usb flashdrive.

When linuxrc is looking for the KNOPPIX filesystem it fails to detect it in the /KNOPPIX/ folder on the flashdrive

I tried to edit the linuxrc located in the miniroot.gz to just have it look in /dev/sda1.

I am using grub and have grub call the boot.img which allows me to boot the same way I boot off of the CD.

I edited the linuxrc file using the loop mount method for both boot.img and miniroot.gz

However when trying to boot using the modified linuxrc I am getting the follwing error:


Kernel panic: VFS: Unable to mount root fs on 03:01
I am wondering if it has to do that I am screwing up the boot.img file by editing inside the loop?

Are there any other ways of doing this?

Thanks

AR

loonix
01-03-2008, 05:32 AM
Ok, I modified my boot sequence and have grub call the kernel and minirt.gz instead of the cds boot.img

I edited the linuxrc in minirt.gz using the loop mount method and am now getting the following error:

Kernel panic: VFS: Unable to mount root fs on unknown-block
Not sure why?

Anybody any ideas?

Thanks

AR

BjoKa
04-09-2008, 09:08 AM
Hi!

I run into similar trouble like the previous poster.

I tried to remaster the Knoppix-5.1 CD, following the instruction at http://www.knoppix.net/wiki/Knoppix_Remastering_Howto

using the original /cdrom/KNOPPIX/KNOPPIX file and the original /cdrom/boot/isolinux/minirt.gz I can create a new bootable CD image. but as soon as I change anything in minirt.gz, the resulting CD stops after loading the kernel with a panic: "unable to mount root fs at unknown-block (1,3)"

I did the following to modify minirt.gz (everything in my remaster-copy of boot/isolinux):
- gzip -d minirt.gz
- losetup /dev/loop2 minirt
- mount /dev/loop2 /mnt2
- ... some editing of linuxrc
- sync
- unmount /mnt2
- losetup -d /dev/loop2
- gzip minirt

next, created the bootable iso image as shown on the wiki: "mkisofs -pad -l -r -J -v -V "KNOPPIX" -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -hide-rr-moved -o ${destfile} ${masterdir}"

What else is required to produce a ramdisk, which can be loaded by isolinux + kernel?

Thanks.

BjoKa
04-09-2008, 03:21 PM
Sorry for following up on myself, but some more insight:

By booting with "vga=normal loglevvel=9" I got the following more statements from the booting kernel:


RAMDISK: compressed image found at block 0
EXT2-fs warning: checktime reached, running e2fsck is recommended
VFS: mounted root (ext2 filesystem)
No filesystem could mount root, tried: reiserfs ext3 ext2 msdos vfat iso9660 fuseblk
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,3)


The third and fourth lines seem to contradict each other. Can anyone shed some light on what is going on here?

Does this mean, that my modified linuxrc is not executable / dies prematurely?
Or does it never get to the point of running linuxrc? I guess the last, because there is no output of linuxrc at all. But still I have no clue whats is wrong.


BjoKa

naerdinsul
04-10-2008, 08:32 PM
I was havin' the same issue. I found a solution else where on the board:

http://www.knoppix.net/forum/viewtopic.php?p=113378

It seems that if you edit the file using nano, it'll try to convert it automagically between different formats. Solved my issue. Hope it helps you too!

BjoKa
04-14-2008, 03:11 PM
Thanks very much, that solved my problem!

For some reason, nano had changed all "\n" to "\r", which prevented the execution of linuxrc.
But be careful:
Using tr to change things back failed, because there is one line, which is supposed to have an embedded "\r" in a variable definition. Changing this one into "\n" creates another syntax error.