LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-14-2004, 01:30 AM   #1
daigoro_cub
LQ Newbie
 
Registered: Sep 2004
Distribution: fedora core2
Posts: 3

Rep: Reputation: 0
kernel panic, grub and fdisk


Hey!
(Don't mind the english, it's not my first language...)

After solving many problems with help from forums like this one, i'm stuck with one problem i can't solve. Help please!!
So... the error message on boot is something like:

creating root device
mkrootdev: label /dev/hda6/ not found
mounting root fileystem
mount: error 2 mounting ext3
pivotroot: pivot_root(/sysroot, /sysroot/initrd fayled:2)
umount /initrd/proc fayled:2
freeing unused kernel memory: 144K freed
Kernel Panic 'Try passing init = option to kernel'

When i reboot the computer and press 'c' on grub, i manually load kernel and initrd with:

grub> kernel /boot/vmlinuz-2.6.5-1.358 root=/dev/hda6
grub> initrd /boot/initrd-2.6.5-1.358.img root=/dev/hda6
grub> boot

And it boots perfecly! Why does that happen when my grub.conf is:

#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,5)/boot/grub/splash.xpm.gz
title Fedora Core (2.6.5-1.358)
root (hd0,6)
kernel /boot/vmlinuz-2.6.5-1.358 ro root=LABEL=/dev/hda6/ rhgb quiet
initrd /boot/initrd-2.6.5-1.358.img root=/dev/hda6/
title WindowsXP
rootnoverify (hd0,0)
chainloader +1

After making changes to grub.conf I do:

/sbin/grub-install /dev/hda

with this output:

Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

# this device map was generated by anaconda
(fd0) /dev/fd0
(hd0) /dev/hda

It all started when I tried to format an empty partition with this result by fdisk:

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1020 8193118+ 7 HPFS/NTFS
/dev/hda2 1021 9729 69955042+ f W95 Ext'd (LBA)
/dev/hda5 1021 8924 63488848+ 83 Linux
/dev/hda6 8925 9601 5437971 83 Linux
/dev/hda7 9602 9728 1020096 82 Linux swap

And that's it! When i boot the computer, it stalls with the kernel-panic message. I have to reboot it and load kernel and initrd manually.

Help! Thanks!

daigoro_cub
 
Old 09-14-2004, 01:44 AM   #2
greg108
Member
 
Registered: Aug 2003
Location: CA USA
Distribution: FC2, FC4, Mandrake 10, Slackware 10, RedHat 9, Suse 9.1, College Linux, Debian Sarge, Gentoo
Posts: 170

Rep: Reputation: 30
Why don't you edit your grub.conf the same way you give commands manually. Without 'boot'.
It has to work.
 
Old 09-14-2004, 01:49 AM   #3
aiza
LQ Newbie
 
Registered: Jul 2004
Posts: 18

Rep: Reputation: 0
Re: kernel panic, grub and fdisk

Quote:
Originally posted by daigoro_cub
Hey!
(Don't mind the english, it's not my first language...)

After solving many problems with help from forums like this one, i'm stuck with one problem i can't solve. Help please!!
So... the error message on boot is something like:

creating root device
mkrootdev: label /dev/hda6/ not found
mounting root fileystem
mount: error 2 mounting ext3
pivotroot: pivot_root(/sysroot, /sysroot/initrd fayled:2)
umount /initrd/proc fayled:2
freeing unused kernel memory: 144K freed
Kernel Panic 'Try passing init = option to kernel'

When i reboot the computer and press 'c' on grub, i manually load kernel and initrd with:

grub> kernel /boot/vmlinuz-2.6.5-1.358 root=/dev/hda6
grub> initrd /boot/initrd-2.6.5-1.358.img root=/dev/hda6
grub> boot

And it boots perfecly! Why does that happen when my grub.conf is:

#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,5)/boot/grub/splash.xpm.gz
title Fedora Core (2.6.5-1.358)
root (hd0,6)
kernel /boot/vmlinuz-2.6.5-1.358 ro root=LABEL=/dev/hda6/ rhgb quiet
initrd /boot/initrd-2.6.5-1.358.img root=/dev/hda6/
title WindowsXP
rootnoverify (hd0,0)
chainloader +1

After making changes to grub.conf I do:

/sbin/grub-install /dev/hda

with this output:

Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

# this device map was generated by anaconda
(fd0) /dev/fd0
(hd0) /dev/hda

It all started when I tried to format an empty partition with this result by fdisk:

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1020 8193118+ 7 HPFS/NTFS
/dev/hda2 1021 9729 69955042+ f W95 Ext'd (LBA)
/dev/hda5 1021 8924 63488848+ 83 Linux
/dev/hda6 8925 9601 5437971 83 Linux
/dev/hda7 9602 9728 1020096 82 Linux swap

And that's it! When i boot the computer, it stalls with the kernel-panic message. I have to reboot it and load kernel and initrd manually.

Help! Thanks!

daigoro_cub
Replace:
kernel /boot/vmlinuz-2.6.5-1.358 ro root=LABEL=/dev/hda6/ rhgb quiet
With:
kernel /boot/vmlinuz-2.6.5-1.358 ro root=/dev/hda6 rhgb quiet

Last edited by aiza; 09-14-2004 at 02:02 AM.
 
Old 09-14-2004, 01:54 AM   #4
MartinN
Member
 
Registered: Nov 2003
Location: Ronneby, Sweden
Posts: 555

Rep: Reputation: 30
Hi!

Try changing this line:
kernel /boot/vmlinuz-2.6.5-1.358 ro root=LABEL=/dev/hda6/ rhgb quiet
to this:
kernel /boot/vmlinuz-2.6.5-1.358 ro root=/dev/hda6/ rhgb quiet

Martin
 
Old 09-14-2004, 10:13 AM   #5
daigoro_cub
LQ Newbie
 
Registered: Sep 2004
Distribution: fedora core2
Posts: 3

Original Poster
Rep: Reputation: 0
Thank you for your help!

But nothing solved the problem.
I am changing 'grub.conf' and then I do '/sbin/grub-install /dev/hda'. Is something wrong with that?
After removing the 'LABEL' part, the kernel message poped even faster on screen. (lol!)

So... help still needed.

daigoro_cub
 
Old 09-14-2004, 03:15 PM   #6
daigoro_cub
LQ Newbie
 
Registered: Sep 2004
Distribution: fedora core2
Posts: 3

Original Poster
Rep: Reputation: 0
problem solved!!

It works! I changed 'grub.conf' to it's -almost- original configuration (before i started to mess around with fdisk) and it works! IT WORKS!!
Here is the final grub.conf:

#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,5)/boot/grub/splash.xpm.gz
title Fedora Core (2.6.5-1.358)
root (hd0,5)
kernel /boot/vmlinuz-2.6.5-1.358 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.5-1.358.img
title WindowsXP
rootnoverify (hd0,0)
chainloader +1

The major difference is in 'root=/LABEL=/'. I was complicating with too mutch arguments. The 'initrd' doesn't even get anything with 'root=' in it.
Thanks for all the help!

daigoro_cub
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub = Kernel panic iirish Linux - Newbie 4 04-22-2005 10:11 AM
Grub Kernel Panic CloudBuilder Linux - General 3 02-07-2005 06:11 PM
Grub w/ Gentoo 2.6.3 - Kernel Panic smehi Linux - Newbie 3 03-22-2004 12:39 AM
Kernel panic after editing grub bruno buys Linux - Newbie 2 12-02-2003 10:43 AM
Grub.conf - Kernel Panic. liguorir Linux - Software 2 06-29-2003 02:03 PM


All times are GMT -5. The time now is 04:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration