Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 65741 - grub boot "Error 17" with grub installed on /dev/hda2
Summary: grub boot "Error 17" with grub installed on /dev/hda2
Status: RESOLVED WORKSFORME
Alias: None
Product: [OLD] Docs-user
Classification: Unclassified
Component: Gentoo Linux x86 Installation Guide (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: Docs Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-28 16:55 UTC by Attila Stehr
Modified: 2004-10-11 06:40 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Attila Stehr 2004-09-28 16:55:18 UTC
further information shown under "Steps to Reproduce"

Reproducible: Always
Steps to Reproduce:
livecd root # df
Filesystem           1K-blocks      Used Available Use% Mounted on
tmpfs                   159936     74112     85824  47% /
/newroot/dev/cdroms/cdrom0
                        619368    619368         0 100% /mnt/cdrom
/dev/loop/0              71104     71104         0 100% /mnt/livecd
/dev/hdc1                93307     23902     64588  28% /mnt/gentoo
/dev/hda2                31722        13     30059   1% /mnt/gentoo/boot
/dev/hdb1              2083468   1655128    322504  84% /mnt/gentoo/usr
/dev/hdb2              1034276    151524    830212  16% /mnt/gentoo/opt
/dev/hdc2              1035692     33108    949972   4% /mnt/gentoo/tmp
/dev/hdc4            109321408    653576 103114564   1% /mnt/gentoo/home
/dev/hdc5              2071384    152504   1813656   8% /mnt/gentoo/var
/dev/hdc6              1035660     54584    928468   6% /mnt/gentoo/var/log
/dev/hdc7              1035660     32844    950208   4% /mnt/gentoo/var/spool
/dev/hdc8               806368     16432    748972   3% /mnt/gentoo/backup
/dev/sda1              2063504     54480   1904204   3% /mnt/gentoo/var/db
/dev/sdb1              1058648     32856   1025792   4% /mnt/gentoo/home/httpd

--------------------------------------------------

livecd / # fdisk -l /dev/hda

Disk /dev/hda: 428 MB, 428067840 bytes
15 heads, 62 sectors/track, 899 cylinders
Units = cylinders of 930 * 512 = 476160 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1         828      384989   83  Linux
/dev/hda2   *         829         899       33015   83  Linux

--------------------------------------------------

livecd / # emerge grub
Calculating dependencies ...done!
>>> emerge (1 of 1) sys-boot/grub-0.94-r1 to /
>>> md5 src_uri ;-) grub-0.94.tar.gz
>>> md5 src_uri ;-) grub-0.94-splash.patch.bz2
>>> Unpacking source...
[...]

--------------------------------------------------

livecd / # ll /boot/
total 2125
drwxr-xr-x   4 root root    1024 Sep 29 03:02 .
drwxr-xr-x  19 root root    1024 Sep 17 23:07 ..
-rw-r--r--   1 root root  661136 Sep 29 03:02 System.map-2.4.26-gentoo-r9
-rw-r--r--   1 root root   24768 Sep 29 03:02 config-2.4.26-gentoo-r9
drwxr-xr-x   2 root root    1024 Sep 29 02:58 grub
-rw-r--r--   1 root root 1460780 Sep 29 03:01 kernel-2.4.26-gentoo-r9
drwx------   2 root root   12288 Sep 29 02:51 lost+found

----------------------------------------------

livecd / # ll /boot/grub/
total 847
drwxr-xr-x  2 root root   1024 Sep 29 03:05 .
drwxr-xr-x  4 root root   1024 Sep 29 03:02 ..
-rw-r--r--  1 root root  11264 Sep 29 02:58 e2fs_stage1_5
-rw-r--r--  1 root root  10256 Sep 29 02:58 fat_stage1_5
-rw-r--r--  1 root root   9216 Sep 29 02:58 ffs_stage1_5
-rw-r--r--  1 root root    340 Sep 29 03:06 grub.conf
-rw-r--r--  1 root root   1495 Sep 29 02:58 grub.conf.sample
-rw-r--r--  1 root root  11456 Sep 29 02:58 jfs_stage1_5
lrwxrwxrwx  1 root root      9 Sep 29 02:58 menu.lst -> grub.conf
-rw-r--r--  1 root root   9600 Sep 29 02:58 minix_stage1_5
-rwxr-xr-x  1 root root 196836 Sep 29 02:58 nbgrub
-rwxr-xr-x  1 root root 197860 Sep 29 02:58 pxegrub
-rw-r--r--  1 root root  12864 Sep 29 02:58 reiserfs_stage1_5
-rw-r--r--  1 root root  33856 Sep 29 02:58 splash.xpm.gz
-rw-r--r--  1 root root    512 Sep 29 02:58 stage1
-rw-r--r--  1 root root 135148 Sep 29 02:58 stage2
-rwxr-xr-x  1 root root 196900 Sep 29 02:58 stage2.netboot
-rw-r--r--  1 root root   8896 Sep 29 02:58 vstafs_stage1_5
-rw-r--r--  1 root root  12840 Sep 29 02:58 xfs_stage1_5

