To increase the available space you must increase the sectors or
cylinders. A disk only has 2 sides so changing the amount of heads is out
of the question.
The cylinders are the tracks (rings) of data on
a disk. The spacing of the rings is basically fixed in stone, so when you
'add' cylinders you are telling the head to move physically further towards
the end of the disk. This can create a problem if your particular floppy
drive does not want to allow you to go that far. The maximum seems to be
84, only attainable by very few drives. 83 works with a much higher
percentage, and as you get closer to 80 your chances improve.
The
amount of sectors is how 'dense' the information is written on a
cylinder. The absolute limit to this seems to be 24. Anything over 21, is
not natively MS-DOS compatible.
I've done this for the benefit of
the Linux Router Project so my primary concern
was being able to boot.
There are several ways to boot Linux from
a floppy:
LILO - The default boot loader for Linux on a harddrive but
not very practical when it comes to the limited space of floppy disks.
RAW - That is you dd the kernel right to the disk starting at
sector 0. You then dd the compressed root right behind the kernel and rdev
the kernel to tell it where to find the root on the disk. This will afford
you the most room on the disk, since it is raw and contains no filesystem
at all. It is not fun to work with, requires dd and rdev to make changes,
and also the built in boot sector of the kernel may fail in some
combinations of hardware.
SYSLINUX - Thank you Peter Anvin for
filling in the gap. Syslinux is an MS-DOS program that installs to a
standard FAT-12 formatted floppy disk. You can use dd to install it from
and image of a blank syslinuxed disk and avoid MS-DOS. To boot a kernel and
compressed root you simply place the files on the root of the
disk. (default names are LINUX and ROOT.BIN) It has a config file much like
LILO, but unlike LILO it simply looks for the files names at boot time, and
does not need to be rerun everytime a kernel or root image has
changed. Since it is a standard MS-DOS floppy format, it can be changed
through any OS that supports FAT-12 floppies. (Which is basically every OS)
In all instances that follow I use a zImage and a compressed raw
root image. The image is placed into /dev/ram0 by the initrd feature of the
Linux kernel. The following all worked with SYSLINUX. I think 1.68 and 1.74
should work with LILO, and FS'es besides FAT. I'm not sure about a raw
kernel dd to the disk on any of them. Who knows...
All of these
sizes can be attained using the superformat command.
1.68MB - 21s
80c
This is 100% safe, and works with MS-DOS. It was not common because
the extra free sectors were used for unformat information, copy protection,
and other various useless Microsoft novelties. Regardless I have seen this
format used with MS-DOS as far back as
1989.
1.74MB - 21s 83c
This uses 83 cylinders, which is non standard. It does however work fine right in MS-DOS
This should work with all current hardware, but may fail with some older equipment.
1.80MB 2m format (23s 80c?)
This is a custom 2m format. For MS-DOS support you must run the 2m TSR.
For it to be bootable I had to use the MS-DOS 2m software. Linux can format the size
with the superformat command, but not the little custom boot loader. These work fine in a
standard floppy, but the LS-120 could not handle them. These should work 100% with
all systems using a normal floppy, and floppy controller.
1.88MB 2m format (23s 83c?)
Same as above, but it is said to have the possibility of not working on some older floppy
drives. (ie more then 80 cylinders)
This did not work:
1.97MBhowthehelldidhefitthatmuch 2mgui format. These are just not bootable with anything.
It does not even have a standard 512byte sector size. As of this writing 2mgui format support
is not yet available in Linux, though it is expected. If they can ever be made bootable, I have
no idea.
So as it stands for anyone using current hardware that has access to DOS, 1.88MB (About
3.5MB+ uncompressed root and 400K kernel) per floppy is realistic.
Enter the LS-120....
The LS-120 is an IDE floppy drive. It is compatible with both standard 3.5" disks, and the new
120MB disks. As of Linux v2.0.31 there is full support, but you can use a lower version if you
do not need to access the drive after boot. To be able to boot from these you must have
a BIOS that specifically allows the LS-120 to be treated as drive 0. (Where IDE devices normally
start at 80) If you do not have BIOS support, you can purchase a small IDE FloppyMAX card
from Promise Technologies to overcome this deficiency. I Like the LS-120 very much
and it is fantastic for 'embedded' applications. (like routers and termservers)
The kernel boot loader does not like the LS-120, and instantly dies. Also 2m disks do not like
it and will not boot. 1.44MB through 1.74MB disks will work fine. However the current version of
SYSLINUX will not work with the 120MB disks because they are a FAT-16 filesystem. (though >
v1.30 may support this...NOTE: 1.32 is out and it does) You would also be much better off partitioning the disk up and
using ext2 or minix, instead of SYSLINUX unless you need MS-DOS compatibility.
LILO does work fine with 120MB disks. Here is a sample lilo.conf:
boot=/dev/hda compact disk=/dev/hda bios=0 install=/floppy/boot.b map=/floppy/map image=/floppy/linux label=Linux append="load_ramdisk=1" initrd=/floppy/root.bin ramdisk=8192