UmVirt Linux From Scratch Virtual Machines

πŸ’½ULFSVM

πŸ”™Parent Directory-

About

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.

Download

Virtual machine disk images

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.

Raw format

The Raw format is a format where all disk contents stored in a file as-is in bytes sequence.

Pros:

Cons:

QCOW2

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:

Live CD/DVD/USB disk images

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.

Disk image flavors

There are many disk images on each release:

How ULFS disk images are made

Environment

Build process

  1. LFSAutoBuilder from ULFSBE is used to produce lfs disk images for the i686 and amd64 platforms.
  2. LFSCustomizer is used to upgrade lfs disk images to the initial ulfs disk images.
  3. LFSCustomizer is used to build the console disk images from the initial ulfs disk images by installing additional packages.
  4. LFSCustomizer is used to build the x (XOrg) disk images from the console ulfs disk images by installing additional packages.
  5. LFSCustomizer is used to build the lxde disk images from the x ulfs disk images by installing additional packages.
  6. LFSCustomizer is used to build mate disk images from the lxde ulfs disk images for the qemu64 platform. the mate disk image for the i686 platform is installed manually.

Initial configuration in LFSCustomizer is started with the command:

    ./autoconfig

Additional packages in LFSCustomizer are installed with the commands:

LFSCustomizer tips

Runing disk images

  1. decompress disk imagse using the gunzip command
  2. attach the disk image to a virtual machine as an IDE/SATA drive
  3. boot the VM
  4. login as root without a password
  5. edit .xinitrc if needed. Then, run:

        startlxde
    

    or

        mate-session
    
  6. run:

        startx
    

Creating snapshots

Quality Control

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.

Reduce disk image size

Filling by zeroes

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

Installation logs removal

You can remove the installation logs directories in /var/log:

Linux kernel sources removal

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.

Upstream Links