LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Unable to mount root fs on unknown-block(8,10) (https://www.linuxquestions.org/questions/linux-from-scratch-13/unable-to-mount-root-fs-on-unknown-block-8-10-a-908566/)

helen23 10-17-2011 06:57 AM

Unable to mount root fs on unknown-block(8,10)
 
hi. i've just completed the lfs and am going through the blfs and this is the first problem i have had (albeit a big problem :p).

i used ubuntu 10.10 as a host (which i'm on now).

i added the entry for my lfs by running a "grub-update" in my ubuntu (home) system. it added the entry but when i load it i get the error
kernel panic unable to mount root fs on unknown-block(8,10)

here is a list of partitions

root@helen-ubunntu:~# fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x8cdd4106

Device Boot Start End Blocks Id System
/dev/sda1 1 25190 202334278 7 HPFS/NTFS
/dev/sda2 * 25190 25203 102400 7 HPFS/NTFS
/dev/sda3 25203 121602 774322177 5 Extended
/dev/sda5 25203 49691 196701773 7 HPFS/NTFS
/dev/sda6 49691 75188 204800000 83 Linux
/dev/sda7 75188 76208 8192000 82 Linux swap / Solaris
/dev/sda8 76208 77483 10240000 83 Linux
/dev/sda9 77483 77610 1024000 82 Linux swap / Solaris
/dev/sda10 77610 80160 20480000 83 Linux
/dev/sda11 80160 80670 4096000 82 Linux swap / Solaris
root@helen-ubunntu:~#


here is the grub.cfg file located in /boot/grub

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
set saved_entry=${prev_saved_entry}
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z ${boot_once} ]; then
saved_entry=${chosen}
save_env saved_entry
fi
}
insmod ext2
set root='(hd0,10)'
search --no-floppy --fs-uuid --set cf4aad78-b3e4-4018-b928-df8452caf488
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "GNU/Linux, with Linux 2.6.37.2-lfs-6.8" --class gnu-linux --class gnu --class os {
insmod ext2
set root='(hd0,10)'
search --no-floppy --fs-uuid --set cf4aad78-b3e4-4018-b928-df8452caf488
echo Loading Linux 2.6.37.2-lfs-6.8 ...
linux /boot/vmlinux-2.6.37.2-lfs-6.8 root=/dev/sda10 ro
}
menuentry "GNU/Linux, with Linux 2.6.37.2-lfs-6.8 (recovery mode)" --class gnu-linux --class gnu --class os {
insmod ext2
set root='(hd0,10)'
search --no-floppy --fs-uuid --set cf4aad78-b3e4-4018-b928-df8452caf488
echo Loading Linux 2.6.37.2-lfs-6.8 ...
linux /boot/vmlinux-2.6.37.2-lfs-6.8 root=/dev/sda10 ro single
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda2)" {
insmod ntfs
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 52e21b18e21affc1
chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###


here is the same file in my ubuntu system

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}

function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}

function load_video {
insmod vbe
insmod vga
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 3de884c9-6859-4ef4-b298-69d15987fbab
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 3de884c9-6859-4ef4-b298-69d15987fbab
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.35-30-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 3de884c9-6859-4ef4-b298-69d15987fbab
linux /boot/vmlinuz-2.6.35-30-generic-pae root=UUID=3de884c9-6859-4ef4-b298-69d15987fbab ro quiet splash
initrd /boot/initrd.img-2.6.35-30-generic-pae
}
menuentry 'Ubuntu, with Linux 2.6.35-30-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 3de884c9-6859-4ef4-b298-69d15987fbab
echo 'Loading Linux 2.6.35-30-generic-pae ...'
linux /boot/vmlinuz-2.6.35-30-generic-pae root=UUID=3de884c9-6859-4ef4-b298-69d15987fbab ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-30-generic-pae
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 3de884c9-6859-4ef4-b298-69d15987fbab
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 3de884c9-6859-4ef4-b298-69d15987fbab
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "GNU/Linux, with Linux 2.6.37.2-lfs-6.8 (on /dev/sda10)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos10)'
search --no-floppy --fs-uuid --set cf4aad78-b3e4-4018-b928-df8452caf488
linux /boot/vmlinux-2.6.37.2-lfs-6.8 root=/dev/sda10 ro
}
menuentry "GNU/Linux, with Linux 2.6.37.2-lfs-6.8 (recovery mode) (on /dev/sda10)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos10)'
search --no-floppy --fs-uuid --set cf4aad78-b3e4-4018-b928-df8452caf488
linux /boot/vmlinux-2.6.37.2-lfs-6.8 root=/dev/sda10 ro single
}
menuentry "Windows 7 (loader) (on /dev/sda2)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set 52E21B18E21AFFC1
chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###


i might be missing some relevant information, please let me know if thats the case :study:

White Tea Citrus 10-18-2011 06:57 AM

Hello!

It seems to me that grub is doing fine and I think I had the same problem a year ago, I suggest you place the bzImage into your root directory.

Another suggestion is for you to check for errors in /etc/fstab, and could you $ cat /etc/fstab as well as $ sudo fdisk -l to a reply here?

helen23 10-18-2011 07:16 AM

I dug around a bit more and I think it's not actually to do with grub2 at all but rather related to incorrect kernel config parameters. I think im lacking an ext2 file system driver, amongst other things. What are the correct parameters to pass to the kernel for compilation?

White Tea Citrus 10-18-2011 07:38 AM

Here is a nice how-to which I used to compile my kernel and I succeeded with that:

http://www.gentoo.org/doc/en/handbook/index.xml


However I think that posting cat /etc/fstab as well as sudo fdisk -l of your maybe-soon-to-be-true gnu/LFS might pay for the effort.

White Tea Citrus 10-18-2011 07:44 AM

Quote:

Originally Posted by White Tea Citrus (Post 4501428)

I mean: For finding your architecture and clicking on "7. Configuring the kernel"

helen23 10-18-2011 07:55 AM

thanks a lot White Tea Citrus.

nice user name btw :)

White Tea Citrus 10-19-2011 12:36 AM

Thank You


All times are GMT -5. The time now is 09:34 AM.