1

I am about to setup my new Laptop using a dual boot configuration of Ubuntu and Windows 10. I have previously used one drive and partitioned it to contain both the OS. Now, I have a 128Gb PCIe SSD and a 512Gb SSD. I would like my smaller drive to contain only the Ubuntu system and storage and the larger one to be only concerned with windows.

I understand that there are generally two ways to set this up:

Unplugging unused drive on install

  1. unplug 1 drive and install first OS on plugged in the drive

  2. unplug drive with the new system installed, plug in other drive and install 2nd OS

  3. plug-in all drives and configure BIOS/UEFI to select default startup disk
  4. on startup enter BIOS/UEFI to go into the non-default system

Using bootloader

  1. All drives remain in the machine for each installation
  2. install Windows first because Linux installations seem to be more considerate about dual boot setups and leave the windows installation in-tact
  3. After Windows is installed, install Linux and select secondary drive as system and data partition
  4. A boot loader should be created enabling to pick boot system on machine startup

Obviously, I used the second option with my previous setup, since unplugging a partition is physically impossible =). The bootloader ubuntu created for me worked fine, BUT it would default into Linux. This meant sticking to the pc while it booted and quickly cycling to the windows option when booting into my prefered OS - which is Windows.

I would like to have Windows set as my default boot OS, with a convenient way to enter my secondary OS (Ubuntu) when needed. All this being done with each OS installed on a separate drive.

Considering the methods mentioned above, what are the best practices to make this happen? Are there additional considerations or methods I have not mentioned?

  • 1
    You can easily configure the Ubuntu bootloader to boot into Windows by default... do you still want to do this? – user595510 May 10 '17 at 10:37
  • Be sure to boot both Windows & Ubuntu installers in UEFI boot mode, how you boot installer is how it installs. With Ubuntu also partition in advance and include (maybe only for future use) an ESP on the Ubuntu drive. If Windows drive is sda, then grub bootloader will install to that and work just fine. If in future you want just Ubuntu drive you can copy the /EFI/ubuntu folder to Ubuntu drive and manually add entries to may it boot on its own. askubuntu.com/questions/743095/… & help.ubuntu.com/community/UEFI – oldfred May 10 '17 at 14:43
5

You're trying to apply BIOS knowledge to an EFI-based computer, and that will lead you astray. (Note that EFI/UEFI is a replacement for the older BIOS. Many people -- and even manufacturers -- refer to EFIs as "BIOSes," but this is misleading.) In particular:

plug in all drives and configure BIOS/UEFI to select default startup disk

Under BIOS, boot loader code is read from a disk's Master Boot Record (MBR), so it's common to refer to "booting a disk" or something similar, and this is reasonably accurate. Under EFI, though, boot loader code is stored as ordinary files on an EFI System Partition (ESP). Importantly, a single ESP can contain multiple boot loaders, and you can have any number of ESPs. The computer knows which boot loader to run because that information in stored in NVRAM. Thus, although boot code is read from a disk, "booting a disk" is ambiguous at best, and downright deceptive in many contexts.

Instead, you should think of booting a file, and always keep in mind that the file to be booted is referenced in NVRAM. A further complication is that many (but not all) EFIs delete those NVRAM references if the file to be booted disappears. Thus, routinely unplugging disks so you can boot or install an OS on another disk can render the computer unable to boot the OS on the unplugged disk, even when you plug it back in. This fact makes the sort of disk-juggling you describe in your first option inadvisable. (It can be made to work, but if you try, it's imperative that you understand how your computer handles its NVRAM-based pointers to boot loaders, so that you can re-create any entries that are deleted.)

You should also be aware that Ubuntu has a bug that causes it to install its boot loader (GRUB) to the first ESP it finds (normally on /dev/sda), even if you try to tell it to do otherwise. It's possible to work around this bug by temporarily changing partition type codes.

Overall, if you intend to leave both disks in the computer for the long haul, I suggest you not be too concerned with completely isolating the two OSes from each other. In particular, don't obsess about isolating their boot loaders; just let the installers put the boot loaders where they want to put them. This should work fine for most purposes. If you intend to move the disks from one computer to another from time to time, though, you'll need to be more careful and learn more about ESP type codes, how your computer handles NVRAM entries pointing to boot loaders, etc.

As to making Windows the default OS, that's easily accomplished with a tool like GRUB Customizer. I can't offer specific advice on using it, though, since I avoid GRUB whenever possible. (I maintain the rEFInd boot manager, which can also be configured to boot Windows by default by changing the default_selection line in refind.conf.)

For more information on how EFI-mode booting works, I recommend reading one or more of the following:

Finally, modern EFIs provide a feature, known as the Compatibility Support Module (CSM), which enables them to boot using BIOS-mode boot loaders. (See my page on the CSM, referenced above.) If learning the EFI-mode ways seems like too much hassle to you, you can keep doing things in the BIOS way by using your computer's CSM; however, that poses its own risk. In particular, many computers never completely disable EFI-mode boot support, so you can easily end up with one OS installed in BIOS mode and the other in EFI mode, which will be harder to manage than either an all-EFI or an all-BIOS installation. Also, some EFIs lack a CSM, and it's likely that manufacturers will begin dropping the CSM in the future, so sticking with BIOS-mode booting will simply delay your need to learn about EFI-mode booting. IMHO, it's better to take an hour or two to learn the basics of EFI-mode booting than to try to stick with BIOS-mode booting via a CSM.

  • I'm not using UEFI but +1 for wonderfully detailed answer. – WinEunuuchs2Unix May 10 '17 at 15:00
  • You wrote that you are "about to setup my new Laptop." Any new computer is EFI-based, and if you keep the default configuration, it boots in EFI mode. If you wipe that installation, of course, you can use the EFI's CSM to boot in BIOS/CSM/legacy mode, as noted in my answer's final paragraph; but even then, you are using EFI firmware. – Rod Smith May 10 '17 at 19:26
  • Very true I'm running a UEFI program called CSM. But I'm not installing or configuring Grub EFI programs just the old i386 ones. – WinEunuuchs2Unix May 10 '17 at 19:40
  • Wow, thanks a lot! After your already insightful post, I'll definitely take the time to figure out UEFI system setup more. Funny enough, I started playing around with things before reading this and it just so happened I was dumb enough to install one sytem in legacy mode and one in UEFI, which was really messy – Basti Vagabond May 11 '17 at 20:05
  • Oops; I saw the comment from WinEunuuchs2Unix and thought s/he was the OP, hence my comment "you wrote that..."; but I see the OP was Basti Vagabond, so the quote in my earlier comment is misattributed. My apologies for any confusion. – Rod Smith May 13 '17 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.