Table of Contents
Before large floppy disks can be used under LRP, there must be device files for them. Most current releases have these; however, if not, this is how they are created:[8]
mknod
/dev/fd0u1680 b 2 44 | 1.68M |
mknod /dev/fd0u1722 b 2 60 | 1.72M |
mknod /dev/fd0u1743 b 2 76 | 1.74M |
mknod /dev/fd0u2880 b 2 32 | 2.88M |
The technical details of several different floppy sizes are below[9] ; for most this can be skipped without adverse effects:
Device | Major Device Number | Minor Device Number | Cylinders | Heads | Sectors |
---|---|---|---|---|---|
/dev/fd0u1440 | 2 | 28 | 80 | 2 | 18 |
/dev/fd0u1600 | 2 | 124 | 80 | 2 | 20 |
/dev/fd0u1680 | 2 | 44 | 80 | 2 | 21 |
/dev/fd0u1722 | 2 | 60 | 82 | 2 | 21 |
/dev/fd0u1743 | 2 | 76 | 83 | 2 | 21 |
/dev/fd0u1760 | 2 | 96 | 80 | 2 | 22 |
dev/fd0u1840 | 2 | 116 | 80 | 2 | 23 |
/dev/fd0u1940 | 2 | 100 | 80 | 2 | 24 |
/dev/fd0u2880 | 2 | 32 | unknown | 2 | unknown |
The disk device files with ‘D’, ‘H’, and ‘E’ in the names (for the 3.5" disk formats) are no longer used. [10] Some distributions may not have any of these device files, in which case they will have to be created.
To create a large floppy disk under Linux (or LRP), several steps are required. For an example, a 1.68 megabyte disk will be used; others require changing the device file ( /dev/fd0u* ) to the appropriate device file for that disk size.
Format the disk. This creates the basic formatting required for
the disk. Two ways to do this are:fdformat
/dev/fd0u1680
orsuperformat
/dev/fd0u1680
Format the disk for use with MSDOS. This can be accomplished
using one of these sequences: mformat -t 80 -h 2 -s 21
a: mbadblocks a:
or mkfs.msdos
/dev/fd0u1680
To use mformat, the tracks (-t
),
heads (-h
), and sectors (-s
)
are needed; they can be read from the table above.
Apply syslinux to the disk to make the large disk bootable:syslinux
-s /dev/fd0u1680
Creating a large floppy disk image in the filesystem is not hard. Follow these steps:
Create a file of the right size:
dd if=/dev/zero of=/tmp/disk.ima bs=1024 count=1680
With GNU dd, you can use 1k
instead
of 1024
for the block size; it means
the same thing.
Format the disk for use with MSDOS. This can be accomplished
this way: mkfs.msdos /tmp/disk.ima
VFAT (mkfs.vfat) will also work, but syslinux does not understand the VFAT filesystem. Thus, for files used by syslinux you must stay within the MSDOS limitations for it to work. The Linux kernel must then support the VFAT filesystem.
Most LRP kernels do not understand the VFAT filesystem; for best compatability stay with the MSDOS filesystem. The ability to use long filenames is lost, however.
Apply syslinux [11]
Mount in the system if desired:
mount -o loop /tmp/disk.ima /mnt
Now copy everything desired to be on the floppy disk to /mnt.
Unmount when done: umount /mnt
Put the disk into an appropriate drive, then use the following
command: dd if=/dev/fd0u1680 of=/dev/null
This assumes that a 1.68M disk is in the first floppy drive; adjust and correct the device file as necessary. If the disk reads correctly, then the output should be (in this case):
3360+0 records in 3360+0 records out
If the two numbers do not match, or the system generates errors, then the disk is at best unreliable — use another. The number of records reported should match the appropriate number of blocks listed in the previous table.
Each MSDOS formatted floppy allocates 512 byte sectors, 2 sectors
per cluster, and 112 or 224 entries for filenames in the root directory.
By reducing this to 512 byte sectors, 1 sector per cluster, and 96 root
directory entries, you can gain a few more kilobytes on the disk. This is
done with some options to mkfs: mkfs.vfat -S 512 -s 1 -r
96 /tmp/disk.ima
The S
option specifies bytes per
sector, the s
option sectors per cluster,
and the r
option root entries.
Once the disk is created in whatever size desired, then several files must be added to the disk:
The syslinux
configuration files, including syslinux.cfg
The
Linux kernel (linux
).
The base packages [12] for LRP:
root.lrp
[13] |
local.lrp |
etc.lrp |
modules.lrp |
log.lrp |
doc.lrp
(Oxygen distribution only) |
home.lrp
(Oxygen distribution only) |
usr.lrp
(Oxygen distribution only) |
Other
required packages (such as init.lrp
,
inetd.lrp
,
cron.lrp
, etc.)
Any
added packages (such as psentry.lrp
)
Configuration
files (such as oxygen.cfg
,
lrpkg.cfg
, or others...)
Most commonly, these files can be added just be copying the files on a working boot disk to the new boot disk.
Once this is complete, it will be necessary to modify
syslinux.cfg
so that Linux knows what
format the floppy is so Linux can read the floppy properly. Look for a
line that starts with append=
and change
the entry boot=/dev/fd0
to
boot=/dev/fd0u1680
or to whatever device
file is appropriate for the disk that has been created. Note that /dev/fd0
is the first drive, fd1 is the second, et al. Note too, that when fd0 or
fd1 (or whatever) is used, then the standard 1.44M format is assumed.
If this additional configuration in
syslinux.cfg
is not
done, then there will be a message like: LINUXRC: Loading
packages - local(nf!) etc(nf!) modules(nf!) - done.
or
similar. The system would then ask for an “run level.” To fix this, make
sure the boot device entry is correct as detailed above.
There are several things to remember about large, non-standard, floppy disks:
Windows NT does not reliably write any of the non-standard formats.
Any size over 1.68M has very unstable and undependable support among floppy disk drive hardware.
The traditionally used rawrite utility for MSDOS cannot write large floppy formats — use WinImage instead.
Under Windows NT, WinImage has problems writing disks over 1.68M.
Some drives cannot handle large format floppy disks; the Toshiba Tecra notebook and its floppy drive, for example.
Symptom: end_request: I/O error, dev 02:2c (floppy),
sector 19 end_request: I/O error, dev 02:2c (floppy), sector 20
Solution: This is a standard 1.44M floppy being mounted as a 1.68M floppy.
Mount it with the appropriate device file name:
mount /dev/fd0u1440 /mnt
Symptom:
end_request: I/O error, dev 02:2c (floppy), sector 19 Directory sread (sector 0x13) failed end_request: I/O error, dev 02:2c (floppy), sector 20 Directory sread (sector 0x14) failed
Solution: If the two errors on mount were ignored, and an ls command is
performed, these are the errors that ensue — over 10 of each pair. All
that can be done is to wait the errors out and to remount the disk
with the proper device file name instead:
mount /dev/fd0u1440 /mnt
Symptom:
VFS: Can't find a Minix or Minix V2 filesystem on device 02:1c.
Solution: This isn't an error at all. It can come up when a MSDOS disk
is mounted. It may be accompanied by errors declaring other
filesystems not being found. To eliminate this “error,” mount the disk
with the appropriate filesystem type:
mount -t msdos /dev/fd0u1680 /mnt
The
device number (02:1c) refers to the major and minor numbers of the
disk driver. [14]
Symptom: Loading root.lrp .............. boot failed
Solution: root.lrp
is probably corrupt;
create a new one or use a backup disk.
Symptom: 03:05: rw=0, want=2, limit=0 dev 03:05
blksize=1024 blknr=1 sector=2 size=1024 count=1 MINIX-fs: unable to
read superblock attempt to access beyond end of device 03:05: rw=0,
want=1, limit=0 dev 03:05 blksize=1024 blknr=1 sector=2 size=1024
count=1 FAT bread failed Kernel panic: VFS: Unable to mount root fs on
03:05
Solution: This is the result of not having a BOOT parameter in the configuration file and booting with IDE support in a system with an IDE hard drive. In this case, it is attempting to read the root filesystem from device 03:05 (major device number 3, minor device number 5) — which is /dev/hda3. It attempts to read it as a MINIX volume, and fails since /dev/hda3 is a Linux ext2 volume.
Inserting the parameter BOOT=/dev/fd0u1680,msdos
fixes the problem.
[8] Ray Olszewski <[email protected]>
(LRP mailing list, 3 September 2000, 22:14:09)
[9] Ibid.
[10] Linux 2.2.18 kernel documentation: linux/Documentation/devices.txt.
[11] The version of syslinux being
used can be gotten from a UNIX environment this way:
strings ldlinux.sys | head -n 1
[12] This varies according to which distribution is used; typically Oxygen requires many more packages.
[13] In a system using a Linux kernel without LRP patches, this should probably be called root.gz instead. This package is also not loaded by the package retrieval scripts, but rather by syslinux itself.
[14] To see the major and minor numbers, you
can look at the kernel source in the file linux/Documentation/
devices.txt or in the directory listing of the appropriate files in
/dev. The listing for the first disk drive with a standard 1.44M
floppy in it is: brw-rw---- 1 dgd floppy 2, 28 Jun 4
2001 /dev/fd0u1440
The major number is 2 and the
minor number is 28 ( 1c
) listed to
the left of the date - which makes for the report of
02:1c
from the kernel.