Click to See Complete Forum and Search --> : Linux on a wimpy machine - 486 torture inside!


ph34r
01-23-2001, 12:17 AM
Installing Linux on a "Minimal Machine"

Lately I have noticed a lot of BB posts about putting linux on minimal machines, either to use as a firewall/router or to just play with linux a little. This is actually a great use of old hardware and Linux, since you can build high-cost equipment out of low-cost hardware and OS/software. Seen the prices on a 486 with 4mb to 8mb of ram lately? How about a small-office type router?

But, installing Linux on such a machine is not for the average user. If you like to have your hand held all the way with nice GUI interfaces, forget it. This will explain how I managed to install Slackware 7.1 on a old Toshiba Satellite T1910 laptop - black and white screen, 486sx33 CPU, just under 4mb of ram, 300mb drive (e-bay for $10), single 3.5in floppy, single pcmcia slot, and a Gateway 10mb ethernet card. I've got a 28.8 and a 2400 modem for it, but I haven't bothered with either of those yet.

But what is a machine like this good for? Well, if I got the modem going, I could use it as a 'net connect machine for my small home lan - I always connect at sub-28.8 anyway. What I really use it for though is as a terminal/console to my real Linux machine from the couch. While I can't play Quake3, I can use *****X, links, lynx, ftp, ssh, etc. to do web stuff - if it is command-line, it is fair game, if I am patient. In fact, I wrote this on it.

So... how's it done? Well first you need 2 distros - a mini and a "real" one. I used smalllinux and Slackware 7.1 - you may prefer Debian or even Redhat (6.x), but you must be able to really control the install, especially if you have a really small hard drive.

Slackware 7.x no longer actively supports installs on machines with less than 12 mb of ram, and you can still get/make a lowmem boot disk, but the real probelms network and/or pcmcia disks - you run out of RAM since it uses a ramdisk for the root filesystem of the install process. The way to get around this is to make a small ext2 partition (20mb or so) and use that as the root of the system. Also, you can create and activate swap before starting the install script.

