I'd like to dual boot my system but need a hand with an unorthodox method
Linux - NewbieThis 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
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.
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?
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).
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
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.
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.
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.
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.
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?
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.