Page 1 of 1

EasyOS .img file now not compressed

Posted: Thu May 12, 2022 12:26 pm
by scsijon

https://bkhome.org/news/202205/easyos-i ... essed.html for those wanting top follow this.

Just wondering, since your considering not compressing easyos, whether you would also consider limiting the expansion of the ext4 partition during resize, especially as the memory stick sizes are getting huge. I got notice this week that 2GB are now available from multiple sources and at least one manufacturer has plans for 4GB ssd stick to be released later this year.


Re: EasyOS .img file now not compressed

Posted: Thu May 12, 2022 2:50 pm
by BarryK

I want the working-partition to expand to fill the drive. An example is an install to a 240GB SSD, where I just used easydd to write the .img.gz file to the drive, and at first bootup the working-partition expanded to fill the entire free space:

https://easyos.org/install/how-to-insta ... w-ssd.html

There is a limit though. the easy*.img.gz file has an MBR, not a GPT, and can only handle drives up to 2TB.


Re: EasyOS .img file now not compressed

Posted: Thu May 12, 2022 4:38 pm
by user1111

Spent the afternoon messing around. dd'd 800MB of easyos image to a usb stick, then fired up gparted and removed the second partition from that. Removed easy.sfs from the first and then resized that partition down to 40MB and set init to just run setsid cttyhack sh

Booted fine (to cli). I then replaced initrd and vmlinuz with a rootfs.cpio and bzImage of my own (directly compiled from kernel.org) and that booted fine, but where that has the added functionality of ethernet/wifi/phone tethering/phone wifi connectivity. So conceptually could add a partition to the USB using however much space one wished to allocate and pull down a main sfs from wherever (local, remote), and layer, switch_root that.

Annoyingly gparted wouldn't resize the partition down to 40MB type levels, a known issue with some versions. Converting fat32 to fat16 however did enable that 40MB resizing (around 8MB when that .img is gzip compressed).

Another choice might be to also include easy sfs as the last 640MB/whatever of that .img, boot the 40MB initrd/vmlinuz and then copy the last 640MB/whatever to ram (dd with seek), create a partition using unallocated space and dd that from ram into that space.

The more you play, the more you learn, together with opening up options to refine things to how you'd prefer. All part of the fun element :thumbup2: