SliTaz SliTaz Forum

You are not logged in.

#1 2012-11-03 08:40:33

hallevison
Member
Registered: 2012-11-03
Posts: 5

Kernel panic during grub boot

Hi:

I have been using linux for many years, but have never tried to install it.  I am trying to install SliTaz from a live CD.  The OS boots fine from the CD, but I am having trouble when I try to booth it from a hard drive using grub.  In particular, this is what I get when the machine tries to boot.

--

   Booting command-list

root (hd0,0)

File system type is ext2fs, partition type 0x83

kernel /boot/vmlinuz-2.6.30.6-30.6-slitaz root=/dev/hda1 quiet

  [Linux-bzimage, setup=0x3000, size=0x21a850]

EXT3-fs: hda1: couldn't mount because of unsupported optional features (240).

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

--

Any ideas?

Thanks - Hal.

Offline

#2 2012-11-03 09:10:53

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: Kernel panic during grub boot

Hi,

1) What is filesystem type in your /dev/hda1? ext2 or ext3 or ext4?

2) Do you have /dev/hda1? Maybe, you'll try /dev/sda1 or use UUID?

[c]# blkid
...
/dev/sda1: LABEL="PQSERVICE" UUID="0159-6699"
...[/c]
In the menu.lst:

[c]...
root=UUID=0159-6699[/c]

Offline

#3 2012-11-03 15:19:22

hallevison
Member
Registered: 2012-11-03
Posts: 5

Re: Kernel panic during grub boot

Thanks for the quick reply.  I will try to answer your questions, but remember I am newbie.

My menu.lst is:

# For booting SliTaz from : /dev/hda1

#

title SliTaz GNU/Linux (cooking) (Kernel vmlinuz-2.6.30-slitaz)

root (hd0,0)

kernel /boot/vmlinuz-2.6.30.6-slitaz root=/dev/hda1 quiet

I am not using UUID. From what I have read it is better, but I cannot figure out how to make the initrd image. 

I am putting the new OS on an external 2.5" 500G drive (for now because I do not want to screw up the internal disk).  I wanted to make 6 partitions (so I can boot several OS's).  They were all formatted with mkfs.ext3.  When I put the disk on another machine, which is running FC15 btw, I get:

[root@marvin hal]# /sbin/fdisk -l

<deleted info about the main disk>

Disk /dev/sdb: 500.1 GB, 500107862016 bytes

255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x6214db7d

   Device Boot      Start         End      Blocks   Id  System

/dev/sdb1   *        2048      411647      204800   83  Linux

/dev/sdb2          411648   189155327    94371840    5  Extended

/dev/sdb3       189155328   193349631     2097152   82  Linux swap / Solaris

/dev/sdb4       193349632   976773167   391711768   83  Linux

/dev/sdb5          413696    63328255    31457280   83  Linux

/dev/sdb6        63330304   126244863    31457280   83  Linux

/dev/sdb7       126246912   189155327    31454208   83  Linux

When I mount  /dev/sdb1 and run df -T is get:

[root@marvin hal]# df -T | grep sdb

/dev/sdb1     ext3      198337     98582     89515  53% /media/027e0753-3be0-4c33-ac60-bb9bbb4af80b

and finally:

[root@marvin hal]# ls /media/027e0753-3be0-4c33-ac60-bb9bbb4af80b/boot/

grub  vmlinuz-2.6.30.6-slitaz

Does this help?

Offline

#4 2012-11-03 15:29:41

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: Kernel panic during grub boot

Try to change /dev/hda1 to /dev/sda1 in your menu.lst:

[c]kernel /boot/vmlinuz-2.6.30.6-slitaz root=/dev/sda1 quiet[/c]
or

[c]kernel /boot/vmlinuz-2.6.30.6-slitaz root=UUID=027e0753-3be0-4c33-ac60-bb9bbb4af80b quiet[/c]

Offline

#5 2012-11-03 16:06:08

hallevison
Member
Registered: 2012-11-03
Posts: 5

Re: Kernel panic during grub boot

Neither one of those worked.  However, I found a copy rootfs.gz on the CD.  I copied that to /boot/rootfs-2.6.30.6-slitaz.gz and changed my menu.lst to:

# For booting SliTaz from : /dev/hda1

#

title SliTaz GNU/Linux (cooking) (Kernel vmlinuz-2.6.30-slitaz)

root (hd0,0)

kernel /boot/vmlinuz-2.6.30.6-slitaz root=UUID=027e0753-3be0-4c33-ac60-bb9bbb4af80b quiet

initrd /boot/rootfs-2.6.30.6-slitaz.gz

and that works!  It is very slow though.  I guess it need to uncompress rootfs-2.6.30.6-slitaz.gz.  Can you think of any way around that?

Offline

#6 2012-11-03 16:14:30

hallevison
Member
Registered: 2012-11-03
Posts: 5

Re: Kernel panic during grub boot

Oops.  I was wrong.  It IS booting, but it is booting the OS from the CD image and does not see the new filesystem.  So, I am back where I was.

Offline

#7 2012-11-03 16:18:23

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: Kernel panic during grub boot

Are you installed SliTaz on your hard disk?

Do you have next folders & file on your hard disk partition /dev/hda1 (or /dev/sda1)?—

[c]bin    etc    init   media  proc   sbin   tmp    var
dev    home   lib    mnt    root   sys    usr[/c]
Can you start SliTaz LiveCD? Open terminal, became root (by typing su with password root), and start gparted. What GPartEd tell you about your hard drive, is it /dev/hda or /dev/sda?

Or, with fdisk -l

I can see, it tells you about sda. So why you use hda?

Offline

#8 2012-11-03 17:08:51

christophe
Member
Registered: 2011-04-17
Posts: 432

