LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 01-15-2008, 11:03 AM   #1
helptonewbie
Member
 
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

Rep: Reputation: 39
Question I'd like to dual boot my system but need a hand with an unorthodox method


Hi All,
I've had a computer just die on me and whilst i'm deciding what to do about it i'd like to set-up dual boot. ie, i have my normal Windows computer and a Linux computer (died and the HD is fine!). And i'd like to dual boot so nick the linux HD put into the Windows comp and then i guess i can set the linux hard drive to be primary master and all that and then all i need to do is tell the grub where to boot windows. How can i find the line i need to add to the grub, i know how to edit it and all that just don't know how you know what to type in there so to get windows as a boot option, or is there another way. The Windos i'm running is Windows X64 professonal, is there a simpler way? am i on the right track? and how can i know what line to add into the grub to get windows up as a boot option?

Thanks and Regards
Me
 
Old 01-15-2008, 12:21 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Edit /boot/grub/menu.lst to add the following:
Code:
title Windows XP
    map (hd0) (hd1) 
    map (hd1) (hd0) 
    rootnoverify (hd1,0) 
    makeactive 
    chainloader +1
There are two assumptions here:
a) The windows drive is the slave drive. If it is the master, delete the map lines from the above code, and edit the rootnoverify line to read (hd0,0).
b) Windows is in the first partition of the drive. If not, edit the rootnoverify line to show the correct partition number (start numbering from zero).
 
Old 01-17-2008, 01:43 PM   #3
helptonewbie
Member
 
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

Original Poster
Rep: Reputation: 39
Hey, thanks for the input, i can see i've now looked into the grub website etc and found out some stuff there however i'd like to know if its possible to find out in particular what hd? the windows drive is. Is there a way this is possible as i'm able to mount the windows drive fine with /dev/hdb1 but i don't know how to find what hd? number it has if its possible?

Cheers

ps-as it didn't work with the above but i didn't try lots of combinations i'd rather try to get it right without trial and error if possible. Thanks
 
Old 01-17-2008, 02:04 PM   #4
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Boot a liveCD. Run 'fdisk -l' to get a listing of harddrives, partitions, and fileystem types.

Running the liveCD will also make it possible to mount the Linux drive and edit /boot/grub/menu.lst and /etc/fstab (if necessary) to fit the information you get from fdisk.
 
Old 01-17-2008, 02:08 PM   #5
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Well, mine looks like this:

Quote:
title Windows XP 64 Professional
rootnoverify (hd3,0)
makeactive
map (hd0) (hd3)
map (hd3) (hd0)
chainloader +1
I suspect that you'll simply need to replace 3 with 1.

To make sure: boot your computer, select your Linux boot line, press Enter, select the line that has (hdx,x), press Enter and remove the trailing "x)", then press TAB. That should show which numbers are available. Press ESC to return to the boot line.

Last edited by jay73; 01-17-2008 at 02:09 PM.
 
Old 01-17-2008, 02:08 PM   #6
helptonewbie
Member
 
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

Original Poster
Rep: Reputation: 39
cheers, i just run that here's the output, it didn't display the hd? number can i edit the menu.lst and put in map hda1 hdb1? or is that incorrect syntax for grub?

fdisk -l

Disk /dev/hda: 80.0 GB, 80026361856 bytes
240 heads, 63 sectors/track, 10337 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1137 8595688+ 83 Linux
/dev/hda2 1138 8836 58204440 5 Extended
/dev/hda5 1138 1261 937408+ 82 Linux swap / Solaris
/dev/hda6 1262 3305 15452608+ 83 Linux
/dev/hda7 3306 6095 21092368+ 83 Linux
/dev/hda8 6096 8097 15135088+ 83 Linux
/dev/hda9 8098 8836 5586808+ 83 Linux

Disk /dev/hdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 24320 195350368+ 7 HPFS/NTFS

tahnks

ps- i admit i did't use a boot cd already booted into Linux.

JAY - do you mean e for edit the grub and then remove x) from the boot options line for one of the boot options then tab?

Last edited by helptonewbie; 01-17-2008 at 02:12 PM.
 
