Booting from PCMCIA disks
CompactFlash memory disks have become really cheap and a CompactFlash->PCMCIA adaptor is about $10. This makes it attractive to use a CompactFlash card as the only disk drive in a laptop to get.
- Low power consumption.
- Low noise.
- A way to boot the laptop. You might not have a harddisk or the disk caddy for your laptop.
Some laptops, e.g. the IBM Thinkpad 365 used for The picture frame project
can boot from a PCMCIA drive. This has the added bonus that then the linux
kernel boots, the PCMCIA drive is already initialized and any partition on the
drive can be mounted as the root-partition.
Other laptops, e.g. my Thinkpad 770 cannon boot from PCMCIA. You could then
boot the laptop from a floppy-drive and mount the PCMCIA-partition as
/. However the PCMCIA system have not been initialized yet, so the kernel
cannot mount its root.
The pcmcia-cs project has a pcinitrd script that creates an initrd ram disk
image for booting with the root file-system on a PCMCIA device. But is it too
big for a floppy disk. It is about 2.5 MByte not including the linux kernel.
Instead I modified the cardmgr.c program from the pcmcia-package to remove
unnecessary code, mount /proc, mount a tmpfs drive, set up the card in the
first PCMCIA-slot, do a pivot_root() to the new root fs. This is the only
program on the initrd. There is not shell. The result is an 212KByte initrd
leaving space for even a fat 2.6 kernel.
Limitations
- The initrd can only mount the following file-systems: reiserfs, minix, ext2, xfs, cramfs
- The kernel on the floppy image can only mount mount: reiserfs, minix, and cramfs
- The initrd only inserts the pcmcia-card in the first slot.
- There are no modules on the initramdisk. So if you make your own kernel, "pcmcia" and "ide-cs" has to be compiled into the kernel, not as modules.
How to make the CFlash root file system
Well, that depends on what distribution you want. You might try a small distribution LinuxPuppy or "Damn Small Linux".
I prefer Debian.
I run debootstrap
on a laptop with a harddisk.
chroot
to the new root directory and install what I need with apt-get. I have installed xfce4, firefox, thunderbird.
download
This
work is licensed under a Creative Commons
Attribution 2.5 License.
Niels Elgaard Larsen
Back to Elgaard procjets