LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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
 
LinkBack Search this Thread
Old 05-19-2007, 09:13 AM   #1
lozza1978
LQ Newbie
 
Registered: Feb 2005
Posts: 23

Rep: Reputation: 15
Grub help lost vista when installed kubuntu


I was running vista on a sata drive and installed kubuntu on a new IDE(only ide device on the system.)
I have 2 sata drives, 1 with windows vista, and the other is just formatted for NTFS storage.

Now when the system boots, grub appears and there is no option to load windows, I have monuted several partitions in kubuntu to locate Vista and I have its located at /dev/sdc1/

Now Ive been reading loads of grub info and am totally lost??.
I have added the following to the bottom of the /boot/grub/menu.lst file.

Code:
### END DEBIAN AUTOMAGIC KERNELS LIST

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Windows Vista
root (hd2,0)
makeactive
chainloader +1

I reboot the system - grub now shows windows vista option in the menu - I select it - screen changes to "starting now" and just hangs.

I havent a clue what I added to menu.lst but I did change
Code:
root (hd2,0)
from
Code:
root (hd0,0)
to indicate that vista was on the 3rd drive. as /dev/sda = hd0.0 in grub talk or something.

Im not sure where to go from here and anyhelp - links would be usefull.

Cheers
lozza1978
 
Old 05-19-2007, 09:33 AM   #2
lozza1978
LQ Newbie
 
Registered: Feb 2005
Posts: 23

Original Poster
Rep: Reputation: 15
output from fdisk -l

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

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        9327    74919096   83  Linux
/dev/sda2            9328        9729     3229065    5  Extended
/dev/sda5            9328        9729     3229033+  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

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        6708    53881978+   7  HPFS/NTFS
/dev/sdb2            6709       19457   102406342+   f  W95 Ext'd (LBA)
/dev/sdb5            6709       19457   102406311    7  HPFS/NTFS

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

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1        9728    78140128+   7  HPFS/NTFS
I know vista is on /dev/sdc1 but thats about all I do know -
 
Old 05-19-2007, 09:58 AM   #3
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 114Reputation: 114
I don't know about Vista, but earlier Windows had to boot from the first hard drive.

So, you need to remap the hard drives to put Windows first.

Try adding the map lines to your grub menu.lst. Make your entry like this:

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

This will work if Vista is using the BIOS to access the hard drives.
 
Old 05-19-2007, 12:52 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
map is definitely the secret here, but this is a new twist. I would have said
root (hd2,0)
map (hd2) (hd0)
etc.

I am not at a machine where I can test this. One or both forms is going to work.

If you get stuck, you can always boot into windows by switching the boot order in the BIOS.

My site has some info on booting--including link to the GRUB manual.
 
Old 05-19-2007, 01:35 PM   #5
@er<>
LQ Newbie
 
Registered: Oct 2006
Posts: 12

Rep: Reputation: 0
Vista

Vista being the new operating system has its own boot manager. This creates a problem with an additional grub boot loader. Hope someone can tell us a solution to this problem.
 
Old 05-19-2007, 02:22 PM   #6
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
Here is a good tutorial on dual booting Vista and Ubuntu (should be the same for Kubuntu), there are also links to different scenarios with Vista, XP etc.:
http://apcmag.com/5046/how_to_dual_b...nstalled_first

There are also some discrepancies in this story, in the first sentence of the first post by lozza1978 we are told that Linux was installed on a ATA IDE interfaced drive, but in the second post, the output of fdisk -l does not show any ATA drives, only SCSI drives.

EDIT: Also, if Vista was installed and running first, you should have left the boot order in the bios the way it was, it appears the boot order has been changed to the NEW drive with Linux on it. This usually creates problems for Vista. The bios is not a boot loader, grub is, and it would have taken care of everything without problems when installed over top of Vista's boot loader in the MBR of the original disc set to boot in the bios. People always make this mistake because they don't want to overwright the Vista boot loader and attempt to put grub on another disc instead. It is easy to restore the MBR with the Vista installation disc just as it is easy to restore grub with a Linux intallation disc, there's no need to worry. Vista usually refuses to boot if it's boot loader is in an MBR and changes to the system have not been added to it.

Last edited by Junior Hacker; 05-19-2007 at 02:32 PM.
 
Old 05-20-2007, 05:14 AM   #7
lozza1978
LQ Newbie
 
Registered: Feb 2005
Posts: 23

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Junior Hacker
There are also some discrepancies in this story, in the first sentence of the first post by lozza1978 we are told that Linux was installed on a ATA IDE interfaced drive, but in the second post, the output of fdisk -l does not show any ATA drives, only SCSI drives.
I added a 3rd drive to the system, an 80gb IDE -Not sure why it shows up in fdisk as a SCSI? -


