Installing Small Linux v0.75 on your hard drive
Introduction
Small Linux is a nifty little mini-linux distribution that runs happily in 4mb of ram and even with the "extras" installed takes up less than 5mb of disk space. Intended to be used as a 2-floppy OS, these instructions should guide you in installing it on your hard-drive and booting it from there.
Preparation
- Download the v0.75 boot and root floppy images from the Small Linux Website.
- If you don't have 2 pre-formatted floppies handy make them by inserting a floppy into the drive and typing "fdformat /dev/fd0" (replacing "fd0" with your floppy devicename if necessary). Obviously if the verify phase of the format generates any errors, discard the floppy and try again with a different one.
- "Burn" them on pre-formatted 1.44Mb diskettes by inserting the 1st floppy and typing "dd if=smboot075 of=/dev/fd0" and then inserting the 2nd floppy and typing "dd if=smroot075 of=/dev/fd0" (prepending a path to the downloaded files, and/or replacing "fd0" with your floppy devicename if necessary).
- You are now ready to begin the installation below
Installation
- boot using the floppy labeled "boot"
- at the boot: prompt type "linux root=/dev/fd0 load_ramdisk=0" (for some reason the install.sh script breaks if the the root file-system is mounted on a ramdisk)
- insert floppy labelled "root" when prompted to do so (do not remove it except during a POST!)
- login as "root" when prompted and type "fdisk"
- type "p" to list the current partitions, if any
- type "d" and provide a number for each partition found above to delete all existing partitions
- type "p" again to verify there are now no partitiions
- type "n" to create a new partition, select "primary partition and use the number 1, use almost all of the available sectors for this partition
- type "n" again to create a new partition, select "primary partition and use the number 2, 5-15mb is more than enough for swap
- type "t" then "2" then "82" to make the 2nd partition's type linux native swap.
- type "w" to write the new partition table, this will also exit fdisk
- type "mkfs.ext2 /dev/hda1" to format the first partition
- type "mkswap /dev/hda2" to format the second swap-partition
- type "cd /Install" to change directory
- type "./install.sh /dev/hda1" to start the install script using the 1st partition, if the script craps-out with errors, most likely you have mounted the root filesystem on the ramdisk, (making you a poor listener, heh) see #2 above.
- type "reboot" to reboot, removing the "root" disk only after the you see the "checking memory" stuff happening, and quickly inserting the "boot" disk at that time. (or, you can simply wait for the system to complain about a "non-system diskette" or a "missing boot record" and then put in the "boot" disk, typing "ctrl-alt-del" to reboot, or turning off/on the machine.)
- this time at the boot: prompt type "linux root=/dev/hda1 load_ramdisk=0"
- login again by typing "root" at the login: prompt
- type "mount /dev/fd0 /mnt" to mount (and thus gain access to) the "boot" floppy
- type "cd /boot" to change to that directory on your hard drive
- type "cp /mnt/* ." to copy the needed files from the "boot" floppy to the "boot" directory on the hard-drive
- type "cp /boot/linux /vmlinuz" to copy and rename the kernel for booting
- type "lilo" to enable booting, it should respond with something like "linux added"
- familiarize yoursefl with the basic commands for the "vi" that comes with the Small Linux distro by typing "vi", the command to remember here is "ctrl-k-x" which saves the file and exits, if you hopelessly mess it up, use "ctrl-k-q" to exit without saving and reopen the file.
- edit the "PATH=" line found in /etc/profile to read "/bin:/usr/bin" by typing "vi /etc/profile", save the file and exit vi by typing "ctrl-k-x" (the /usr/doc directory does not exist)
- add the line "swapon /dev/hda2" to the file /etc/rc.M just after the line that reads "update &", again using vi and saving/exiting with a ctrl-k-x
- remove the floppy and type "reboot", the system should now boot from the hard-drive
Install the Extras
First, install ldconfig
1. change to the tmp directory by typing "cd /tmp"
2. type "mv /boot/extras.tgz ." to move the file to the tmp directory,
it contains many files you may or may not want, but one you must have: ldconfig.
3. type "gunzip extras.tgz" to decompress it
4. type "tar xf extras.tgz" to extract all the files to the tmp directory
5. type "mv ldconfig /usr/bin" to move it to the proper directory, you may now delete
all the other files left in the tmp directory if desired by typing "rm *"
(make sure you're in the tmp directory by typing "pwd", it should respond with "/tmp"!).
6. edit /etc/ld.so.conf by typing "vi /etc/ld.so.conf", when you're done it should contain only
2 lines that read "/lib" and "/usr/lib".
(the existing 4 lines are non-existant directories, delete them.)
7. the library manager is now ready to run, now install the Midnight Commander.
Install the Midnight Commander file manager
1. change to the boot directory by typing "cd /boot"
2. type "gunzip mc.tgz" to decompress it
3. type "tar xf mc.tar" to unpack the files
4. type "mv libgpm.so.1.06 /lib" and then "mv libncurses.so.3.0 /lib" to move the
library files to the proper directory
5. type "mv mc /usr/bin" to move the program file to the proper directory
7. type "ldconfig" to update the library cache file
8. You may now delete the tar file by typing "rm mc.tar" to save space
9. Type "mc" to start the Midnight Commander.
browse it's online help for more info on it's usage