site  contact  subhomenews

EasyOS live-CD debut

December 04, 2018 — BarryK

A few people have contacted me recently to let me know that they have computers that will not boot from USB. In that situation, the person could do a direct frugal installation to hard drive.

That would mean opening up the downloaded USB-stick image file, then copying 'vmlinuz', 'easy.sfs' and 'initrd' to somewhere on the hard drive, then opening up 'initrd' and fix file 'BOOT_SPECS', then make an entry in the boot manager (such as GRUB).

Those steps are fairly easy, but most easy if already running EasyOS ...which is a "Catch 22" situation if cannot boot from USB.

So, although I said that I wasn't going to do it, have done so, created an EasyOS live-CD. However, one important thing about it, it runs totally in RAM and there is no facility to save sessions. It is thus a pristine bootup everytime.

The intention is that this live-CD is only for those who cannot boot from USB, or who just want to do a quick evaluation of EasyOS. It is intended as an easy means to do a frugal installation to hard drive.

However, theoretically, the live-CD could be enhanced to save sessions, similar to how it is done with the Quirky live-CD. I don't plan to do that though. If someone skilled with shell scripting wants to do it, you are welcome, and if you do so, I will consider incorporating it into the official release.

This CD ISO file will be available with the next release, version 0.9.10. 

An interesting technical detail:

Disk identifier

While I was working out how to create the live-CD, I wanted to be able to create an ISO file with a known "disk identifier", that I could put into the "BOOT_DISKID" parameter in 'BOOT_SPECS'. This identifier is what you see when you run "fdisk -l /dev/<drive>", for example:

# fdisk -l /dev/sdc
Disk /dev/sdc: 7.5 GiB, 8019509248 bytes, 15663104 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: dos
Disk identifier: 0x69522b3b

Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 2048 1310719 1308672 639M ef EFI (FAT-12/16/32)
/dev/sdc2 1310720 15663103 14352384 6.9G 83 Linux

The disk identifier is eight hex characters (4 bytes), a random number generated when the partition table is created.

In Woof, I have a new script 'create-live-cd', which generates a random hex number, and that is also interesting, I found this neat way to do it:

# openssl rand -hex 4

My script assigns this to 'BOOT_DISKID' variable in file 'BOOT_SPECS' inside the 'initrd'.

When the ISO file is created, it will have a random disk-identifier, however, I can change it to the value that I generated. This web page explains how:

My script uses 'fdisk' to do it. At bootup of the live-CD, the 'init' script is easily able to find the boot-drive (the CD iso9660 filesystem, usually /dev/sr0) by reading the disk-identifiers of the drivers. 

Tags: easy