site  news  contact

How to install EasyOS on a new SSD

December 16, 2018 — BarryK

This is another installation tutorial on installing to internal hard drive or SSD. Previously, there was one written specifically for older traditional-BIOS x86 computers:

https://easyos.org/install/easy-frugal-installation.html

And there was another written for modern UEFI-firmware x86 computers (manufactured since 2012):

https://easyos.org/install/how-to-install-easyos-on-your-hard-drive.html

The second tutorial used the Author's Mele PCG35 Apo mini-PC as a case-study. This tutorial also uses the Mele.

The above tutorials considered how to install EasyOS on the existing internal hard drive, either magnetic-platter type or modern solid state drive (SSD). This tut takes a different approach: purchase a new drive and use the entire drive for EasyOS. Which, it turns out, is extremely easy to do, and has the great advantage that the original drive can be left entirely alone, untouched -- which means that if you want to go back to how things were originally, just remove the new drive.

Well, it doesn't have to be an actual new drive, just any drive that that can be put into the computer and used entirely by EasyOS. Let's go...

Install new SSD

The Author (Barry Kauler) decided to buy himself a Christmas present:

https://www.austin.net.au/shop-categories/hard-drives-ssd/kingston-technology-a400-240-gb-serial-ata-iii-2-5.html

Only AU$54 for a 240GB SSD, 2.5inch SATA3. This is far cheaper per-GB than USB Flash drives. The Mele PCG35 Apo has internal provision for an extra 2.5inch SATA and a M.2 SATA drives. The cabling is provided for the 2.5inch drive, so it was a simple matter to install:

image1

Mounting screws are not provided with the drive, but was given them by the guy at Austin Computers.

The Mele is a Win10 PC, so the next step is to boot EasyOS from a USB-stick...

Bootup Easy

Firstly, you must bootup EasyOS from a USB-stick. In theory, the steps described in this page could be done while running any Linux distribution, however, it will be much easier if running Easy.

Hence, read the pages that describe how to download the EasyOS image file, write it to a USB-stick, and boot from it:

https://easyos.org/install/prepare-your-computer-for-booting-linux.html

and:

https://easyos.org/install/how-to-write-easyos-to-a-flash-drive.html

After booting up Easy, you will see the drive partition icons along the bottom of the screen -- notable by its absence is the Kingston SSD...

Stop for a moment and think what we are aiming to do -- bootup EasyOS on the Mele from USB-stick, then write the EasyOS image file to the SSD. However, this can be done elsewhere -- another computer running Linux, in which you can temporarily plug-in the Kingston SSD drive. Just an alternative to consider.

About that "missing" SSD...

Install EasyOS to the new SSD

You need to have the downloaded image file, which is of the form easy-<version>-amd64.img.gz, which you can get from here:

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

The Author put it onto the USB-stick before booting up on the Mele. Now to write it to the SSD:

image2

...drive "mmcblk0" is the original 32GB SSD, "sdb" is the USB-stick that have booted off. "sda" is the Kingston SSD -- it doesn't show because it is completely blank, no partitions.

There are two different ways that you can populate the Kingston SSD:

First, use GParted to create two partitions, a fat32 ESP boot-partition, and second ext4 partiton. This would be done as per the previous tutorials.

Second method, just write the easy-<version>-amd64.img.gz file directly to the drive, just like you would do with a Flash-stick. After all, what is an SSD? -- just a big Flash-drive.

So, the second method is shown in the above snapshot, open a terminal and run easydd. Then, when it asks for target-drive, select sda:

image3

...notice something very interesting: the write speed was 63.7MB/s, that's Mega-Bytes per second. However, it is copying from the USB-stick, which is going to bring it down -- though, that is a SanDisk Extreme, which is extremely fast, like a SSD. Anyway, we expect to be getting a speed well below the manufacturer's claimed sequential write speed -- even if sourcing off a very fast drive -- that is pretty much par for the course.

This SSD would be somewhere near the bottom for SSDs, however, it is far above magnetic-platter hard drives. It is also very far above bottom-rung el-cheapo USB-sticks, which could be as low as 3MB/sec.

Kingston SSD is fast:
The Kingston A400 SSD is no slouch. There are some simple speed tests here:

http://bkhome.org/news/201812/thoughts-on-hdd-and-ssd-speed.html

Installation gotcha:
There is a "gotcha" with this type of installation. Every drive has a unique "disk identifier", and this is what EasyOS looks for at bootup. However, what if another drive has the same ID? The easy-*.img.gz file has a disk-id, but what if a USB-stick has that same image, and is plugged-in when trying to boot from the SSD? ...oh dear, confusion.

To avoid this possible confusion, you could simply not plug-in a USB-stick with the same disk-id. Each version of Easy has a new unique disk-id, so the conflict will only occur if you plug-in a USB stick of the same version as installed to the SSD. That's your easy solution, avoidance, which should be fine for most people.

Or, you can change the disk-id of the SSD drive. It is quite easy to do. You need to use the fdisk utility, and modify the BOOT_SPECS file inside the initrd file. This blog post shows how to change the disk-id:

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

...choose any 8 character hex number. Then, modify BOOT_SPECS to have the same disk-id, see link below for how to modify BOOT_SPECS.

Installation tweak:
While you have the BOOT_SPECS file open, there is a little tweak that you might want to consider. At first bootup, Easy will create folders "containers", "home", "releases", sfs, etc., in the working-partition. However, this is a frugal installation, and the working partition can have anything else you want in it. So, you might want to put all of those folders out of the way, inside a single folder. Here is BOOT_SPECS for the 0.9.12 image:

BOOT_DISKID='0x422ad458'
BOOT_PARTNUM=1
BOOT_FS='vfat'
BOOT_DIR=''
WKG_DISKID='0x422ad458'
WKG_PARTNUM=2
WKG_FS='ext4'
WKG_DIR='easy'
INIT_DISTRO_VERSION=0.9.12
INIT_DISTRO_BINARY_COMPAT='oe'
INIT_DISTRO_COMPAT_VERSION='pyro'
INIT_DISTRO_TARGETARCH='amd64'

...just specify a folder for WKG_DIR, that's it, everything will be created under "easy". You can read more about how to modify the BOOT_SPECS file here:

https://easyos.org/install/how-to-install-easyos-on-your-hard-drive.html

...easy peasy!

Having written the image file to the SSD, that's it, ready to go. It only remains to select the SSD in the UEFI-setup at bootup, however, before doing that, there is a very useful tweak...

Tweak the reFind menu

After having written the image file to sda, a partition will appear:

image7

...click on the "sda1" icon and open "refind.conf" in the Geany text editor. Change just these two line, from this:

#scanfor manual,internal
scanfor manual

to this:

scanfor manual,internal
#scanfor manual

...what that does it cause reFind to automatically scan for internally installed operating systems, and add them to the menu. You might find it useful to study this page of the reFind manual:

https://www.rodsbooks.com/refind/configfile.html

One extra point: those of you who have played with installing EasyOS before, will know about clicking on the initrd file, to fix the BOOT_SPECS file -- well, in this case, no need, it is already OK.

Booting the new SSD

There is no need to install a boot manager such as GRUB. It is just a matter of running the UEFI-Setup and tell it to boot the SSD. You need to hold down a "hot key" at power-on, in the case of the Mele it is the "Esc" key, and the UEFI-Setup will open:

image8

...notice, the "SanDisk Extreme" drive is at the top. That is the USB-stick. The Kingston SSD is down at #5, and it has to be moved up to #1. Note, "UEFI OS" is a fat32 esp 640MB partition that the Author created for earlier installation experiments -- just ignore that.

Then, the reFind menu of the Kingston SSD will display:

image9

...it has done some automatic discovery, and found the Win10 installation. So, you could use this menu to boot any installed OS, there is no need to go back to the UEFI-Setup.

Choosing EasyOS 0.9.12...

image10

...notice, "sda2" is created, an ext4 partition to fill the rest of the drive. Then we have a desktop:

image11

...yay!

"sda2" is only 223GB. Well the specification of 240GB would be 240,000,000 bytes, not the powers-of-2 figure.

That's it. This is a beautiful way to install Easy. In fact, it is portable, just like a USB-stick -- if the Kingston SSD is unplugged and plugged into another PC, voila, it is installed on the other computer.

Have fun! 


(c) Copyright Barry Kauler, December 2018, all reproduction rights reserved.
Disclaimer: Barry Kauler has provided these instructions in good faith, however there is a disclaimer of all responsibility if something does go wrong. It shouldn't, but if you type in something incorrectly and wipe your C: drive, that is entirely your own responsibility. if you are a Linux newbie and want to install Easy on the internal hard drive, it is recommended that you find a Linux-knowledgeable guy to help. 

Tags: install