site  contact  subhomenews

Fast first-time bootup

June 13, 2022 — BarryK

I posted that if booted on a very cheap flash-stick, there will be a considerable delay while 'easy.sfs' is copied from the boot-partition to the working-partition. The worst case was my Emtec usb2 drive, a wait of 5 minutes, as reported here:

I receive feedback that stimulates the creativity, and in this case, posts to the forum have prompted a rethink on that slow bootup:

That 5 minutes is the time to copy three files, 'vmlinuz', 'initrd' and 'easy.sfs'. I have now implemented a fix, that has reduced the time, on that same Emtec drive, to 35 seconds.

The secret is to not have 'easy.sfs' in the boot-partition, only in the working-partition. The image file now has this structure:

15miB fat16
784MiB ext4                                                                                        

...which adds up to 800MiB. I made the easy*.img file 801MiB, with an empty 1MiB on the end.

Now here is the important difference. Files 'vmlinuz' and 'initrd' are as before, in the boot-partition; however, 'easy.sfs' is in the working-partition, like this, for sdb1 the boot-partition:


And sdb2 the working-partition:


At first bootup, 'vmlinuz' and 'initrd' are copied into the 'releases' folder in the working-partition, as before. However, file 'easy.sfs' is moved into the releases folder. The move is important, as when done within the same filesystem it is very fast, unlike a copy.

Furthermore, there are no longer two 'easy.sfs' files, just the one, in the 'releases' folder.

When the time comes to update to a new version, it is the same method as before. Copy the new 'vmlinuz' and 'initrd' into the boot-partition, click on 'initrd' to fix the 'BOOT_SPECS' file. But, for 'easy.sfs', drop that into the working-partition. It will be populated with folders, no problem, just drop it in:


At next bootup, Easy will recognize that this is an update, and will create a new folder under the 'releases' folder, and copy the new 'vmlinuz', 'initrd', and will move 'easy.sfs', into the new releases folder. So, for an update also, the 5 minute wait reduces to 35 seconds.

It is simple, and it works great. That 35 seconds is for a very low-quality flash stick. Hopefully you will use something better, so you might only have to wait a couple of seconds, or if using a top-quality drive, the blink of an eye.    

Tags: easy