Old 01-17-2008, 02:14 PM   #7
helptonewbie
Member
 
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

Original Poster
Rep: Reputation: 39
pss - i have tried it the way bigrigdriver said which looks pretty much the same as your method, and did use a hd1
 
Old 01-17-2008, 02:19 PM   #8
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Quote:
JAY - do you mean e for edit the grub and then remove x) from the boot options line for one of the boot options then tab?
Yes, that's what I meant.
 
Old 01-17-2008, 02:29 PM   #9
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
It's somewhat easier if you just use the tab-completion feature of the GRUB editor. Just boot and, when GRUB shows you the selection menu, press "e" to start the editor. Then select one of the root (hd lines, delete from the end of the line so it looks like the bold string in this sentence, and press the tab key. That will display all the hard drive numbers visible to GRUB. Pick any one of the displayed numbers, enter it and a comma and press tab again. That will list all the partitions on the drive you selected.

Note that using the GRUB editor does NOT change the GRUB configuration file, just the file copy in GRUB's memory. So an Escape keystroke will discard any changes you made. In other words, you can try anything you want to try out using the editor until you get it to work, and then make the changes you know will work to your configuration file.
 
Old 01-17-2008, 02:32 PM   #10
helptonewbie
Member
 
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

Original Poster
Rep: Reputation: 39
Your right Jay, it does tab along once i got it into grub text mode, however it didn't work, for some reason it still producing the error when trying to boot,

A disk read error
press cntrl ++ alt + del to restart

Does it matter in the order the lines exist as you both have the lines in a different order in which case makes me think this shouldn't be an issue?
 
Old 01-17-2008, 02:34 PM   #11
helptonewbie
Member
 
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

Original Poster
Rep: Reputation: 39
thanks for the response PTrenholme, it is a cool thing i wasn't aware of, i've done some grub editing before but didn't know this one :-)
 
Old 01-17-2008, 02:36 PM   #12
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
The TAB trick is only for checking - it doesn't modify anything. You'd still need to edit grub manually.

And yes, the order can be important but I don't remember whether XP is as picky a some other operating systems.
 
Old 01-17-2008, 02:41 PM   #13
helptonewbie
Member
 
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

Original Poster
Rep: Reputation: 39
i'm able to boot what change i made by typing 'b' after editing and thats when the error occurs, i know the disk is fine as i can mount it when booted into linux no problems
 
Old 01-17-2008, 02:52 PM   #14
helptonewbie
Member
 
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

Original Poster
Rep: Reputation: 39
the grub manual i just see recommends adding the command boot on the end ie

Code:
title Windows XP 64 Professional
rootnoverify (hd1,0)
makeactive
chainloader +1
map (hd0) (hd1)
map (hd1) (hd0)
boot

Last edited by helptonewbie; 01-17-2008 at 03:01 PM.
 
Old 01-17-2008, 03:04 PM   #15
helptonewbie
Member
 
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

Original Poster
Rep: Reputation: 39
I'm still getting that very annoying read error. I've now tried it the following methods:-

title Windows XP 64 Professional
rootnoverify (hd1,0)
makeactive
chainloader +1
map (hd0,0) (hd1,0)
map (hd1,0) (hd0,0)
boot

title Windows XP 64 Professional
map (hd0,0) (hd1,0)
map (hd1,0) (hd0,0)
rootnoverify (hd1,0)
makeactive
chainloader +1
boot

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

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

and none of those have worked
 
  


Reply



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
Unorthodox Multi-boot on Multiflavor System on single sata hdd neoezekiel Linux - Software 2 12-03-2006 09:28 PM
Best method for dual boot with dual hard drive? aidano Linux - Software 2 11-16-2006 12:04 PM
how to make a dual-boot system on a linux system RoyalGala Linux - Newbie 6 03-03-2006 02:36 PM
File system middle man on dual boot system? TehFlyingDutchman Linux - General 5 12-28-2005 02:17 AM
Newbie needs Mandrake/Win98 dual-HD, dual boot system design help... buddha Linux - Newbie 20 09-04-2003 08:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:29 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration