-
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
HPGYT DELL Micron 5100 PRO 960GB SATA 6Gb/s 2.5in SSD 0HPGYT MTFDDAK960TCB Gen14
$69.00
G5T03 Dell Intel DC S3700 Series 800GB SATA 6Gb/s 2.5" SSD 0G5T03 SSDSC2BA800G3E
$55.00
### MZ-7KE1T0 Samsung 850 Pro Series 1TB 2.5 inch SATA3 SSD ###
$105.00
WD 500GB My Passport SSD, Portable External Solid State Drive WDBAGF5000ARD-WESN
$59.99
Patriot P210 128GB 256GB 512GB 1TB 2TB 2.5" SATA 3 6GB/s Internal SSD PC/MAC Lot
$14.99
Netac 1TB 2TB 512GB Internal SSD 2.5'' SATA III 6Gb/s Solid State Drive lot
$13.99
Fanxiang SSD 512GB 1TB 2TB 4TB 2.5'' SSD SATA III Internal Solid State Drive lot
$13.99
Patriot P210 256GB SSD 2.5" SATA III 6GB/s Internal Solid State Drive For PC/MAC
$19.99
Fanxiang SSD 512GB 1TB 2TB 4TB 2.5''SATA III Internal Solid State Hard Drive LOT
$188.99
M.2 NVMe SSD 128GB 256GB 512GB Single Notch with Windows Installed 10 / 11
$85.25