I installed Ubuntu 20.04, uninstalled the desktop, and then I want to package it as an .iso file for a customized version of Ubuntu installation, but the methods I see so far seem to rely on GUI. I originally intended to use systemback-cli, but it seems that this command cannot generate.iso files?
- 99
1 Answers
To create an image of the installed system on a disk from the command line, you need two disks: one with the Ubuntu installation and another, blank, of equal or greater capacity.
You need to use a universal Linux command-line program called dd.
By creating an image file of the disk with the Ubuntu installation, you can use it later to replicate an exact copy of the original installed system on another disk.
With both disks installed, the original system disk and an empty disk of equal or greater capacity with an ext4 partition table and partition, it is necessary to verify how each disk is identified by running the following in a terminal:
sudo fdisk -l
Assuming the disks are identified as /dev/sda and /dev/sdb, the system installation disk and an empty disk of equal or greater size, respectively, will be mounted on /media/disk-b
To create the disk image with the Ubuntu installation, simply run the following command:
sudo dd if=/dev/sda of=/media/disk-b/imagen.img bs=1M
if and of are the input and output respectively, bs is the amount of data that will be taken to make the copy.
This command will result in an exact copy of the /dev/sda disk on /media/disk-b/image.img.
Replace the disk and directory names with the appropriate ones.
There is no difference in the structure of the ISO and IMG formats if the IMG file is uncompressed.
An IMG file can be renamed with the ISO file extension and then opened in software that only recognizes the ISO file format.
This is an efficient way to access disc information in programs that do not support the IMG format.
- 17,808