Re: Kernel panic during grub boot

Took me about 6 months to find a way around a similar problem

Add rootdelay=9 and make sure you address the right device (ie, i think from your config, sda1)

eg grub.list:

title SliTaz GNU/Linux (cooking) (Kernel vmlinuz-2.6.30-slitaz)

root (hd0,0)

kernel /boot/vmlinuz-2.6.30.6-slitaz root=/dev/sda1 rootdelay=9 quiet

If it does not work then switch back to hda1 and try again

if it works you may have to manually adjust /etc/fstab for /home

Offline

#9 2012-11-03 17:18:23

hallevison
Member
Registered: 2012-11-03
Posts: 5

Re: Kernel panic during grub boot

That worked, Christophe.  Thanks.  Indeed, thanks to both of you!

Offline

#10 2012-11-03 18:12:55

christophe
Member
Registered: 2011-04-17
Posts: 432

Re: Kernel panic during grub boot

happy to hear that, thanks for the feedback.

We should really document somewhere that with external disks some rootdelay parameter is required....

Offline

#11 2012-11-04 06:41:22

gdesilva
Member
Registered: 2011-04-07
Posts: 419

Re: Kernel panic during grub boot

@christophe, this is already documented in

http://doc.slitaz.org/en:handbook:installation

under Installing SliTaz on an USB Device section.

Offline

#12 2012-11-04 15:48:38

christophe
Member
Registered: 2011-04-17
Posts: 432

Re: Kernel panic during grub boot

Good point. That makes me wonder if we could improve the documentation here.

Or better probably just add the rootdelay by default in config.lst (it does not hurt if not needed...)

I have not renewed my registration to update the doc since the site changed  a while ago but will consider doing it wink

Offline

#13 2012-11-04 16:24:07

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: Kernel panic during grub boot

Hi Christophe,

better probably just add the rootdelay by default

Please, compare:

Boot in 10 seconds or less on a very recent machine

[SliTaz 4.0 Release Notes]

Ten seconds to booting + ten seconds to waiting usb drive.

Offline

#14 2012-11-05 00:58:56

christophe
Member
Registered: 2011-04-17
Posts: 432

Re: Kernel panic during grub boot

Did you actually compare it ?

I have not tried it recently, but it seemed to me from what i remember the rootdelay get shortened once the device is mounted (ie, it DOES NOT add 10s delay, just the time required, if any)

Offline

#15 2012-11-05 01:07:39

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: Kernel panic during grub boot

Oh, thank you, Christophe.

Not, actually I not compared. Sorry. Only I remember real 6 s delay in the 3.0. Don't know if it was rootdelay or another sort of delay in waiting for usb device.

If so like you say, then it does no harm.

Offline

#16 2012-11-06 16:52:16

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: Kernel panic during grub boot

Interesting code chunk from /etc/init.d/bootopts.sh:

[c]home=*)
    # Check for a specified home partition (home=*) and check for
    # user home dir. Note: home=usb is a shorter and easier way to
    # have home=/dev/sda1.
    DEVICE=${opt#home=}
    [ "$DEVICE" = "usb" ] && DEVICE="$(usb_device)1"
    echo "Home has been specified to $DEVICE..."
    DEVID=$(/sbin/blkid | sed 'p;s/"//g' | fgrep "$DEVICE" | sed 's/:.*//;q')
    if [ -z "$DEVID" ]; then
        USBDELAY=$(cat /sys/module/usb_storage/parameters/delay_use)
        USBDELAY=$((2+$USBDELAY))
        echo "Sleeping $USBDELAY s to let the kernel detect the device... "
        sleep $USBDELAY
    fi[/c]
Appears that this is not enough?

Offline

#17 2012-11-07 17:39:07

christophe
Member
Registered: 2011-04-17
Posts: 432

Re: Kernel panic during grub boot

why do you say this is or may not be enough ?

Offline

#18 2012-11-07 17:43:45

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: Kernel panic during grub boot

Nevermind.

We have automatic calculated delay when home mounted to USB, but have no similar code for root.

And I told you earlier about this delay. I see that is not what we need. Once again, my apologies.

Offline

#19 2012-11-09 19:15:13

christophe
Member
Registered: 2011-04-17
Posts: 432

Re: Kernel panic during grub boot

okay i can see a "true" sleep here.

I understand where you are coming from.

I think rootdelay works differently (this is part of grub by the way, not specific to slitaz)

Here I did not notice any difference between a rootdelay of 2 or 9, but i did not measure that either (though i tested both values).

I was booting from a usb disk which mounts pretty fast (but not as fast as to bypass any rootdelay).

I assumed grub was smart enough to just boot once it sees the device, even if it was instructed for some higher rootdelay...

But this is just an assumption on my side

I do not think modifying bootops would be of any help (unless i am wrong, the boot device is already mounted once it executes) but to add a default rootdelay of 6 or 9 when installing grub would make sense, just in case slitaz gets installed on an external disk.

And, of course, no need to apologize (if any such clarification was required)...

Offline

#20 2012-11-25 19:34:01

christophe
Member
Registered: 2011-04-17
Posts: 432

Re: Kernel panic during grub boot

@ Aleksej,

Well actually i did  a formal test this week end after another (related) discussion on this forum, and the rootdelay does not time out, you were right it mathematically adds waiting time.

I did not notice that because I set it to 4 seconds, and booting from my USB disk takes 13 seconds (instead of 9 seconds for my  sata drive).

That delay is real, but not significant enough that I would considered being betrayed by Slitaz'development team with a default 4s root delay (13s is I believe still faster than any other OS I have been booting on that machine)

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.016 seconds, 7 queries executed - Memory usage: 1.57 MiB (Peak: 1.77 MiB) ]