Partner links

7 tips for dual-booting Linux distributions and Windows

dualBoot5

Alternates title: Tips for dual-booting Windows and Linux; tips for dual-booting Windows and Linux on a computer with 2 two hard drives; tips for dual-booting Windows and Linux on a computer with an SSD and 1 HDD.

This is an updated version of tips for dual-booting Windows and Linux. Information for dual-booting using a combination of a Solid State Drive (SSD) and a regular hard drive (HDD) have been included. Most of the material from that article have been reposted here, with some modification.

A future update version of this updated version will include materials on dual-booting using UEFI hardware and also information regarding Windows 8. Once I acquire a UEFI hardware and I can get a copy of Windows 8, then that update will be published.

That ends the intro, the article starts below.

Multi-booting, installing more than one operating system on a computer’s hard drive(s), has become very popular over the years, fueled, of course, by the popularity of Linux as an alternate system on desktops and servers. Dual-booting, installing two operating systems on a computer is a subset of that, and in this article, basic guidelines to follow when attempting to dual-boot a Linux distribution and Windows are presented.

The most common practice is to dual-boot on a computer with one hard drive. That, however, gives the system a single point of failure. If you can afford to, the best option is to install each operating system on a separate hard drive. That ensures that if something goes wrong with an OS or one hard drive, you can always boot from the other drive, and troubleshoot the other one whenever you are can. That is tip number 1 for dual-booting your favorite Linux distribution and Windows.

Tip Number 2: When attempting to dual-boot on a computer with one hard drive, always install Windows first, followed by your Linux distribution. Why? Because Windows is intentionally designed to destroy everything in its path. So, if it finds another operating system on the same hard drive it is being installed on, it has no built-in mechanism that allows it to play nice.

Tip Number 3: If you are going to dual-boot on a computer with an existing installation of Windows, and you do not want to re-install Windows, it means you will have to shrink the Windows partition to create room for your choice of Linux distribution. You can do this from inside Windows or from the Linux installer, and be sure that your data will be left intact. But remember to back up our data before shrinking your C drive. There is a saying in the stock and commodities trading business which goes like this: “You can never go broke by taking profits.” We can rephrase that for dual-booting to: You can never lose your data by backing it up. Back up your data before messing with your C drive.

Tip Number 4: Every tip in this article is important, but this is even more so. When attempting to dual-boot on a computer with one hard drive, do not install Linux or make the mistake of installing Linux on the same partition that Windows is installed on. That is the same thing as deleting your C drive. So look before you install.

Tip Number 5: By default, the boot loaders of operating systems are installed in the Master Boot Record (MBR) of a hard drive, which is located at the very beginning of the drive. That is the best location for it. However, when attempting to dual-boot Windows and a Linux distribution on a computer with one hard drive, you have another option: Install the Linux boot loader on a separate boot partition, and have the Windows boot loader be responsible for dual-booting both operating systems. Whether you choose to follow this tip or not depends on your tolerance for pain, because the alternative is to use the default, that is, install the Linux boot loader in the MBR.

The problem with that is if you ever have to reinstall Windows, or upgrade it, it will wipe the Linux boot loader and install its own (boot loader). Also, some anti-virus programs have been known to install small files in the MBR, so that could be another source of pain, if you have to install an anti-virus program on Windows.

This screen shot shows how the installation program of Fedora, a popular Linux distribution, gives you a choice of locations for installing its boot loader. In the system where this screen shot was taken, /dev/sda3 is the boot partition. In this case, it is a primary partition. If you are new to Linux, you might want to read guide to disks and disk partitions in Linux.
fedwinDl10

With the Linux boot loader installed some place other than the MBR, an entry must be added to Windows boot menu, so that whenever the computer boots, Windows’ boot menu will look just like the one shown in the image below.
BCD4

Tip Number 6: When attempting to dual-boot on a computer with two hard drives, it is best to install the respective boot loaders on their operating system’s hard drive. Keeping them completely apart in that fashion makes troubleshooting and management a bit less of a hassle. Keep in mind that even in this type of setup, you can still locate an NTFS partition on the second hard drive, that is the Linux hard drive. And that NTFS partition can be before or after the Linux partitions, that is, at the beginning or end of the hard drive.

