Re: [Etherboot-developers] Q: device naming....
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: Anselm M. H. <an...@ho...> - 2002-08-21 16:01:25
|
> Tenatively I have made the url:
> file:///floppy0
> file:///disk0
> With a +- offset to find the start of the boot file.
> Which is fine.
But that doesn't help in every case (e.g. Ms-doze formatted disc, some
kind of fragmentation taking place). OK, that's exaggeration, nowadays
you have to format floppies before using them anyway (storing them in
a box beside my screen. Good idea I hope).
Digging inside my 10-year-old "PC-intern 3.0" documentation I found
out that every dos floppy has a fixed format (well, I knew that,
but...) with a BIOS parameter block that allows the FAT to be shifted.
It usually starts at block 1 (offset 0x200), but one can shift that
while still keeping DOS compatibility. Imagine a disk layout like
this:
0x0000 (512 bytes) Bios Parameter Block*, Loader Code
*with FAT-shift for 15,5 kB set
0x0200 (15,5 kB) Rest of etherboot
0x4000 Begin of FAT, length as needed
0x.... Directory
which should be DOS/Win-compatible. You better not format it (killing the
etherboot loader), but else it should work as usual floppy, allowing
you to copy the kernel to this disk from any operating system. Or (if
you cannot burn a ROM) lock a write-protected disc inside drive A
which can contain some stuff - better than provoking some Windumb
choke (if dual-OS or so, as in my "test lab") about that unformatted
disk in drive A.
In case someone writes FAT12 support, this disk could bear a kernel or
a menu image or so, but mountable and *easily* configurable from
linux.
> I am wondering if that naming convention is find of if I should
> switch to something like:
> file:///fd0
> file:///hd0
You could think about three factors
- What happens with the second/third disc? -> file:///disk1 ...
- How to access partitions (hard disk only)? -> file:///disk0/1 ...
- How to access files there? -> file:///floppy0/vmlinuz,
file:///disk0/1/vmlinuz -> that's not intuitive.
I'd prefer
file:///fd <number> [/<filename>]
file:///hd <letter> [<number>[/filename[+offset]]] (no number->mbr)
file:///hd <letter> [<number>][{+|-}offset]
Meanwhile, the + offset is ok, but what is - for?
> And on the same subject I am wondering if the old disk code
> that reads from the pcbios has enough merits to even be kept.
Could be... If there is some SCSI hardware snapping into the BIOS, it
could allow SCSI disk access as disk 0x81 or so. Your ide code
probably doesn't handle that up to now, does it?
file:///bd<number> [<number>] while <number> accesses the Bios
device 0x80+<number> could do (for BiosDisk-access). Floppy support
through the Bios can become obsolete. If sometime filesystem support
be added, an uniform interface to disk access could be reasonable. Not
neccessary for floppy/disk as few people will have
fat12-disk-partitions, but who knows if for scsi(via Bios)/ide?
Watching a game, having a Bud,
Anselm
|