site  news  contact

Easy frugal installation

December 06, 2018 — BarryK

EasyOS can be downloaded as an image file for a USB-stick, or as an ISO file for a live-CD. It is recommended that you opt for the USB-stick image, however, for older computers that will not boot from USB, choose the live-CD. These will get you up and running with EasyOS, however, you might then want to install Easy to the hard drive in the computer. That is what this page is about.

However, a qualification. This page focuses on the installation requirements of older computers, with traditional BIOS, not the "new fangled" PCs with UEFI-firmware (which is, technically, still a "BIOS", but we tend to refer to the older one as BIOS and the newer as UEFI). Most PCs manufactured from 2012 onward have UEFI-firmware.

Another qualification: you can do an installation of Easy from any Linux distro, Ubuntu, Slackware, whatever. However, it is simpler if you first bootup Easy (USB-stick or live-CD). This page does mention how to do it while running another Linux, but the instructions mostly expect you to be running Easy. Right, let's go...

Get started with Easy

The first thing to do is bootup your computer with EasyOS. As stated above, download either a USB-stick image file or live-CD ISO file.

In the case of booting from a USB-stick, it is pretty straightforward, download the image file, write it to a USB-stick, then set the BIOS to boot from it. If you need more explanation, here is a tutorial:

http://bkhome.org/easy/how-to-write-easyos-to-a-flash-drive.html

In the case of the live-CD, this is the second choice, as it is somewhat limited. It boots up running in RAM only, and sessions cannot be saved. However, a USB-stick can be created specifically for saving sessions, as this blog post explains:

http://bkhome.org/news/201812/permanent-saving-for-easyos-live-cd.html

To write the ISO image to a CD or DVD media, is documented extensively on the Internet, for Linux, Windows and Mac.

The files to download are kindly hosted by ibiblio.org. Grab the latest version:

http://distro.ibiblio.org/easyos/amd64/releases/pyro/

After getting up-and-running with Easy, you might be quite satisfied to leave it at that. There is no compelling reason that you should install to the computer hard drive, except perhaps you don't want to have a USB-drive sticking out of your computer, or have the optical drive occupied.

In fact, some people don't even bother with booting up Easy from USB-stick or live-CD, they just download the file, open it up, and do a direct install to hard drive -- yep, that is very easy.

Let's do it...

Frugal versus full install

The difference needs to be explained. EasyOS only does frugal installation to hard drive. Most Linux distributions do a full installation.

A full installation is where Linux occupies an entire partition, and in that partition you will see the folders /bin, /sbin, /opt, /etc/, /sys, /proc, /tmp, /dev, /usr, /run, /lib, and more.

A frugal installation only occupies one folder in a partition, and the rest of the partition can be used for anything else. Other Linux distributions, for example.

Easy does have one particular requirement though, the partition must have a Linux filesystem, preferably ext4. Microsoft DOS and Windows occupy partitions with vfat or ntfs filesystems.

Thus, to install Easy, there has to be a partition with a Linux filesystem, and if you have a Windows PC, then you will have to create such a partition. How to do this is not explained in this page.

If you have previously installed Linux on the computer, then you will have such a partition, and you should be good-to-go -- as Easy can co-exist with whatever is already on that partition.

If you do need to create a partition with Linux filesystem, there is documentation on the Internet, for example:

http://bkhome.org/easy/how-to-install-easy-os-on-your-hard-drive.html

The case study on this page is to perform a frugal installation to a HP Compaq Presario, where the original Windows has been removed, and two ext4 partitions created. The author does not need Windows!

Frugal install how-to

It really is easy. The case study, as mentioned above, is a Compaq Presario. This has a 500GB hard drive, and GParted (in the Filesystem menu) was used to create two partitions. In this photo, have booted from live-CD, and the first partition (sda1) is 48.4GB:

image1

It was decided to do the frugal installation in sda1, and an appropriate choice of folders was made. The naming, and depth, of these folders is entirely up to you -- you could, for example, install to /frugal/easy/amd64/v0.9.10. This is the author's choice, /easy/0.9.10:

image2

...the frugal install process is simply to click on the CD and copy those three files, 'easy.sfs', 'initrd' and 'vmlinuz'. That's it, done.

Well, not quite. File 'initrd' has a file inside it, named 'BOOT_SPECS', that needs to be fixed for the current location. To fix it, is very simple...

Fix BOOT_SPECS file

All that you have to do is click on 'initrd', and follow the prompts...

image3

Choose "Yes", and 'BOOT_SPECS' is automatically fixed...

image4

...yes, that looks good, so click "Yes", and there is a final confirmation...

image5

If you had clicked "No" to either of the above windows, the 'initrd' file would be opened up and you can manually edit 'BOOT_SPECS', and anything else inside 'initrd' -- then you would click on 'initrd' to close it up.

We now have a frugal installation, ready to be booted. One important detail though, a boot manager...

Grub4Dos boot manager

A boot manager is required for booting mulitple operating systems on a PC. The type of boot manager differs depending on whether it is a BIOS or UEFI computer.

In the case of UEFI, it is planned to write another tutorial. Here is an older one that will help:

http://bkhome.org/easy/how-to-install-easy-os-on-your-hard-drive.html

For a BIOS computer, EasyOS has Grub4Dos, which has in it an install script named 'grub4dosconfig' originally created for Puppy Linux by Puppy Forum member 'shinobar' and still maintained by him. So, using Grub4Dos...

Of course, this is assuming that you are certain that there is not already a boot manager installed. if Windows is installed on the PC, it does have its own boot manager, but it cannot multiboot Linux operating systems. You can install Grub4Dos, and the Windows installation should still work, it will be one of the menu entries.

