LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Grub won't load! error 17 (https://www.linuxquestions.org/questions/linux-newbie-8/grub-wont-load-error-17-a-283660/)

mcgoon 01-29-2005 08:16 AM

Grub won't load! error 17
 
Hi all,

Once again I've managed to screw things up. :(
I run a dual boot with win2000 and fc2 and was resizing and moving my partitions.

Everything was going well until I moved my boot partition!
Now when I start up the computer, I get the following message:

Grub loading stage1.5

Grub loading, please wait...
Error 17

So I ran linux rescue using the 1st fc2 disc and then chroot /mnt/sysimage.
I tried to run /sbin/grub-install /dev/hda but then got this error:

The file /boot/grub/stage1 not read correctly

So I'm lost now. The grub-install function has always worked for me in the past so I don't know what I'm doing wrong.

Help please... at the moment my computer is unusable! (or unbootable for that matter)

masand 01-29-2005 08:19 AM

where is ur /boot partiton??? and files

post ur grub.conf as well

regards

mcgoon 01-29-2005 08:37 AM

my boot partition should be /dev/hda5

if i fdisk -l , i get something along the lines of:
Device Boot Type
/dev/hda1 * HPFS/NTFS
/dev/hda2 W95 Ext'd (LBA)
/dev/hda5 Linux
/dev/hda6 Linux
/dev/hda7 Linux Swap


and my grub.conf reads:

#boot=/dev/hda
default=0
timeout=8
splashimage=(hd0,4)/grub/splash.xpm.gz
title Fedora Core (2.6.8)
root (hd0,4)
kernel /vmlinuz-2.6.8-1.521 ro root=LABEL=/
initrd /initrd-2.6.8-1.521.img
title win2000
rootnoverify (hd0,0)
unhide (hd0,0)
chainloader +1

you'll forgive me if i haven't put every single detail listed in these files, but I'm having to transcribe these onto another computer. I think I've given you all the right info (I hope)

Out of curiosity, do you know what Error 17 actually is?

Thanks for this,
M

mcgoon 01-29-2005 08:43 AM

ohh there was one other thing i forgot to mention.

I have an empty space on my hard drive (from a fat32 partition that i deleted) just before the boot partition. Don't know if that makes any difference, but i thought it best to give you as many details as possible.
When I fdisk -l , it refers to it by saying "ommitting empty partition (5)"

masand 01-29-2005 11:37 AM

hi there

"I moved my boot partition"
what was ur boot partiton earlier??

also post the full O/p of

fdisk - l

regards

masand 01-29-2005 11:42 AM

just found this

"grub error 17 Cannot mount selected partition"

so it is clear

that something is wrong with the boot partiton

mcgoon 01-29-2005 07:21 PM

My full fdisk -l reads:
ommitting empty partition (5)

Disk: /dev/hda: 20GB, 20003880960
255 heads, 63 sectors/track, 2432 cylinders
Units = cylinders of 16065 * 512 = 8225280

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1147 9213246 7 HPFS/NTFS
/dev/hda2 1148 2432 10321762+ f W95 Ext'd (LBA)
/dev/hda5 1305 1317 104391 83 Linux
/dev/hda6 1318 2367 8434093 83 Linux
/dev/hda7 2368 2432 522081 82 Linux swap

Basically what I've done as far as "moving" my partitions is I increased the size of my extended partition and then moved my boot partition from the head of the extended partition up to the head of the Linux ext3 partition.
So now the "empty" partition is between the start of the extended partition and the start of the boot partition.
Does that all make sense?

mcgoon 01-30-2005 03:28 AM

Never fear, I worked it all out.

When I originally moved the partition, the partition program I was using (Paragon) gave it a new hda number which I couldn't update with grub for some reason.

I grabbed the grub.img and rawwrite programs off http://www.desktop-linux.net/grub.htm and booted my computer off a floppy.

I then reordered all my partitions so the boot partition was back in the same place as it was originally.

Then I reinstalled grub (grub-install /dev/hda) in the linux rescue mode. :-)

Thanks all for your help!!!!

masand 01-30-2005 07:06 AM

that was really a nice work!!

guerses 02-13-2005 09:08 AM

Hi everybody,
I post my problem here since I think it is somehow a related problem.

I have a partitioned laptop with WindowsXP and SuSE 8.2 Everything
was working till I reinstalled WindowsXP again. After Installation Windows started to boot automatically
without loading GRUB. Then using my SuSE CD I booted SuSE and there I tried to install
grub. First I tried

grub-install /dev/hda

and I got the message:

The file /boot/grub/stage1 not read correctly

Next I tried in grub shell by doing

grub
grub>root (hd0,0)

which gives:

Filesystem type unknown, partition type 0x82

To find out where my Grub files reside I typed

grub> find /boot/grub/stage1

and I got

(hd0,1)

