Sunday, April 28, 2024
9
rated 0 times [  9] [ 0]  / answers: 1 / hits: 2331  / 2 Years ago, wed, june 15, 2022, 11:53:22

I have installed Ubuntu on a 32GB USB and set it up like I want, Installing some programs and removing others. I have added custom wallpaper and splash screen.


How can I duplicate my modified OS and GMail it using Google Drive, (10GB limit), to friends and family for Christmas?


It should be able to run on any modern x86-64 computer that meets Ubuntu hardware specifications. It should be installable using Rufus, Etcher, mkusb and Gnome-Disks. I would also like to be able to install it from a USB stick.


I have heard of and tried Remastersys, ISORespin, Ubuntu Customization Kit and Systemback, but these all seem to be abandoned now.


Sometimes I work in VirtualBox and would like to be able to distribute the OS's I create there also.


More From » system-installation

 Answers
3

Duplicating a Ubuntu System for Distribution


1) Create Image file from existing operating system:



  • Boot Live Ubuntu USB and insert Full install, (or Persistent), USB to be copied.



  • Create an image file of the Full install USB, (or Persistent USB), using Gnome-Disks.




enter image description here


enter image description here


2) Truncate image for distribution, remove unwanted space from end of image file. (Optional)


Example: Removes NTFS Microsoft basic data partition from end of drive.


Input


ubuntu@ubuntu:~$ cd /media/ubuntu/DATA/
ubuntu@ubuntu:/media/ubuntu/DATA$ fdisk -l DiskImageofsdd.img

Output


Disk DiskImageofsdd.img: 28.66 GiB, 30752636928 bytes, 60063744 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 82741D01-6511-4A8A-8FDF-52D8C165C178

Device Start End Sectors Size Type
DiskImageofsdd.img1 1953 3906 1954 977K BIOS boot
DiskImageofsdd.img2 3907 503906 500000 244.1M EFI System
DiskImageofsdd.img3 505856 44578815 44072960 21G Linux filesystem
DiskImageofsdd.img4 44578816 60061695 15482880 7.4G Microsoft basic data

Input


ubuntu@ubuntu:/media/ubuntu/DATA$ truncate --size=$[(44578815+1)*512] DiskImageofsdd.img

3) Compress image for distribution. (Optional)



  • For xz compression using 7Zip. Install 7Zip for Windows: https://www.7-zip.org/a/7z1900-x64.msi or for Ubuntu P7Zip Desktop from the Ubuntu store. Once 7Zip has been installed on Windows or Ubuntu, flashing tool should work without first decompressing xz file..



  • PKZip compression, may also be used but is not as tight.




4) Virtual Machine: Convert .vdi file to .img file that can be flashed to bootable USB. (Optional)



  • Open VirtualBox



  • cd to folder that contains ubuntu.vdi and run:




VBoxManage clonemedium --format RAW ubuntu.vdi ubuntu.img


5) Install Image File to target drive


Caution: The target drive will be overwritten.



  • Use the pancake icon in Disks or use Etcher, Rufus, dd or mkusb when you want to restore or clone the image to another drive.


6) Create Installer Drive for Image File. (Optional)



  • Use Etcher, Startup Disk Creator, dd, mkusb, etc to make Live USB.



  • From another Linux drive, convert new writable partition to NTFS partition using:




ubuntu@ubuntu:~$ sudo mkfs.ntfs -f -L usbdata /dev/sdx3


Where sdx is the Live drive.



  • Place the OS image file in the NTFS partition of the Live USB, where it can be flashed to a target drive from the Live USB when required.


[#2214] Friday, June 17, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
landarre

Total Points: 254
Total Questions: 96
Total Answers: 109

Location: Burundi
Member since Sun, Apr 16, 2023
1 Year ago
landarre questions
;