Step 1 - Getting the root fs for install on your drive. For this, you will need a mini distro that can either run from a single floppy in your amount of ram (I like HAL91, but it needs more than 4mb ram). For this, I used smalllinux. You have to be able to fdisk and make a small (15-20mb) ext2 partition, and a swap partition. Once done, you need to get the contents of the color.gz boot disk, your chosen kernel disk (bare.i or bareapm.i), and perhaps the network and pcmcia disks onto the ext2 partition. You will need to use a "real" machine to mount the disks images as loop file systems (or make and mount the floppies) - this requires support for both loop and minix file systems. Having a staticly compiled copy of tar and gzip/gunzip available helps too (check www.linuxfromscratch.org (http://www.linuxfromscratch.org) to learn how to compile these as static binaries), since you can compress the files enough to get them onto a fat or ext2 1.44 floppy.

Step 2 - Once you have the file structure on the small ext2 partition mirroring the boot/root disks, you can boot with the first install disk. When lilo comes up, be sure to give it the root=/dev/hda1 (or whatever) argument so it loads the root filesys for install from the disk, and not into ram. Once you login and get to a prompt, you will need to activate your swap partition (man swapon). Once your swap is running, you can start the install process. Manually mount or link the /pcmcia and /network directories if you need them for install. On my system, I did a NFS install by pre-mounting the share into a /source directory and then picking a "install from hard-drive or premounted directory" install when given the chance.

Step 3 - Installing. I installed the A, AP, and N disk sets from Slackware 7.1 - the base system, console apps, and networking. Just over 100mb aretaken by this. WARNING - there are a few things you need to do before re-booting to your new systemif you have less than 8mb of ram - mostly having to do with the way modulesare loaded/probed on boot and what shell you run. Bash just won't run in 4mb of ram, virtual consoles take precious memory, as do un-needed modules. Trim everything you can, and change your default shell (for both root and your user acct.) to ash. The 4mb-Laptop HOWTO covers all sorts of these details - if you have less than 12-16mb of ram, read it - it may help your performance.

Well, here is the results of installing my system. I have included below the output from free, df -h, and fdisk -l . I was running 2 instances of ash and 1 of ssh when I did these outputs.


$ free
total used free shared buffers cached
Mem: 2068 1840 228 492 80 528
-/+ buffers/cache: 1232 836
Swap: 31244 980 30264

$ df -h

Filesystem Size Used Avail Use% Mounted on
/dev/hda2 247M 113M 121M 48% /


$ fdisk -l

Disk /dev/hda: 16 heads, 63 sectors, 682 cylinders
Units = cylinders of 1008 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 102 51376+ 83 Linux native
/dev/hda2 * 103 620 261072 83 Linux native
/dev/hda3 621 682 31248 82 Linux swap

$


And, a while later, a bit of bragging:

9:24pm up 30 days, 23:34, 2 users, load average: 0.03, 0.13, 0.09


But what do you install from? If you don't have a CD in your intended victim (remember - low end stuff), there are literally tons of ways. Just get creative and RTFM on installing. I used a NFS share from my desktop machine. It is possible to use floppies to install a base of Debian or Slack, with just enough OS to boot and either connect via ethernet or start a modem connection. If you have a second machine you can use it as a server - even if it is running 95/98/ME. Just get Apache for win32 and run it long enough to do a http install of Redhat 6.x. You can even put your harddrive in a machine that has a CD and copy the install files to it.


IMHO, adding software should be done with pre-made binaries, either via apt-get or www.linuxmafia.org. (http://www.linuxmafia.org.) A 486 with 4mb of ram takes a while to compile stuff - a long, long while. Also, compilers and their various components take tons of disk space - which may not be there to use.

So... who's up for making a 386/486 Beowolf/Mosix cluster to crunch Seti blocks on?

edits - damm ubb crap. where's my <pre> tags?

[This message has been edited by ph34r (edited 22 January 2001).]

Sterling
01-23-2001, 10:20 AM
Another interesting experiment to try (picked this up from a guy in the local LUG, never tried it myself, though.

If you have a couple of smaller boxes, 486s or low-end Pentiums, and a couple of larger ones (more RAM, bigger proc, whatever), you can make good use of Linux's networking abilities. If the other machines have bigger harddisks, mount /usr and friends off of them, read-only. There is a lot of documentation on what should be considered safe and unsafe for a read-only mount.

Maximising your processors is the main point of this post, though. I don't know the exact details of how he did this, but he set up the smaller machines with a script frontend for a bunch of programs (the one he demoed was the GIMP) that checked the processor usage on both larger machines. If one or both were below a certant percentage, it would run the GIMP on one of those and display it on the smaller machine. The speed increase was noticable just from the shorter demonstration he gave.

If anyone manages to set this up, post something about it. I'm sure others will find some use in it.

------------------
-Sterling
"There is no Linuxnewbie.org cabal..."

Whipping Boy
01-25-2001, 07:20 PM
Try doing that same thing with only floppies. THAT'S what separates the men from the boys http://www.linuxnewbie.org/ubb/smile.gif

------------------
Kurt Weber
Shell scripts? Shell scripts? We don't NEED no stinkin' shell scripts!
White, heterosexual, middle-class, and proud!
I've never understood why Bill Gates would name his company after his penis

trauma
01-25-2001, 10:40 PM
would using a low-end machine (486's) as a firewall slow the whole network down? it seems that it would because all traffic is routed through it, both incoming and outgoing, rite?

ph34r
01-26-2001, 03:02 PM
Well, maybe if it only had 4mb of ram, but with 8-16, it really shines. Network traffic routing and such really doesn't require many resources at all. And, if your net connect is via modem, who cares if your internal lan at 100mbit is slowed a bit on your router? Once it leaves the router, it is going at 28.8 or whatever you connect at.

mstich
02-03-2001, 11:26 AM
Originally posted by trauma:
would using a low-end machine (486's) as a firewall slow the whole network down? it seems that it would because all traffic is routed through it, both incoming and outgoing, rite?

I'm running a 486/33 for my firewall on a cable connection, and it doesn't slow anything down.

bisk
02-10-2001, 10:57 AM
I just wish I had all the parts to put my 486 together , it just seems a waste using a k6 2 400 as a gateway when it could be used for more worthwhile pursuits.

Hatecrime69
02-16-2001, 10:06 AM
I have an early pentium (socket 5) and i tryed two hd's on it (one was dropped :( ) they both started to install mandrake, slack, and caldera but never finished. It surely had enough ram though, about 80mb! (my real sys has olny 96) when i do get a new hd for it (most likey at a computer show, where i can get a smaller hd for cheap) i am going to olny install linu, don't know what i can use it for (all the pc's running in my house currently have a seperate ip from @home) I may make it a router for my comp olny so i can eventually add my dream mecheine a amd anthlon or duron :)

bdg1983
02-18-2001, 03:47 PM
Yes, actually, I've done this sort of thing too (albiet on a machine with slightly more memory - a hefty 16M :)) You can take a look at the result at http://fallout.tjs.org/ (yes, it runs apache), and if you feel like it, you can telnet to it (you'll be surprised :))

mrBen
02-27-2001, 09:17 AM
Like the telnet!! :P

I'm planning to be installing Linux on a 386 with 4Mb and a titchy harddrive in the next few weeks. Have managed to procure a CD-ROM drive, which will save a lot of hassle, but I'll let you know how it goes.

Anybody recommend a Distro. (I'm guessing Slackware's probably the way to go, but thoughts would be welcome.)

ph34r
02-27-2001, 12:16 PM
Slack or Debian

SpookyFish
03-06-2001, 01:13 AM
bisk,
YHPM

~loucura
03-16-2001, 01:27 AM
I have an old 486 laptop, with 20Mb of Ram, a 14.4 modem, floppy drive, and what have you. I have it running Slackware 7.1, DOS, Windows 95, Mu Linux, and am currently working on my own tiny release. These are all on separate partitions and are wholly independent, except DOS/Windows... slackassed backwards compatible searching for bloody... **grumble grumble grumble**

Uhm, right..

I didn't need Mu Linux (a tiny linux that fits on 1 1.77MB floppy) to install Slackware, I used disks... why? Because I like keeping a backup around so I can use it again if need be, or even better, use it on someone elses system.

I haven't gotten around to installing the N modules, mainly because I'm lazy and spoiled by the T3 at work, and do not relish 14.4 internet connections...

I'm going to have to get that done soon...

**shrugs**

radagast
03-17-2001, 04:29 PM
I've been using linux at home as web server (so everyone could share the cable), file server (for backups) and alternative OS (for fun) - starting with a 486-33 with 8Mram/300Mhd, which i've gradually got up to a P-100 with 40M/12G, which is very fine.

Xwindows runs slow, but is still quicker than the command line. and i have to pull a spare monitor out of the cupboard when i need to do admin.

this week i have the answer - install X-win32 on win95 box, set up linux to allow telnet from only that IP, and i can do everything from there. No more extra monitor on the lounge, and the windows box (with the good monitor/ mouse/ keyboard) takes care of the gui, leaving nebuchadnezzar to do what he does best.

it's almost like distributed computing.

tallmikeG
03-23-2001, 12:57 PM
Originally posted by mrBen:
[B]I'm planning to be installing Linux on a 386 with 4Mb and a titchy harddrive in the next few weeks. Have managed to procure a CD-ROM drive, which will save a lot of hassle, but I'll let you know how it goes.B]


i'm thinking about doing the exact same thing, just for fun...keep me updated on how it's going, and if it's even worth it! lol!

AmiHughes
04-02-2001, 05:15 PM
My posting rights have been revoked beacuse I tend to do irrational things.

[ 02 April 2001: Message edited by: Sensei ]

Neurotica
04-02-2001, 05:35 PM
I have notified "dn.net" who is your DNS, that you have a slanderous webpage.

Legal action will be taken against you, if you do not remove the false information from your webpage.

Thank you.

--Jennifer Zynn

[ 02 April 2001: Message edited by: Neurotica ]

mocni
04-09-2001, 09:24 PM
I have an old 486 with a linux mini distro (GrayCatLinux), but It deosn't recognize any of my harddrives or partitions. Anyone ever had this trouble? And I have tried various other mini distro's with the exact same problem, could my mobo be incompatible with linux?

mram19
04-11-2001, 09:34 PM
I have a 486 IBM 701cs with the butterfly keyboard running RH 6.2. I love it. I'm teaching myself python on it, use it for taking notes and soon will load some chess programs on it. It's command line only, but I think that's cool.

The installation was kind of tough, but we got it going using tomsrtbt (http://www.toms.net/rb/home.html)(mini distro) to connect to my home network, then installed from my other linux machine. Voila.

I love this machine. I take it on trips, to the coffee shop, whatever. I think it's a testament to linux that you're able to utilize old hardware like this, and I sincerely hope the OS remains backwards compatible. :)

X_console
04-13-2001, 01:12 AM
Why not make this into an NHF and send it to Sensei? I think a lot of people would find this information helpful.

ph34r
04-13-2001, 09:25 AM
I think that dealing with old hardware that makes you jump thru hoops due to lack of resources is not for newbies :)

I wouldn't mind making something up, and I think it is a good thing that many people read/needed, which is why I posted it here. For newbies its not tho (imho). However, if Sensei (or you or whoever) wants to take it from here and put it in NFH format (a few <p> tags and some table action should do it) then please feel free to do so.

Sensei
04-13-2001, 09:40 AM
I'm on it...I'm also using it as an interesting thread in this weeks newsletter.

roderyk
04-16-2001, 01:14 AM
THis is for mrBen:

If you're plannig on installing a 386 with 4MB, regular dsitro's are not the way to go. Instead, you could use a mini Linux, which fits on a floppy, to run the computer.

If this computer is running independently, the hard drive would probably help. But if your connecting this to another, you could run this as a terminal.

In this case you get a mini Linux that boots through a floppy. Through the magic workings of Linux networking, you canhave the terminal run all the programs on the server, and just print results in the terminal. THat way, you don't even need a hard drive. just a floppy, 386, and monitor.

Boris
04-17-2001, 01:53 PM
Yeah, I inherited two 486/40's from a friend. Tried installing SuSE 7.1 with the installer, but every time it would start copying files to the HD, it would abort on the 4th or 5th package. I didn't know about the mini-distro intalls, and I was -stumped-.

In the end, I decided the problem was that I simply didn't have enough RAM to facilitate copying. Solution?

Rip the HDD out, put it as Master in my big box (64 MB), loaded it, ripped it out, put the other box's HDD in as Master, and repeated. Worked like a charm. :D

vvx
04-21-2001, 04:40 AM
Well, I just went through a similar ordeal, using an AT&T globalyst 200 laptop and debian.

The thing has a color tft monitor, 9.5" I believe, it's actually pretty nice.. 250mb hd, 486 dx2 50 cpu, 2 pcmcia slots, floppy drive, and .. 4mb ram. I tried the lowmem disks for most major distributions before giving up on that, did a quick web search, ran upon the 4mb laptop howto (VERY GOOD RESOURCE!) and got my start from there. I don't have a network card for this beast so everything is installed via floppy, mulinux I couldn't get to boot at all, only thing I managed to get to boot was small linux. The real problem with small linux is that for running in low mem mode it uses a floppy disk as your root partition, obviously you can't just pull out your root partition without having it complain. So, what I did was figure out how I wanted to partition my drive, I decided to go with 10mb /boot, 25mb /home 32mb swap and the rest for /. Now, to get around the problem I made my partitions and installed small linux to the hard drive, the 10mb partition actually. Getting that to boot wasn't too much of a problem, and I had a lovely linux install on my hard drive .. but it wasn't debian, so I couldn't leave off there! Now, the problem like you mention with the major distribution's installs is the ramdisk, so if you copy the contents of the root disk to a partition on your hard drive and use that as root you got it made. So, I extracted the root disk to a directory, tar.gz'd it, and put it on a floppy, and then expanded that to the 25mb partition. Then took my spiffy debian boot disk and pointed it at root and voila! I had some problems at first, got a bunch of errors but at the same time got most of linux installed (If you're going to install this way, you need the rescue disk, 4 driver disks, and 11 disks for the base install..) it bombed shortly before finishing, and I hadn't made the partition with support for 2.0 kernels so smart linux couldn't see it, so I upgraded the kernel to 2.2.19 on smart linux and then booted to the debian setup using that kernel. Amazingly, the install went very smooth after that, guess the boot disk I was using disagreed with my laptop hardware, finished my install, and it's running the base install of 2.2 now. I'm going to hook up my modem to the laptop and upgrade it and put on all my cool favorite apps (I really just want minicom). Eventually I plan to make a null parallel cable and use plip networking, but for now I have a serial cable I can login to a sparc with via terminal (thus minicom) and the sparc is connected to the net so I can run all my stuff there.

As for the laptop, I'm really happy with this thing, I don't think the previous owner used this much at all, the thing looks brand new -- even the battery holds a 2 and a half hour charge! Too bad running X isn't feasible or I'd take the thing with me everywhere. :)

vvx
04-21-2001, 04:20 PM
Oh yeah, I know you mentioned not using bash, but I'm using bash on mine. :)

Zalion
04-22-2001, 08:27 AM
I'm running Mandrake 7.2 on a 166mhz Pentium, 32MB RAM, 1.7GB HDD, 16X CD. Like you said you can't play q3 or anything like that. But it's perfect for messing around and getting used to the os !

digiital
04-23-2001, 10:21 AM
I've been using a distro called e-smith(www.e-smith.org). I'm running it on a P100 with 32Megs ram and 600Meg/1.2Gig HD. This distro is VERY VERY simple to install. Out of the box you'll get WEB/FTP/MAIL/FIREWALL servers plus afew more small things. All the admin is done via webpage.

No Monitor/Keyboard is even needed on the gateway.

George P Boutwell
04-23-2001, 11:12 AM
radagast,

You could always install/run Webmin (http://www.webmin.com/webmin/ ) on that machine, and then use a browser on your Win9x machine to edit/control/configure your linux machine.

Just a thought,

George

Originally posted by radagast:
<STRONG>i have to pull a spare monitor out of the cupboard when i need to do admin.

this week i have the answer - install X-win32 on win95 box, set up linux to allow telnet from only that IP, and i can do everything from there. No more extra monitor on the lounge, and the windows box (with the good monitor/ mouse/ keyboard) takes care of the gui, leaving nebuchadnezzar to do what he does best.</STRONG>

Zappo
06-18-2001, 09:57 AM
Could anyone post how to install Linux on a 386 - and, specifically, which distro to use? I've got an old laptop which is a 386, 3 megs RAM, 40 megs HD. On the plus side, I don't need it to have any graphics or network support. Any suggestions?
(Thanx FoBoT for pointing me to this thread)

ph34r
06-18-2001, 01:31 PM
That 3mb of ram may be a stopper for you, but check out the 4mb Laptop HOWTO at www.linuxdoc.org (http://www.linuxdoc.org) - lots of useful information.