I have more than 100 units of the same HW I need to prepare for our product delivery.
All of them are the very same HW (celeron N platform, 32GB SSD) and come with a standard Ubuntu 20.10 installation which needs to be customized for our specific product.
I did all the customization on a single unit I would like to keep as a "master" setup to be spread on all the unit.
I dumped an image of this "master" installation through Rufus on a windows 10 machine and tried to prepare the cloned units.
The issue here is that the cloned SSD only boots on the "master" unit, but it will not boot on a different one.
I got a message stating "... Select proper boot device ...Insert boor media in selected boot device and press a key".
I should be a EFI related setup, which actually I do not know in details.
I tried to copy the file this way
cp /boot/efi/EFI/ubuntu/grubx64.efi /boot/efi/EFI/BOOT/bootx64.efi
(which in my installation is actually all capitals BOOTX64.EFI), as I got it should be used as recovery when main boot file is not found. But this did not work.
How can I create an usable portable Ubuntu 20.10 image for this massive installation?
3 Answers
My experience is that an installed Ubuntu desktop system (in a portable drive) can boot in many pc computers, not only with identical hardware. as long as there are no proprietary drivers (e.g. for graphics and wifi). And hence, cloned systems will work too (in other computers).
But there are some things to check.
Cloning works correctly when the target drive is at least as big as the source drive (not one single byte smaller). Please notice that two drives with the same nominal size (e.g. 32 GB) may contain different numbers of bytes.
- If the target drive is slightly smaller, you can work around the problem by leaving enough unallocated drive space near the tail end of the drive.
If there is a GUID partition table, GPT, and the target drive size is different, you must fix the backup partition table, which should be located at the tail end of the drive. You can do that with
gdiskor easier with gpt-fix.
- Ubuntu Server is setting up the wired network in a non-portable way, and there may be other things that prevent cloning.
- 47,684
Duplicating a Ubuntu System for Distribution
Ref: How to Duplicate a Ubuntu System for Distribution?
Once you have created the running Ubuntu OS with everything you want, use Gnome-Disks to create an image file of it, (.img).
Use balenaEtcher, https://www.balena.io/etcher/, to flash the Ubuntu image file to the new hardware. Etcher will flash an image file to multiple SSD's at the same time.
Use the settings icon in the upper right hand corner of the window to select Unsafe mode for flashing to large drives.
When cloning images, all the OS partitions have the same UUID. GParted has an option for creating new UUID's if desired.
- 20,530
- 12
- 78
- 125
Actually the reasn for a boot failure on cloned disk was that the UEFI feature was misconfigured on the BIOS. I reconfigured it properly and it boots. Thanks anyone who commented in this very helpful and reactive community.


