π½ | ULFSVM | ||
---|---|---|---|
π | Parent Directory | - | |
ULFSVM - UmVirt Linux From Scratch virtual machine disk images and Live CD/DVD/USB disk images.
These images can be installed on real disks and be used as bare metal systems.
π₯ | Name | Last modified | Size |
---|---|---|---|
π0.1 | 2024-04-01 03:43 | - | |
π0.2 | 2024-04-23 12:38 | - | |
π0.2.1 | 2024-09-14 03:29 | - | |
π0.2.2 | 2024-02-21 05:07 | - | |
π4145625122 | 2024-11-12 03:38 | - | |
A Linux From Scratch build from sources is too resource expensive. It is requires:
But, Linux From Scratch from source code can be build from virtual machines. This aproach is more simple and reliable than using real harware.
To reduce costs, we create VMs disk images and share it with the public. If desired, any user can make their own disk images with their own package set.
We use the QEMU hypervisor (emulator) as a back-end for virualization because QEMU is powerful open-source software.
QEMU uses disk images in raw and qcow2 format as VM disk images. It is then possible to convert those disk images from any one format to another other with the qemu-img command-line program.
The Raw format is a format where all disk contents stored in a file as-is in bytes sequence.
Pros:
Cons:
The qcow2 format is 'copy on write' format. This format is allows for storing snapshots and modifications separately. In opposition to the raw format, it reserves disk space only when write operations are performed.
Pros:
Π‘ons:
Any UmVirt Linux From Scratch instance can be converted to Live CD/DVD/USB disk images via Linux Live Kit. Images converted with the Live Kit allows for booting UmVirt Linux From Scratch without using HDD/SDD. Also, these images can be used as virtual machine disk images.
A key feature of live CD/DVD/USB disk images is the read only root file system. After every reboot, any modifications are reset. Additional local or remote devices can be used to preserve information.
There are many disk images on each release:
Initial configuration in LFSCustomizer is started with the command:
./autoconfig
Additional packages in LFSCustomizer are installed with the commands:
Console
./installpackages console
Xorg (TWM)
./installpackages x
Xorg (LXDE)
./installpackages lxde
Xorg (Mate)
./installpackages mate
To avoid Internet access, turn off dns resolving by running:
systemctl stop systemd-resolved
To install packages from local repository, edit ./env.sh
edit .xinitrc if needed. Then, run:
startlxde
or
mate-session
run:
startx
To create the snapshot 'init' on 'x.qcow2' run:
qemu-img snapshot -c init x.qcow2
To list the snapshots for 'x.qcow2' run:
qemu-img snapshot -l x.qcow2
To load the snapshot 'init' on 'x.qcow2' run:
qemu-img snapshot -a init x.qcow2
To delete the snapshot 'init' on 'x.qcow2' run:
qemu-img snapshot -d init x.qcow2
In ULFS, no package installation verification is implemented.
To check the package installation logs run the command:
wc -l /var/log/ulfs-packages/*/files.txt | grep " 0"
This comand will print all the packages where no files were installed.
You can inspect configure.log, build.log, install.log to get more info.
To reduce the disk image size, you can fill unused space with zeroes by using an empty file. Such a file can be created with the command:
dd if=/dev/zero of=zero.img bs=16384 && rm -v zero.img
or
chimp zerofill
After compresson, a Raw disk will consume less disk space. QCOW starts to consume more disk space as write operations are performed. To reduce a QCOW disk image, convert it with the qemu-img command from qcow2 to qcow2.
qemu-img convert -O qcow2 x.qcow2 new.qcow2
You can remove the installation logs directories in /var/log:
You can remove the Linux kernel sources directory in /usr/src/linux.
Because the Linux kernel is a particularly important part of the operating system which performs various critical operations like hardware interactions, removing it makes hardware support and reconfiguration more difficult.
Be careful about removing the Linux kernel sources from disk image.