5

I have just bought a Dell Inspiron laptop which supports both UEFI and legacy boot mode. I already have Windows 10 installed in legacy boot mode. Do I need to install Ubuntu in legacy boot mode or UEFI mode for dual boot? Which mode will be better?

Newbyte
  • 109
  • 1
    if windows is in legacy then ubutnu has to be in legacy. or both in UEFI – ravery Jul 13 '17 at 13:37
  • 1
    @ravery if you don't mind what happens if I install ubuntu in UEFI mode? – Vivek Dhakal Jul 13 '17 at 13:39
  • 1
    then you will have to go into system setting and switch boot mode every time you want to switch os... though it is possible to reinstall windows in UEFI and then ubuntu in UEFI – ravery Jul 13 '17 at 13:41
  • 1
    @ravery This is a good answer. Sometimes you post good answers as comments and sometimes comments as answers ;-) – Pilot6 Jul 13 '17 at 13:41
  • @pilot -- this isn't big enough to be a full answer .... – ravery Jul 13 '17 at 13:43
  • @VivekDhakal There may be other problems if you install in different modes. – Pilot6 Jul 13 '17 at 13:43
  • @ravery If this is not a duplicate it is good enogh to be posted as an answer. Good answers are not always big ;-) – Pilot6 Jul 13 '17 at 13:44
  • Actually I am new to linux platform. Yesterday I was installing linux mint along with the windows but I got some errors in the middle of the installation. some errors like ''grub--efi-amd64-signed package failed to install''. I think it could be due to installation in different mode.what do you guys think?? – Vivek Dhakal Jul 13 '17 at 13:47
  • that is a different issue. the way that the grub updater determines if the system is uefi errors on some laptops. something wrong with the if/then statement. see here https://askubuntu.com/a/934416/694267 – ravery Jul 13 '17 at 13:53
  • The grub-efi-amd64-signed package is the default EFI-mode boot loader on Ubuntu (and therefore also on Mint, which is derived from Ubuntu). The error indicates that you were attempting to install Mint in EFI mode, not in BIOS mode. There are numerous possible causes of that error, not just the one ravery has referenced. In your case, my guess is that the disk lacked an EFI System Partition (ESP), since it was set up for BIOS-mode booting of Windows. – Rod Smith Jul 13 '17 at 14:35
  • @pilot -- and this is exactly why I didn't post as an answer – ravery Jul 13 '17 at 14:39
  • @RodSmith -- the error in the 30_uefi-firmware file is well documented. that error is why he switch to legacy mode (if you read the comments) – ravery Jul 13 '17 at 14:40
  • @ravery It is OK. I upvoted both answers. Sometimes this happens. You can also improve your answer too. – Pilot6 Jul 13 '17 at 14:41
  • @Pilot6 -- it is more his condescending attitude than the down vote. his refusal to accept that cheap computer vary greatly – ravery Jul 13 '17 at 14:43

3 Answers3

5

On most computers, two OSes don't have to be in the same boot mode, but it's helpful -- very helpful -- for both of them to be in the same boot mode.

