Page 1 of 8 123 ... LastLast
Results 1 to 10 of 74

Thread: How to dual boot Ubuntu and Windows XP without changing the Windows MBR

  1. #1
    Join Date
    Aug 2005
    Beans
    37

    How to dual boot Ubuntu and Windows XP without changing the Windows MBR

    How to dual boot Windows and linux without changing the Windows Master Boot Record:

    (I'm assuming you've read other FAQs on how to install linux to your partition of choice. I recommend creating a partition on a second hard drive. That's the risk free option if you don't want to destoy Windows on your primary partition. But you should be able to create a partition on your primary hard drive by using software that can non-detructively resize your Windows partition. QTParted is a good program which can be downloaded if you're running the ubunut live CD. Back up though. It doesn't always work. I don't think the partition resizer in the ubuntu installer can do non-destructive.)

    When installing ubuntu, install the boot loader (GRUB) to a floppy disk instead of the MBR. ie. when prompted for grub location enter: /dev/fd0

    Boot into ubuntu with the floppy.

    Open a terminal window.

    Copy your bootloader from the floppy to a file called bootsect.lnx with this command:
    dd if=/dev/fd0 of=bootsect.lnx bs=512 count=1

    Save that file somewhere that you can access from within Windows. ie a FAT partition, a USB drive, a floppy (but not your boot floppy!) Don't try saving it to an NTFS Windows XP partition from within linux. (Bad!)

    Reboot into Windows. (hint: take the floppy out of the drive. Keep it somewhere as a rescue boot floppy.)

    Copy bootsect.lnx from wherever you had stored it to c:\bootsect.lnx

    Open a file called c:\boot.ini
    (It's normally a hidden read-only file, so you may have to change the folder and file options.)

    After opening boot.ini add the following line to the end of it and save it:
    c:\bootsect.lnx=”Linux”

    Reboot your system.

    You will be prompted to boot either Windows or Linux and your MBR hasn't been changed at all!

    It's magic!
    I use this setup to boot ubuntu from the third partition of my second hard drive. As ubuntu is on a second drive I haven't made any changes to my Windows partition at all! Risk free.

    (If you do screw up your MBR and can't get into Windows try booting your Windows rescue CD and then type 'fdisk /mbr' to restore it. If you already have ubuntu installed I think you can make a boot floppy this way, but I"m not 100% certain: In a console, type grub-intall /dev/fd0.)

    I apologize if to anyone who's already read this in the installation forum but someone suggested it would be more useful to post this here.

    James.

  2. #2
    Join Date
    Nov 2004
    Location
    Purdue University, Indiana
    Beans
    816
    Distro
    Dapper Drake Testing/

    Re: How to dual boot Ubuntu and Windows XP without changing the Windows MBR

    Good guide; is there any way to do this without a boot floppy? Ubuntu installs GRUB onto its own partition if you don't use the MBR, right? Can you somehow get the first section of the drive you install Ubuntu onto?

    Contrary to popular belief, the Ubuntu installer can resize NTFS and FAT32. Here's a guide on how to do this, with pictures:
    http://www3.telus.net/linux4u/ubuntu.html

  3. #3
    Join Date
    Aug 2005
    Beans
    37

    Re: How to dual boot Ubuntu and Windows XP without changing the Windows MBR

    I thought that would work to. That was what I tried first. I tried writing GRUB to the boot sector of my root linux partition and then grabbing the data from there, but I couln't get it to work. I also tried writing it to the boot sector of the first partition of the second drive. Coping the data from there didn't work either. But I coudn't boot from directly from there either by changing my BIOS settings. It has something to do with chain loaders and BIOS drive mapping that I don't really undertand. But I was able to get my system going from a floppy and I was able to extract what I needed from there.

  4. #4
    Join Date
    Aug 2005
    Beans
    73

    Re: How to dual boot Ubuntu and Windows XP without changing the Windows MBR

    Is there a way to to repair the MBR and do this after you have installed linux?

  5. #5
    Join Date
    Aug 2005
    Location
    Michigan, USA
    Beans
    5
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How to dual boot Ubuntu and Windows XP without changing the Windows MBR

    Quote Originally Posted by celticmonkey
    I tried writing GRUB to the boot sector of my root linux partition and then grabbing the data from there, but I couln't get it to work.
    So,

    Code:
    dd if=/dev/hda6 bs=512 count=1 of=/linux.bin
    doesn't work with Ubuntu? This is the method I used to set up dual booting on my laptop--which doesn't have a floppy disc--under Kanotix/Knoppix et. al. I copied the linux.bin file to my c:\ directory and then appended an entry for Linux to c:\boot.ini.

    I'm glad I stumbled into this forum before trying to install Ubuntu. I would have been livid!

  6. #6
    Join Date
    Aug 2005
    Beans
    73

    Re: How to dual boot Ubuntu and Windows XP without changing the Windows MBR

    Do you think it would be possible to install grub to another created partition then boot from the live cd and copy the config from there? THen boot to windows and do the rest?

    I tried to do a new installation and install grub to floppy (/dev/fd0 like you said) and got a fatal erorr. Floppy and floppy drive function normally in windows.
    Last edited by Slicedbread; August 14th, 2005 at 03:29 PM.

  7. #7
    Join Date
    Aug 2005
    Beans
    37

    Re: How to dual boot Ubuntu and Windows XP without changing the Windows MBR

    I hope I haven't misinformed anybody with my FAQ. I absolutely know that you should be able to write the grub to a hard disk and copy the info from there. Other people have done it. It just didn't work with my computer.

    On my work computer I have two harddrives. I installed linux to the second along with the boot loader. Then I changed the BIOS to boot from the second and then from the boot menu could pick either linux or windows.

    When I tried that at home it wouldn't work. I've got some wierd BIOS issues I think. Something to do with drive mappings being switched? I don't know exactly. I also ran into trouble installing the boot loader to the MBR. Windows wouldnt' boot then. (If you ever screw up your MBR, user the windows rescue CD and "fdisk /mbr". Or get a hold of the "The Ultimate Boot CD". It has tools for restored a MBR as well as some other cool stuff. http://www.ultimatebootcd.com/) Anyway, then I moved on to the above method. I didn't have any luck copying from my hard drive partition, but I think that relates in some way that I don't understand to my wierd BIOS issues. The boot loader gets confused about what drive it is booting because BIOS has switched the drive mapping maybe? I don't know. There's a lot I don't undertand about booting. But it did boot off the floppy. So that's what I did and that's where I copied the loader from. I foolishly assumed that everyone still has a floppy these days, which of course they don't. Mabye that solution won't work for everyone.

  8. #8
    Join Date
    Aug 2005
    Beans
    94
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How to dual boot Ubuntu and Windows XP without changing the Windows MBR

    Quote Originally Posted by celticmonkey
    How to dual boot Windows and linux without changing the Windows Master Boot Record:


    When installing ubuntu, install the boot loader (GRUB) to a floppy disk instead of the MBR. ie. when prompted for grub location enter: /dev/fd0

    Boot into ubuntu with the floppy.


    James.
    I've installed Ubuntu 5.04 a couple of times now and I have never been prompetd for a location to install grub --what am I missing?
    Charley

  9. #9
    Join Date
    Jul 2005
    Location
    Rolla, MO
    Beans
    228
    Distro
    Ubuntu 6.06

    Re: How to dual boot Ubuntu and Windows XP without changing the Windows MBR

    Quote Originally Posted by BiggoCharley
    I've installed Ubuntu 5.04 a couple of times now and I have never been prompetd for a location to install grub --what am I missing?
    Charley
    I wondered about this too, but I think it depends on whether GRUB is already installed on the MBR.

    When I installed Ubuntu for the first time, it prompted me for where to install GRUB. However, the second time (I experimented a little too much) it didn't ask me.

  10. #10
    Join Date
    Aug 2005
    Beans
    37

    Re: How to dual boot Ubuntu and Windows XP without changing the Windows MBR

    I tried this again on another machine and was prompted for a location to install grub. The installer autodetected another OS and asked where I wanted grub. It may be, however, that if grub is already on the MBR you need to do something else.

    I should have said that none of this works for Windows 95 and 98. You need 2000, NT or XP.

Page 1 of 8 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •