Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I am trying to get GRUB working on my computer so I can use different versions of the Linux kernel on boot. I have previously been using a floppy disk to boot up. I installed the GRUB debian package and ran grub-install to install grub, upon booting, I was presented with Error 17, which means cannot mount selected partition. I decided to create a GRUB boot disk to see if I could figure things out. Here is what happens in GRUB when I try to load my menu.lst file to boot up.
grub> root (hd0,2)
Unrecognized file system. Partition type 0x83
grub> configfile (hd0,2)/boot/menu.lst
Cannot mount selected partition
I have no idea why I'm getting that error, if I run GRUB from the shell, I can run the above commands and after I rn the configfile command, I am presented with a text-based menu and a list of my kernels that I have set up in menu.lst, upon selecting one, I am returned to the shell. I think it may be something in my config file, but I don't know what it could be. If someone could point me in the right direction, I would greatly appreciate it. Thanks.
Here is the output of fdisk -l
Disk /dev/hda: 40.0 GB, 40020664320 bytes
128 heads, 63 sectors/track, 9693 cylinders
Units = cylinders of 8064 * 512 = 4128768 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 24 96736+ 83 Linux
/dev/hda2 9601 9693 374976 82 Linux swap
/dev/hda3 * 25 9600 38610432 83 Linux
Partition table entries are not in disk order
Sorry about the formatting, there isnt a [code] tag that I know of, so the formatting got messed up
Mon Sep 06 10:43 PM root@uilleann ~ # fdisk -l
Disk /dev/hdc: 40.0 GB, 40037760000 bytes
255 heads, 63 sectors/track, 4867 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdc1 * 1 4867 39094146 c Win95 FAT32 (LBA)
Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 1215 9755991 c Win95 FAT32 (LBA)
/dev/hda2 1215 2429 9751455 7 HPFS/NTFS
/dev/hda3 2429 2446 140017+ 83 Linux
/dev/hda4 2447 4865 19430617+ 5 Extended
/dev/hda5 2447 2516 562243+ 83 Linux
/dev/hda6 2517 3368 6843658+ 83 Linux
/dev/hda7 3369 3795 3429846 83 Linux
/dev/hda8 3796 4222 3429846 83 Linux
/dev/hda9 4223 4865 5164866 83 Linux
Disk /dev/hdb: 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/hdb1 * 1 9729 78148161 83 Linux
I forgot to mention that you should also post your /boot/grub/grub.conf file:
Code:
# Duron 950 uilleann /boot/grub/grub.conf file
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,2)
# kernel /vmlinuz-version ro root=/dev/hda7
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,2)/grub/splash.xpm.gz
title Fedora Core 1 kernel-2.4.22-1.2115.nptl
root (hd0,2)
kernel /vmlinuz-2.4.22-1.2115.nptl ro root=LABEL=/ hdd=ide-scsi rhgb
initrd /initrd-2.4.22-1.2115.nptl.img
title Gentoo Sources Linux
root (hd0,2)
kernel (hd0,2)/boot/kernel-2.4.26-gentoo-r9 root=/dev/hda6 hdd=ide-scsi
title Gentoo Gaming Linux
root (hd0,2)
kernel (hd0,2)/boot/gaming-bzImage root=/dev/hda6 hdd=ide-scsi
title Gentoo Dev Sources Linux
root (hd0,2)
kernel (hd0,2)/boot/dev-bzImage root=/dev/hda6 hdd=ide-scsi
title Microsoft Windows
rootnoverify (hd0,0)
chainloader +1
>fdisk -l
Disk /dev/hda: 40.0 GB, 40020664320 bytes
128 heads, 63 sectors/track, 9693 cylinders
Units = cylinders of 8064 * 512 = 4128768 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 24 96736+ 83 Linux
/dev/hda2 9601 9693 374976 82 Linux swap
/dev/hda3 * 25 9600 38610432 83 Linux
Partition table entries are not in disk order
Code:
>cat /boot/grub/menu.lst
#
# Sample boot menu configuration file
#
# Boot the first entry
default 0
# Boot automatically after 30 seconds
timeout 30
# Fallback to the second entry
fallback 1
# Linux 2.2.20-idepci
title Linux_2.2.20-idepci
kernel (hd0,2)/boot/vmlinuz-2.2.20-idepci root=(hd0,2)
# Linux 2.4.25-1
title Linux_2.4.25-1
kernel (hd0,2)/boot/vmlinuz-2.4.25-1-386 root=(hd0,2)
# Linux 2.6.8.1
title Linux_2.6.8.1
kernel (hd0,2)/boot/vmlinuz-2.6.8.1-20040816 root=(hd0,2)
UPDATE: I installed grub onto a floppy disk, and was able to get the menu showing my kernels that I set up in menu.lst, yet I still get error 17 when I try to boot with any of them. Could this be a permission issue? I tried (hd0,0) (hd0,1) (hd,2) for the kernel boot command, and all three returned error 17. It sounds more like a permission issue now.
What other files have you got in /boot/grub? Grub will give the error 17 message if it can't recognise the filesystem. I had a run in with it about a fortnight ago when I moved to Reiser4. Your root filesytem is ext2 so the minimum you need are the files stage1, stage2 and e2fs_stage1_5. Copy them from /usr/share/grub/i386-pc (if that's your architecture) to /boot/grub. I would just copy all the files as it won't do any harm. I hope this helps. Sorry if it doesn't. Good luck.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.