Page 1 of 1
EasyResize - resize easyos image file to any size (updated)
Posted: Wed Mar 20, 2024 10:37 pm
by Thanos
I think run easyos in virtual usb disk is quite fast than in real usb disk, so I write a tool for it.
If you want to boot easyos by ventoy and need anysize space for work, my tool can help you.
.
.
- 01.png (177.47 KiB) Viewed 1098 times
.
.
- 02.png (170.8 KiB) Viewed 1098 times
.
.
- 03.png (153.66 KiB) Viewed 1098 times
Re: EasyResize - resize easyos image file to any size
Posted: Wed Mar 20, 2024 11:00 pm
by Thanos
.
.
.
.
.
.
Here is the code.
Just run it from rox.
Re: EasyResize - resize easyos image file to any size
Posted: Wed Mar 20, 2024 11:53 pm
by rockedge
Thanos wrote: ↑Wed Mar 20, 2024 11:00 pm
I can't upload the sh file or zip file to the forum. Why?
Are the files too big?
The .sh file must renamed or the forum will not allow it. Can't just insert random arbitrary bash script or sh code onto the sever because it is a huge security risk, so it needs to be "wrapped" with a fake extension.
Like this example:
test.sh
renamed as test.sh.fake.gz
The .zip file version will not attach if it exceeds the upload size limit.
Re: EasyResize - resize easyos image file to any size
Posted: Thu Mar 21, 2024 1:40 pm
by Thanos
Now, the code has been upload.
Re: EasyResize - resize easyos image file to any size
Posted: Fri Mar 22, 2024 8:35 am
by Caramel
Thanks @Thanos
The script did not work for me
stat: impossible d'exécuter statx '../easy-test.img': No such file or directory
0
realpath: ../easy57/easy-5.7-amd64.img: No such file or directory
dirname: opérande manquant
Saisissez « dirname --help » pour plus d'informations.
cp: impossible d'évaluer '../tools/pv': No such file or directory
Copying the image file...
↓↓↓
/tmp.img
./increase.sh: line 84: pv: command not found
Resizing the image file...
822083584 octets (822 MB, 784 MiB) copiés, 7 s, 114 MB/s
800+0 enregistrements lus
800+0 enregistrements écrits
838860800 octets (839 MB, 800 MiB) copiés, 7,38787 s, 114 MB/s
Erreur: /dev/loop4 : étiquette de disque inconnue
Resizing the partition...
Erreur: /dev/loop4 : étiquette de disque inconnue
Resizing the file system...
e2fsck: No such file or directory while trying to open /dev/loop4p2
Possibly non-existent device?
resize2fs 1.46.5 (30-Dec-2021)
open: No such file or directory while opening /dev/loop4p2
Modifying the image file...
mount: mounting /dev/loop4p1 on /tmp/img/p1 failed: No such file or directory
mount: mounting /dev/loop4p2 on /tmp/img/p2 failed: No such file or directory
cp: impossible d'évaluer '../p2/*': No such file or directory
umount: can't unmount /tmp/img/p1: Invalid argument
umount: can't unmount /tmp/img/p2: Invalid argument
mv : option incorrecte — « c »
Saisissez « mv --help » pour plus d'informations.
cfdisk: invalid option -- 'i'
Exécutez « cfdisk --help » pour obtenir des renseignements complémentaires.
#
Re: EasyResize - resize easyos image file to any size
Posted: Fri Mar 22, 2024 10:54 pm
by Thanos
Caramel wrote: ↑Fri Mar 22, 2024 8:35 am
Thanks @Thanos
The script did not work for me
stat: impossible d'exécuter statx '../easy-test.img': No such file or directory
0
realpath: ../easy57/easy-5.7-amd64.img: No such file or directory
dirname: opérande manquant
Saisissez « dirname --help » pour plus d'informations.
cp: impossible d'évaluer '../tools/pv': No such file or directory
Copying the image file...
↓↓↓
/tmp.img
./increase.sh: line 84: pv: command not found
Resizing the image file...
822083584 octets (822 MB, 784 MiB) copiés, 7 s, 114 MB/s
800+0 enregistrements lus
800+0 enregistrements écrits
838860800 octets (839 MB, 800 MiB) copiés, 7,38787 s, 114 MB/s
Erreur: /dev/loop4 : étiquette de disque inconnue
Resizing the partition...
Erreur: /dev/loop4 : étiquette de disque inconnue
Resizing the file system...
e2fsck: No such file or directory while trying to open /dev/loop4p2
Possibly non-existent device?
resize2fs 1.46.5 (30-Dec-2021)
open: No such file or directory while opening /dev/loop4p2
Modifying the image file...
mount: mounting /dev/loop4p1 on /tmp/img/p1 failed: No such file or directory
mount: mounting /dev/loop4p2 on /tmp/img/p2 failed: No such file or directory
cp: impossible d'évaluer '../p2/*': No such file or directory
umount: can't unmount /tmp/img/p1: Invalid argument
umount: can't unmount /tmp/img/p2: Invalid argument
mv : option incorrecte — « c »
Saisissez « mv --help » pour plus d'informations.
cfdisk: invalid option -- 'i'
Exécutez « cfdisk --help » pour obtenir des renseignements complémentaires.
#
You should run it from rox, just click it in rox.
Re: EasyResize - resize easyos image file to any size
Posted: Sat Mar 23, 2024 7:22 am
by Caramel
Thanos wrote: ↑Fri Mar 22, 2024 10:54 pm
Caramel wrote: ↑Fri Mar 22, 2024 8:35 am
Thanks @Thanos
The script did not work for me
You should run it from rox, just click it in rox.
I clicked on increase.sh and have chosen to increase up to 1000 MB.
A file easy-5.7-amd64-inc.img has been created next to easy-5.7.img. After 2 hours it is not finished.
The executable /usr/libexec/gpartedbin is still running. I tried to increase the priority of gpartbin with renice witout apparent effect.
Not only my PC is slow but more it do not operate at its peak.
Edit : I stopped after 3 hours
EDIT ; I just saw that the script was updated.
Re: EasyResize - resize easyos image file to any size
Posted: Tue Mar 26, 2024 9:49 am
by Caramel
Caramel wrote: ↑Sat Mar 23, 2024 7:22 am
EDIT ; I just saw that the script was updated.
Still problems.
The file obtained easy-5.7-amd64-inc.img is bigger than easy-5.7-amd64.img but the second partition in it is not increased.
There is simply unallocated space on the img file.
To test in terminal i have commented the lines 54 to 57, 67, 126 to 128 and 130 (They are instructions in case the script is launched in terminal)
Problem with the line 96
Code: Select all
end=$(parted $loopn print|awk 'NR==2{sub(/..$/,"",$3);print $3}')
In my test "end = : " while it should be a size (like 1848MB)
Without understanding, i tried different changes in this line, To change print $3 in print $4 seems to work
----------------------------------------------------------------------------------------------------------------------------------------------
IMPORTANT EDIT : The cause of the failure for me is a the output of the command parted in French
In English
# parted /dev/sda5 print
Model: Unknown (unknown)
Disk /dev/sda5: 85.9GB
In French
# parted /dev/sda5 print
Modèle : Inconnu (unknown)
Disque /dev/sda5 : 85,9GB
There is a space between /dev/sda5 and : in the French output, not un the English output
------------------------------------------------------------------------------------------------------------------------------------------------------------
Another problem is line 119
with the error
'../p2/*': No such file or directory
I do not know what is the purpose of this instruction, so I haven't tested anything