Menu

Massive restore of dual boot image. Ubuntu disappears from bios after Windows first boot.

jepson2k
2022-05-20
2022-06-16
  • jepson2k

    jepson2k - 2022-05-20

    First off, thank you to those that created Clonezilla! Its an amazing software!

    I have to re-image the same 40 computers about every 2 weeks for the next couple of months. I took a computer with Window 10 and installed Ubuntu alongside it. Grub is in its default location (in the Ubuntu partition) for a computer that had Windows 10 first and Ubuntu installed afterwards. I installed the necessary applications on both OS's and create a golden image from the disk. Using Clonezilla, I deploy this golden image to 40 laptops. After the restore process completes, the computers restart, grub pops up, and they boot to Ubuntu just fine.

    The issue is that once the computers boot to Windows the Ubuntu OS disappears from the bios boot menu and grub no longer shows up. The current solution: boot each laptop into Windows, restart it, and boot into the Boot-Repair-Disk (https://sourceforge.net/p/boot-repair-cd/home/Home/) run the recommended repair and the laptops are good to go. Unfortunately, this takes a while as there are at least 40 laptops, sometimes more. Am I doing something wrong? Is there a better solution? Also, I apologize if this is not the right forum for this topic.

    Misc. Background info: * Bios is UEFI-only mode, no legacy support. * Secure boot is off. * I would assume since the Firmware Interface Support is UEFI that the partition style is GPT. * Clonezilla server Lite is used for the restore process. * A few computers each time seem to be perfectly ok and booting to Windows does not change anything.

    What I've tried:

    • Having Clonezilla run grub repair scripts on each of the computers after the restore takes place. This has no effect. Grub works fine until I boot into windows for the first time.
    • Completely wiping the disk of a laptop, installing a fresh copy of Windows and Ubuntu, installing all the necessary user applications, and taking a new image of the disk (in-case I messed up something with the previous golden image). Restoring the computers using this golden image did not change anything.
    • Taking an image of the boot partition (the first partition), booting all the computers to Windows, and then restoring that partition only to each of the computers using Clonezilla with the option "-j1" enabled. This has no effect, but I read it on another forum and thought I would give it a shot.
    • Looking around the internet for many hours for a solution. All the articles and forums I find are mainly about fixing grub. Which again this process works but it takes awhile to perform on 40 computers one by one.

    What I can't do:

    • I can't restore just the Windows and Ubuntu partitions. Often times the user's that use these computers will completely wipe the disk and install their own setup on it. So I have to restore the full disk.
     
  • Steven Shiau

    Steven Shiau - 2022-05-25

    "The issue is that once the computers boot to Windows the Ubuntu OS disappears from the bios boot menu and grub no longer shows up. " -> This looks like there are two EFI boot menus and once your Windows boots, it moves the Windows EFI boot menu to the first. You can check that in your uEFI BIOS.
    If so, you can delete the Windows EFI boot menu, just the keep the Ubuntu EFI boot menu in your BIOS. Then add chainloader in your grub to boot Windows.

    Steven

     
  • jepson2k

    jepson2k - 2022-06-09

    So your tip made me realize I needed to learn more about the Windows Boot manager (my searches were mainly GRUB focused before). I kept coming across articles that would say something along the lines of "If you can't change the boot order in your BIOS then run bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi or bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi to boot to GRUB first." I had mostly ignored these tips since I could change the boot order in BIOS. When I had tested it out in the past, I ran the command with "grubx64.efi" at the end since I didn't think GRUB would use the shim when secure boot was turned off. I was wrong.

    I tested out the command "bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi" and it mostly fixed the problem. I can now flash the computers and they will run without boot issues. Weirdly enough Linux still disappears from the UEFI/BIOS on about 75% of the time when I flash them. This isn't a big issue since they can all reach Linux just fine, but it's odd that it occurs. This has saved me a lot of time, so thank you for your help.

     
    👍
    1
  • Steven Shiau

    Steven Shiau - 2022-06-16

    Cool. Thanks for sharing that.

    Steven

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.