LinuxQuestions.org
Help answer threads with 0 replies.
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
 
Search this Thread
Old 02-17-2006, 08:15 AM   #1
gkrishn
LQ Newbie
 
Registered: Feb 2006
Posts: 6

Rep: Reputation: 0
Dual boot (Booting Windows from Linux MBR)


Hi ,
I have two disk installed with Linux(disk 1) and WinXP(disk 2) .Now i am changing Hardisk jumbper manualy to get in to Linux/Windows .I want to configure my REDHAT linux boot manager to list Linux and WindowXP and wanna boot according to my choice .

Here is what my fdisk -l shows (Only relevant infos are pasted here )

/dev/hda1 boot LINUX
/dev/hda2
/dev/hda3

/dev/hdb1 boot WINXP

I configured grub.conf in follwoing way and gets these errors .

rootnoverify (1,0)
error:Unrecognised device string

rootnoverify (1,1)
error:Unrecognised device string

rootnoverify (hdb1,0)
Error:error while parsing number

rootnoverify (hd1,0)
error:selected disk does not exist

I am only getting title Windows XP in linux grub boot manager .Coudl some one provide me suitable entry for rootnoverify () ??? Please help.
 
Old 02-17-2006, 09:14 AM   #2
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 14.1
Posts: 1,138

Rep: Reputation: 55
Quote:
Originally Posted by gkrishn
I configured grub.conf in follwoing way and gets these errors .

rootnoverify (1,0)
error:Unrecognised device string

rootnoverify (1,1)
error:Unrecognised device string

rootnoverify (hdb1,0)
Error:error while parsing number

rootnoverify (hd1,0)
error:selected disk does not exist
Hi,

Is that your entire grub.conf file??? Please post the entire file here.

Tux,
 
Old 02-17-2006, 09:25 AM   #3
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
Blog Entries: 1

Rep: Reputation: 63
I believe it is not possible to the bootloader on the first drive to boot am OS on the second drive.

I wish I am wrong, anyone can confirm this ?

As far as I know, grub can not boot a OS on a different disk or when the OS starts after the 1024 cylinder of the first disk. This is the primary reason for the small /boot partition. It enables you to put everything else after the 1024 cyl or on a second drive, but the /boot needs to be on the primary disk AND before the 1024 cyl.

Would be nice if anyone else can contribute to this subject. I admit I am not a expert in this matter, so I can be wrong.
 
Old 02-17-2006, 09:37 AM   #4
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 14.1
Posts: 1,138

Rep: Reputation: 55
Quote:
Originally Posted by marozsas
I believe it is not possible to the bootloader on the first drive to boot am OS on the second drive.

I wish I am wrong, anyone can confirm this ?

As far as I know, grub can not boot a OS on a different disk or when the OS starts after the 1024 cylinder of the first disk. This is the primary reason for the small /boot partition. It enables you to put everything else after the 1024 cyl or on a second drive, but the /boot needs to be on the primary disk AND before the 1024 cyl.

Would be nice if anyone else can contribute to this subject. I admit I am not a expert in this matter, so I can be wrong.
No that is not the case...Grub **CAN** boot **any OS on any hard drive**. I have two hard drives and grub just boots fine anyone you choose. The 1024 cylinder concept is also antiquated now. AFAIK, it was a bios constraint which is not present in modern bioses.

You can very well install any Linux distro with only two partitions "/" and swap. Infact, my secondary distro (Arch Linux) does not have a separate /boot partition.

Tux,
 
Old 02-21-2006, 07:59 AM   #5
gkrishn
LQ Newbie
 
Registered: Feb 2006
Posts: 6

Original Poster
Rep: Reputation: 0
TUX , Thanks for your reply .

Here is my grub.conf file (first disk (Primary master-hda) )

default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
Title Red Hat Linux(2.4.20-8)
root (hd0,0)
kernel /vmlinuz-2.4.20-8 root=Label=/ hdd=ide-scsi
initrd /initrd-2.4.20-8.img

Primary Slave (hdb) is installed with WInodows XP (NTFS).


Now how to configure grub to boot hdb (windows ) .


-Thanks in advance .
 
Old 02-21-2006, 09:39 AM   #6
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,684

Rep: Reputation: 54
This should be it:
the "map" statement makes windows "think" it is being booted off the primary master - this is probably better to have, because it likely was installed when it really was on primary master...
and note the "title" - whereas you had "Title" - i'd do it without caps because that is what is in the manual for grub...
Code:
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz


title Red Hat Linux(2.4.20-8)
root (hd0,0)
kernel /vmlinuz-2.4.20-8 root=Label=/ hdd=ide-scsi
initrd /initrd-2.4.20-8.img


title=Windows XP
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader +1
 
Old 02-21-2006, 10:00 AM   #7
gkrishn
LQ Newbie
 
Registered: Feb 2006
Posts: 6

Original Poster
Rep: Reputation: 0
I dont understand anything .

I installed WinXP on second disk (hdb) keeping it as primary master.Later changed it to primary slave.And have linux disk(hda) now on as primary master .Now want to boot WinXP from grub (ie,want to point hdb from hda ).

Once again

hda (linux)
hdb (winXP)

Both installed seperalty keeping as primary master .Hope this helps.
Please help me
 
Old 02-21-2006, 10:24 AM   #8
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,684

