DEBIAN LINUX ON A ZIP DISK

This project originally came to mind as I had a number of zip disks on hand, given to me by a friend. While all of these Zip disks were of the 100 mb type, I also had several 250 mb Zip disks on hand. While boot CD's can be easily created, it occured to me that using CD-R's for this purpose seemed like a waste of good CD's, since creating such images used only a fraction of the CD disk space. Using CDRW's for this purpose often resulted in failed burns of boot iso images. True, there are several Live CD versions of various Linux distos out there, one excellent choice being Knoppix. But not everyone has access to a cd burner. So, why not use these aging Zip disks for a good purpose?

WHAT YOU NEED;

1. Getting Started: Formatting the Zip Disk

Boot into your intact Linux distro and have your zip disk handy. We will be using fdisk to create the needned partitions, so that the burned CD will recognize the zip disk as a valid "hard drive" device. Of course, it is always wise to assure that your version of Linux can recognize and mount the zip drive. This comes in handy of something goes wrong during the installation or running of the zip disk, once the distro is fully installed on the zip disk. Assure that the zip disk is either recognized as a scsi device (ie; sda4) or a flat device, such as hdd4. I also have my zip disks mounted as /dev/zip.

Get to a console screen, as root, and type the following;

fdisk  /dev/sda

This brings you to the console of fdisk. You can see what parition(s) are on the zip disk by pressing "p" on your keyboard. What you now want to do is delete the current partitions on the disk. Usually the vfat partition on a zip disk is partition 4, but note the partition number when you view the list of partitions on the disk and proceed accordingly.

Once that is done add a partition (n) choose "p" for primary partition and follow the cues. I chose partition 1 and allowed a default start of 1 and end point of 228. Add a second partition on (sda2), allowing fdisk to allocate the rest of the space for the second partition. This will become your swap partition. Now that you are back at the command prompt, choose "t" to change the designation of the second partiton (#2) to "82" which designates a swap partition. Once this is done, type "w" to write the changes and exit fdisk. You can check that the process was successful by getting back into fdisk and choosing "p" to see what partitons that you have created. Make note of the number of blocks on the swap partition, as this will shortly become handy. Here is what my partitons looked like under fdisk:

Device Boot Start End Blocks Id System
/dev/sda1 1 228 233456 83 Linux
dev/sda2 229 239 11264 82 Linux swap

Now comes the fun part. The first time I tried this, my zip drive complained and chattered when actually formatting the partitions. The following command structure silenced the chatter. Now you can format the actual partitions using e2fsprogs. Since our Debian CD can recognize ext2 and ext3 partitions, you can choose either file format. Type;

mke2fs -c  /dev/sda1

to format the first partiton you created, which will be your root partition. This may take a few minutes, which is fine.

Or, you could opt to use the ext3 filesystem by typing;

mke2fs -j  /dev/sda1

For the swap partiton, type;

mkswap -c  /dev/sda2 11264 (note the 11264 equals the number of blocks for this device)

The zip disk is now prepared to be recognized when using the burned CD to install Debian on your Zip disk.

Next Page