Details vary greatly from one EFI to another, but in all but some very ancient EFIs, BIOS-mode OSes are installed using a Compatibility Support Module (CSM), which is a sort of BIOS emulator for EFI firmware. The CSM can be switched on and off, either by you setting options in the firmware or by the firmware itself, when it detects whatever key things trigger it to use the CSM or not use it. Unfortunately, there's very little standardization in the way different EFIs (and therefore computers) determine which boot mode to use when both are active. This makes the CSM a temperamental and tricky thing to use. That said, there are typically two ways that OSes using different boot modes can be managed:

  • Using the built-in boot manager -- All EFIs provide some sort of built-in boot manager, but details on how they're used vary from one machine to another. Typically, you access the boot manager by hitting a function key (usually F8 or above), Del, or Enter soon after the computer powers on. This action produces a menu of boot options. Some of these will boot the computer in EFI mode and others in BIOS mode. EFI entries are usually either named by the OS that installs them (e.g., ubuntu or Windows boot manager) or include the string "UEFI." BIOS entries are likely to describe BIOS boot media, like be the name of a hard disk. Thus, you can switch between a BIOS-mode Windows and an EFI-mode Ubuntu by selecting the hard disk by name vs. an entry called ubuntu in the boot manager.
  • Using rEFInd -- My rEFInd boot manager is a standalone boot manager that can do something similar to what the EFI's boot manager can do, but it works in more-or-less the same way on any EFI-based computer. (Macs are an exception; the CSM in Macs is unique, and so rEFInd treats Macs differently.) By default, rEFInd's CSM support is inactive, so you won't see BIOS-mode boot options. If you uncomment the scanfor line in refind.conf and ensure that hdbios is among the options, you'll see a gray diamond-shaped icon for your hard disk, which will launch any BIOS-mode boot loader it contains. This is in addition to whatever EFI-mode boot loaders the disk contains. Thus, you can switch between BIOS-mode and EFI-mode boot loaders.

Neither of these tools is guaranteed to work; some EFIs lack CSMs and so can't boot in BIOS mode at all. (Clearly that's not the case for you.) Also, some very early EFIs for x86-64 were actually implemented on top of BIOS, so they boot in BIOS mode by using the underlying BIOS. These EFIs don't have a CSM, so the boot manager works differently and rEFInd can't boot in BIOS mode. Chances are you don't have such a system, but it's possible you do.

Note that the CSM must be active for it to be useful, but activating it does not (usually) guarantee that it will be used. This is what makes switching boot modes from one boot to the next, without mucking with firmware settings, possible. That said, if your computer has nothing but BIOS-mode boot loaders installed, booting in EFI mode becomes impossible (unless or until you plug in an EFI-bootable medium or install an EFI boot loader). Once again, I'd like to emphasize that there are subtle (and not-so-subtle) differences between computers, which makes providing generic advice very difficult.

As a practical matter, this information is largely academic for you. Given an existing Windows installation in BIOS mode, you should probably install Ubuntu in BIOS mode, too. The trick is to know the mode in which the installer boots. That information isn't exactly identified in flashing red letters, so it's easy to boot in the wrong mode and not realize it. You may want to drop to a shell and look for a directory called /sys/firmware/efi. If it's present, you've booted in EFI mode; if it's absent, you've booted in BIOS mode. If you accidentally boot in the wrong mode, stop and try again.

Alternatively, you could convert the Windows installation to boot in EFI mode using Microsoft's new MBR2GPT tool and then install Ubuntu in EFI mode. This is likely to be a cleaner solution in the long term, but in the short term, it adds some risk (I'm not sure how much yet; the tool is new enough that I have no idea of how risky it is) and is likely to be more time-consuming than doing a BIOS-mode install of Ubuntu.

Rod Smith
  • 44,284
  • 7
  • 63
  • 105
1

When dual booting, both OS's have to be booted in the same mode.
It does not matter which. If the two OS's are in different modes, they wil not see each other and you will have to switch boot mode in system setting each time you switch OS.

Since windows is already installed in Legacy mode, ubuntu needs to be installed in Legacy mode.

If you really want UEFI (there are advantages to it), then reinstall windows in UEFI. And Install ubuntu in UEFI mode.

NOTE: yes it is less hassle in most cases to install windows then ubuntu.