Rep: Reputation: 54
That is exactly what I meant...you had originally installed windows when it was the primary master.
Now it is primary slave - which is what grub names as (hd1)
- more specifically - windows is installed on the first and - (I assume) - only partition on that drive which is called (hd1,0) by grub.
rootnoverify (hd1,0) tells grub to boot the OS which is on /dev/hdb1 - which is the first partition of primary slave - which is where your windows is now.
map (hd0) (hd1)
map (hd1) (hd0) these things make it appear to windows as if it is booted as being on primary master - while it is really on primary slave.
Just copy+paste the WindowsXP section into your current grub.conf (add it to it) and give it a try.
You should see a menu on boot offering you to choose eighter Red Hat Linux(2.4.20-8) or Windows XP.
If you wait 10 seconds and don't do anything - linux gets booted, because it is the default.
default=0 means: boot the first of the available entries in grub.conf
So - since this is working already - there is nothing to loose and it might even work to boot windows too now - if I have thought correctly (I tried...)
 
Old 02-21-2006, 10:32 AM   #9
gkrishn
LQ Newbie
 
Registered: Feb 2006
Posts: 6

Original Poster
Rep: Reputation: 0
title=Windows XP
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader +1


JOMEN, i tried this already but without 'makeactive' . Sure i will try this and let you know tomorrow. Thanks a lot Jomen.
 
Old 02-21-2006, 10:39 AM   #10
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,684

Rep: Reputation: 54
ok. - but why without "makeactive" - any reason for that?
You don't have to fear that this will somehow overwrite something - it won't - neighter on your first nor on your second disk. All you need to change really for it to work is the file grub.conf and that is it.
And - just to make sure - add the Windows XP-section to the end of your grub.conf - so that the entry for Red Hat Linux(2.4.20-8) is still in it before it! I say this because you only posted the Windows-secton...

Last edited by jomen; 02-21-2006 at 10:43 AM.
 
Old 02-21-2006, 10:50 AM   #11
gkrishn
LQ Newbie
 
Registered: Feb 2006
Posts: 6

Original Poster
Rep: Reputation: 0
I had not much idea on that. i just did as mentioned in one article .I hope the tip given by you wil solve all the issues .

Wil let you know .
 
Old 02-22-2006, 05:11 AM   #12
gkrishn
LQ Newbie
 
Registered: Feb 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Still have issue.

title=Windows XP
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader +1

gives error :Selected disk does not exist.

But i am sure it is correct.see output of fdisk -l in my first post . Also,WinXP is installed in NTFS.Is that the pbm here ?
 
Old 02-22-2006, 05:37 AM   #13
abk4523
Member
 
Registered: Jun 2004
Distribution: RH8/Fedora Core 4
Posts: 110

Rep: Reputation: 15
I have my windows partition installed in NTFS and it does not have a problem. Try repartitioning the windows drive with two partitions, the first having 1024 meg, the second with the rest of the drive. Install Windows on the second partition, then Linux on the second hard drive, with the boot record on the first drive. I beleive that option is under the configure advanced boot loader options.When you select Windows from grub, you may get a message about missing the NTDLDR file, just press a key and ignore it. That should work. This is the older way, but it works.

Last edited by abk4523; 02-22-2006 at 05:44 AM.
 
Old 02-22-2006, 06:10 AM   #14
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,684

Rep: Reputation: 54
Since both Os are working properly there is really no need to go through a reinstall due to repartitioning the windows-drive - it makes no sense to me.
Make sure though that your second disk is known to the bios - not all Bios'es recognize automatically that you changed a disk or even put another one in - Maybe the second disk is just not (yet) known by Bios - look!

Instad of repartitioning you can write down all the lines from the windows section of grub.conf - to have them handy at boot. There, when you see the splash-screen, press "c" and you get to the grub command-line.
There you tell grub where its files are: root (hd0,0) <-- on second thought - leave this one out
then you issue the commands you wrote down (not the title...makes no sense there)
Grub has a nice TAB-completion feature - type a command partially and the possible matches are shown - useful in finding out what grub sees your second disk as.
You can even test this in the running system by calling "grub" as root - of course you cannot boot then but to get familiar with the command-line interface its useful.
And: you should get rid of the bootable-flag for the linux partition - it is not needed for linux or grub - and might confuse Windows when is sees 2 bootable disks - just the windows drive (partition) should have a bootable-flag

Last edited by jomen; 02-22-2006 at 06:13 AM.
 
Old 02-22-2006, 07:00 AM   #15
kevkim55
Member
 
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353

Rep: Reputation: 32
How is the second hard drive (which has winXP installed on it) connected ? Thru' usb or firewire or directy to the ide port thru' ribbon cable ?
I know itz hard to make windoz boot from a slave device. Windoz (most likely) insists on being master device !! I'm not saying itz impozzible to boot windoz from a slave drive but, it just don't work on some hardware.

Last edited by kevkim55; 02-22-2006 at 07:02 AM.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Install Lilo in MBR during instalation of SuSE 9.3 (with dual boot Windows XP) cangussu.br Linux - Newbie 2 05-05-2005 10:46 PM
dual booting using windows boot manager? texasnoob Linux - Newbie 5 10-06-2004 08:22 AM
Windows / Mandrake 10.0 dual boot - MBR corrupted rdsmith4 Linux - General 1 08-25-2004 07:48 PM
MBR with WinXP and Linux Dual Boot Ruined...! truhuska Linux - Newbie 7 04-29-2004 11:49 PM
Dual boot, linux MBR on floppy question? Dobie Linux - Newbie 1 12-15-2003 10:19 AM


All times are GMT -5. The time now is 02:45 PM.

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