LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-12-2013, 07:21 AM   #1
Totoro-kun
Member
 
Registered: Nov 2010
Location: Kaunas, Lithuania
Distribution: Slackware
Posts: 234

Rep: Reputation: 125Reputation: 125
Slackware 14.1 on 512MB hard drive!


Good day,
I've got little Hp Compaq F5000 thin client machine, which has Via Transmeta TM8600 1.2 Ghz VLIW (Very Long Instruction Word) cpu, ATI Radeon 7000 graphics, 512MB ram and 512 flash hard drive. It is nice, because it works from 12V PSU, it's completely passive and silent, it has 4 USB ports, Audio card, Lan, Com, LPT, PS2 and VGA. So it's very geeky and kind of asks for trouble!

I was interested if it is possible to install latest and greatest Slack on it. So I've installed minimal base system, then added networking and audio capabilities, so now I have 281MB Slack with gzipped modules, {info,man,doc} files removed.

Basically it has split-vt, nano, mc, sudo, mpg123, ssh, links and wget.

It is somewhat usable as it is now. However, it does have whooping 174MB of free space for great stuff! I think it would be interesting to try and install Xorg and one or two gui programs. I have already tested Xorg with fluxbox on similar virtual machine, and I still have ~90 MB free there, however I want to really learn what is minimally needed for Xorg to work, before I can try and install it in my little computer. Maybe someone already have a tag file for minimal Xorg and could share?

Also, I've noticed, that threads about minimal Slack pops out from time to time, so it seems people might be interested in a little how-to in my next post.

Last edited by Totoro-kun; 12-12-2013 at 02:40 PM.
 
Old 12-12-2013, 08:29 AM   #2
Totoro-kun
Member
 
Registered: Nov 2010
Location: Kaunas, Lithuania
Distribution: Slackware
Posts: 234

Original Poster
Rep: Reputation: 125Reputation: 125
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:
Code:
# netconfig
If you installed gpm (mouse support for the text environment), you should run this command, to get it going:
Code:
# mouseconfig
If you installed glibc-zoneinfo package, then run this command to configure your time zone:
Code:
# timeconfig
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!

Last edited by Totoro-kun; 12-12-2013 at 02:34 PM.
 
5 members found this post helpful.
  


Reply

Tags
hard disk, mini, slackware 14.1


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you install puppy to a 512mb flash drive? gatewaysolo9100 Puppy 2 04-16-2007 07:16 PM
Installed USB 512MB flash drive(Permission Problem) Balarabay1 SUSE / openSUSE 17 04-12-2006 09:06 AM
Installing slackware 9.1 from hard drive?? react Linux - Newbie 2 03-30-2005 09:01 AM
Frustrated with Kingston 512MB DataTraveler USB Drive 2.0 alan8373 Linux - Hardware 10 11-08-2004 09:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration