Sometimes you just don't have the hardware you need for a normal install.
This is the tale of how I installed Debian on a machine with only a PCMCIA ATA disk, but this can be applied to installs where a normal floppy/CD method can't be applied: small memory, weird hardware (ever tried to find an affordable way to connect an external SCSI CD-ROM drive to an IBM PS/2?)
These steps apply to Debian 2.2 for i386, other distributions might or might not work similarly, maybe some of this is useful anyway.
I assume you know (at least mostly) what you're doing when you try these
steps, this isn't a 100% foolproof recipe and you're on your own if you
screw up, like fdisk or mke2fs the wrong disk, blowing away your mp3
collection important data files.
Fujitsu Stylistic 500, no CD, no floppy drive, 170 MB diskspace occupied by DOS 6/WIN 3.11. Truly a horrible little machine, maybe Debian would make it slightly better :-)
A borrowed laptop with Red Hat installed. Some steps might be a little easier if the kernel and libs are of roughly the same versions to the stuff you're installing, but that isn't vital. Having the same distribution in both machines can also be helpful, think "man pages" and "/usr/doc"?
It's quite nice to have an Internet-connected machine nearby, there's always some annoying detail you could check on-line in 10 seconds instead of having to install some foo-source.deb just to read docs (like which option you use to tell your ethernet card to use the right cable.)
I tried to do a normal CD/floppy install first, with a little luck the install program would have recognized the disk and let me install straight to it. This option is usually the most painless one, but it didn't work for me. I could have taken a crash course in Linux PCMCIA support, but I figured out most of the stuff I needed to read was online.
Make partitions (I made ext2 on part.1, swap on 2) & filesystems
fdisk /dev/hdc mke2fs /dev/hdc1 mkswap /dev/hdc2
Mount the target and the first Debian CD. If you use some other mount
points, just do a mental sed 's/mnt\/pcmcia/your_mount_point/g'
when you read on.
mount /dev/hdc1 /mnt/pcmcia/ mount /mnt/cdrom
Install the base system
cd /mnt/pcmcia tar xzvf /mnt/cdrom/dists/stable/main/disks-i386/current/base2_2.tgz
Install a kernel + map file. I did this from one of the rescue images. There are a few to choose from, with just about enough documentation so you can choose the right one for your system.
mount /mnt/cdrom/dists/stable/main/disks-i386/current/images-1.44/rescue.bin /mnt/tmp cp /mnt/tmp/linux /mnt/pcmcia/boot/vmlinuz zcat /mnt/tmp/sys_map.gz >/mnt/pcmcia/boot/System.map umount /mnt/tmp
Install modules & utilities. These come in a gzipped tarfile containing mostly gzipped tarfiles.
cd /mnt/pcmcia/tmp tar xzvf /mnt/cdrom/dists/stable/main/disks-i386/current/drivers.tgz cd /mnt/pcmcia tar xzvf tmp/modconf.tgz tar xzvf tmp/modules.tgz tar xzvf tmp/pcmcia.tgz
By now, most of the base system is in, but a few small adjustments need to be made before the first boot.
Create /etc/modules.conf. This is the safe-ish way to do it,
you wouldn't want to overwrite essential files on a friend's computer?
(I did just that, actually...)
chroot /mnt/pcmcia /sbin/update-modules
Create a suitable lilo.conf, this is the part that's most YMMV so far, but this is what my setup looked like. It took a few "trial and error" -loops to get the "disk" and "bios" parameters nailed...
boot=/dev/hdc linear compact map=/boot/map install=/boot/boot.b default=linux verbose=4 disk=/dev/hdc bios=0x80 image=/boot/linux label=linux read-only root=/dev/hda1
Install boot sector... use the lilo installed on the target drive if possible.
/mnt/pcmcia/sbin/lilo -r /mnt/pcmcia
Create /etc/fstab. The easiest way is usually copying the
one on your host system and doing the necessary adjustments. Forgetting the
/proc filesystem is too easy. This is another way to do it:
echo "/dev/hda1 / ext2 defaults 1 1" > /mnt/pcmcia/etc/fstab echo "/dev/hda2 swap swap defaults 0 0" >>/mnt/pcmcia/etc/fstab echo "none /proc proc defaults 0 0" >>/mnt/pcmcia/etc/fstab
The Debian base system contains a file called
/sbin/unconfigured.sh, which stops the boot process if it exists.
Normally it's used to start the first boot setup, but as we do it manually we
don't need it.
rm /mnt/pcmcia/sbin/unconfigured.sh
Now move the disk to the target machine and boot it. If everything is OK, you'll find a semi-working Debian system.
dpkg-reconfigure base-configshadowconfig on|off to setup shadow passwordskbdconfig to setup your keyboard.apt-setup to setup package sources.tzconfig to setup your timezoneCopyright Raine M. Ekman 1994-2003. All rites reserved. Void where prohibited. Do not dry cat in microwave oven. Objects in the rear view mirror may appear closer than they are. Ad nauseaum.