Tip Number 7: Normally, you would set up a dual-boot system using two regular hard drives, but now that Solid State Drives (SSDs) are being shipped with some computers and are relatively cheap to acquire, you might want to use a combination of an SSD and a regular hard drive for dual-booting. With a combination like that, the best approach for dual-booting, is to locate the Windows system partition on the SSD, and the Windows data partition (the C drive) and the Linux distribution on the HDD. The C drive can be before or after the Linux partitions, but the Linux boot loader must be installed in the MBR of the HDD.

Notes:

  • Installing a Linux distribution on an external hard drive attached to a Windows machine is not considered dual-booting, even though the distribution’s installer automatically adds an entry for Windows in GRUB’s menu.
  • It is not possible to dual-boot Windows and Linux on an external hard drive. Why? Windows will not allow itself to be installed on an external hard drive. I am sure there are ways around this, but it is generally not possible.

Share:

Facebook
Twitter
Pinterest
LinkedIn

Partner links

Newsletter: Subscribe for updates

Subscribe
Notify of
guest
25 Comments
Inline Feedbacks
View all comments
Bueller
Bueller
9 years ago

Very useful article. Thanks!

Quick question (re: Tip 5), how should i add an entry to the Windows boot menu to point to the GRUB that i have installed on another partition? What does the entry in the boot.ini look like?

I can’t use EasyBCD as i have Windows XP only.

wallep
wallep
11 years ago

Hi finid and Kurt,

on Sept. 13, 2012 @ 6:58pm Kurt said,
> In my opinion, the best way to dual boot windows and
> linux, is to use two hard drives, install windows to
> the first hard drive (skip that step if preinstalled),
> then disconnect this drive, install another hard drive
> as the first hard drive and install linux. Then connect
> the windows drive as the SECOND hard drive. Boot into
> linux and edit the grub.conf file to add an entry to
> boot windows using the chainloader. As windows will
> only boot if it is the first drive, use the grub map
> command to switch the first and second drives. No
> changes at all are made to the windows drive MBR or
> anything else, and windows will just boot when you
> select it from the grub boot menu.

Help me out here please. I currently have the installer running for Debian Squeeze netinst ver. 6.0.6. I’m at the partition set-up screen.

I will be dual-booting (win2k and Debian). Windows 2000 has its own hard drive and is currently fully operational. I installed another drive for Debian. Both drives are on the same cable (win2k drive set to ‘master’ and debian drive set to ‘slave’).

I have backed up all data on my windows drive and even cloned it to another drive that I keep in storage. Therefore I’m ok on the back-up warning.

My system is a legacy system. Its a “dual” Pentium III total 2.0 GHz cpu with 1 gig of DDR RAM running windows 2000 spk 4. I built the system in 2001. The motherboard is an iWill-DVD266R with max capacity of 4 gigs for DDR memory. I currently have 1 gig installed of DDR.

This win2k system is still my main desktop and is a real workhorse. I do utilize newer OS’s on other systems but this is the system I’d prefer to utilize as a dual-boot.

QUESTION #1 Please
Can I still utilize the article that ‘finid’ wrote titled, “Dual Booting Win7 and Ubuntu 12.04 using two hard drives” for my ‘Debian Squeeze netinst’ install using two separate drives? Or do I need to be concerned with Kurt’s option described above?

Kurt’s excellent alternative is too advanced for me as this is my first Linux install? I can easily understand finid’s tutorial.

QUESTION #2 Please:
Also, do I need to be concerned about the UEIF firmware issue that was addressed in another tutorial as it relates to my ‘dual’ pentium III system? The tutorial is titled, “Dual-boot Windows 7 and Ubuntu 12.04 on a PC with UEFI board, SSD and HDD”.

see: http://www.linuxbsdos.com/2012/10/10/dual-boot-windows-7-and-ubuntu-12-04-on-a-pc-with-uefi-board-ssd-and-hdd/

Thank you

wallep
wallep
11 years ago

Hi finid and Kurt,

on Sept. 13, 2012 @ 6:58pm Kurt said,
> In my opinion, the best way to dual boot windows and
> linux, is to use two hard drives, install windows to
> the first hard drive (skip that step if preinstalled),
> then disconnect this drive, install another hard drive
> as the first hard drive and install linux. Then connect
> the windows drive as the SECOND hard drive. Boot into
> linux and edit the grub.conf file to add an entry to
> boot windows using the chainloader. As windows will
> only boot if it is the first drive, use the grub map
> command to switch the first and second drives. No
> changes at all are made to the windows drive MBR or
> anything else, and windows will just boot when you
> select it from the grub boot menu.

