site  contact  subhomenews

How to bootup into RAM only

July 18, 2020 — BarryK

EasyOS has the "Copy session to RAM & disable drives" boot menu entry. This copies the last session of the working-drive, to RAM, then unmounts the drive. It also disables access to the internal drives. Jon7 has asked if it is possible to have the same thing, but do not disable drives:

it is possible to override the working-partition, by passing "WKG_DEV=zram0" on the kernel commandline. Also, the 'init' script in the initrd will recognise this "WKG_LABEL=EASYOSZRAM" to have the same effect. Note that WKG_DEV and WKG_LABEL are not case sensitive, so you could have "wkg-dev=zram0" on the commandline. But the "EASYOSZRAM" is case-sensitive.

Those two will cause a pristine first bootup into RAM. Not what Jan7 wants. Looks like we will have to experiment...

In the 'init' script, comment-out line 466:

#xWKG_DEV='' #190817

Then create a new entry in /EFI/BOOT/refind.conf, with boot parameter "xWKG_DEV=zram0":

 submenuentry "Copy session to RAM & unmount working-partition" {
add_options "xWKG_DEV=zram0"

If the experiment works, I will document it and make the change in 'init' permanent.

EDIT 2020-07-27:
This has been formalized for EasyOS 2.3.4 and beyond. The kernel boot parameter is now "qfix=lock1" or "qfix=lok1" (or "LOCK1" or "LOK1"), which will bootup, copying the session to RAM and will then unmount the working-partition, in fact, all partitions.

Tags: easy