LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Installed Mandriva - lost Win Vista (https://www.linuxquestions.org/questions/linux-newbie-8/installed-mandriva-lost-win-vista-647595/)

davholla 06-07-2008 06:38 AM

Installed Mandriva - lost Win Vista
 
I just installed Mandriva on my machine but sadly Windows did not get added to the grub menu. I am having problems adding it, I think Windows did not get killed but am not sure.

I have googled this without success.

Vit77 06-07-2008 06:54 AM

Try to add such lines in your /boot/grub/menu.lst file:

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

And don't forget to run /boot/grub/install.sh to make changes have effect.

davholla 06-07-2008 07:07 AM

I did that but rather going into Windows I just get a diagnostics page.

syg00 06-07-2008 07:21 AM

Probably (hd0,1), but let's see the output from "fdisk -l" (might need root/sudo)

pixellany 06-07-2008 07:31 AM

Quote:

And don't forget to run /boot/grub/install.sh to make changes have effect.
I never looked at this before. This script installs GRUB to the MBR---not necessary in this case. All you have to do is edit menu.lst and save it.

As already stated, we need to know what the partition setup is. Also, what partitioning options did you select when installing Mandriva?

davholla 06-07-2008 08:25 AM

Fdisk gives

Code:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x70000000

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1          8      64228+  6  FAT16
/dev/sda2              9        1314    10485760    7  HPFS/NTFS
/dev/sda3            1314      30965  238176090+  7  HPFS/NTFS
/dev/sda4          30966      60801  239657670    5  Extended
/dev/sda5          30966      31984    8185086  83  Linux
/dev/sda6          31985      32493    4088511  82  Linux swap / Solaris
/dev/sda7          32494      60801  227383978+  83  Linux

Disk /dev/sdb: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x230c85ca

  Device Boot      Start        End      Blocks  Id  System
/dev/sdb1              1      10010    80405293+  c  W95 FAT32 (LBA)

When I installed I used the default - resize existing partitions - was that a mistake ??? I really hope I do not need to reinstall Windows.

pixellany 06-07-2008 09:59 AM

It looks like Windows is on sda2 (hd0,1 in grub-speak)

Thus--in /boot/grub/menu.lst you need:
title Windows
root (hd0,1)
map (hd0,1)(hd0,0)
map (hd0,0)(hd0,1)
makeactive
chainloader +1

davholla 06-07-2008 11:38 AM

That did not work I got unknown filesystem

Code:

title windows
root (hd0,1)
map (hdo,0),(hd0,1)
makeactive
chainloader +1


yancek 06-07-2008 11:59 AM

Take a look at pixellany's entry recommendation. If your last post is what you entered you did not do it correctly, you left out the second map entry. sda2 looks like a pretty small partition though, so try it and if it doesn't work try it for sda3.

davholla 06-07-2008 12:21 PM

Code:

title windows
root (hd0,1)
map (hd0,1)(hd0,0)
map (hd0,0)(hd0,1)
makeactive
chainloader +1


Sadly even I cut and paste correctly it still does not work.

dv502 06-07-2008 01:47 PM

I found out that resizing a vista partition can cause vista not to boot up or recognize the partition. Here is a link that shows you what to do after resizing a vista partition. Scroll down until you see this paragraph

Once it's done, quit, remove the live cd and then reboot your computer. Unless you are very lucky, you'll be greeted with this horrible error message saying "Windows Failed to start. A recent hardware or software change might be the cause.



Start reading from there and you should get vista back.


http://www.howtogeek.com/howto/windo...sta-partition/

After that is done, follow the above suggestions on adding vista to the grub menu.

Good luck

davholla 06-08-2008 06:36 AM

Thanks for the help.
However after reading lots of advice I now have this in my menu.lst file

Code:

timeout 10
color black/cyan yellow/cyan
gfxmenu (hd0,4)/boot/gfxmenu
default 0

title linux
kernel (hd0,4)/boot/vmlinuz BOOT_IMAGE=linux root=UUID=0185a4f0-bb82-450c-9cde-5e8767c1c8e0 resume=/dev/sda6 splash=silent vga=788
initrd (hd0,4)/boot/initrd.img

title linux-nonfb
kernel (hd0,4)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=UUID=0185a4f0-bb82-450c-9cde-5e8767c1c8e0 resume=/dev/sda6
initrd (hd0,4)/boot/initrd.img

title failsafe
kernel (hd0,4)/boot/vmlinuz BOOT_IMAGE=failsafe root=UUID=0185a4f0-bb82-450c-9cde-5e8767c1c8e0 failsafe
initrd (hd0,4)/boot/initrd.img

title windows
root (hd0,1)
map (hd0,1)(hd0,0)
map (hd0,0)(hd0,1)
makeactive
chainloader +1

title windows-0
root (hd0,0)
chainloader +1

title windows-1
rootnoverify(hd0,0)
makeactive
chainloader +1
boot

Windows - gives file error
windows-0 gives me Windows or Dell Diagnostics which I spent 18 hours running with no benefit
windows -1 gives unrecognised device error.


Is all lost ??? Do I have to install Windows and of course then Linux again ????

PS sadly http://www.howtogeek.com/howto/windo...sta-partition/
did not solve the problem

yancek 06-08-2008 11:31 AM

You have a FAT16 and two NTFS partitions. If booting from sda2 didn't work try sda3, sda3 is over 20 times the size of sda2. Use your first menu.lst entry for windows with the map commands and change the (hd0,1) entries to (hd0,2). Your first partition (hd0,0) is your Dell diagnostics so it has to be sda2 (hd0,1) or sda3 (hd0,2).

Hope it works.

dv502 06-08-2008 11:49 AM

I notice the three windows boot options has hd0,0 which points to the first partition which is a FAT16 i.e dev/sda1.

Your NTFS partitions are on dev/sda2 and /dev/sda3. Partitions are numbered starting at zero. So
/dev/sda2 is refer to as hd0,1 and /dev/sda3 is hd0,2

try this, re-edit and substitute the hd0,0 with hd0,1 and hd0,2 accordingly

title windows-1
rootnoverify(hd0,1)
makeactive
chainloader +1
boot

title windows-2
rootnoverify(hd0,2)
makeactive
chainloader +1
boot

Both of these points to the NTFS partitions which vista uses. Test and let us know.

Hey yancek, as I was writing, its looks like you beat me to it. We both have similar answers for him/her. :)

davholla 06-08-2008 04:27 PM

Thanks I will try that tomorrow


All times are GMT -5. The time now is 02:36 AM.