then I typed the following
grub>root (hd0,1)
Filesystem type is reiserfs, partition type 0x83
grub>kernel /boot/vmlinuz
[Linux-bzImage, setup=0x1400, size=0x1078c4]
grub>setup(hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/reiserfs_stage1_5" exists... yes
Running "embed /boot/grub/reiserfs_stage1_5 (hd0)"... 21 sectors are embedded.
succeeded
Running "install /boot/grub/stage1/ (hd0) (hd0)1+21 p (hd0,1)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
Done.

Then I rebooted. This time grubloader worked. I got the following massages,

Grub Loading stage1.5.

Grub Loading please wait
graphics file "(hd0,0)/boot/message/" missing, press a key to continue...

I pressed a key and I got the options in my menu.lst correctly
but not in the standard SuSE window (I guess due to previous error about missing massage)

linux
windows
failsafe

and when I chose linux the following error comes,

Booting 'linux'
kernel (hd0,0)/boot/vmlinuz/ root=/dev/hda1 hdc=ide=scsi vga=791

Error 17: Cannot mount selected partition

Press any key to continue.

If a chose windows partition it works. I guess the problem is that
when I type in grub shell

grub> find /boot/grub/stage1
it gives me (hd0,1) which has to be (hd,0,0) (in my opinion) because
(hd0,1) is my swap partition.

Here I attach also the important files.
Also maybe important to mention I have GRUB 0.92 version

my /boot/grub/menu.lst file:

# Modified by YaST2. Last modification on Sat Feb 12 20:17:21 2005

gfxmenu (hd0,0)/message
color white/blue black/light-gray
default 0
timeout 8

title linux
kernel (hd0,0)/boot/vmlinuz root=/dev/hda1 hdc=ide=scsi vga=791
initrd (hd0,0)/boot/initrd

title windows
root (hd0,2)
makeactive
chainloader +1

title failsafe
kernel (hd0,0)/boot/vmlinuz.shipped root=/dev/hda1 ide=nodma apm=off acpi=off vga=normal nosmp maxcpus=0 disableapic 3
initrd (hd0,0)/boot/initrd.shipped


my /etc/grub.conf file:

root (hd0,0)
install --stage2=/boot/grub/stage2 /boot/grub/stage1 d (hd0) /boot/grub/stage2 0x8000 (hd0,0)/boot/grub/menu.lst
quit

my /boot/grub/device.map file:
(fd0) /dev/fd0
(hd0) /dev/hda


my /etc/fstab file:

/dev/hda1 / reiserfs defaults 1 1
/dev/hda3 /windows/C vfat users,gid=users,umask=0002,iocharset=iso8859-1,code=437 0 0
/dev/hda2 swap swap pri=42 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
proc /proc proc defaults 0 0
usbdevfs /proc/bus/usb usbdevfs noauto 0 0
/dev/cdrecorder /media/cdrecorder auto ro,noauto,user,exec 0 0
/dev/cdrom /media/cdrom auto ro,noauto,user,exec 0 0


Finally one last point which I feel also somehow important.
When I boot from CD during booting I get some errors,

Activating swap-devices in /etc/fstab... failed
Checking file systems...
fsck 1.28 (31-Aug-2002)
reiserfs_open: neither new or old reiserfs format found on /dev/hda1

reiserfsck : could not open filesystem on "/dev/hda1"

Warning... fsck.reiserfs for device /dev/hda1/ exited with signal 6.
fsck.reiserfs /dev/hda1 failed (status 0x8). Run manually!


fsck failed. Please repair manually and reboot. The root filesystem is currently mounted read-only.
To remount it read-write do:

bash# mount -n -o remount,rw /


I did of course this remounting before I tried grub-install and all other stuff.

I hope I did not give to much unnecessary information.

mcgoon 02-14-2005 12:56 AM

Hi,

I don't know if I'm in the best position to solve all your problems, but 2 requests/questions:
*Did you change/resize any of your partitions when you reinstalled XP. (If so, what program did you use?)
*Can you give us the full output of fdisk -l please?



Good luck!

guerses 02-14-2005 01:29 AM

Thanks for the reply,

I did not change or resize any of my partitions during windows installation. Here I attach the fdisk -l result:

Disk /dev/hda: 255 heads, 63 sectors, 3648 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hda1 3 94 738990 82 Linux Swap
/dev/hda2 95 2352 18137385 83 Linux
/dev/hda3 * 2353 3647 10402087+ c Win95 FAT32 (LBA)

I guess it does not fit with my fstab file ??

masand 02-14-2005 01:47 AM

title linux
kernel (hd0,0)/boot/vmlinuz root=/dev/hda1 hdc=ide=scsi vga=791
initrd (hd0,0)/boot/initrd

see here u trying to load ur hda1 as ur root partiton while u have hda2 as ur root partiton

so make hda1 as hda2

and (hd0,0) as (hd0,1)

regards

guerses 02-14-2005 02:05 AM

Thanks for the correction.

I tried what you said. Then it started to boot
but I got this massage then


reiserfsck : could not open filesystem on "/dev/hda1"

Warning... fsck.reiserfs for device /dev/hda1/ exited with signal 6.
fsck.reiserfs /dev/hda1 failed (status 0x8). Run manually!


fsck failed. Please repair manually and reboot. The root filesystem is currently mounted read-only.
To remount it read-write do:

bash# mount -n -o remount,rw /

I am confused with my partitions. If I do not a mistake in my
fstab file hda1 seems to be the root partition but if I write fdisk -l
it seems hda2 to b the root partition. Should I also edit my fstab file as well ?

regards

masand 02-14-2005 04:32 AM

sorry forgot to mention that

u need to edit ur /etc/fstab as well

replce hda1 by hda2 and vice versa

regards


All times are GMT -5. The time now is 12:25 PM.