UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Here is a summary of my situation. I was dual-booting Windows XP and Ubuntu, but I don't remember which disk I was booting off of back then. The state I am in now is such that I must use the BIOS to switch between accessing Ubuntu and Windows.
When I have hard drive 1 (lets call it WD for western digital) as primary boot device in BIOS, GRUB loads up. From this GRUB screen I can select Linux and boot into it just fine. I have an option however for Windows XP, which I have since upgraded to Windows 7. Selecting that option causes boot to fail with some short message.
When I have hard drive 2 (lets call it S for samsung) as primary boot device in BIOS, I boot straight into Windows 7 just fine.
GRUB and Ubuntu is located on WD, and Windows is on S. How do I fix GRUB to successfully point to and boot S for my Windows option so that I can keep WD as my primary boot device and go through GRUB?
Thanks for the help! I couldn't quite get the information I needed looking over the many similar threads...
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,369
Rep:
As windows is not hd0 we have to map you're drives
Depending on the UBUNTu version you use you have GRUB 2 or GHUB 1
UBUNTU 10.4 uses grub 2 in that case you grub.cfg /boot/grub/grub.cfg
In older versions of Ubuntu have GRUB 1 meaning you are using menu.lst /boot/grub/menu.lst
Depending on the on the grub you use ad the begin of the windows the lines
Map (hd0) (hd3)
Map (hd3) (hd0)
Sdc is you third physical drive
sdc1 is the first partition on sdc
I have a menu.lst file and am working on an upgraded ubuntu that was originally much older, so I am certain I have GRUB 1.
Why do I want to Map hd0 to hd3 and hd3 to hd0? Can't I just change the root entry? Right now my entry for Windows looks like:
Code:
title Microsoft Windows XP Professional
root (hd0,0)
savedefault
makeactive
chainloader +1
wouldn't the fix look something like:
Code:
title Microsoft Windows 7
root (hd2,0)
savedefault
makeactive
chainloader +1
I'm trying to figure out what the relationship between the notation "hdx" means in relationship to "sdx". Is it equivalent in meaning (enumerating the logical hard drives) but using 0 indexed numbers when doing hd0, hd1, etc. and letters for sda, sdb, sdc, etc.? What does the s stand for?
UPDATE:
Doing the above change to menu.lst causes boot to hang with "Starting up..." I'm guessing I need to change the Windows bootmgr somehow?
Because of the difficulty in booting windows when it is not on the first drive. You would have to go to Microsoft to get an explanation of the why, no reason it couldn't be done.
Quote:
Can't I just change the root entry?
You can try, I doubt it will for the reason explained above. Try the entry below:
Quote:
title Microsoft Windows 7
rootnoverify (hd2,0)
map (hd0) (hd2)
map (hd2) (hd0)
chainloader +1
You don't need (or should not at least) the makeactive line as your windows partition is already marked active.
The (hd0) entries in Grub are the naming convention its developers use. In Grub Legacy, both hard drives and partitions are numbered beginning with zero (0). In Grub 2, hard drives are numbered from zero (0) and partitions are numbered from one (1).
So (hd0) in Grub would be the first drive, (hd1) the second, etc.
Using fdisk, for example, you would see sda, sdb, etc .
(hd0) should be equal to sda, (hd1) to sdb, etc. This is usually the case but not always.
The 's' used to refer to scsi drives as and the 'h' to IDE but newer distributions have taken to using 's' for all drives, mostly.
And also: Clean installs of Windows erase GRUB from the MBR, which means you have to boot from the Ubuntu Live CD, open a terminal window, and issue the following commands:
@Kenny_Strawn, GRUB is not located on the MBR of the Windows partition. I can access the GRUB program just fine by selecting one hard drive to boot with in the BIOS, and Windows by selecting the other. Does your advice still apply?
That is probably where your problem started is you changed the boot order in bios originally. If you leave your boot order this way Yancek is right you will need to remap your hd in grub menu. M$ thinks if has to be on the first partition of the first drive in order to work. You are tricking it by remapping grub.
When I select Windows from GRUB, however, I get the message "NTDLR is missing.
You stated in your first post that you initially had windows xp on your drive and you upgraded it to windows 7, is that correct? If it is, you did something wrong because there is no NTLDR in windows 7, that was in xp. Win 7 and vista use a totally different bootloader than xp. You might do a search here on repairing windows 7 bootloader, I've seen posts about it or just google it. The error you report indicates Grub is getting to your windows boot sector but it is no correct.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.