[syslinux] Problem with 2GB USB Pendrive

ArcosCom Linux User linux at arcoscom.com
Fri Mar 30 15:56:56 PDT 2007


Hi, i'm trying to create an ubuntu live-pendrive using this tutorial

http://www.pendrivelinux.com/2007/02/12/usb-ubuntu-tutorial-for-linux-users/

I have a 2GB USB Pendrive. When I insert the pendrive, /var/log/messages
says:

kernel: usb 5-5: new high speed USB device using ehci_hcd and address 35
kernel: usb 5-5: configuration #1 chosen from 1 choice
kernel: scsi13 : SCSI emulation for USB Mass Storage devices
kernel: scsi 13:0:0:0: Direct-Access     CBM      Flash Disk       4.00
PQ: 0 ANSI: 2
kernel: SCSI device sdc: 997759 2048-byte hdwr sectors (2043 MB)
kernel: sdc: Write Protect is off
kernel: sdc: assuming drive cache: write through
kernel: SCSI device sdc: 997759 2048-byte hdwr sectors (2043 MB)
kernel: sdc: Write Protect is off
kernel: sdc: assuming drive cache: write through
kernel:  sdc: sdc1 sdc2
kernel: sd 13:0:0:0: Attached scsi removable disk sdc
kernel: sd 13:0:0:0: Attached scsi generic sg2 type 0

Before of all, I'm using this software versions:
kernel (vanilla): 2.6.19.7
syslinux: 3.36-1 (from syslinux rpm repository)
fdisk: util-linux 2.13-pre7
mkdosfs: (don't know how to obtain)
distro: FC6

I run all steps in the same secuence that appears in the web page.
In step 3.2, when I run:
---BEGIN---
# fdisk /dev/sdc
Note: sector size is 2048 (not 512)

Command (m for help):
---END---
(see the "Note" that appears)

In step 3.6.3, I use +800M.

Before step 5, I have this:
---BEGIN---
# fdisk -l /dev/sdc
Note: sector size is 2048 (not 512)

Disk /dev/sdc: 2043 MB, 2043410432 bytes
63 heads, 62 sectors/track, 255 cylinders
Units = cylinders of 3906 * 2048 = 7999488 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1         101      788888    6  FAT16
/dev/sdc2             102         255     1203048   83  Linux
#
---END---

Before step 8:
---BEGIN---
# mkfs.vfat -F 16 -n PENDRIVE /dev/sdc1
mkfs.vfat 2.11 (12 Mar 2005)

# mkfs.ext2 -b 2096 -L PENDRIVE2 /dev/sdc2
mke2fs 1.39 (29-May-2006)
Etiqueta del sistema de ficheros=PENDRIVE2
Tipo de SO: Linux
Tamaño del bloque=2048 (bitácora=1)
Tamaño del fragmento=2048 (bitácora=1)
150960 nodos i, 601524 bloques
30076 bloques (5.00%) reservados para el súper usuario
Primer bloque de datos=0
Maximum filesystem blocks=537919488
37 bloque de grupos
16384 bloques por grupo, 16384 fragmentos por grupo
4080 nodos i por grupo
Respaldo del súper bloque guardado en los bloques:
        16384, 49152, 81920, 114688, 147456, 409600, 442368

Mientras se escribían las tablas de nodos i: terminado
Escribiendo superbloques y la información contable del sistema de
ficheros: hecho

Este sistema de ficheros se revisará automáticamente cada 31 meses o
180 dias, lo que suceda primero.  Utilice tune2fs -c o -i para cambiarlo.

#
---END---

At this step, I run "sync", extract and insert pendrive. I try to mount
/dev/sdc1 as this:
---BEGIN---
# mount -t vfat /dev/sdc1 /media/pendrive/
mount: /dev/sdc1: can't read superblock
#
---END---
/var/log/messages says at this point:
---BEGIN---
kernel: FAT: logical sector size too small for device (logical sector size
= 512)
---END---

Then I correct this problem using this:
---BEGIN---
# mkfs.vfat -vc -F 16 -n PENDRIVE -S 2048 /dev/sdc1
mkfs.vfat 2.11 (12 Mar 2005)
/dev/sdc1 has 63 heads and 62 sectors per track,
logical sector size is 2048,
using 0xf8 media descriptor, with 394444 sectors;
file system has 2 16-bit FATs and 8 sectors per cluster.
FAT size is 49 sectors, and provides 49292 clusters.
Root directory contains 512 slots.
Volume ID is 460d8c96, volume label PENDRIVE   .
Searching for bad blocks 34912... 69472... 104160... 133984... 168784...
203104... 237664... 272096... 306656... 341088... 375520... 410080...
444512... 479200... 513744... 548320... 582880... 617440... 652000...
686432... 720992... 755424...
#
---END---

At this point, I retry the mount comand successfully (and sdc2 into
pendrive2 dir to test), then unzipped the "precooked" qpubuntu.zip file
into /media/pendrive with no problem, umount /dev/sdc1 (and sdc2), run
"sync", extract, reinsert and umount (again, because gmone like to mount
devices by itself).

And the las step:
---BEGIN---
# syslinux -sf /dev/sdc1
syslinux: only 512-byte sectors are supported
#
---END---

The questions (after 3 hours playing, two hours googling and 30 minutes
writing this e-mail) are:

Does anyone know this problem and any solution or work arount to allow me
boot with this type of USB pendrive? (thinking in kernel patch, syslinux
patch, binary file that I can "dd' into some pendrive's zones, etc...)

Will the syslinux (or any analogous project) developers make an upgrade to
correct this problem?

I tryed this steps making FAT16 LBA, FAT32, FAT32 LBA partitions types for
/dev/sdc1 and playing with mkfs.vfat "-S" parameter with no success.

Thank you very much.

P.D.: I successfully make an 128MB live-pendrive with SystemRescueCD
distro using diferent FAT types to test.




More information about the Syslinux mailing list