LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   grub problem (https://www.linuxquestions.org/questions/linux-software-2/grub-problem-607495/)

fakie_flip 12-17-2007 10:03 PM

grub problem
 
Hello, after installing Linux onto my friend's computer, windows does not boot anymore. He hasn't used Linux before, so he's not ready to switch entirely. I've tried appending this to the menu.lst

Code:

title                Windows Vista
 root                (hd0,0)
 makeactive
 chainloader        +1

That didn't work. I think I got grub error 13, not found, so at the grub menu, I hit e and edited hd0,0 to hd1,0 to see if that would work. I hit b and got the same error message again. When installing Linux, it did not automatically add Windows to the grub menu like it usually has for me in the past.

Code:

$ sudo fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd65ddc8d

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1        9363    75208266  83  Linux
/dev/sda2            9364        9729    2939895    5  Extended
/dev/sda5            9364        9729    2939863+  82  Linux swap / Solaris

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x397a3979

  Device Boot      Start        End      Blocks  Id  System
/dev/sdb1              1      19458  156288000    7  HPFS/NTFS


ash4stuff 12-17-2007 10:26 PM

choose other device
 
you have two disks.

dev sda is probably hd0 in grub
dev sdb is probably hd1 in grub

so try this:

title Windows Vista
root (hd1,1)
savedefault
makeactive
chainloader +1

Simon Bridge 12-17-2007 10:28 PM

vista is installed to the second HDD - Windows OSs seem to prefer being first, so you have to remap the drives in menu.lst before you chainload. Alternatively, swap the boot order in bion, and install grub to the mbr of the (new) first drive.

title Windows Vista
rootnoverify (hd1,0)
savedefault
makeactive
chainloader +1

using mapping:

title Windows Vista
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd0,0)
savedefault
makeactive
chainloader +1

http://ruslug.rutgers.edu/~mcgrof/gr.../docs/menu.lst
sda1 is (hd0,0)
sdb1 is (hd1,0)
sdb2 is (hd1,1)
... you don't want grub checking to see if that ntfs partition has valid boot stuff... it doesn't.

fakie_flip 12-17-2007 10:37 PM

Quote:

Originally Posted by ash4stuff (Post 2994144)
you have two disks.

dev sda is probably hd0 in grub
dev sdb is probably hd1 in grub

so try this:

title Windows Vista
root (hd1,1)
savedefault
makeactive
chainloader +1

Why not (hd1,0)? Windows is installed on the first partition of drive sdb, not the second partition of that drive which is what the second 1 represents in this (hd1,1).


All times are GMT -5. The time now is 01:55 AM.