Re: [pc110] installing small linux boot off pcmcia - HOWTO lilo?

Adam Lambert (adam nospam at scl.cwru.edu)
Tue, 23 Jan 2001 01:12:46 -0500

I have lilo and a mini system installed on a 32M cflash. I have my
home dir, /usr/local, and X11 installed on an 80M typeII flash.
(ie - 80M drive is not needed for boot, mounted my cardmgr after system
is up)

i have dos installed on the internal cflash - i boot it by removing the
32M cflash (32M in, boot linux via lilo, 32M out, boot dos on internal sundisk)

I use a slackware 4 setup that I painstakenly paired down a couple years
ago for this...

booting with lilo was a pain, also... the pc110's BIOS is used in the
begining of the boot process, but once the linux kernel loads, and begins
to use its native IDE drivers, linux sees the drives according to their physical
ide connections and not their BIOS redirections, and consequently
changes the drive mapping that lilo saw (as it received from BIOS)
(based on your boot order in the easy setup screen)

so, I remap hda and hdb in a parameter to the kernel to be the order
that lilo originally saw.

it took a while to find the params for this 32M flash: 734,4,32

so, my pertinent lilo.conf lines:
boot = /dev/hdb
root = /dev/hdb1
disk = /dev/hda
bios=0x81
disk = /dev/hdb
bios=0x80
append="hdb=734,4,32"

note: lilo and the kernel are both on the same disk, the 32M cflash.

bios is set to boot first from the floppy, then ext cflash (HD2), then the
internal flash (HD1)

I never did get linux to be able to see both the internal flash and the
external cflash at the same time.. I believe I read somewhere that
the kernel stops looking for cflash devices after finding the first one,
but never got around to verifying and/or patching.

Shouldn't matter, but I have kernel 2.2.12 on the box.

hope it helps
adam

On Mon, 22 Jan 2001 06:40:50 -0800, Fringe Ryder wrote:

>I tried several years ago, but could not get a LILO load to work; I wound
>up putting loadlin on the tiny internal RAM disk.
>
>At 10:18 AM 1/22/01 +0000, Prashant wrote:
>>hi,
>>
>>So I have been trying to create a pure linux system
>>boot off a pcmcia card on my pc110, ie no loadlin in
>>dos as I did before. I am using a small linux
>>distribution call MuLinux (see
>>http://mulinux.nevalabs.org/).
>>
>>This here is the result of "fdisk /dev/hdc", ie fdisk
>>of the pcmcia card when
>>it is in the card reader of my desktop:
>>
>># fdisk /dev/hdc
>>
>>Command (m for help): p
>>
>>Disk /dev/hdc: 4 heads, 32 sectors, 1008 cylinders
>>Units = cylinders of 128 * 512 bytes
>>
>> Device Boot Start End Blocks Id
>>System
>>/dev/hdc1 * 1 1008 64511+ 83
>>Linux
>>
>>I created a mulinux floppy and then copied it to my
>>compact flash (well,
>>I did it in an even more round-about way, but here is
>>a synopsis):
>>
>># cat /dev/fd0H1722 > /dev/hdc1
>>
>>I mounted the flash card:
>>
>># mount -t ext2 /dev/hdc1 /mnt/pcmcia0
>>
>>I then modified the mulinux lilo.conf file named
>>"lilo.1722" to look like
>>this: (note: the /boot/boot.b, etc. files do exist on
>>the flash, I
>>checked)
>>
>>=================================================
>># lilo.conf for muLinux (build by mu script)
>>#
>>disk=/dev/hdc
>> bios=0x80
>> sectors=32
>> heads= 4
>> cylinders=1008
>>boot=/dev/hdc1
>>install=/mnt/pcmcia0/boot/boot.b
>>map=/mnt/pcmcia0/boot/map
>>message=/mnt/pcmcia0/boot/mulinux.msg
>>backup=/dev/null
>>
>>read-write
>>vga=normal
>>prompt
>>delay=40
>>timeout=50
>>
>>image=/mnt/pcmcia0/boot/mulinuz
>>label=mulinux
>>root=/dev/hdb1
>>append="INFO=1722 load_ramdisk=1 prompt_ramdisk=0
>>ramdisk_size=4600 ramdisk_start=596 "
>>=======================================================
>>
>>and then ran the mulinux version of lilo to install
>>it:
>>
>># cat lilo.1722 | ./lilo -r /mnt/pcmcia0 -C -
>>
>>but I get this error:
>>
>>stat /dev/hdc: No such file or directory
>>
>>I get this error if I change hdc to hdc1:
>>
>>stat /dev/hdc1: No such file or directory
>>
>>I am sure my lilo.1722 is bad somehow.
>>
>>Can anyone see my problem? I know I have to change the
>>append= to
>>something like "hdb=noprobe hdb=1008,4,32" as well.
>>(is that right?)
>>
>>What are the different device names on the pc110? Is
>>this it:
>>/dev/hda = 4mb flash
>>/dev/hdb = compact flash 1
>>/dev/hdc = compact flash 2
>>? Do I use these device names in lilo in root=, or ...
>>hm, a little
>>confused here. What confuses me is what device names
>>to use when in lilo,
>>in editing the lilo.conf am I talking to lilo or to
>>the boot loader...
>>
>>oh, I also have the pcmcia booting first in my pc110
>>h/w config.
>>
>>thanks in advance
>>
>>Prashant
>