-
Fixing "/usr/bin/flash-knoppix2" for fractional MiB media capacity values
Hello philo

Originally Posted by
philo
Thanks Blacksimon. I tried this with my 32GB key:
[[...]]
step #4
Next I run knoppix installer with the 'p' option and again received the infamous error message that the "overlay is too small".
So no joy so far.
Note - Not better if the whole key was formated in FAT32 before doing step #1.
Before the /usr/bin/flash-knoppix2 script can fail, it should show you
a dialog with a list of storage devices. In that list your 32 GB key should appear
with a storage capacity/size value (in MiB). If that value is a fractional/floating point value
(with something like ".5" or ".25" at the end), then you have found the
reason for the failure and the overlay is too small message: The script performs calculations
with that value, but these fail (with shell error message) and return a zero value.
You can fix this yourself by changing the script, making it suppress the
decimal fraction before the calculations take place.
In the line reading (at line number ca. 367):
total="$(awk '{print ($1 / 2048 )}' /sys/block/"${FLASH##*/}"/size 2>/dev/null)"
Change the part that reads:
print ($1 / 2048 )
to:
printf( "%d", ($1 / 2048 ) )
This change can be performed even in a Knoppix booted from a DVD- or CD-ROM, with a
Text editor of your choice (nano is simple to use). Your change will reside in the RAM overlay.
I could successfully use this changed script to create a flash storage medium with
a big (7 GiB) reiserfs overlay filesystem, without having to prepare any partitions on it
(I only had an empty parition table there).
I hope I this helps. I hope I have correctly understood Your problem.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

RAM-HOL-SAM60CPU RAM USB-C Powered Dock for Samsung Tab Active5 - 3 - 2
$81.99

Samsung 2.5" 870 EVO SSD SATA III 250GB 500GB 1TB Internet Solid State Drive Lot
$60.00

Lot of 15 Non-Working Samsung Galaxy Tablets for Parts
$338.63

LOT OF 5 Samsung 870 EVO 500GB 2.5" SATA SSD TLC DRAM 95% or Better
$250.00

Samsung PM961 512GB PCIe Gen 3x4 NVMe 2280 M.2 SSD MZVLW512HMJP-000D1
$60.00

RAM-GDS-SKIN-SAM54-NG-1 RAM Mounts IntelliSkin® Next Gen for Samsung Tab Active4
$93.99

RAM-HOL-SAM52CPU RAM USB-C Powered Dock Samsung Tab Active4 Pro & Tab Active Pro
$81.99

Samsung 8GB DDR5 5600MHz SODIMM Laptop RAM PC5-44800 CL46 M425R1GB4BB0-CWM
$99.99

SAMSUNG FIT PLUS 128GB USB 3.1 Flash Drive - fully working & authentic
$24.95

Samsung 870 EVO 4TB 2.5" SATA III Internal SSD (MZ-77E4T0B/AM)
$310.00