-
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

🔀 Juniper Networks EX2300-C-12P 12× Gigabit PoE+ • 2× 10G SFP+ Compact Switch ⚡
$109.99

Juniper EX2300 12-Port Gigabit PoE+ Managed Network Switch P/N: EX2300-C-12P
$149.99

Juniper Networks EX3400-24T 24-Port Ethernet Switch w/Power Cord
$174.99

Juniper EX3400-24P 24-Port PoE+ GbE + 4-Port 1/10Gb SFP Switch
$245.00

JUNIPER QFX5120-48Y-AFO 48x 10/25GbE SFP28 8x 40/100GbE Network Switch Dual PSU
$6998.00

Juniper Networks QFX-SFP-DAC-7MA to Brocade (Formerly) XBR-TWX-0701 Comp TAA
$196.99

Juniper Networks AP33-US Indoor Wifi6 (US Version) 5GHz: 4x4:4; 2.99
$24.99

Juniper MX204 +JUNOS and Dual Power Supply
$7299.99

Juniper Networks Mist Wireless Access Points, Model AP45
$59.99

Juniper Networks EX2300-48P 48-Port Gigabit PoE Managed Ethernet Switch
$79.99