Help me out here please. I currently have the installer running for Debian Squeeze netinst ver. 6.0.6. I’m at the partition set-up screen.

I will be dual-booting (win2k and Debian). Windows 2000 has its own hard drive and is currently fully operational and I installed another drive for Debian. Both drives are on the same cable (win2k drive set to ‘master’ and debian drive set to ‘slave’).

I have backed up all data on my windows drive and even cloned it to another drive that I keep in storage. Therefore I’m ok on the back-up warning.

My system is a legacy system. Its a “dual” Pentium III total 2.0 GHz cpu with 1 gig of DDR RAM running windows 2000 spk 4. I built the system in 2001. The motherboard is an iWill-DVD266R with max capacity of 4 gigs for DDR memory. I currently have 1 gig installed of DDR.

This win2k system is still my main desktop and is a real workhorse. I do utilize newer OS’s on other systems but this is the system I’d prefer to utilize as a dual-boot.

Can I still utilize the article that ‘finid’ wrote titled, “Dual Booting Win7 and Ubuntu 12.04 using two hard drives” for my ‘Debian Squeeze netinst’ install using two separate drives? Or do I need to be concerned with Kurt’s option described above?

Kurt’s excellent alternative is too advanced for me as this is my first Linux install? I can easily understand finid’s tutorial.

Also, do I need to be concerned about the UEIF firmware issue that was addressed in another tutorial as it relates to my ‘dual’ pentium III system? The tutorial is titled,
“Dual-boot Windows 7 and Ubuntu 12.04 on a PC with UEFI board, SSD and HDD”.

see: http://www.linuxbsdos.com/2012/10/10/dual-boot-windows-7-and-ubuntu-12-04-on-a-pc-with-uefi-board-ssd-and-hdd/

Thank you

Kurt
Kurt
Reply to  finid
11 years ago

Finid,

I’m with you on putting Linux on the first or primary drive and putting the Windows disk as the second drive. As far as I know, there is no practicable way to do this except to first install Windows with the disk as the first drive, as that is the only way windows will install, and then move it to be the second drive either physically or with the BIOS if your BIOS will do that. Then yes, install another hard drive as the first hard drive and put Linux on it. If you have a very clever installer, it may put the correct entry in GRUB to boot the windows disk, but the issue is that Windows must think it is the first hard disk or it won’t boot. That is what the map entry is for in grub.conf. It will swap the drive order before booting Windows with the chainloader. I am not aware that the typical Linux installer will do this correctly, but then I don’t know much.

The point of not having the windows drive connected while you are installing Linux is to make sure that nothing is changed on the Windows drive. The computer case is already open, so connecting the drive or not is no big deal.

The only tricky part is putting the correct entry in grub.conf, but even here, it won’t hurt anything if done incorrectly. After it is set up, no further mucking around in the internals is required.

Anyway, that is just my 2 cents, and I hope you don’t mind me throwing it into the pot.

Kurt

Kurt
Kurt
Reply to  finid
11 years ago

Well I guess that will put Grub on the second drive, but the point of the procedure I was outlining is that it does not touch the windows drive at all.

Kurt

SAlder
SAlder
11 years ago

Anyone else find it funny that they used Fedora 14 (the last really user-friendly Fedora) for this article?

Caesar Tjalbo
Caesar Tjalbo
11 years ago

“the best approach for dual-booting, is to locate the Windows system partition on the SSD”

Why? I can see you’re looking for an easy solution but if you’re primarily using linux, you’re not getting much of the benefits of SSD.

Caesar Tjalbo
Caesar Tjalbo
Reply to  finid
11 years ago

You’re right, the tips are apparently geared towards people who use “Linux as an alternate system”.

Perhaps in the next iteration of these tips, the author wants to include information for those who’d like to set up Linux on the SSD.

Caesar Tjalbo
Caesar Tjalbo
Reply to  finid
11 years ago

(I hadn’t seen before you’re the author)

In a setup with 2 drives, you’d install windows first and then linux, regardless what you use the most. That’s the order of installing.

If these 2 drives are a normal hd and a ssd, why would i place windows on the ssd if i’ll be using linux more than windows?

In other words, why is it recommended to locate linux on the hd? Can’t linux boot from a ssd?

ka
ka
11 years ago

As a guide for someone completely new to dual booting this is a quite good guide. A hands-up would be on step 3 in the event the computer came pee-installed with 4 primary partitions on a disk with a msdos partition table. In this case shrinking a partition is pointless as a disk with msdos partition table only can hold 4 primary partitions. In this case you need to make a decision:

