Page 1 of 1
How to resize an Easy***.img file ?
Posted: Wed Mar 01, 2023 8:00 pm
by Caramel
This question is particulary for BarryK and follow the message https://www.forum.puppylinux.com/viewto ... 399#p81399
In https://bkhome.org/news/202302/mount-im ... write.html , it is explained how to mount read-write an easy image drive but not how to enlarge the part with the folder /easyos .
I've searched in vain on internet.
Thank for your help.
Re: How to resize an Easy***.img file ?
Posted: Thu Mar 02, 2023 6:09 pm
by Caramel
Method under test :
Commands to execute In the directory where is located (a copy of) easy-5.0-amd64.img to enlarge it to 1G
- (optional) fdisk -l easy-5.0-amd64.img display informations on the partitions on the drive image
Disque easy-5.0-amd64.img : 825 MiB, 865075200 octets, 1689600 secteurs
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Type d'étiquette de disque : dos
Identifiant de disque : 0x07c66c81
Périphérique Amorçage Début Fin Secteurs Taille Id Type
easy-5.0-amd64.img1 * 2048 16383 14336 7340032 ef EFI (FAT-12/16/
easy-5.0-amd64.img2 16384 1687551 1671168 855638016 83 Linux
- truncate -s 1G easy-5.0-amd64.img (extend the size to 1GB)
- fdisk easy-5.0-amd64.img (to modify the partition table)
then type d, type enter to delete the partition 2
then type n, type enter 4 times to create the partition 2 with maximum size
fdisk asks if we want to delete the signature. Reply N
(optional) type p for verify the table partions after the modification
Périphérique Amorçage Début Fin Secteurs Taille Id Type
easy-5.0-amd64.img1 * 2048 16383 14336 7340032 ef EFI (FAT-12/16
easy-5.0-amd64.img2 16384 2097151 2080768 1065353216 83 Linux
type w to save the new table and quit fdisk.
We can now verify the size of easy-5.0-amd64.img (1024MB -> OK)
We click on easy-5.0-amd64.img to mount it read-only
The 2nd partition is probably mount with dev/loop2 (cat /etc/mtab to verify , it's the line /dev/loop2 /tmp/mount-img-2-ext4-loop2 ext4 ro,relatime 0 0)
blkid /dev/loop2
/dev/loop2: LABEL="easy2" UUID="328ed5c2-b561-11ed-ae4d-287fcfeb4376" BLOCK_SIZE="4096" TYPE="ext4"
The UUID has not changed
I'll test the img file in ventoy.
Re: How to resize an Easy***.img file ?
Posted: Fri Mar 03, 2023 5:59 pm
by Caramel
The easy-5.0 img file enlarged don't work with ventoy.
So i tested with the original easy-5.0-amd64.img. Don't work too (whereas easy-4.5.5 work)
Re: How to resize an Easy***.img file ?
Posted: Fri Mar 03, 2023 7:19 pm
by Caramel
My conclusions for this topic:
-The method for enlarge the 2nd partition in a easy***.img file seems work. (EDIT : not works)
-The last version of ventoy (1.0.88) is not compatible with easy5.0***.img
-The mehod for install easy on a ventoy key explained in https://www.forum.puppylinux.com/viewto ... 625#p81625 is still working
Re: How to resize an Easy***.img file ?
Posted: Fri Mar 03, 2023 11:40 pm
by BarryK
Looking through the above steps, you have increased the size of the working-partition, however you haven't increased the ext4 filesystem to fill the partition.
In a drive with working-partition /dev/sdb2:
Re: How to resize an Easy***.img file ?
Posted: Sat Mar 04, 2023 9:58 am
by Caramel
BarryK wrote: Fri Mar 03, 2023 11:40 pm
Looking through the above steps, you have increased the size of the working-partition, however you haven't increased the ext4 filesystem to fill the partition.
In a drive with working-partition /dev/sdb2:
You're right.
Fdisk change only the table of partitions, not modify the format of the partitions.
I'll test with parted
Re: How to resize an Easy***.img file ?
Posted: Sat Mar 04, 2023 1:22 pm
by Caramel
I don't succeed with parted. I give up.