"Touch wood' -- the author cannot guarantee that your Windows installation won't get stuffed up, and you might want to back it up first. On the otherhand, plenty of people have successfully used Grub4Dos.

Grub4Dos is in the EasyOS menu...

grub1

In this case study, there is no Windows to worry about, and Grub4Dos finds only one installation:

grub2

It is just a matter of clicking "OK" at each window...

grub3

And again, a final confirmation...

grub4

Now, looking at the sda1 partition, we see the Grub4Dos installed files...

grub5

File 'menu.lst' can be opened in a text editor. It has this in it...

title EasyOS-0.9.10 (sda1/easy/0.9.10)
find --set-root uuid () 3f8f077d-7a7d-4e7a-9cb5-a8b94e1f1c87
kernel /easy/0.9.10/vmlinuz rw
initrd /easy/0.9.10/initrd

In the future, you can perform frugal installs and manually add entries to 'menu.lst'. Very easy to have dozens of frugal installations, if you want.

First frugal bootup

The big moment has arrived. Reboot, and there will be a boot menu:

grub6

And a desktop!...

desk1

...that's it, you are off and running!

The "second half" of this web-page is notes for manual installation steps if you are not running EasyOS, instead performing a frugal install of Easy while running some other distro...


Manual steps

With Easy, opening up the downloaded USB-stick image file, or the ISO file, to extract the 'vmlinuz', 'easy.sfs' and 'initrd' files, is very easy -- just click on it. However, with other Linux distros, it may be more tedious.

For example, the USB-stick image...

Opening up the downloaded file

The file you download is named easy-<version>-<architecture>.img.gz, for example easy-0.9.10-amd64.img.gz. The ".gz" on the end means that it is gzip compressed, and with Easy, and Puppy (and derivatives), if you click on it, there will be an offer to uncompress it. With many other distributions, you have to open a terminal and do it manually:

# gunzip easy-0.9.10-amd64.img.gz

Having done so, you will have easy-0.9.10-amd64.img

This image file can be written to a Flash drive, and booted from. However, this web page is showing how to extract the contents of the image file, and install to a internal hard drive.

How to "open up" the image file and extract the contents?

The file easy-0.9.10-amd64.img (or whichever version you have downloaded) is only 641MB. However, at first bootup it will expand to use the entire drive. So any drive, from 2GB upwards, is suitable (although at least 8GB is recommended for ongoing usage).

Internally, the file contains a 640MB fat32 partition. If you are already running EasyOS, you can just click on this file to open it up and see inside. With other Linux distributions, you have to do it from the commandline:

# mkdir mntpt
# mount -t vfat -o loop,offset=1048576 easy-0.1.6-amd64.img mntpt

The fat32 partition actually starts 1MB into the file (which is 1048576 bytes), the first 1MB has partition table and other stuff.

One vital detail. Puppy Linux and derivatives may actually run the Busybox mount utility, which does not support that offset parameter. However, they all (or nearly all) have mount-FULL, which is the full mount utility.

With Easy, being easy, you just click on the file, and you can see what is in the vfat partition:

easy1

Now, the files are available to be copied into the frugal installation. You only need those three, 'vmlinuz', 'easy.sfs' and 'initrd'.

Opening up 'initrd'

As already explained earlier in this web-page, running Easy, 'initrd' can be opened up just by clicking on it. For other Linux distributions, some steps are required.

'initrd' is an uncompressed cpio archive, and can be opened like this:

You will have to use the cpio utility to open up initrd. Open a terminal where initrd is:

# mkdir initrd-tree
# cd initrd-tree
# cat ../initrd | cpio -i -d -m
# cd ..

Then edit file BOOT_SPECS as described above. Then, close up initrd like this:

# sync
# rm initrd
# cd initrd-tree
# find . | cpio -o -H newc > ../initrd
# sync
# cd ..

The 'BOOT_SPECS' file is pretty self-explanatory, almost...

Editing 'BOOT_SPECS'

The file contents will look something like this:

BOOT_DISKID='0x50e598ae'
BOOT_PARTNUM=3
BOOT_FS='ext4'
BOOT_DIR='easy/0.9.10/'
WKG_DISKID='0x50e598ae'
WKG_PARTNUM=3
WKG_FS='ext4'
WKG_DIR='easy/0.9.10/'
INIT_DISTRO_VERSION=0.9.10
INIT_DISTRO_BINARY_COMPAT='oe'
INIT_DISTRO_COMPAT_VERSION='pyro'
INIT_DISTRO_TARGET_ARCH='amd64'

Usually, for a frugal installation in a BIOS computer, the boot-partition would be the same as the working-partition, but it doesn't have to be. The decision is yours. Note that the boot-partition does not have to be a Linux filesystem, it can be vfat or ntfs.

Those _DISKID variables are the "disk identifiers" of the boot- and working-partitions. You can obtain this by running 'fdisk'. For example, say that we are installing to drive sdb:

# fdisk -l /dev/sdb
Disk /dev/sdb: 3.7 TiB, 4000787030016 bytes, 7814037168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 9443C469-9EA4-42F5-9EB5-1C22175AB9B8

Device Start End Sectors Size Type
/dev/sdb1 2048 7407708159 7407706112 3.5T Linux filesystem
/dev/sdb2 7407708160 7814035455 406327296 193.8G Linux filesystem

There is some explanation about the disk identifier here:

http://bkhome.org/news/201812/easyos-live-cd-debut.html

and here:

http://bkhome.org/news/201812/permanent-saving-for-easyos-live-cd.html

Have fun!


This webpage (c) Copyright Barry Kauler, December 2018. All rights reserved.

Tags: install