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 01-29-2005, 08:16 AM   #1
mcgoon
Member
 
Registered: Sep 2004
Location: Sydney, Australia
Distribution: Fedora Core 2
Posts: 42

Rep: Reputation: 15
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)
 
Old 01-29-2005, 08:19 AM   #2
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
where is ur /boot partiton??? and files

post ur grub.conf as well

regards
 
Old 01-29-2005, 08:37 AM   #3
mcgoon
Member
 
Registered: Sep 2004
Location: Sydney, Australia
Distribution: Fedora Core 2
Posts: 42

Original Poster
Rep: Reputation: 15
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
 
Old 01-29-2005, 08:43 AM   #4
mcgoon
Member
 
Registered: Sep 2004
Location: Sydney, Australia
Distribution: Fedora Core 2
Posts: 42

Original Poster
Rep: Reputation: 15
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)"
 
Old 01-29-2005, 11:37 AM   #5
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hi there

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

also post the full O/p of

fdisk - l

regards
 
Old 01-29-2005, 11:42 AM   #6
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
just found this

"grub error 17 Cannot mount selected partition"

so it is clear

that something is wrong with the boot partiton
 
Old 01-29-2005, 07:21 PM   #7
mcgoon
Member
 
Registered: Sep 2004
Location: Sydney, Australia
Distribution: Fedora Core 2
Posts: 42

Original Poster
Rep: Reputation: 15
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?
 
Old 01-30-2005, 03:28 AM   #8
mcgoon
Member
 
Registered: Sep 2004
Location: Sydney, Australia
Distribution: Fedora Core 2
Posts: 42

Original Poster
Rep: Reputation: 15
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!!!!
 
Old 01-30-2005, 07:06 AM   #9
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
that was really a nice work!!
 
Old 02-13-2005, 09:08 AM   #10
guerses
LQ Newbie
 
Registered: Feb 2005
Location: Germany
Posts: 4

Rep: Reputation: 0
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.
 
Old 02-14-2005, 12:56 AM   #11
mcgoon
Member
 
Registered: Sep 2004
Location: Sydney, Australia
Distribution: Fedora Core 2
Posts: 42

Original Poster
Rep: Reputation: 15
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!
 
Old 02-14-2005, 01:29 AM   #12
guerses
LQ Newbie
 
Registered: Feb 2005
Location: Germany
Posts: 4

Rep: Reputation: 0
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 ??
 
Old 02-14-2005, 01:47 AM   #13
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
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
 
Old 02-14-2005, 02:05 AM   #14
guerses
LQ Newbie
 
Registered: Feb 2005
Location: Germany
Posts: 4

Rep: Reputation: 0
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
 
Old 02-14-2005, 04:32 AM   #15
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
sorry forgot to mention that

u need to edit ur /etc/fstab as well

replce hda1 by hda2 and vice versa

regards
 
  


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
load grub again manomohan Red Hat 2 11-18-2005 10:53 PM
GRUB doesn't load rcracer7 Linux - Newbie 4 10-03-2005 12:16 AM
Grub won't load eggoz Linux - General 2 08-07-2005 08:01 PM
grub doesn't auto-load kernel, time/date auto-change, k3b cannot load kenji1903 Red Hat 16 03-27-2005 08:48 PM
GRUB Section2 load error, partition error. Ryle Linux - General 1 06-27-2004 02:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:20 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
Open Source Consulting | Domain Registration