You are not logged in.

#1 2009-08-06 10:30:15

Alp
Member
Registered: 2008-09-27
Posts: 89

Grub system boot messed up after windows crash

I have a dualboot system with Win XP and Arch. Yesterday Windows crashed while i was listening to music. Since then, when i boot my computer Grub throws an error message (i think it's error 17) and doesn't start the bootmanager. But if i boot from a normal Ubuntu-Live-CD an choose "boot from first harddisk" i get my grub manager and i am able to boot normally.

I tried to fix this by manually reconfigure grub like this:

1. Pop in the Live CD, boot from it until you reach the desktop.
2. Open a terminal window or switch to a tty.
3. Type "grub"
4. Type "root (hd0,6)", or whatever your harddisk + boot partition numbers are (my /boot is at /dev/sda7, which translates to hd0,6 for grub).
5. Type "setup (hd0)", ot whatever your harddisk nr is.
6. Quit grub by typing "quit".
7. Reboot.

(taken from http://ubuntuforums.org/showpost.php?p= … stcount=2)

It seems that my hdX is different to my sdX labels. sda is my linux harddisk, and sdc is my windows drive. But if i type root (hd0,0) i get "Filesystem type unknown, partition type 0x7", which means that this is an NTFS drive. So i tried root (hd2,0) (in my menu.lst, booting arch is also defined with hd2,0) and then i get "Error 21: Selected disk does not exist".

Now two questions:
1) Why is the labeling different? Why isn't sda1 = hd0 and so on?
2) How to restore my boot process? (this is slightly more important wink)

Offline

#2 2009-08-06 19:00:57

Alp
Member
Registered: 2008-09-27
Posts: 89

Re: Grub system boot messed up after windows crash

Can't find the solution, anyone?

Last edited by Alp (2009-08-06 19:01:16)

Offline

#3 2009-08-06 19:31:18

bds
Member
Registered: 2004-02-27
Posts: 47

Re: Grub system boot messed up after windows crash

You're most likely not giving grub the correct partition.

After booting into your system (via a live CD, for example), run grub as root, then from the grub prompt, do:

find /boot/grub/stage1

This will give you the partition you need in grub style (hdx,y). Put it into menu.lst, and you're good to go.

HTH

Offline

#4 2009-08-07 02:31:05

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Grub system boot messed up after windows crash

It would seem you have misunderstood somewhat the naming procedure used in grub ...
sda = (hd0)
sda1 = (hd0,0)
sda6 = (hd0,5)
sdb = (hd1)
sdc1 = (hd2,0)
etc etc

Offline

#5 2009-08-07 02:58:16

Alp
Member
Registered: 2008-09-27
Posts: 89

Re: Grub system boot messed up after windows crash

I think you both understood me wrong.

First, i don't need to alter the menu.lst, because grub doesn't show the boot choose menu at all. It just prints error 17 without any chance of doing something.

Second, i know the naming procedure. But obviously in my case hd0 and hd2 are switched, so that sda = (hd2) and sdc = (hd0). I don't know why.

Offline

#6 2009-08-07 03:28:20

bds
Member
Registered: 2004-02-27
Posts: 47

Re: Grub system boot messed up after windows crash

Offline

#7 2009-08-07 03:54:35

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Grub system boot messed up after windows crash

Alp wrote:

I think you both understood me wrong.

First, i don't need to alter the menu.lst, because grub doesn't show the boot choose menu at all. It just prints error 17 without any chance of doing something.

Second, i know the naming procedure. But obviously in my case hd0 and hd2 are switched, so that sda = (hd2) and sdc = (hd0). I don't know why.

well - you referred to 'sda1' as 'hd0' in your first post ...

as for the remapping of drives, there's always:
map (hd0) (hd2)
map (hd2) (hd0)

Offline

#8 2009-08-07 09:59:06

Alp
Member
Registered: 2008-09-27
Posts: 89

Re: Grub system boot messed up after windows crash

Yes, that was wrong. Ok, but the mapping is only important for the boot screen, where i can choose the system to be started. I don't see that screen if i boot normally. There is just that "error 17" and the system halts. If I boot with Ubuntu Live cd and choose "boot from first harddisk" i see my grub screen and everything works fine (totally independent of any drive mappings).

Offline

#9 2009-08-07 11:46:19

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: Grub system boot messed up after windows crash

Take a look at archwiki: http://wiki.archlinux.org/index.php/Grub

Some help there regarding error 17.

Offline

#10 2009-08-07 16:22:55

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Grub system boot messed up after windows crash


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#11 2009-09-16 08:09:52

Alp
Member
Registered: 2008-09-27
Posts: 89

Re: Grub system boot messed up after windows crash

In the meantime i reinstalled grub several times, but with no luck. I got a new problem: Error 22.

But I finally got it to work. The Boot-order of my hard disks was wrong in my BIOS. After i changed the order, everything went fine.

Offline

Board footer

Powered by FluxBB