Brian_Holiday Posted September 28, 2005 Report Share Posted September 28, 2005 This is what I want to do: I have an existing machine with xp on the primary drive. I want to add a drive with Ubuntu already loaded. Can I make the Ubuntu drive be the primary drive, and point it to the XP load as an additional OS? If so, I would appreciate instructions or a link. TIA, BH Quote Link to post Share on other sites
shanenin Posted September 28, 2005 Report Share Posted September 28, 2005 It sounds like you installed ubuntu on a different computer. So now you wnat to add that harddrive that already has ubuntu installed to you xp computer.Can I make the Ubuntu drive be the primary drive, and point it to the XP load as an additional OS?does it actually need to be the primary drive, or do you just want ubuntu to boot by default, but have the option of booting XP.Is my understanding above correct, if so i can give you some instuctions :-) Quote Link to post Share on other sites
Brian_Holiday Posted September 28, 2005 Author Report Share Posted September 28, 2005 It sounds like you installed ubuntu on a different computer. So now you wnat to add that harddrive that already has ubuntu installed to you xp computer. Can I make the Ubuntu drive be the primary drive, and point it to the XP load as an additional OS?does it actually need to be the primary drive, or do you just want ubuntu to boot by default, but have the option of booting XP.Is my understanding above correct, if so i can give you some instuctions :-)<{POST_SNAPBACK}>I built 2 identical machines, and one got Hijacked by my wife . Now I have to merge these 2 machines for my own use. I really don't want to modify the XP load at all. I was hoping I could use the Ubuntu's bootloader to load XP on demand. Can it be done that way, or am I forced to load it into the master bootrecord on the primary drive? BH Quote Link to post Share on other sites
shanenin Posted September 28, 2005 Report Share Posted September 28, 2005 sure, you can do this. You can leave XP on the primary(first ide device) and ubuntu on your master(second ide device). You will have to reinstall grub on the mbr of your master(the one with xp). I will have some instructions later, have to run an errand. Quote Link to post Share on other sites
shanenin Posted September 28, 2005 Report Share Posted September 28, 2005 what partition is your / and /boot on, for example /dev/hda2, and /dev/hda1. they will be listed in your /etc/fstab file Quote Link to post Share on other sites
naraku9333 Posted September 28, 2005 Report Share Posted September 28, 2005 (edited) Are you sure all hardware is the samne, if it is this should be fairly simple. Install the Ubuntu drive as slave (or secondary master), leave Windows as primary. All you really need to do is install grub on mbr of windows drive and edit menu.lst and fstab. When both drives are in boot a live cd like knoppix and mount the linux drivemkdir /mnt/hdb     mount /dev/hdb1 /mnt/hdb  (if your drives are SATA it may be sdb instead of hdb)then chroot into the linux drive chroot /mnt/hdb /bin/bashthen run grub and run these commands in grub shellgrub> root (hd1,0)      grub> setup (hd0)      grub> quit  Then you need to edit /boot/grub/menu.lst and scroll down to the end of the default section and change the lines root(hd0,0) to root(hd1,0) and change kernel  /boot/vmlinuz-2.6.10-5-386 root=/dev/hda1 ro to kernel  /boot/vmlinuz-2.6.10-5-386 root=/dev/hdb1 ro if you have a seperate boot partition then this would be hdb3. Add at the end of the file title  Other operating systems:root# This entry automatically added by the Debian installer for a non-linux OS# on /dev/hda1title  Microsoft Windows XP Home Editionroot  (hd0,0)savedefaultmakeactivechainloader +1 so you can have windows as a boot choice.Now your /etc/fstab, just change hda* to hdb keeping everythin else the same. Unless I missed something you should be ready to reboot. Hope this works for you. Edited September 28, 2005 by naraku9333 Quote Link to post Share on other sites
shanenin Posted September 28, 2005 Report Share Posted September 28, 2005 A very nice explanation :-)I noticed this part, that does not seem rightmkdir /mnt/hdb     mount /dev/hdb /mnt/hdb  you just have the generic listing of the drive, you need to specify a paritiion, assuming ubuntu is installed in the first partition, it would be like thismkdir /mnt/hdb     mount /dev/hdb1 /mnt/hdb Quote Link to post Share on other sites
naraku9333 Posted September 28, 2005 Report Share Posted September 28, 2005 Thanks Shane, I edited my post. Thats what I get for not proof reading what I posted. Quote Link to post Share on other sites
Brian_Holiday Posted September 29, 2005 Author Report Share Posted September 29, 2005 Thanks all, I will try this a little later today. It seems I don't have a choice, I have to put Windows on the first drive. Regards, BH Quote Link to post Share on other sites
shanenin Posted September 29, 2005 Report Share Posted September 29, 2005 (edited) Thanks all, I will try this a little later today. It seems I don't have a choice, I have to put Windows on the first drive. Regards,   BH<{POST_SNAPBACK}>you could probably but windows on the slave spot also, it may even be easier. I would have suggested doing it the same way naraku9333 did it. I mainly based this desision on old habits of windows xp needing to boot from the master.You may get lucking placing ubunu on the master, xp on the slave, then just editing your /etc/fstab to point to xp. Then just add this to the bottom of your menu.lst filetitle  Microsoft Windows XP Home Editionroot  (hd1,0)savedefaultmakeactivechainloader +1if this does not work, the way naraku9333 posted will work for sure :-) Edited September 30, 2005 by shanenin Quote Link to post Share on other sites
Hai-Etlik Posted September 30, 2005 Report Share Posted September 30, 2005 (edited) title      Windows 95/98/Meroot       (hd1,0)map (hd0) (hd1)map (hd1) (hd0)savedefaultmakeactivechainloader   +1The two map lines swap the primary master and slave from the perspecive of the chainloaded OS. I don't know if it works with less primitive OSes like WinNT or GNU/Linux, never had cause to try. This may or may not prove useful to you. Edited September 30, 2005 by Hai-Etlik Quote Link to post Share on other sites
Brian_Holiday Posted October 3, 2005 Author Report Share Posted October 3, 2005 The machine is working now, primarily due to the help you guys gave me (thanks). I do have a 'lesson learned': 1) IDE Raid cards have the option of hyjacking the primary IDE channels. My raid card remapped the drives by default, and it confused me. The bootloader ended up on IDE5 (The XP Drive). I finally had to disconnect the raid card to get it to load properly. I will be digging into my RAID card soon to figure out how to turn off the remap. Ubuntu works great, it recognized everything and it all works. I haven't gotten the network printer to work, but that isn't related to Linux. It didn't work under XP either. Thanks again all for the help. You have sparked my interest in doing a self study so I can better understand the bootloader. BH Quote Link to post Share on other sites
shanenin Posted October 3, 2005 Report Share Posted October 3, 2005 so did you leave xp on the primary or slave drive, I think you had the option to do it either way, just curious?so are one of your drives sata, or both of them ide? Quote Link to post Share on other sites
Brian_Holiday Posted October 3, 2005 Author Report Share Posted October 3, 2005 (edited) so did you leave xp on the primary or slave drive, I think you had the option to do it either way, just curious?so are one of your drives sata, or both of them ide?<{POST_SNAPBACK}> I had to put the bootloader into the MBR on the primary drive (master), with the XP load. Ubuntu is on another channel. (no slaves in my setup) Everything I see tells me XP MUST be on the first IDE drive. What is strange is how the RAID card remaps the drive during setup, and then boots from the XP drive designated IDE5. That question is going to grate on me until I figure it out, hopefully I will have time to work on it this week. BH Edited October 3, 2005 by Brian_Holiday Quote Link to post Share on other sites
shanenin Posted October 3, 2005 Report Share Posted October 3, 2005 thanks for the explanation :-) Quote Link to post Share on other sites
iccaros Posted October 3, 2005 Report Share Posted October 3, 2005 so did you leave xp on the primary or slave drive, I think you had the option to do it either way, just curious?so are one of your drives sata, or both of them ide?<{POST_SNAPBACK}> I had to put the bootloader into the MBR on the primary drive (master), with the XP load. Ubuntu is on another channel. (no slaves in my setup) Everything I see tells me XP MUST be on the first IDE drive. What is strange is how the RAID card remaps the drive during setup, and then boots from the XP drive designated IDE5. That question is going to grate on me until I figure it out, hopefully I will have time to work on it this week. BH<{POST_SNAPBACK}>xp must be on the primary partition not the primary drive. you can have 4 primary partitions on a single drive. this page may seem old but the information is all good. http://multiboot.solaris-x86.org/ Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.