usb_inst.sh wrongly calculate required size of USB stick

Post there if you have problem when downloading the iso, or burning it.
Milan
Posts: 5
Joined: 06 Oct 2013, 13:29

usb_inst.sh wrongly calculate required size of USB stick

Postby Milan » 06 Oct 2013, 13:53

This is impossible to write CD to USB stick by usb_inst.sh because the script needs 512 MiB which is more than usual 512 MB stick has (because MB is 1000*1000 and MiB id 1024*1024). So please change required value from 512 to 490 (which has been done before already, but reverted for whatever reason).
Today I wrote version 3.8.0 to 512 MB USB stick and df reports 420 MiB (out of 495 MiB) so 75 MiB of free space.
You may see that my 512 MB USB stick has size of 495 MiB.

Or you may fix calculation of requred size. Maybe change value from 17 to 22 so a little bit smaller stick fit (there could be slack space at the begginning of the stick because some tools "allign" start of the partition to value higher than 1st cylinder):

--- usb_inst.sh.orig 2013-10-06 15:15:18.309854757 +0200
+++ usb_inst.sh 2013-10-06 15:44:54.842242352 +0200
@@ -186,7 +186,8 @@
fi

secsizeofdev="$(blockdev --getsz ${devname})"
- mbsizeofdev="$((secsizeofdev/2048))"
+ # normal 512 MB USB stick has size 495 MiB, so let it fit (because 512-495=17)
+ mbsizeofdev="$((secsizeofdev/2048+17))"
if [ "${mbsizeofdev}" -lt "${MINSIZEMB}" ]
then
die "The device [${devname}] is only ${mbsizeofdev} MB. It is too small to copy all the files, an USB-stick of at least ${MINSIZEMB}MB is recommended"

Milan
Posts: 5
Joined: 06 Oct 2013, 13:29

Re: usb_inst.sh wrongly calculate required size of USB stick

Postby Milan » 29 Jan 2014, 06:52

Version 4.0.0 has the same problem still. So I'm unable to instal to 512 MB USBstick even it fits.

Please fix the script. Thank you.

rrt
Posts: 1
Joined: 21 Apr 2014, 14:31

Re: usb_inst.sh wrongly calculate required size of USB stick

Postby rrt » 21 Apr 2014, 14:35

I ran into this problem too. There's a workaround, which is to copy the usb_inst.sh file elsewhere, edit the size from 512 to 490, and also manually insert a value for PROG_LOC which matches the directory where you've mounted the ISO image, so that the installer doesn't complain that you're running the installation script from the wrong directory. Then run your copy of the script from the mounted directory with the appropriate relative path, e.g. ../usb_inst.sh.

Milan
Posts: 5
Joined: 06 Oct 2013, 13:29

Re: usb_inst.sh wrongly calculate required size of USB stick

Postby Milan » 01 Nov 2014, 13:20

Latest 4.4.0 still has the problem with be small enough for 512KiB USB flash stick, but because wrong value in script.
Simple lowering value in the script helps to solve the problem, but needs to copy all out to HDD.


Return to “Downloading and burning”

Who is online

Users browsing this forum: No registered users and 3 guests