Spread the love! TechSpot Tech Gift Shortlist 2017

Dual boot Vista and Linux

By Phantasm66 · 17 replies
Apr 30, 2007
  1. OK, I had to investigate this just recently, so I thought I would share. Here is what to do if you want to add Linux to Vista's boot menu, rather than using Grub in the Master Boot Record.

    # Install Vista as normal.

    # Install Linux, but install Grub to the bootsector of your / partition (which from now on we will call /dev/sda3) and NOT the MBR (i.e. /dev/sda)

    # Boot Linux from the install CD, choose rescue mode.

    # From the command prompt in rescue mode, mount your Linux installation partition, i.e.

    mount /dev/sda3 /mnt/sysimage

    then chroot it:

    chroot /mnt/sysimage

    reinstall Grub just to make sure that its working OK

    /sbin/grub-install /dev/sda3

    now, make a file image of the bootsector of /dev/sda3:

    dd if=/dev/sda3 of=bootsect.lin bs=512 count=1

    copy the bootsect.lin to somewhere you will be able to get it back when in Vista.

    # Now, back in Vista

    copy bootsect.lin to c:\

    open a command prompt with cmd, and do the following:

    bcdedit /displayorder {current}

    bcdedit /create /d "Linux" /application BOOTSECTOR

    (should say something like created entry, it will give it a name, like {cfc90cf0-f718-11db-b281-005056c00008} )


    bcdedit /set {cfc90cf0-f718-11db-b281-005056c00008} device boot
    bcdedit /set {cfc90cf0-f718-11db-b281-005056c00008} PATH \bootsect.lin
    bcdedit /displayorder {cfc90cf0-f718-11db-b281-005056c00008} /addlast
    bcdedit /timeout 5

    # Reboot, Linux is now in the boot menu which if you select it you will go into Grub.

    Easy, eh??
  2. raybay

    raybay TS Evangelist Posts: 7,241   +10

    Thanks. Your work looks useful.
  3. Phantasm66

    Phantasm66 TS Rookie Topic Starter Posts: 5,734   +8

    Any time. Have fun.
  4. herbiepopnecker

    herbiepopnecker TS Rookie

    I upgrade my dual boot Ubuntu/XP Toshiba A70 to Vista, forgot it would trash grub. Not asking for a fix, warning others do like I did, ghosted the XP partition onto a USB drive.
    Couple more days, and I'm ditching that P.O.S. Vista for good. Nothing but five minute bootups, software reinstalls, blue screens and other problems!
  5. raybay

    raybay TS Evangelist Posts: 7,241   +10

    Didn't Ubuntu require FAT32, whereas Windows Vista required NTFS?
  6. herbiepopnecker

    herbiepopnecker TS Rookie

    Let me get my archeology tools and dig up what FAT32 wuz...
    NTFS was for XP, Linux uses ext3. Vista has some stupid new MS file system...
    FAT32 should only be on a tech's USB stick so you can read the tools for stubborn old coots on 98...
  7. doradeno2003

    doradeno2003 TS Rookie

    Hello to everyone here this is my first post.

    Now I have a question
    can I do dual boot with XP and Linux instead of Vista and Linux?
    and how can I do it?
  8. hamad2919

    hamad2919 TS Rookie

  9. Sicilian

    Sicilian TS Rookie

    Heres some very good, easy to follow dual booting guides. I even managed to install vista then ubuntu following these guides http://apcmag.com/node/5162/
  10. fenderguy2112

    fenderguy2112 TS Rookie Posts: 28

    Looks like a good idea, however you can never be 100% sure both os's will stay consistant in that grub menu.
  11. Phantasm66

    Phantasm66 TS Rookie Topic Starter Posts: 5,734   +8

    You certainly can.

    Install Linux to any partition you like. Once booted, find out the device the / partition (where grub should be in the bootsector) is installed to.

    df -h

    should tell you this, you are looking for the device / is mounted to.

    if its /dev/sda3, then do this:

    dd if=/dev/sda3 of=bootsect.lin bs=512 count=1

    this will create a file called bootsect.lin in your present working directory.

    copy this file to c:\

    edit c:\boot.ini and append the following line:

    c:\bootsect.lin = "Linux"

    Reboot and choose Linux from the boot menu.
  12. SNGX1275

    SNGX1275 TS Forces Special Posts: 10,742   +419

    Its not even that complicated Phantasm66. Ubuntu, PCLinuxOS 2007 and Suse (probably others but I haven't tried) will resize your Windows partition for you and then install. Once they install they use grub or lilo and your Windows install is an option.

    I suppose if you insist on using Windows' bootloader then the manual way is how it would need to be done.
  13. hemanty

    hemanty TS Rookie

    Xp & Fedora 8 on same disk ?


    This is my first post on this forum & this is my first attempt to install a Linux!
    I have a PC with one single internal hard disk with two partitions!
    I have a external USB drive with around 30 GB space!

    I read various posts on this forum about how to install Fedora on second
    disk! I haven't come across anything that talks about how to install XP &
    Fedora on the disk! Is this possible ? If so, how can one go about doing
    it ?

    Also, if it's not possible, can I install Fedora on external USB drive ?
    I have used the USB drive as a backup for my internal disk! Is it possible
    to make it bootable for Fedora ? If so, how to do it ?

    Thank you for your help in advance!
  14. hemanty

    hemanty TS Rookie

    XP & Fedora on same hard disk!

    I am searching on internet for few hours, I found a way to resize
    main partition "ntfs" occupied by XP using tool "Qtparted" on Knoppix
    live CD! Even though I have taken backup, I was bit nervous about
    it as I haven't this kind of stuff before in my life! It was easy thing to
    it! It took me three hours to do it - including downloading, live CD,
    buring DVD, booting maching with DVD, running Knoppix and resizing
    the partion!

  15. rokit

    rokit TS Rookie

    Hey I've tried going through all those steps, but can't get it to work. Linux shows up as an option, but GRUB never gets loaded. The screen goes black and there's a blinking cursor at the upper left (which is actually what happens right before Linux loads up), however the cursor just keeps blinking until I turn off the PC.

    I figure my setup might be partly to blame, but I'm not sure. I am quad-booting on two hard drives. I've got two Vista partitions on the first drive, and a Vista and Linux partition on the second drive. When the computer first starts up the Windows MBR displays all my OS choices (including Linux although it gets me nowhere). I can successfully boot all 3 Vista partitions from there. If I want to boot into Linux, I have to change the order in which the drives are booted and it works just fine. However, it would be a lot more convenient if I could boot Linux from the boot list.

    Here are some settings I've tried:
    bcdedit /set {ID} PATH \linux.bin <-- I made this file before I came across this post
    bcdedit /set {ID} PATH \bootsect.lin
    bcdedit /set {ID} device boot
    bcdedit /set {ID} device partition=C:

    Of course, I tried these one by one. Anyone know what the problem could be?
  16. WinXPert

    WinXPert TS Guru Posts: 445

    Thanks Phantasm66.

    To rokit try GAG. Haven't tried it on Vista/Linux but It works with XP/Linux.
  17. kmetek

    kmetek TS Rookie

    isnt there a simple program for dual boot?
  18. Leeky

    Leeky TS Evangelist Posts: 3,797   +117

    Linux will handle dual boot and sort it out to boot into two or more OS' for you mate. :)
Topic Status:
Not open for further replies.

Similar Topics

Add your comment to this article

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...