-
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

2-Bay/4-Bay Hard Drive Enclosure for 3.5"/2.5'' SATA HDD/SSD 10Gbps USB-C 3.2
$75.99

Broadcom 9600-24i RAID Controller PCIe Gen 4.1 Tri-Mode NEW 05-50111-01004
$649.99

OWC Mercury Elite Pro 2 Bay RAID Enclosure with USB 3.2 for Dual 3.5 inch HDDs
$87.99

Broadcom 9600-24i Tri-Mode RAID Controller 4.0 NVMe SAS SATA NEW 05-50111-01003
$639.69

WAVLINK RAID 2 Bay Hard Drive Docking Station SATA 2.5/3.5'' SSD HDD Enclosure
$119.99

Acasis USB 3.2 2 Bay HDD RAID Enclosure for 2.5/3.5" SATA Drives External Array
$55.00

Broadcom LSI 9305-16i 12Gbps SAS-3 PCIe x8 HBA 16-Ports Raid Controller
$64.99

Dell PowerEdge HBA330 LP PCI-E 12GBs RAID SAS Controller Adapter J7TNV
$18.95

CalDigit VR minin 2 Portable Raid Storage On The Go
$75.00

Intel VROC Premium RAID Controller Card PCIe Add-On Module VROCPREMMOD
$265.00