----------------------------------------------

livecd / # cat /boot/grub/grub.conf
# this entry should be booted usually:
default 0

# timeout untill standard entry (above) is run
timeout 5

# location of background image
splashimage=(hd0,1)/grub/splash.xpm.gz

# name of entry (!use kernel version!)
title=Gentoo Linux 2.4.26-r9
# place of /boot
root (hd0,1)
# place of kernel image
kernel (hd0,1)/kernel-2.4.26-gentoo-r9 root=/dev/hdc1 vga=789

----------------------------------------------

livecd / # cp /proc/mounts /etc/mtab
cp: overwrite `/etc/mtab'? y

livecd / # cd /boot && ln -s . boot

livecd boot # ll
total 2125
drwxr-xr-x   4 root root    1024 Sep 29 03:12 .
drwxr-xr-x  19 root root    1024 Sep 17 23:07 ..
-rw-r--r--   1 root root  661136 Sep 29 03:02 System.map-2.4.26-gentoo-r9
lrwxrwxrwx   1 root root       1 Sep 29 03:12 boot -> .
-rw-r--r--   1 root root   24768 Sep 29 03:02 config-2.4.26-gentoo-r9
drwxr-xr-x   2 root root    1024 Sep 29 03:05 grub
-rw-r--r--   1 root root 1460780 Sep 29 03:01 kernel-2.4.26-gentoo-r9
drwx------   2 root root   12288 Sep 29 02:51 lost+found

----------------------------------------------

livecd boot # grub-install --root-directory=/boot /dev/hda
Probing devices to guess BIOS drives. This may take a long time.
Installation finished. No error reported.
This is the contents of the device map /boot/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'.

(fd0)   /dev/fd0
(hd0)   /dev/hda
(hd1)   /dev/hdb
(hd2)   /dev/hdc
(hd3)   /dev/sda
(hd4)   /dev/sdb

===REBOOT===>

GRUB Loading stage1.5.

GRUB loading, please wait...
Error 17

(system halts but CRTL-ALT-DEL possible)

===NEXT TRY: MANUAL INSTALL===>

    GNU GRUB  version 0.94  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename. ]

grub> root (hd0,1)
 Filesystem type is ext2fs, partition type 0x83

grub> find /boot/kernel-2.4.26-gentoo-r9
 (hd0,1)

grub> setup (hd0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  22 sectors are embedded.
succeeded
 Running "install /boot/grub/stage1 (hd0) (hd0)1+22 p (hd0,1)/boot/grub/stage2 /boot/grub/menu.lst"... 

succeeded
Done.

grub> setup (hd0,1)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0,1)"... failed (this is not fatal)
 Running "embed /boot/grub/e2fs_stage1_5 (hd0,1)"... failed (this is not fatal)
 Running "install /boot/grub/stage1 (hd0,1) /boot/grub/stage2 p /boot/grub/menu.lst "... succeeded
Done.

grub>

===REBOOT=============================>

GRUB Loading stage1.5.

GRUB loading, please wait...
Error 17

(system halts but CRTL-ALT-DEL possible)


Expected Results:  
grub should boot the kernel

workaround:

Works for me if I use /dev/hda1 as /boot and /dev/hda2 as SWAP.

Please mention that it's NOT posible to make grub run in an OTHER partition than
the first one even if that (other) partition is bootable.
Comment 1 Attila Stehr 2004-09-28 17:43:46 UTC
Using "cd /boot && ln -s . boot" as mentioned on http://www.gnu.org/software/grub/grub-faq.html#q11 doesn't help as well.

I didn't expect it to, because hda2 was ext2 and grub-online-docs say:

> 17 : Cannot mount selected partition
>    This error is returned if the partition requested exists, but the _filesystem type_cannot_be_recognized_ by GRUB. 

see http://www.gnu.org/software/grub/manual/grub.html#Stage2%20errors
Comment 2 Sven Vermeulen (RETIRED) gentoo-dev 2004-10-10 08:07:44 UTC
I can't reproduce this; my VMWare installation allows grub on /dev/hda2 just fine.
There are lots of users who have their boot partition elsewhere than (hd0,0). Just skim through the forums.

You might want to put this on http://savannah.gnu.org/bugs/?group=grub if you want to persue.
Comment 3 Attila Stehr 2004-10-11 06:40:43 UTC
thx for checking
well, whatever: I use (hd0,0) now ...