1) don’t touch the disk and use a second hard drive
2) move the data from for example the “User data” partition to the root partition and replace it with an extended partition. (The “user data” partition may then be recreated as a logical partition within the extended partition if so desired)
3) consider installing linux on an image file within the windows partition (not recommended – as this is fragile, but it is ok for uncommitted testing) – Ubuntu do this easily using the Wubi installer.
4) Install to an external disk – memory stick – linux is in fact reasonable fast even running from USB sticks, but an external USB 3.0 disk would run great! (notice that booting with USB 3.0 support might require grub to add the boot parameter “pci=nomsi”.

In two disk setup I would actually recommend considering backup partitions, and partitions for increased performance on the opposite disks. I would create a partition to store the windows pagefile.sys within an NTFS partition on the opposing disk for windows, and a swap partition or partition holding a swap file on the disk opposing linux. The same is the case for backup partitions.

Another comment – Whereas linux is good for trouble shooting windows problems, windows is not good for troubleshooting linux problems. For this it is better to keep a boot-able rescue cd or live usb stick handy. I do actually tend to install a rescue partition on the second disk.

Kurt
Kurt
11 years ago

In my opinion, the best way to dual boot windows and linux, is to use two hard drives, install windows to the first hard drive (skip that step if preinstalled), then disconnect this drive, install another hard drive as the first hard drive and install linux. Then connect the windows drive as the SECOND hard drive. Boot into linux and edit the grub.conf file to add an entry to boot windows using the chainloader. As windows will only boot if it is the first drive, use the grub map command to switch the first and second drives. No changes at all are made to the windows drive MBR or anything else, and windows will just boot when you select it from the grub boot menu.

See this thread:

http://ubuntuforums.org/showthread.php?t=275728

Kurt

Kurt
Kurt
Reply to  finid
11 years ago

Well no, you can’t do this with out disconnecting and reconnecting the windows drive. But you only have to do it once. The point is, under this scenerio, you want The linux drive to be the first drive with the MBR so that the computer will boot grub. Then you can select from the grub menu which operating system to boot. Grub will take care of making the windows drive think it is the first drive using the grub map command. The beauty of this is that you can add a linux drive/OS to an existing Windows system without changing a thing on the windows drive except swapping the cables. I like to keep the windows drive disconnected during the Linux install to prevent accidents.

Try it sometime. It’s sweet.

Kurt

Kurt
Kurt
Reply to  finid
11 years ago

I guess you could say “It depends” SATA drives are ordered by the connector on the motherboard, although which drive is the boot drive or number one drive can be set in the bios of some, but not all motherboards.

If you can select the boot drive through the bios or by a function key at boot, then you can connect your windows or linux drive as you wish, and just select the drive you want to boot through the bios. If you cannot use the bios to select the boot drive, or don’t want to use it, then setting up grub as I described above is the way to go.

Kurt

Fitzcarraldoblog
Reply to  Kurt
11 years ago

As far as laptops are concerned, most don’t have two internal hard drives. Furthermore, many laptops cannot have two internal hard drives fitted and many people don’t want to cart around an external hard drive with a laptop. In such cases the only solution if one wants to dual boot is to use the internal hard drive for both operating systems.

Fitzcarraldoblog
11 years ago

Regarding your tip no. 5, there is another reason why it is better to use the Windows boot loader to chainload the Linux boot loader in the boot sector of a partition: many desktop and laptop machines have a hidden ‘factory restore’ partition for Windows, which you can invoke using certain keypresses at boot. Some manufacturers put code for that in the MBR, so if you install the Linux boot loader there you may overwrite it. See e.g. http://fitzcarraldoblog.wordpress.com/2010/12/28/the-best-way-to-dual-boot-linux-and-windows/

Get the latest

On social media

Security distros

Hacker
Linux distros for hacking and pentesting

Crypto mining OS

Bitcoin
Distros for mining bitcoin and other cryptocurrencies

Crypto hardware

MSI GeForce GTX 1070
Installing Nvidia GTX 1070 GPU drivers on Ubuntu

Disk guide

LVM
Beginner's guide to disks & disk partitions in Linux

Bash guide

Bash shell terminal
How to set the PATH variable in Bash
Categories
Archives
25
0
Hya, what do you think? Please comment.x
()
x