I have now edited /boot/grub/menu.lst,

Code:
title Windows Vista
root (hd2,0)
map        (hd0) (hd2)
map        (hd2) (hd0)
makeactive
chainloader +1
Now when I boot this option I get NTLDR is missing press ctrl alt del to restart -

Am I actually getting some where with this or not?

Any suggestions on what the next step should be?.


Thanks for all the useful advice and links

lozza1978
 
Old 05-20-2007, 05:39 AM   #8
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
The sdc does not always corresponding to the (hd2). The best way is to get the information directly from the horse's mouth --> Grub.

Why not activate a Grub shell in Linux and use the geometry command as follow
Code:
grub
geometry (hd0)
geometry (hd1)
geometry (hd2)
If Vista is indeed in (hd2) the it will have only one partition of Type 7 there.

The new Kubuntu, based on Ubuntu, is using kernel 2.6.20 that has abandoned the Pata/IDE disk names of hda to hdd and all future Pata/IDE disks are grouped under the SCSI/Sata/USB disk family using sda, sdb, sdc...etc.

My Vista certainly boots no different to a Dos or any other MS Windows. So the suggestion of
Code:
title Windows Vista
root (hd2,0)
map (hd0) (hd2)
map (hd2) (hd0)
makeactive
chainloader +1
is sound to me if Vista is indeed in (hd2,0).

If you have any problem with it I would suggest the next cure is to tell the Bios to boot Vista disk first and use the Vista installation CD to restore its MBR inside its own disk, run it again to satisfy everything works, then use the Bios to put the Vista disk back to (hd2) position (3rd disk in the booting queue) and fire up Grub to boot it. The Vista's own MBR can remain inside its own disk.

A procedure to restore Vista's MBR is available in the Task B7 in the last link of my signature.

Last edited by saikee; 05-20-2007 at 02:52 PM.
 
Old 05-20-2007, 02:26 PM   #9
lozza1978
LQ Newbie
 
Registered: Feb 2005
Posts: 23

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by saikee
The sdc does not always corresponding to the (hd2). The best way is to get the information directly from the horse's mouth --> Grub.

Why not activate a Grub shell in Linux and use the geometry command as follow
Code:
grub
geometry (hd0)
geometry (hd1)
geometry (hd2)
If Vista is indeed in (hd2) the it will have only one partition of Type 7 there.
This bit of info was so vital - thanks dude, vista is on (hd2) and the type was 0x7, just as you said.

Next step was to remove all the harddrives and just leave the vista hard drive, I booted using the vista install DVD and run recovery. in the end I had to run recovery 3 times in total for vista to start up on its own without getting the NTLDR is missing. (At last - thanks again Saikee)

plugged my harddrives back in - booted up and grub loaded selected vista and bang - I now have a duel booting system.

This is my grub config to launch vista

Code:
title Windows Vista
root (hd2,0)
map (hd0) (hd2)
map (hd2) (hd0)
makeactive
chainloader +1

Thanks again to the grub master Saikee
 
Old 05-20-2007, 02:50 PM   #10
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Glad it works out for you.

I think Grub is a lot simpler and easier than many users give credit for.
 
Old 05-20-2007, 11:52 PM   #11
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Quote:
Originally Posted by lozza1978
Thanks again to the grub master Saikee
I thought he was the "Bootmaster"--or "Doctor Boot"

Quote:
Originally Posted by saikee
I think Grub is a lot simpler and easier than many users give credit for.
GRUB IS simple and easy--once you know how....

Seriously, the real issue here is that you can go years on a Windows system and not even know (or care) that there is such a thing as a bootloader, much less have to configure it.
 
Old 05-21-2007, 02:23 AM   #12
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Think I learn all my booting in the first 2 years into Linux. 30 years before were just like Pixellany said I knew nothing about booting with MS systems even I was using it everyday.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Kubuntu 7.04: Putting up a real fight against Windows Vista. LXer Syndicated Linux News 0 04-20-2007 04:16 PM
kubuntu-vista laptops sharing pcmcia internet, possible? MoXplorer Linux - Networking 6 03-31-2007 06:57 PM
kubuntu won't install with vista present benny_j Linux - Newbie 3 03-25-2007 08:51 AM
Vista/Kubuntu on **2** drives Plastech Linux - Newbie 8 02-26-2007 05:27 PM
Lost WinXP when I installed RH8 GRUB HELPPPP!!! arvmenon Linux - General 2 04-29-2003 12:37 PM


All times are GMT -5. The time now is 08:43 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration