WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: syslinux - mkdiskimage and perl library  (Read 3615 times)

Offline parky_dw

  • Newbie
  • *
  • Posts: 33
syslinux - mkdiskimage and perl library
« on: November 01, 2012, 06:57:26 AM »
I wanted to use the mkdiskimage application that is part of the syslinux.tgz package.

1. Fresh installation of TinyCore-4.6.2.iso
2. Use App browser to install kmaps, pci-utils and usb-utils
3. Use App browser to install syslinux.tgz

Start typing mkdis.. & tab autocompletes to mkdiskimage

Hit return and I get "mkdiskimage not found" and yet I can see it there in /tmp/tcloop/syslinux/usr/local/bin/mkdiskimage (and the link in /usr/local/bin).

[I now see that it is a perl script and so doesn't run as perl is not loaded]

4. Use the App Browser to load tc-install.tgz (syslinux is a dependency of that package, and so is perl - so that got perl loaded.)

This time mkdiskimage will run in that without any parameters I get the usage screen.  However...

mkdiskimage -Mz4 -i usbzip /dev/sdb 20 64 32
results in
Undefined subroutine &main::to_int called at /usr/local/bin/diskimage line 182, <DATA> line 18.

What is missing is the perl module "Data Types" which includes the "to_int" function - see http://search.cpan.org/~dwheeler/Data-Types-0.09/lib/Data/Types.pm

Downloading and installing this module (after installing make.tcz) lets the application run (after I add a line "use Data::Types" to the original script).

So an element of syslinux.tgz requires perl and also a perl module that is not part of the tinycore standard build - there only seem to be three Data::xxxx extensions, and Data::Types is not one of them.

David

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: syslinux - mkdiskimage and perl library
« Reply #1 on: November 01, 2012, 07:37:26 AM »
good detective work  :)

[I now see that it is a perl script and so doesn't run as perl is not loaded]

from the syslinux info file:
Quote
optionally requires perl5 extension to use isohybrid, mkdiskimage, etc

Quote
What is missing is the perl module "Data Types" which includes the "to_int" function - see http://search.cpan.org/~dwheeler/Data-Types-0.09/lib/Data/Types.pm
If you could submit a perl_data-types module (as long as the function is not in the other perl_data* extensions) it would be much appreciated.

Offline parky_dw

  • Newbie
  • *
  • Posts: 33
Re: syslinux - mkdiskimage and perl library
« Reply #2 on: November 01, 2012, 02:05:40 PM »
I must remember to read the info files
I must remember to read the info files
I must......

I'll look into the module thing when I have time, but what I need to understand first is why the "use" line is missing from the perl script.  I'll check another distribution at some point and see what's happening there with this...

Offline genec

  • Full Member
  • ***
  • Posts: 240
Re: syslinux - mkdiskimage and perl library
« Reply #3 on: November 03, 2012, 08:32:09 AM »
I'll look into the module thing when I have time, but what I need to understand first is why the "use" line is missing from the perl script.  I'll check another distribution at some point and see what's happening there with this...

Good catch.  It appears to me to be at least 1 or 2 bugs since at least 3.85.

Offline genec

  • Full Member
  • ***
  • Posts: 240
Re: syslinux - mkdiskimage and perl library
« Reply #4 on: November 03, 2012, 10:26:39 AM »