-
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

Vintage Cherry W. Germany G80-0486H/05 Mechanical 25-Pin D-Sub Keyboard M8
$170.99

Vintage Computer - PC Innovation Intel 486DX2 - Dos Ver 6.2 Windows 3.1
$250.00

Vintage Jetway J-620BF Socket 370 Celeron AT Motherboard SiS 620 Brand New
$75.00

Vintage HP Hewlett Packard 2112A 21MX 1000 M-Series 16-Bit Minicomputer
$419.99

Vintage Timbuk2 Crossbody Messenger Bag Forest Green/ Black Y2k USA Made
$85.00

Vintage cross Apple computer branded pen rainbow logo In original box
$100.00

Vintage Apple computer Cross Metal Ballpoint Pen Black Ink Gold Trim
$125.00

Vintage Microsoft Office 4.2 for Windows Original Floppy Disks & Manuals 1994
$119.99

Vintage 1986 Goldenrod Research Corp CP/M Desktop Computer Syste w/Keyboard
$350.00

Vintage ISA Expansion Card Lot Async Serial I/O Printer Game RAM Untested
$107.29