OK, here is how I've done it:
First, if you would select all these
packages during the install, then installation would fail, most likely. Not sure why, I just guess it has something to do with temp, man, doc, info files and uncompressed modules filling up little hard drive.
Installing base system
At first, it is best to install only minimal system, then add what you like.
This list has packages I've used as my base system, it only has mkinitrd, lilo and nano, plus what it needs to boot and function. I've also noted some dependency information in
this list, so it easier to tell what is needed and why.
Lets begin!
* Boot your Slackware 14.1 dvd, partition your hard drive (I've used single ext4 partition).
* Run Setup, then select only A AP and L package groups, in the next step, select 'menu' option, and select only packages mentioned in
this list
* Affter installation is finished, do not remove your Slackware 14.1 dvd, hit alt+control+delete, when computer boots from it again, in the boot prompt enter:
Code:
huge.s root=/dev/sda1 rdinit= ro
Your Slack will boot, login as root and edit
/etc/lilo.conf file, so it looks like this:
Code:
append=" vt.default_utf8=1" # only for utf8 support obviously
boot = /dev/sda
compact ## add, or uncomment this, your Slack will boot faster
bitmap = /boot/slack.bmp
bmp-colors = 255,0,255,0,255,0
bmp-timer = 65,27,0,255
prompt
timeout = 30 # default value is 1200 meaning 2 minutes! Plenty of time to think about one choice! Reduce to 3 seconds.
change-rules
reset
vga = normal
# Linux bootable partition config begins
image = /boot/vmlinuz
initrd = /boot/initrd.gz # add this entry for initrd.gz you will create shortly
root = /dev/sda1
label = Linux
read-only
Save and exit. Now initrd.gz is needed, lets create it!
Code:
# /usr/share/mkinitrd/mkinitrd_command_generator.sh
Once executed, this script will show you a command to create your
initrd.gz file, enter it and hit enter. You will see some messages about adding modules. After it is done, execute lilo and remove leftover files:
Code:
# lilo
# rm -rf /boot/initrd-tree
Now it is great time to do some optimizing. Lets edit your
/etc/fstab:
Code:
/dev/sda1 / ext4 noatime,defaults 1 1 # add noatime option, so your hard drive would be less stressed at reading operations.
tmpfs /tmp tmpfs defaults 0 0 # add this line in the end of file, it will mount your /tmp in ram
Edit
/etc/profile.d/lang.sh and lang.csh files if you want to enable utf-8 support:
Code:
#export LANG=en_US # comment this one out
export LANG=en_US.UTF-8 # uncomment this one
lang.csh would be very similar.
Lets gzip your kernel modules, this way they take much less space:
Code:
# find /lib/modules/ -type f -name '*.ko' -exec gzip {} \;
# depmod -a
You can reboot your computer, and boot your Slack from a hard drive, but do not remove Slackware 14.1 dvd just yet.
Installing some software
At this stage, you have very basic Slackware Linux system, which can't do much, we are going to change that. So mount your Slackware 14.1 DVD:
Code:
# mount /dev/cdrom /mnt/dvd
From there, you will have to manually cd into
/mnt/dvd/slackware/ and
installpkg additional programs and libraries you want. You can use my
other package list to get an idea of what is needed, from where and why. It also has a weird agenda:
* symbol next to a package indicates, that package has some dependencies (listed on the right)
+ symbol next to a package indicates, that package is needed by one other package. More +, more packages depends on it.
- symbol next to a dependency means, that dependency is not met on purpose
also note, that this dependency information is incomplete, I just hope it can be somewhat usefull.
If you installed networking capabilities, to configure your hostname and your IP address, you will have to run:
If you installed gpm (mouse support for the text environment), you should run this command, to get it going:
If you installed
glibc-zoneinfo package, then run this command to configure your time zone:
If you have a cd/dvd drive, and want it to be usefull, then add this script to cron.hourly
Code:
KUKU=`/bin/date +%I`
while [ $KUKU -gt 0 ]; do
eject /dev/cdrom
eject -t /dev/cdrom
KUKU=$((KUKU-1))
done
Lets free some space!
Now that you have everything you need, it is time to clean up a litle. To do that, lets remove some unneeded maculature (we are brave ya?!)
Code:
# rm -r /usr/doc/* -f
# rm -r /usr/man/* -f
# rm -r /usr/info/* -f
By default, Linux file systems reserve about 10% of your blocks, we will reduce that to 1% and free up some space (the bigger the drive, the more impact it has!):
Code:
# tune2fs -m 1 /dev/sda1
Since
initrd.gz is already made, it is unlikely, that we will need to make one again, so remove mkinitrd:
Code:
# removepkg mkinitrd
Possibly you might remove
mpfr and
cpio as well, but being cautious, I have left them be.
Congradulations on your Slack under 300MB!