Difference between revisions of "Dual boot with Windows"

From ArchWiki
Jump to: navigation, search
(Link to Grub2 instead of leaving out of date info here.)
m (added a boot loader, style corrections)
Line 4: Line 4:
 
This is a simple article detailing different methods of Arch/Windows coexistence.
 
This is a simple article detailing different methods of Arch/Windows coexistence.
  
== Using Grub2 ==
+
== Using a Linux boot loader ==
See [[Grub#Dual-booting]].
+
 
 +
You may use [[GRUB#Dual-booting|GRUB]] or [[Syslinux#Chainloading|Syslinux]].
 +
 
 +
== Using Windows boot loader ==
  
==Using Windows boot-loader==
 
 
Another option is sort of the reverse of what is described at the beginning of this article where GRUB loads the Windows boot loader, which then loads Windows. Under this option, the Windows boot loader load GRUB, which then loads arch.  
 
Another option is sort of the reverse of what is described at the beginning of this article where GRUB loads the Windows boot loader, which then loads Windows. Under this option, the Windows boot loader load GRUB, which then loads arch.  
  
===Using Windows 7/8 Boot-Loader===
+
=== Using Windows 7/8 boot loader ===
Excerpted from http://www.iceflatline.com/2009/09/how-to-dual-boot-windows-7-and-linux-using-bcdedit/
+
  
In order to have the Windows boot-loader see the linux partition, one of the linux partitions created needs to be FAT32 (in this case, /dev/sda3). The remainder of the setup is similar to a typical installation. Some documents state that the partition being loaded by the Win boot-loader must be a primary partition but I have used this without problem on an extended partition.
+
The following section contains excerptes from http://www.iceflatline.com/2009/09/how-to-dual-boot-windows-7-and-linux-using-bcdedit/.
  
*When installing the grub bootloader, install it on your '''/boot''' partition rather than the MBR. {{Note| For instance, my '''/boot''' partition is '''/dev/sda5'''. So I installed grub at '''/dev/sda5''' instead of '''/dev/sda''' <br>  For help on doing this, see [[Grub#Install to Partition or Partitionless Disk]]}}
+
In order to have the Windows boot loader see the Linux partition, one of the Linux partitions created needs to be FAT32 (in this case, {{ic|/dev/sda3}}). The remainder of the setup is similar to a typical installation. Some documents state that the partition being loaded by the Windows boot loader must be a primary partition but I have used this without problem on an extended partition.
  
*Under linux make a copy of the boot info by typing the following at the command shell:
+
* When installing the grub boot loader, install it on your {{ic|/boot}} partition rather than the MBR. {{Note|For instance, my {{ic|/boot}} partition is {{ic|/dev/sda5}}. So I installed grub at {{ic|/dev/sda5}} instead of {{ic|/dev/sda}}. For help on doing this, see [[GRUB#Install to Partition or Partitionless Disk]]}}
{{bc|1=
+
my_windows_part=/dev/sda3
+
my_boot_part=/dev/sda5
+
mkdir /media/win
+
mount $my_windows_part /media/win
+
dd if=$my_boot_part of=/media/win/linux.bin bs=512 count=1
+
}}
+
*Boot to windows and open up and you should be able to see the FAT32 partition. Copy the linux.bin file to C:\. Now run '''cmd''' with administrator privileges (navigate to Start->All Programs->Accessories, Right-click on Command Prompt and select “Run as administrator.”)
+
{{bc|
+
bcdedit /create /d “Linux” /application BOOTSECTOR
+
}}
+
*BCDEdit will return an alphanumeric identifier for this entry that I will refer to as {ID} in the remaining steps. You’ll need to replace {ID} by the actual returned identifier. An example of {ID} is {d7294d4e-9837-11de-99ac-f3f3a79e3e93}.
+
{{bc|1=
+
bcdedit /set {ID} device partition=c:
+
bcdedit /set {ID} path \linux.bin
+
bcdedit /displayorder {ID} /addlast
+
bcdedit /timeout 30
+
}}
+
  
Done! Reboot and enjoy. In my case I'm using the Win bootloader so that I can map my Dell Precision M4500's second power button to boot linux instead of windows.
+
* Under Linux make a copy of the boot info by typing the following at the command shell:
  
===Using Windows 2000/XP Bootloader===
+
my_windows_part=/dev/sda3
For information on this method see http://www.geocities.com/epark/linux/grub-w2k-HOWTO.html. I do not believe there are any distinct advantages of this method over the Linux bootloader; you will still need a {{ic|/boot}} partition, and this one is arguably more difficult to set up.
+
my_boot_part=/dev/sda5
 +
mkdir /media/win
 +
mount $my_windows_part /media/win
 +
dd if=$my_boot_part of=/media/win/linux.bin bs=512 count=1
 +
 
 +
* Boot to Windows and open up and you should be able to see the FAT32 partition. Copy the linux.bin file to {{ic|C:\}}. Now run '''cmd''' with administrator privileges (navigate to ''Start > All Programs > Accessories'', right-click on ''Command Prompt'' and select ''Run as administrator''):
 +
 
 +
bcdedit /create /d “Linux” /application BOOTSECTOR
 +
 
 +
* BCDEdit will return an alphanumeric identifier for this entry that I will refer to as {ID} in the remaining steps. You’ll need to replace {ID} by the actual returned identifier. An example of {ID} is {d7294d4e-9837-11de-99ac-f3f3a79e3e93}.
 +
 
 +
bcdedit /set {ID} device partition=c:
 +
bcdedit /set {ID}  path \linux.bin
 +
bcdedit /displayorder {ID} /addlast
 +
bcdedit /timeout 30
 +
 
 +
Reboot and enjoy. In my case I'm using the Windows boot loader so that I can map my Dell Precision M4500's second power button to boot Linux instead of Windows.
 +
 
 +
=== Using Windows 2000/XP boot loader ===
 +
 
 +
For information on this method see http://www.geocities.com/epark/linux/grub-w2k-HOWTO.html. I do not believe there are any distinct advantages of this method over the Linux boot loader; you will still need a {{ic|/boot}} partition, and this one is arguably more difficult to set up.
  
 
== See also ==
 
== See also ==
 +
 
[https://bbs.archlinux.org/viewtopic.php?id=140049 Booting Windows from a desktop shortcut]
 
[https://bbs.archlinux.org/viewtopic.php?id=140049 Booting Windows from a desktop shortcut]

Revision as of 09:59, 25 May 2013

This is a simple article detailing different methods of Arch/Windows coexistence.

Using a Linux boot loader

You may use GRUB or Syslinux.

Using Windows boot loader

Another option is sort of the reverse of what is described at the beginning of this article where GRUB loads the Windows boot loader, which then loads Windows. Under this option, the Windows boot loader load GRUB, which then loads arch.

Using Windows 7/8 boot loader

The following section contains excerptes from http://www.iceflatline.com/2009/09/how-to-dual-boot-windows-7-and-linux-using-bcdedit/.

In order to have the Windows boot loader see the Linux partition, one of the Linux partitions created needs to be FAT32 (in this case, /dev/sda3). The remainder of the setup is similar to a typical installation. Some documents state that the partition being loaded by the Windows boot loader must be a primary partition but I have used this without problem on an extended partition.

  • When installing the grub boot loader, install it on your /boot partition rather than the MBR.
    Note: For instance, my /boot partition is /dev/sda5. So I installed grub at /dev/sda5 instead of /dev/sda. For help on doing this, see GRUB#Install to Partition or Partitionless Disk
  • Under Linux make a copy of the boot info by typing the following at the command shell:
my_windows_part=/dev/sda3
my_boot_part=/dev/sda5
mkdir /media/win
mount $my_windows_part /media/win
dd if=$my_boot_part of=/media/win/linux.bin bs=512 count=1
  • Boot to Windows and open up and you should be able to see the FAT32 partition. Copy the linux.bin file to C:\. Now run cmd with administrator privileges (navigate to Start > All Programs > Accessories, right-click on Command Prompt and select Run as administrator):
bcdedit /create /d “Linux” /application BOOTSECTOR
  • BCDEdit will return an alphanumeric identifier for this entry that I will refer to as {ID} in the remaining steps. You’ll need to replace {ID} by the actual returned identifier. An example of {ID} is {d7294d4e-9837-11de-99ac-f3f3a79e3e93}.
bcdedit /set {ID} device partition=c:
bcdedit /set {ID}  path \linux.bin
bcdedit /displayorder {ID} /addlast
bcdedit /timeout 30

Reboot and enjoy. In my case I'm using the Windows boot loader so that I can map my Dell Precision M4500's second power button to boot Linux instead of Windows.

Using Windows 2000/XP boot loader

For information on this method see http://www.geocities.com/epark/linux/grub-w2k-HOWTO.html. I do not believe there are any distinct advantages of this method over the Linux boot loader; you will still need a /boot partition, and this one is arguably more difficult to set up.

See also

Booting Windows from a desktop shortcut