EasyOS .img file now not compressed

Moderator: BarryK

Post Reply
scsijon
Posts: 205
Joined: Fri Jul 24, 2020 10:11 am
Has thanked: 6 times
Been thanked: 19 times

EasyOS .img file now not compressed

Post 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.

User avatar
BarryK
Posts: 2738
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 135 times
Been thanked: 745 times

Re: EasyOS .img file now not compressed

Post 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.

user1111

Re: EasyOS .img file now not compressed

Post 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:

Post Reply

Return to “EasyOS”