Re: LILO and kernel bootsector will not boot off an LS-120 IDE floppy.

Dave Cinege (dcinege@psychosis.com)
Fri, 08 Aug 97 18:10:37 -0500


On Fri, 8 Aug 1997 23:28:50 +0200 (MET DST), Werner Almesberger wrote:

>Dave Cinege wrote:
>> I've still had no more luck with lilo. I have noticed that the LS-120 is
>> getting addressed as hdg instead of hda because of the memory address the
>> IDE controller resides at.
>
>First let me say that I don't know what kind of animal an LS-120 is. If

It is an IDE ATAPI floppy. It can use 720k/1.44mb/120mb floppy disks.
2.1.x has support for them.

If your system has BIOS support it will be treated as drive A: and you can
boot from it (though DOS does not want to boot from a 120mb disk)

If you have no BIOS support you have to run a DD, and it is thrown at the
end of your drive letters. Linux doesn't care about the BIOS either way
after you boot of course....

Boot-up looks like this:
Aug 8 16:43:41 Zen-Machine kernel: hda: FX140S, ATAPI CDROM drive
Aug 8 16:43:41 Zen-Machine kernel: hdb: LS-120 COSM 02 UHD Floppy, ATAPI FLOPPY drive
[snip]
17:07:23 Zen-Machine kernel: hdb: DMA disabled
Aug 8 17:07:23 Zen-Machine kernel: ide-floppy: hdb: I/O error, pc = 5a, key = 5, asc = 24, ascq = 0
Aug 8 17:07:23 Zen-Machine kernel: ide-floppy: Can't get drive capabilities
Aug 8 17:07:23 Zen-Machine kernel: hdb: 123817kB, 247635 blocks, 512 sector size
Aug 8 17:07:23 Zen-Machine kernel: hdb: 123264kB, 963/8/32 CHS, 533 kBps, 512 sector size, 720 rpm
Aug 8 17:07:23 Zen-Machine kernel: hdb: The drive reports both 126222336 and 126789120 bytes as its capacity

(Yes there is still some weirdness. I am working with the author to iron out
the little quirks)

>it identifies itself as an IDE disk to the system, LILO will treat it
>as such and use some probably stupid BIOS drive number. If the LS-120
>identifies itself as drive 0 ("A:") to the BIOS, something like
>
> disk = /dev/hdg bios = 0

>in your lilo.conf might help. If it identifies itself as the first
>hard disk, it'd be bios = 0x80 . If it picks either identity,
>depending on the media in it, well, you can also use variables in
>lilo.conf ;-)
>
>Depending on what this device does with the disk geometry, I'd also
>experiment with the LINEAR option. Also, I'd avoid the use of COMPACT

I've had this on....I'll turn it off.

>before the first successful boot. If all else fails and you have to
>specify the entire geometry, remember that dparam is your friend.
>
>Once you get it to work with LILO, it might be easier to find out what
>breaks the kernel boot sector.
>
>> I'm making the disk on my system as hda.
>
>I don't understand this sentence. Are you (1) talking about your real
>IDE hard disk or are you saying that (2) you can access that IDE floppy
>also as /dev/hda ? If (1), just try the above procedure. If (2), you may
>have to use /dev/hda instead of /dev/hdg, but I'm actually not quite
>sure what's going on then.

#1 none of my systems have IDE harddrives. : O

I am working between a few system here.

A - My workstation. Has no BIOS support, and a CD-ROM that is master. the
LS-120 turns up under Linux as hdb on this machine....I can make the LS-120
master and have it go to hda. (Just had it like this before)

B - My router. This is an old 486 that doesn't even have onboard I/O. I am
using a promise floppy max IDE adapter with it (made for the LS-120). It has
an onboard BIOS with boot support, but it resides at the quarterary IDE
memory location. Even though the LS-120 is the only thing in this system,
linux sees it as hdg.

C - One of my dev systems. This has BIOS boot support and the LS-120 is the
only thing in it right now, so it shows up as hda. I just moved my testing
over to this because I am sick of bringing my entire network down. : P

I am making the disks on system A, and them sneaker netting them to the
other machines to see if they will boot.

Now I'm not much of a lilo guru (I've been spolied by Debian) but I assume
if I list the boot device as /dev/hdb, and put it in one of the machines
that sees it as /dev/hda or /dev/hdg it will not complete the boot
cycle....but I still expect to see somthing first. (Like the LILO message)

All I am getting now is " 01" racing up the screen.

Now that you have full details, do you think you can provide me with an
example?

This is what I was using (cut and modified from the debian mkrboot script):

mkfs -t ext2 $DEV
mount -t ext2 $DEV /floppy
cp $KERNEL /floppy/linux
cp $ROOTIMAGE /floppy/root.bin
cp /boot/boot.b /floppy
rdev /floppy/linux /dev/ram
ramsize /floppy/linux 0
lilo -C ./lilo.conf -b $DEV -i /floppy/boot.b -m /floppy/map
umount /floppy

lilo.conf
---------
compact
append="load_ramdisk=1"
image=/floppy/linux
label=linux
initrd=/floppy/root.bin

>If such devices are becoming popular, a long-term solution would probably

Most likely they will be the device to replace the standard floppy drive.

>be to detect them in the IDE drivers of the kernel and to give them
>either their own major device number or to have some ioctl that lets me
>get their real identity, so LILO can act appropriately without requiring
>special configuration.

Hmm your call. hf0 hf1 maybe?? I don't like the current scheme where it
moves all over the place.

-------------------------------------------------------------------------
http://www.psychosis.com/emc/ Elite MicroComputers 908-541-4214
http://www.psychosis.com/linux-router/ Linux Router Project