I have two HDD in the PC. First HDD has Installed Older Ubuntu with EFI partition. Second HDD is empty. When I try to install Ubuntu 17.04 "zesty" amd64 desktop (18cc54af55d7ca931bbb8588e8d9c1bd *ubuntu-17.04-desktop-amd64.iso) from USB flash key (with grub in EFI), there is no any option to select in "Installation Type" which HDD I want to erase (to partition by ubuntu installer); and with manual partition installation fails by installing to the wrong disk's EFI system partition, breaking existing Ubuntu boot process. I want to have 2 separate boot devices, so when one HDD will break, I will have second HDD in bootable state.

I have no option to selectively disable first or second HDD in the BIOS (and no security for one of them); and PC is not very easy (actually too hard) to disassemble to physically remove one of HDDs.

Can I hide one of my HDDs with grub or with help of console or in linux kernel?

  • Will "libata.force=2.00:disable" of askubuntu.com/a/387261 work when added to kernel command line options in grub by manual menu entry editing?
    – osgx
    May 8, 2017 at 5:31
  • Back up your ESP. And manually partition in advance and include an ESP on second drive. After install copy ESP from sda to second drive and then restore backup to sda. You may need to edit fstab with correct UUID for efi/ESP partition. You also may need to use efobootmgr to add correct entries for second install. I also copy /EFI/ubuntu to /EFI/Boot and rename shimx64.efi to bootx64.efi a backup/fallback boot entry.
    – oldfred
    May 8, 2017 at 21:31

1 Answer 1


I recommend the following workaround:

  1. Boot the Ubuntu installer in its "try before installing" mode.
  2. If desired, partition your disk(s) with GParted, parted, gdisk, or some other tool. (This step is optional, since you can generally do this in the Ubuntu installer, Ubiquity.) It sounds like you were trying to create a second ESP on your second disk, and that's probably a good idea, given that you'll have two Ubuntu installations, both of which will try to write their GRUB binaries to the same place if they share an ESP.
  3. Open a Terminal window.
  4. Type ubiquity -b. This launches Ubiquity in such a way that it will not install GRUB.
  5. Proceed with your installation in whatever way you desire. This will probably involve using the Something Else installation option.
  6. Reboot into your existing Ubuntu installation
  7. At this point, you can do one or both of two things:
    • Open a Terminal and type sudo update-grub. With any luck, this will cause your existing GRUB to detect the new installation of Ubuntu 17.04, enabling you to switch between them.
    • Install and configure some other boot loader or boot manager. My own rEFInd boot manager is likely to be easy to get working. Unlike most boot programs, rEFInd does not require explicit configuration to boot a new kernel when it's installed, so it tends to be a bit less prone to hassles when dealing with a computer that holds multiple Linux distributions.
  8. Boot into Ubuntu 17.04 and edit /etc/fstab so that whatever partition you want to use as its ESP is mounted at /boot/efi. I recommend then typing sudo mount -a and checking (with df, for example) that the ESP was mounted where you expected.

Be aware that you're likely to encounter boot coups from time to time, in which one OS takes over the primary boot loader duties, switching the configuration (and perhaps the boot program) from what the computer had been using. Despite the fact that you told Ubiquity to not install GRUB, chances are 17.04 will attempt to install it at some point as part of a package upgrade. This problem, and ways to deal with it, is covered on my boot coup page.

  • Is your rEFInd signed by default keys or loadable by signed shim? Can it be signed with MOK keys to enable Secure Boot? Now I did install with "libata.force=2.00:disable" option to hide first disk from kernel and "Entire disk". But still some manual actions were done to resize partitions from "try before installing". Two Ubuntu installations had problems by rewriting same "ubuntu" dir in EFI of first disk ESP.
    – osgx
    May 8, 2017 at 20:24
  • 1
    The binaries that I distribute are signed by my own key, but no Shim recognizes my key "out of the box"; you must add my public key to a MOK list to use it with Shim and Secure Boot. If you install via the PPA, you'll need to sign rEFInd with your own key and add your public key to the MOK list to use it with Secure Boot. See the rEFInd Secure Boot documentation for more details on this subject. For a more complex but also more flexible approach, see this page of mine.
    – Rod Smith
    May 8, 2017 at 22:10
  • Rod, can rEFInd installed to HDD ESP used to boot from external USB flash (from EFI-enabled flash / from MBR flash)? Or to boot from iso image placed on usb flash or on HDD partition of some file system?
    – osgx
    May 8, 2017 at 22:17
  • 1
    rEFInd can boot to an external USB flash drive; however, in some cases a USB flash drive will be recognized slowly by the EFI. If that happens, it won't appear right away in the menu, but hitting Esc should cause it to appear. rEFInd can't currently boot from a .iso file because this would require a loopback driver; however, if you copy the .iso file to a partition (dd if=foo.iso of=/dev/sdc2 or something similar) and if you put the ISO-9660 filesystem driver, it may work.
    – Rod Smith
    May 8, 2017 at 23:09

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.