[syslinux] USB boot problems on Gigabyte GA-M55Plus-S3G

Ronald F. Guilmette rfg at tristatelogic.com
Sun Jan 19 15:29:21 PST 2014


In message <BLU0-SMTP48EE10402F4B5AE9EC1E078BBB0 at phx.gbl>, Ady wrote:

>After dd'ing my test.img to the USB drive, you would have one FAT32 
>partition of about 700MB. So:

Someone in this thread said something about erasing or eliminating
stuff from the USB stick first, so just to be on the safe side, before
I dd'd your test.img file to my test stick (i.e. one of my 2GB
Sandisk Cruzer Blades that was failing to boot Clonezilla even
before I started this thread), I first dd'd /dev/zero to the stick
until dd hit physical EOF on the stick.

>1_ Expand the content of the Clonezilla Live zip archive in some 
>temporal directory.
>
>2_ Move *almost* all the resulting expanded content from the temporal 
>directory to the FAT32 partition in the USB drive; with the 
>*exception* of the following directories (and their contents, of 
>course):
>2a_ './isolinux/'
>2b_ './syslinux/'

Note:  I mis-spoke earlier when I made reference to using ntfs-3g to
access the stick.  (Duh!)  As you say, once the stick has your test.img
file on it, it contains a FAT32 filesystem, not NTFS.  So I can access
it from FreeBSD simply by mounting it with "-t msdosfs".

Fdisk on FreeBSD appears to confirm that the stick is how you wished
and expected it to be:

====================================================================
******* Working on device /dev/da2 *******
parameters extracted from in-core disklabel are:
cylinders=243 heads=255 sectors/track=63 (16065 blks/cyl)

parameters to be used for BIOS calculations are:
cylinders=243 heads=255 sectors/track=63 (16065 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 12 (0x0c),(DOS or Windows 95 with 32 bit FAT (LBA))
    start 2048, size 1431552 (699 Meg), flag 0
        beg: cyl 0/ head 32/ sector 33;
        end: cyl 89/ head 60/ sector 35
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>
====================================================================

>Note that my test.img already contains a './syslinux/' directory with 
>some files in it.

Yes, and at the top level it apparently contains _only_ that.

>3_ Move (part of) the content of Clonezilla's temporal './syslinux/' 
>directory to the equivalent './syslinux/' directory located in the 
>FAT32 partition in the USB drive, with two *caveats*:
>
>3a_ If the filename already exists in the destination directory, 
>*keep it*, do 
>*NOT* replace it with the one from Clonezilla. This is specially 
>important for 
>'./syslinux/ldlinux.sys'.
>
>3b_ The only file from Clonezilla's temporal directory that indeed 
>should 
>replace the one already placed in the USB drive is 
>'./syslinux/syslinux.cfg'.

Below are directory listings of (a) /syslinux/ on the test stick after
your test.img file has been copied to it and (b) /syslinux/ as it
exists within the (unziped) clonezilla-live-2.2.1-22-amd64.zip file:

(a)
==========================================================================
-rwxr-xr-x  1 root  wheel    1652 Dec 11 02:08 cat.c32
-rwxr-xr-x  1 root  wheel   24040 Dec 11 02:08 chain.c32
-rwxr-xr-x  1 root  wheel    1256 Dec 11 02:08 cmd.c32
-rwxr-xr-x  1 root  wheel    1500 Dec 11 02:07 config.c32
-rwxr-xr-x  1 root  wheel    1592 Dec 11 02:08 debug.c32
-rwxr-xr-x  1 root  wheel    1996 Dec 11 02:07 disk.c32
-rwxr-xr-x  1 root  wheel  173060 Dec 11 02:08 hdt.c32
-rwxr-xr-x  1 root  wheel    1524 Dec 11 02:08 hello.c32
-rwxr-xr-x  1 root  wheel    3692 Dec 11 02:08 hexdump.c32
-r-xr-xr-x  1 root  wheel  122080 Jan 16 14:40 ldlinux.c32
-r-xr-xr-x  1 root  wheel   67072 Jan 16 14:40 ldlinux.sys
-rwxr-xr-x  1 root  wheel  186452 Dec 11 02:07 libcom32.c32
-rwxr-xr-x  1 root  wheel   66548 Dec 11 02:07 libgpl.c32
-rwxr-xr-x  1 root  wheel  112908 Dec 11 02:08 liblua.c32
-rwxr-xr-x  1 root  wheel   24056 Dec 11 02:08 libmenu.c32
-rwxr-xr-x  1 root  wheel   24156 Dec 11 02:07 libutil.c32
-rwxr-xr-x  1 root  wheel    4660 Dec 11 02:08 linux.c32
-rwxr-xr-x  1 root  wheel    2948 Dec 11 02:08 ls.c32
-rwxr-xr-x  1 root  wheel    2432 Dec 11 02:08 meminfo.c32
-rwxr-xr-x  1 root  wheel   26568 Dec 11 02:08 menu.c32
-rwxr-xr-x  1 root  wheel    1504 Dec 11 02:08 pwd.c32
-rwxr-xr-x  1 root  wheel   13768 Dec 11 02:08 rosh.c32
-rwxr-xr-x  1 root  wheel      56 Jan 16 14:27 syslinux.cfg
-rwxr-xr-x  1 root  wheel   27076 Dec 11 02:08 vesamenu.c32
-rwxr-xr-x  1 root  wheel    2460 Dec 11 02:08 whichsys.c32
==========================================================================

(b)
==========================================================================
-rw-r--r--  1 rfg  rfg   24040 Dec 11 02:08 chain.c32
-rw-r--r--  1 rfg  rfg   43283 Aug 12  2012 drblwp.png
-rw-r--r--  1 rfg  rfg  122080 Dec 11 02:07 ldlinux.c32
-rw-r--r--  1 rfg  rfg  186452 Dec 11 02:07 libcom32.c32
-rw-r--r--  1 rfg  rfg   24156 Dec 11 02:07 libutil.c32
-rw-r--r--  1 rfg  rfg   26140 Dec 26 03:25 memdisk
-rw-r--r--  1 rfg  rfg   26568 Dec 11 02:08 menu.c32
-rw-r--r--  1 rfg  rfg   46464 Aug 12  2012 ocswp.png
-rw-r--r--  1 rfg  rfg    6503 Jan  6 05:52 syslinux.cfg
-rw-r--r--  1 rfg  rfg   27076 Dec 11 02:08 vesamenu.c32
==========================================================================

I elected to accomplish your step 3a by first cd'ing into the /syslinux/
directory of the unzipped Clonezilla and then executing the command:

   find * -print | cpio -pvm /mnt/syslinux

where /mnt/syslinux is/was the /syslinux/ directory on the test stick.
The results of doing this were as follows, which I hope is what you
wanted:

=========================================================================
/mnt/syslinux/chain.c32cpio: chain.c32: File on disk is not older; skipping.
/mnt/syslinux/drblwp.png
/mnt/syslinux/ldlinux.c32cpio: ldlinux.c32: File on disk is not older; skipping.
/mnt/syslinux/libcom32.c32cpio: libcom32.c32: File on disk is not older; skipping.
/mnt/syslinux/libutil.c32cpio: libutil.c32: File on disk is not older; skipping.
/mnt/syslinux/memdisk
/mnt/syslinux/menu.c32cpio: menu.c32: File on disk is not older; skipping.
/mnt/syslinux/ocswp.png
/mnt/syslinux/syslinux.cfgcpio: syslinux.cfg: File on disk is not older; skipping.
/mnt/syslinux/vesamenu.c32cpio: vesamenu.c32: File on disk is not older; skipping.
=========================================================================

I elected to carry out your step 3b via the following command:

   find * -name syslinux.cfg -print | cpio -pvmu /mnt/syslinux

Following these steps, the /syslinux/ directory on the stick is as follows:

=============================================================================
-rwxr-xr-x  1 root  wheel    1652 Dec 11 02:08 cat.c32
-rwxr-xr-x  1 root  wheel   24040 Dec 11 02:08 chain.c32
-rwxr-xr-x  1 root  wheel    1256 Dec 11 02:08 cmd.c32
-rwxr-xr-x  1 root  wheel    1500 Dec 11 02:07 config.c32
-rwxr-xr-x  1 root  wheel    1592 Dec 11 02:08 debug.c32
-rwxr-xr-x  1 root  wheel    1996 Dec 11 02:07 disk.c32
-rwxr-xr-x  1 root  wheel   43283 Aug 12  2012 drblwp.png
-rwxr-xr-x  1 root  wheel  173060 Dec 11 02:08 hdt.c32
-rwxr-xr-x  1 root  wheel    1524 Dec 11 02:08 hello.c32
-rwxr-xr-x  1 root  wheel    3692 Dec 11 02:08 hexdump.c32
-r-xr-xr-x  1 root  wheel  122080 Jan 16 14:40 ldlinux.c32
-r-xr-xr-x  1 root  wheel   67072 Jan 16 14:40 ldlinux.sys
-rwxr-xr-x  1 root  wheel  186452 Dec 11 02:07 libcom32.c32
-rwxr-xr-x  1 root  wheel   66548 Dec 11 02:07 libgpl.c32
-rwxr-xr-x  1 root  wheel  112908 Dec 11 02:08 liblua.c32
-rwxr-xr-x  1 root  wheel   24056 Dec 11 02:08 libmenu.c32
-rwxr-xr-x  1 root  wheel   24156 Dec 11 02:07 libutil.c32
-rwxr-xr-x  1 root  wheel    4660 Dec 11 02:08 linux.c32
-rwxr-xr-x  1 root  wheel    2948 Dec 11 02:08 ls.c32
-rwxr-xr-x  1 root  wheel   26140 Dec 26 03:25 memdisk
-rwxr-xr-x  1 root  wheel    2432 Dec 11 02:08 meminfo.c32
-rwxr-xr-x  1 root  wheel   26568 Dec 11 02:08 menu.c32
-rwxr-xr-x  1 root  wheel   46464 Aug 12  2012 ocswp.png
-rwxr-xr-x  1 root  wheel    1504 Dec 11 02:08 pwd.c32
-rwxr-xr-x  1 root  wheel   13768 Dec 11 02:08 rosh.c32
-rwxr-xr-x  1 root  wheel    6503 Jan  6 05:52 syslinux.cfg
-rwxr-xr-x  1 root  wheel   27076 Dec 11 02:08 vesamenu.c32
-rwxr-xr-x  1 root  wheel    2460 Dec 11 02:08 whichsys.c32
=============================================================================

>Then boot the USB drive (using F12 during POST as before). I would 
>expect at least the initial Clonezilla boot menu to show up.

I umounted /mnt, removed the test stick and stuck it into one of the rear
USB 2.0 ports on the GA-M55Plus-S3G, then powered that on.  (No other mass
storage devices were attached.)

I forgot (the first time) to use F12 as you requested, so the system just
booted normally.

The Clonezilla boot menu *did* show up.

I then went back and used F12 as you requested.

In this case also, the Clonezilla boot menu *did* show up.

I assume this all represents success.

Are we done now?


Regards,
rfg


P.S.  It is my sincere hope that we did not go through all of this just so
that you could tell me "Hey Ron!  This is the (convoluted) procedure you must
use if you want to boot Clonezilla, ever, on that motherboard."

All these experiments will result in improvements to Syslinux that will, in
due course, make it out to the developers of Clonezilla and UBCD and OpenELEC,
yes?


More information about the Syslinux mailing list