11

I am going to reinstall Windows on my computer so that I can flash the UEFI/ BIOS (the computer manufacturer only supplies a .exe file). I would like to efficiently reinstall Ubuntu after that. Can you explain a time efficient way to do that?

Edit: Really, I am looking for the safest way to do this with a reasonable degree of efficiency.

10
  • 2
    I would just make a +minimum size partition on hard drive for a Windows install. Have ubuntu install disk handy if grub needs fixing after. Leave ubuntu install alone.
    – crip659
    Aug 13, 2019 at 20:12
  • 1
    Some with .exe files also offer a DOS file, so you can create a DOS bootable flash drive to run update.Most better systems now let you run update directly from UEFI with update on a FAT32 partition. And a few new UEFI systems will update directly from Linux with fwupd.org/lvfs/devicelist & fwupd.org/vendorlist
    – oldfred
    Aug 13, 2019 at 22:00
  • 1
    Do you have a spare hard drive available that you can use in this project? Aug 14, 2019 at 16:58
  • 1
    @tudor I already flashed the uefi but could be useful info. Aug 14, 2019 at 17:39
  • 1
    @Eric Towers yes, I have a spare drive. Aug 14, 2019 at 17:39

4 Answers 4

17

The most efficient way is to find a Live Windows image and boot from it.

You will be able to flash BIOS from it.

But beware that in some cases it is not a good idea to flash a new BIOS. About a week ago I flashed a new BIOS to an Asus laptop using a BIOS utility (built in into BIOS called EasyFlash).

After that I lost touchpad in Ubuntu and had other problems. I couldn't downgrade BIOS using the same utility because it didn't allow to flash older BIOS.

So I had to use a Live Windows image where I successfuly downgraded BIOS using /nodate switch.

So if you don't have a very strong reason, and everything works fine, don't upgrade BIOS. Ubuntu will take care of CPU microcode.

8
  • I can't seem to find any information about /nodate. Very curious about that. Aug 13, 2019 at 22:27
  • 2
    It may be Asus specific.
    – Pilot6
    Aug 14, 2019 at 4:47
  • 1
    Recommending against updating your BIOS is somewhat dodgy. It can leave you open to big vulnerabilities.
    – MechMK1
    Aug 14, 2019 at 9:59
  • 5
    Can you give an example of "big" vulnerabilities in BIOS?
    – Pilot6
    Aug 14, 2019 at 11:32
  • 2
    @Joshua, unless you're a target for a three-letter agency or doing something similarly valuable, you don't need to worry about Spectre. Yes, it's a powerful attack, but it's also really tricky to pull off outside a lab environment.
    – Mark
    Aug 14, 2019 at 22:13
13

Disconnect your Ubuntu system drive, connect an old spare or used drive, install Windows on it, and do the BIOS update (if, as Pilot6 explained above, if you absolutely, positively, have to update the BIOS). Then, disconnect the old drive, put your Ubuntu OS drive back on, and you're ready to know, secure in the knowledge that Windows did not corrupt Linux.

5
  • 1
    This is really the only right answer. With the Ubuntu drive disconnected, the Windows installer can't screw it up. Aug 14, 2019 at 22:34
  • A user with 12,000 posts here says that you need to actually run an installation (not just plug in old drive) for grub repair. forums.linuxmint.com/… Aug 15, 2019 at 7:46
  • But, grub repair is not the intent. The OP wants to flash a BIOS/firmware update, which is a Windows-centric task. My answer is intended to allow them to do that without complicating their Ubuntu situation. Any grub repair would be a separate issue and therefore out of scope here.
    – K7AAY
    Aug 15, 2019 at 15:25
  • @whitelightning : The post you cite assumes you have only one hard drive and that you let Windows installer modify the boot data on that drive. This answer avoids that complication by preventing that installer any access to your drive with your current Ubuntu install. Aug 15, 2019 at 16:18
  • @Eric Towers When I have a bootable Ubuntu disc (live installation media not included), the UEFI adds "ubuntu" as a boot device. So, I was thinking that having Windows connected and flashing would erase that. But, I am thinking now that it will automatically get recreated when hooking the Ubuntu drive back up. Aug 15, 2019 at 18:07
2

The most time efficient method of putting an existing Ubuntu installation back on your system is to boot from a thumb drive, do a complete image backup of the entire drive to another (large enough) storage device, then restore that image backup after you're done with Windows.

I'll link an article on how to do this (be careful; you can erase everything as easily as backing it up), but dd is the core command for these operations.

7
  • My understanding is that when I install a new UEFI, there are some things that need to change, regarding other parts of the system. I believe the bootloader is one of them. So don't we need a way to naturally create some of the "install" files? Aug 13, 2019 at 22:31
  • Considering that full disc backups take several hours, this is hardly "most time efficient". Even opening the laptop and changing the drive would be faster.
    – jpa
    Aug 14, 2019 at 6:15
  • @whitelightning Boot configuration is stored on the disk on a EFI System Partition, so restoring disk image will revert those changes as well. But if you want to do it fast, use Clonezilla for imaging, not dd. Clonezilla will only backup used space.
    – gronostaj
    Aug 14, 2019 at 6:19
  • @gronostaj When I install Ubuntu, there is an EFI system partition, uses fat32 file system. The Ubuntu installation automatically creates that. You are saying that we don't want that moved over, right? Aug 14, 2019 at 17:51
  • @whitelightning I am saying that this partition contains complete boot configuration for installed OSes. As long as you have a full disk backup, including ESP, restoring it will also restore previous boot configuration. Updating UEFI doesn't affect those files, so it's a sound plan to 1) full backup, 2) wipe and install Windows, 3) update UEFI, 4) restore backup.
    – gronostaj
    Aug 15, 2019 at 9:47
2

If your .exe flasher tool does not need installation, then you may be able to do this from the Windows installer disc.

Download a Windows 10 installer iso image from Microsoft of the appropriate bitness (32-bit or 64-bit). If you visit the site from Windows, then Microsoft wants you to download their "Media creation tool", which can either download an iso or create a bootable USB drive. I believe the site simply offers the iso file if you visit from Linux, but I haven't tried. This is a free download, and you don't need a license since you won't be installing.

Boot the computer with the installer disc. Progress through the installer until you come to the "Install Now" screen, don't click that button, and press Shift + F10 to open a Command Prompt window. From there you can do many things, for example: Plug in a USB drive with your flasher .exe on it, navigate there (you may have to try a few drive letters to find the correct one), and execute it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .