Syslinux and Flash Devices larger than 1 GB

Under development: PCMCIA, wireless, etc.
Post Reply
Message
Author
JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

Syslinux and Flash Devices larger than 1 GB

#1 Post by JustGreg »

In trying to work the Dingo Alpha syslinux problem, I found something that may be a future problem with larger than 1 Gigabyte flash devices.

I checked the man page for syslinux and found the following:

Known Syslinux BUGS
SYSLINUX is unsafe to use on any file system that extends past cylinder 1024. This is a fundamental limitation of the standard BIOS API.

SYSLINUX will not work (and will refuse to install) on file systems with a
cluster size of more than 16K (typically means a file system of more
than 1 GB.)

I have installed Dingo Alpha (11 Jan) to a 2 Gigabyte Impact (manufactured by Lexar) USB Flash Drive. The install worked perfect. I was able to boot the drive without a problem. The device was FAT16 with 32 Kilobyte clusters. It did not have number of cylinders (952) greater than 1024.

I tried to do the same with Kingston SD card of 2 Gigabyte size. The installation failed. Syslinux would not even start. The card came from the manufacturer with FAT16 with 32 Kilobyte clusters and what appear 1267 cylinders. The various partition utilities gave different values. Theproblem was the logical and physical start and end values did not match.

Has anyone else encounter this with flash devices larger than 1 Gigabyte?

I will be trying to two ideas with the SD card to make it work with Puppy. The first is to divide the device into two partitions. The first would be small (128 Megabytes to hold the Puppy system files) FAT16 partition and the second with the rest of the space would be FAT32 for the puppy save file.

The second idea would be to convert the whole space to ext2 and use extlinux in place of syslinux.

Any comments on the ideas?
Last edited by JustGreg on Sat 26 Jan 2008, 01:12, edited 1 time in total.
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#2 Post by rcrsn51 »

Or you could use GRUB.

kattami
Posts: 109
Joined: Fri 18 Jan 2008, 02:16
Location: Norway

#3 Post by kattami »

Ok, I have a question:

Do Grub work if you want to turn off the HDD just for security's sake?

I also want to try to use SD cards since my laptop has an integrated slot and its easier to have a card in that slot than having an usb pin that is sticking out of the usb connection.

So if Grub cant work without the HDD, then it wont work when turning it off in bios.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#4 Post by rcrsn51 »

Go here and download the "pup2usb" attachment.
http://www.murga-linux.com/puppy/viewtopic.php?t=16950

GRUB shouldn't care if your HDD is disabled as long as your BIOS reports that the flash drive is a bootable device. I have put Puppy on an SD card in a USB adapter.

JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

#5 Post by JustGreg »

Thank you, rcrrsn51 for the grub suggestion. I have used grub before on a USB device. It does work. I have been thinking about this. Ideally, one would still like to have Windows capability with the device to transfer files. The experiments using Dingo alpha (11 Jan) when I get to them to tonight will be:
1. Small Fat16 partition with syslinux and rest of space in second partition using Fat32.
2. Convert the small FAT16 partition to ext2 and try with extlinux
3. Try grub.

I will also break out a stop watch and measure the boot time. I will use my Eee PC since it can boot directly from a SD card.
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#6 Post by rcrsn51 »

Just to clarify for other readers - you can install GRUB on a FAT partition. So the flash drive can be made bootable and still be visible to Windows.

justauser
Posts: 28
Joined: Wed 09 Nov 2005, 21:24

I have Dingo on a 2GB flash drive

#7 Post by justauser »

I have Dingo installed on a 2Gb flash drive that is formatted FAT32 and have booted on 2 different systems. The oldest is a Dell 700M laptop that is 3 years old.

Leachim
Posts: 229
Joined: Sun 27 May 2007, 23:04

#8 Post by Leachim »

If you look for a syslinux replacement for FAT32. I wrote a boot loader (SIBLO) derived from syslinux last year, It is nearly 100% compatible to syslinux and also supports booting of Windows and Windows Live Systems. I (and several others) use it everyday for booting our Puppy derivatives from USB-flash-drives.

http://simplux.org/siblo

JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

#9 Post by JustGreg »

Thank you, justauser for the information on the 2 GB flash device. Is it a USB Flash Drive, justauser?

Leachim, thank you for the information on your possible replacement for syslinux. I do not think a decision on boot loaders is needed now. I will add SIBLO to the list. So far, it contains syslinux, Grub, extlinux, and Grub4dos. All three have been discussed in the forum.

First, I have to get a partition on the 2 Gigabyte SD card. It appears that SD cards as set up by the manufacture are in a "super floppy format" and do not have the traditional partition table. I have not been able to partition the SD card and get the full 2 Gigabytes capacity. I keep getting about 1 Gigabytes. Cfdisk refuses to do anything with the SD card. Fdisk sort of works, but, does not report the correct size. Gparted will work but
complains about the lack of a partition table and lack of disk label. It will only make a 1 Gigabyte partition. I have to do some reading on the "super floppy format".

The problem seems to be the disk geometry (heads, sectors per track and cylinders). I spent last night with hexedit, a copy of the master boot record/partition table, and a reference on the master boot record. I will keep at it.
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much

JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

#10 Post by JustGreg »

After banging my head with hexedit,, hexadecimal numbers and partition tables, I have come to the conclusion the problem is with SD cards over 2 gigabytes in size. SD cards are made for cameras and celluar telephones. They are deliver in a "super floppy format" with a MSDOS FAT16 filesystem. There is no partition table. The information in the first sector (main boot record is not used and incomplete). One could manually edit a known good boot record for the same size device and get a workable device. But, it would be painful.

I could not find a way using the standard tools to get partitions that added up to the device size. I always came up with a half size device. I trying using mkdosfs to produce a new "super floppy format" area and it produce a half size device. I may have over look something. If I have then, please post it! The "super floppy format" and FAT16 are ok for cameras and celluar telephones, which just have to read/write a sector or block of sectors, but, it does not work well for a modern operating system.

The good news was on the USB flash drives (1 Gigabyte or larger) that I could get my hands on, all had good partition tables. Most were FAT16, but, they could easily be changed to another file system. I have two manufacturers Compact Flash 1 Gigabyte devices. The CF devices also had correct partition table.

This only applies to SD cards 2 Gigabytes or larger. I have used smalller size SD cards to test puppy on my Eee PC without any problems.

I did find an excellent web source on SD cards. It is:
http://www.hjreggel.net/cardspeed/

It has a good article on formating, "The Truth about Formating". It also provides the codes for card readers and other technical information. If you are interested in SD cards, please take a look at it.

Lastly, this same problem (super floppy format) was encounter when people want to use USB Flash drives and Puppy several years ago. However, in that case, the FAT16 file system was adequate for the device size and the partition information was correct.
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much

User avatar
Crash
Posts: 453
Joined: Fri 09 Dec 2005, 06:34
Location: Melbourne, FL

#11 Post by Crash »

I don't know if that is true for all SD cards 2 GB and above. I had a 2 GB Sandisk Extreme III SD that was formatted in the traditional way out of the box. I could re-format it in either FAT16 or FAT32 as a standard hard drive, not superfloppy. If I intentionally make such a device a superfloppy, I can repartition it to regular hard drive mode by having GParted make a new Disk Label. I haven't tried any SD device bigger than 2 GB because they are still above my self-imposed price point ($20). Maybe others can convey their experiences with such devices.

JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

#12 Post by JustGreg »

Thank you, Crash for the information. The devices for my tests were made by Sandisk, Kingston, and Transcend. This is the same as when I look at USB flash drives in 2005. Some were "super floppy format" and others used a regular hard disk format.

Crash, could you get the number of cylinders, heads and sectors for your Sandisk device and post the data? The information can be shown with:

Code: Select all

fdisk -l /dev/sd$
with $ being the drive letter for the device. Thanks in advance for the help!
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much

User avatar
Crash
Posts: 453
Joined: Fri 09 Dec 2005, 06:34
Location: Melbourne, FL

#13 Post by Crash »

The key word is I "had" a 2GB Sandisk Extreme III SD. I returned it because I saw no significant difference in performance for the particular camera that it was intended. That's the bad news.

The good news is that I just picked up a Sandisk Ultra II 2 GB SD card. Out of the box (actually out of the blister pack), Puppy sees it as a standard FAT16 device. Windows XP also recognizes it as a healthy FAT device, 2 GB.

fdisk says the following:


Disk /dev/sda: 2032 MB, 2032664576 bytes
64 heads, 63 sectors/track, 984 cylinders
Units = cylinders of 4032 * 512 = 2064384 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 984 1983619+ 6 FAT16


I set the boot flag with GParted and ran Puppy Universal Installer. Then I attempted a boot. I got a DISK BOOT FAILURE error.

I went back to GParted, created a new Disklabel, then created the partition as fat16, set the boot flag, and re-ran Universal Installer. This time, it booted up fine.

Then I removed the partition, re-created it as fat32, set the boot flag, and re-ran Universal Installer. This also booted fine.

My conclusion is that this particular 2 GB SD card is well behaved, although it did need a new disk label to boot.

JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

#14 Post by JustGreg »

That is good news about Sandisk Ultra II 2 GB card. From your information, it works fine with Puppy. I have been using the standard SD cards, which are lower cost.. This is like when USB flash drives first started coming out. It was the "luck of the draw" on getting one that would boot. The good news is Puppy and Syslinux will work with a card that passes the fdisk test (i.e. fdisk reports the size correctly). No real changes are needed for Puppy. Thank you for the reply.

The disk label in the partition table is needed by the BIOS to know there is active partition. Otherwise, the card was a super floppy format with no active partition, even though the information was there.

I will be trying the cylinders, heads, sector values to see if I can get the my card to work.
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much

JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

#15 Post by JustGreg »

I got Dingo Alpha (11 Jan) to work with no problems on the Kingston 2 GB SD card. It boot fine on the Eee PC with no problems. I had to use hexedit -s (sector) to manually set the maximum sectors to the correct value. I used fdisk to set the cylinders, heads, sectors to the values given by Crash for his 2 GB scan disk. Delete the old partition and create a new one using Fat32. I made a new msdos file system using mkdosfs. I did a Digno Alpha installation. Syslinux did not complain about Fat32 file system and did the install. It booted up. With a correct format and partition device, there is no problem with Syslinux.
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much

User avatar
ezeze5000
Posts: 347
Joined: Tue 10 May 2005, 17:48
Location: Missouri U.S.A
Contact:

Flash drive booting

#16 Post by ezeze5000 »

I ordered this item and am currently waiting for a good laptop candidate to put it in.

http://www.acscontrol.com/Index_ACS.asp ... dapter.htm

Ill let you know how it went as soon as I can.
If at first you don't succeed try try again!

JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

#17 Post by JustGreg »

This is for any future readers with problems occurring with Syslinux. Syslinux version 3.0 or later can handle FAT32 partitions. The documentation found on the web can be for older versions. The documentation states the problem of FAT32. The latest (that I have) version 3.60 of Syslinux documentation does not have the warning. Puppy 3.01 uses Syslinux 3.36 that is why there is no problem.
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much

Post Reply