also @ TechSpot: Asus P7P55D Deluxe Motherboard Review
Welcome to the TechSpot OpenBoards. Please read the FAQ if you have any questions. Login to participate.

Go Back   TechSpot OpenBoards > TechSpot Community > Guides and Tutorials

Dual boot Vista and Linux

Reply
Bookmark Thread Tools
  #1  
Old 04-30-2007
Phantasm66's Avatar
TechSpot Evangelist
 
Location: Glasgow, Scotland
Member since: Feb 2002, 6,703 posts
Dual boot Vista and Linux

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} )

then

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??
Reply With Quote
  #2  
Old 04-30-2007
TechSpot Evangelist
 
Location: Four Corners, US
Member since: Dec 2006, 8,893 posts
Thanks. Your work looks useful.
Reply With Quote
To remove this ad, sign in. To register for a new account, click here.
  
  #3  
Old 04-30-2007
Phantasm66's Avatar
TechSpot Evangelist
 
Location: Glasgow, Scotland
Member since: Feb 2002, 6,703 posts
Any time. Have fun.
Reply With Quote
  #4  
Old 05-17-2007
Newcomer, in training
 
Member since: Sep 2006, 15 posts
Thank you for your info. I have similiar but different thing.... I have using linux operating system and for my backup I am using windows server. it's awesome to work with two different operating system.
Reply With Quote
  #5  
Old 05-30-2009
Newcomer, in training
 
Member since: May 2009, 2 posts
Change to device value.

This is excellent and concise help but I had to make a change to get this to work for Windows7. I had to change the device value in the following manner.

bcdedit /set {cfc90cf0-f718-11db-b281-005056c00008} device partition=C:


More information on bcdedit can be found here:
technet.microsoft.com/en-us/library/cc709667(WS.10).aspx
microsoft.com/whdc/system/platform/firmware/bcd.mspx

A useful command to list all entries in the current store is:

bcdedit /enum


Thank you for your well researched post.
Reply With Quote
  #6  
Old 06-01-2009
AndrestheBean's Avatar
TechSpot Member
 
Location: Puerto Vallarta, Mexico
Member since: May 2009, 204 posts
System specs
i have always wanted to try ubuntu lol
Reply With Quote
  #7  
Old 06-01-2009
jobeard's Avatar
TechSpot Evangelist
 
Location: Southern Calif.
Member since: Apr 2005, 7,906 posts
cleverly done -- but WHY? The most important part is the install sequence
  1. Windows
  2. Linux (brandx)
  3. Grub
which preserves the Windows startup nicely.

Was there a particular problem with Vista+Linux+Grub you were solving?
Reply With Quote
  #8  
Old 06-02-2009
Newcomer, in training
 
Member since: May 2009, 2 posts
Yes, you are correct that Grub preserves the Windows login during install to the MBR. (At least for the Ubuntu 9.04 installation.) My need for the Windows controlled MBR was an attempt to track down an error with imaging the final build of both Win7 and Ubuntu 9.04 with Acronis True Image Home 2009.

I am building this computer in the hope of attracting my nine year old nephew's attention to computers and hope he will try things and break the installation. The Acronis image will allow me to put it back together relatively quickly.

Unfortunately, I have been receiving an error in Acronis telling me the partition is corrupt. This error led me to believe that Acronis was unable to read the MBR with Grub installed. It has taken me several days of troubleshooting in my sparse free time to figure out the error is caused by the logical partition I used to create a fifth partition to allow swap space and a FAT32 partition for fileswapping between Windows and Linux. I expect the Acronis error will disappear when I image with the Sector by Sector option.
Reply With Quote
Reply

Tip: Download Advanced SystemCare 3 Freeware - 1 Click A Day to Clean, Repair, Protect & Optimize your PC.

Thread Tools


Similar Topics
Topic Category Replies Last Post
Dual boot Vista and Linux The Alternative OS 15 2 Weeks Ago 03:22 AM
vista and xp dual boot Windows OS 3 02-16-2007 11:24 AM
Can't dual boot XP after installing Vista? Windows OS 5 02-04-2007 12:42 AM
Dual Boot Windows XP / Vista Windows OS 1 06-20-2006 01:22 AM
Dual boot vista uninstall WITHOUT XP cd Windows OS 2 04-30-2006 02:07 PM


All times are GMT -4. The time now is 10:13 PM.