Score:0

Dual Boot with SSD and HDD

ua flag

I have SSD in that I have installed a Ubuntu 20.04 and HDD in that I have installed WINDOWS os. I am using HP laptop with 12 GB RAM. So I would like know How can I manage dual boot like when needed I can switch OS for my use? Mainly I am using Ubuntu but sometime needed windows. SSD size is 240 GB, So I don't want to install windows in that.

Thanks

Merilyn Ne avatar
sy flag
I think you just need to go BIOS/UEFI to select which disk (ssd or hdd) to boot first, when you want to switch OS. Dual boot in my mind means 2 OSes installed in same disk and use a boot-loader (usually Grub2) to control which one to boot on startup.
5a01d01P avatar
ua flag
@MerilynNe, Thanks for your response. But SSD not available in BIOS/UEFI option. When I removing HDD, SSD directly Booting. But don't know why SSD not available in BIOS/UEFI setting. Any idea?
oldfred avatar
cn flag
Most HP only let you change boot order in UEFI settings, not UEFI boot order. And HPs typically find a Windows install, but not auto find a Linux install. If you are unplugging a drive, UEFI entries are forgotten & you have to redo those, probably in UEFI settings.
Score:1
in flag

There are several approaches to this.

You can use the BIOS boot menu to select the OS.

You can install the bootloader for both operating systems in the UEFI partition on the main boot drive, and do one of the following:

  • use a UEFI boot selector like refind to select between the installed operating systems
  • use linux grub to select between windows or ubuntu
  • use tools to add linux to the windows boot menu

The easiest would be to use grub to select, but this requires installing the linux bootloader in the same UEFI partition as the windows boot loader, and possibly enabling windows detection in the grub default options.

Score:1
jp flag

Modern EFI-based computers are much more flexible about boot options than were older BIOS-based computers. Under BIOS, you could select a default boot disk, or sometimes a non-disk device (like a network boot option), but that was about it. Under EFI/UEFI, boot loaders are programs stored in files on a disk, so one disk can contain many boot loaders, and you can set an order in which they're tried. Although most EFIs offer options to "boot a disk," that refers either to old BIOS-style booting (using something called the Compatibility Support Module, or CSM, which most likely isn't in play in your case); or booting using a "fallback" filename (EFI\BOOT\bootx64.efi on x86-64 systems). The question reveals BIOS-style thinking about the boot process, but that can lead one badly astray when dealing with EFI-mode booting.

In a properly-configured computer that dual boots Windows and Ubuntu, there are likely to be at least two boot entries, one for each OS, and likely other system-specific boot options for fallback boot loaders, built-in tools, etc. You can see the boot options in Linux with the efibootmgr tool, thus:

$ sudo efibootmgr
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,0009,0006,0007,0008,0001,0002,0003
Boot0000* ubuntu
Boot0001* UEFI:CD/DVD Drive
Boot0002* UEFI:Removable Device
Boot0003* UEFI:Network Device
Boot0006* UEFI OS
Boot0007* Hard Drive
Boot0008* CD/DVD Drive
Boot0009* Windows Boot Manager

In this example, Boot0000 (aka ubuntu) is first in the boot order and Boot0009 (aka Windows Boot Manager) is second in the boot order (although it's at the bottom of the list of boot entries). You can see more details by adding -v to the efibootmgr command, but the extra information takes some knowledge to parse.

Most OSes, on installation, set their own boot loaders to be the default. This fact has implications because some OSes' boot loaders do a better job of detecting other OSes' existence than others. The easiest way to dual-boot Ubuntu and Windows is to install Windows first and then Ubuntu; Ubuntu's GRUB 2 setup scripts will normally detect Windows and add it to the GRUB 2 boot menu. If this doesn't work or if you installed in the other order, there are a number of steps you can take to fix things, but I can't be certain which step(s) will do the trick for you. Options include:

  • Install my rEFInd boot manager, which scans for other OSes' boot loaders on every boot. You can install it in Ubuntu by typing sudo apt install refind.
  • If efibootmgr shows that Windows is first in the boot order, you can change the boot order with the -o option to efibootmgr, as in sudo efibootmgr -o 0,9,6,7,8,1,2,3 in the above example (if Windows were first there). Note that the exact numbers you type will be extremely system-specific! Also, you probably only need the first number or two; the others exist in case the first one doesn't work.
  • If you installed Ubuntu first and then Windows, then resetting the boot order with efibootmgr may be necessary, but won't be sufficient; you'll need to add Windows to the GRUB 2 configuration, too. This can normally be done with sudo update-grub. If this doesn't work, then you're into advanced GRUB configuration, which is a pain. Installing rEFInd is likely to be easier, but I'm biased. (I maintain rEFInd.)
  • If adjusting the boot order in efibootmgr doesn't have a permanent effect, then you're probably looking at a boot coup, which can be tricky to fix, as described on the linked page. Identifying the cause of the boot coup is important -- is it Windows resetting itself as the default on every boot? Is your NVRAM flaky? Is GRUB failing and exiting, leading to the EFI booting Windows instead? Is the UEFI firmware buggy? The best solution is different for each cause.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.