ULFSVM - UmVirt Linux From Scratch virtual machines disk images and Live CD/DVD/USB disk images.
This images can be installed on real disks and be used as firmware.
A Linux From Scratch build from sources is too much expensive. It is requires:
To build Linux From Scratch from source code virtual machines (virtualization) can be used. This aproach is more simple and reliable than using a real harware.
To reduce costs we create VMs hard disk images backups and share it to public. If desired any user can make his own disk images with your own package set.
We use QEMU hypervisor (emulator) as back-end for virualization because QEMU is powerful open-source software.
QEMU use disk images in raw and qcow2 format as VMs hard disk images. It is possible to convert disk images from any one format to other with qemu-img programm.
Raw format is format where all disk contents stored in file as is as bytes sequence.
Pros:
Cons:
qcow2 format is copy on write format. This format is allows to store snapshots and modifications separately. In opposition to raw format it reserve disk space only when write operation is porformed.
Pros:
Сons:
Any UmVirt Linux From Scratch instance can be converted to Live CD/DVD/USB disk images via Linux Live Kit. This images allows to boot UmVirt Linux From Scratch without using HDD/SDD. Also this images can be used as Virtual machines disk images.
Key feature of live CD/DVD/USB disk images is read only root file system. Each time after boot user is get same system all modifications are lost. Additional local or remote devices can be used to store information.
There are many disk images on each release:
Initial configuration in LFSCustomizer is started by command:
./autoconfig
Additional packages in LFSCustomizer are installed with commands:
Console
./installpackages console
Xorg (TWM)
./installpackages x
Xorg (LXDE)
./installpackages lxde
Xorg (Mate)
./installpackages mate
To avoid Internet access turn off dns resolving run:
systemctl stop systemd-resolved
To install packages from local repository edit ./env.sh
edit .xinitrc if needed type:
startlxde
or
mate-session
run
startx
To create snapshot 'init' on 'x.qcow2' run
qemu-img snapshot -c init x.qcow2
To list snapshots on 'x.qcow2' run
qemu-img snapshot -l x.qcow2
To load snapshot 'init' on 'x.qcow2' run
qemu-img snapshot -a init x.qcow2
To delete snapshot 'init' on 'x.qcow2' run
qemu-img snapshot -d init x.qcow2
In ULFS no package installation verification implemented.
To check packages installation run command:
wc -l /var/log/ulfs-packages/*/files.txt | grep " 0"
This comand will print all packages where no files installed.
You can inspect configure.log, build.log, install.log to get more info.
To reduce disk image you can fill unused space by zeroes using empty file. Such file can be created by command:
dd if=/dev/zero of=zero.img bs=16384 && rm -v zero.img
or
chimp zerofill
After compresson Raw disk will consume less disk space. QCOW is start consume more disk space because write operations is performed. To reduce QCOW disk image convert it by qemu-img command from qcow2 to qcow2.
qemu-img convert -O qcow2 x.qcow2 new.qcow2
You can remove installation logs directories in /var/log:
You can remove Linux kernel sources directory in /usr/src/linux.
Because Linux kernel is important operating system part which perform various critical operations like hardware interaction it removing make hardware support reconfiguration more difficult.
Be careful when removing Linux kernel sources from disk image.