ravery
  • 6,874
  • Now i got another issue inside the legacy mode while installing ubuntu. The space i created from windows disk management is shown to be ''unusable'' in installation type while it had to free space.what to do now? – Vivek Dhakal Jul 13 '17 at 14:03
  • delete the partition, then tell the installer to use free space – ravery Jul 13 '17 at 14:08
  • actually it was unallocated space i created by shrinking the partition in which windows is already installed. How can i del unallocated space?? – Vivek Dhakal Jul 13 '17 at 14:10
  • oh you can't, I thought you made a partition....it is refusing to use free space? are you sure you are in legacy mode? – ravery Jul 13 '17 at 14:12
  • yes. I am in legacy mode. – Vivek Dhakal Jul 13 '17 at 14:13
  • is the drive partitioned with gpt or MBR? – ravery Jul 13 '17 at 14:14
  • sorry it took a while, the unallocated space is in MBR partition style. – Vivek Dhakal Jul 13 '17 at 14:19
  • looks good, do you have atleast 40G free? – ravery Jul 13 '17 at 14:22
  • yes. I have plenty of free space – Vivek Dhakal Jul 13 '17 at 14:23
  • I'm not sure why it is refusing the free space. you could make the partitions from windows, 5GB for swap and the rest for root partition, you don't need to format them, then choose advanced partitioning and assign as appropriate – ravery Jul 13 '17 at 14:27
  • @Vivek, your disk space problem could be related to the number of partitions. Please see this question, or if that doesn't help, create a new question showing your disk output (sudo parted -l or sudo fdisk -l) and a screen shot of the installation error. This site is not set up for the sort of lengthy back-and-forth you're engaged in at the moment. – Rod Smith Jul 13 '17 at 14:30
  • Although I agree with the advice to install Ubuntu in BIOS mode (with the caveat that a 4-partition-limit problem may make a conversion of everything to EFI mode a bit more appealing), the claim that two OSes cannot be installed in different modes is simply wrong. – Rod Smith Jul 13 '17 at 14:32
  • @RodSmith -- I did not say that they can't be ... I said you'd have to switch boot modes to use them – ravery Jul 13 '17 at 14:34
  • @ravery, you wrote "When dual booting, both OS's have to be booted in the same mode." Note: "have to be." Other claims in that lead paragraph, although more vague, are also dubious, or at least easily interpreted in a way that would lead readers to draw the wrong conclusion. – Rod Smith Jul 13 '17 at 14:37
  • @RodSmith -- there is nothing dubious about what I said – ravery Jul 13 '17 at 14:38
  • "If the two OS's are in different modes, they wil not see each other" -- this is vague and unclear at best, and in fact boot mode has nothing to do with whether an OS can identify another OS's partitions or files. "[Y]ou will have to switch boot mode in system setting each time you switch OS" -- See my answer; although switching boot modes would be required, doing it in the system settings is not (usually) needed. This can (usually) be done on a boot-by-boot basis in the built-in boot manager or by rEFInd. – Rod Smith Jul 13 '17 at 15:11
  • @ravery, precision matters with computers. I've seen people do disastrous things because they misinterpret imprecise advice. In this case, to Vivek, this may not matter; but somebody else who needs to boot two OSes in the same mode might find your answer and be led astray. In the EFI realm, this is a big deal; there's a long history of almost-right answers causing problems. If you care to discuss this more, feel free to contact me off-site. (I see no way for users to message each other via this site.) See the contact information on my Web site. – Rod Smith Jul 13 '17 at 15:26
0

Well it is actually possible. I have a windows 8.1 and ubuntu 17.04 on my HDD hard which both have UFEI boot systems. On the other hand I have windows 10 on my internal SSD hard drive which runs on legacy boots on the same machine. If you install Ubuntu after the other OSs, grub will be able to recognize all your OSs and boot systems. However, if not you shall download boot-repair and apply its automatic fix. Therefore, like me, you get a grub with all the options you desire. Remind that grub-customizer can affect the boot-repair adversely (in case you use it). Moreover, you need a large EFI partition (about 200MB) as boot-repairs might occupy it.

  • Does the internal SSD have a GPT or an MBR partition table? 2. An EFI partition should be about 500 MB to be on the safe side. It's worth the extra 300 MB.
  • – karel Nov 22 '19 at 12:43
  • the SSD has MBR. 400MB is enough. depends on the version of your boot-repair; unfortunately, the older ones occupy less. – behrang Dec 03 '19 at 16:03