ufh logo Upgrades from Hell : Linux 2

Carrying on (as I do) from my previous article.

It was now time to get the Linux box going. The configuration of the Linux box is fairly straightforward. Since it regularly gets used for spare parts, it has a hodgepodge of parts. I had been running MEMTEST on it for 50 hours straight, to verify that the memory wasn't an issue in terms of problems.

The Plan:

1) Update hardware
2) install Mandrake 8 (Red Hat kernel 2.4.x, the latest thing)
3) get ADSL going
4) get IP Masquerading going (comms from Windows machines to internet)

My estimates were:

1) 20 minutes (no, really).
2) 2+ hours.
3) 30 minutes.
4) 30 minutes.

The machine consisted of Tyan Turbo S1517 motherboard. 64MB memory. P166 CPU. Quantum 6GB drive. Samsung 6GB drive. ACCTON ISA MPX ethernet card. Diamond Stealth 64 2MB video card. Nec Multisync 3D monitor. Crappy keyboard. Logitech 3 button mouse. Mandrake 7.1 'Red Hat' Linux.

Current value : $<200.

I had rebuilt the operating system a while ago with help from my linux/unix knowledgeable friend Chrispie. It ran unerringly (104 days uptime when I powered it down for the network re-arrangement in mid May). I knew that the ISA network card was problematic (indeed the boot process has a 'ether=...' statement in there to detect the fucking thing). See the older articles on our experiments to get it to see the SMC 1211 network card.

The Samsung drive was bodgy. I got 2 of them a few years ago, and the other one died Christmas 1999 after months of torture in Dad's machine. I took it apart when I was there and the disk was scratched beyond belief -- I've seen hard disk crashes before, and this one was a classic. Anyway, my drive had a known problem of refusing to spin up after a power-down. You had to take the drive out of the case, hold it in your hand, and 'spin' the drive a bit when you first applied power. That got the drive spinning up, and then it was right.

During our aborted install of Mandrake 8 to that drive, the install crashed, with the hard disk light staying hard on -- subsequent power-down/reboot had the drive not spinning up. I wasn't going to trust it anymore, it's a DEAD drive (contained backups of my old configuration, and ancient archives which are now safely elsewhere).

So, out with the 6GB Samsung, out with the ISA network card. In with the new netgear 100Mbps card, in with the SMC1211 card which the ADSL modem plugs into. In with the 32Xcdrom from my machine, and in with the old Quantum 6GB drive from my machine. I had hooked up the drive and CDROM to be on the primary channel, with the old 6GB linux system on the secondary channel.

Boot up, IDE detect, sees the two identical drives, save settings, set up to boot from CDROM, and sit back. POST occurs, then the hard drives spin up and the system just sat there. And sat there. And sat there doing nothing. Hmm. Unplug the original drive completely, power up, and away she goes. Time elapsed -- 30 minutes or so.

Finds the CDROM and boots from it, Mandrake 8 install. Select the most automatic install, it finds the 6GB hard drive, formats it according to its inbuilt clues (256MB swap, 3GB / root partition, 2.6gb /home partition). Packages get selected and away it goes. Chug chug chug. The original 14 minute estimate soon blows out into 50 minutes, and about an hour later it finished, and DETECTED both network cards! The install process got up to the X-Windows config (the very last step of the install). It tried to drive the poor Nec 3D monitor too hard, the screen went berko, and I had to try and choose a different resolution/monitor. The install process then crashed with a segmentation fault. :-(

Start again :-(

This time it crashed with a segmentation fault just after finishing copying all the packages (another hour).

I gave up.

Go back to Linux 7.1 on the original drive, and try to get the compiler going. Signal 11 every time the compiler ran, no matter what I tried.

Turn off computer, turn it on again, it runs, but no way can I get it to compile things. X-Windows then decides to crash, HARD, and won't start anymore. My 7.1 installation has finally gone beserko. :-(

Shrug shoulders, go back to plan A -- install Mandrake 8.

Discuss with Val about buying the NetGear router as the preferred solution (~$300 and subsequently a waste of the $129 I spent on the hub, since the Netgear solution has 4 10/100ports built in)

Power off machine, hook up the 'new' quantum, unplug the old. That is when I notice the CPU fan, and the board is noticably warm -- perhaps the CPU fan has failed again? Turn on system, and the CPU fan didn't move!!!

Try to move fan, whirrr it goes into life.

That is probably what the problem was, the CPU FAN. Sheesh.

Put in Mandrake 8 CDROM. Set controls for the heart of the sun, install EVERYTHING this time, let it rip. Dinner arrives (Pizza) I go and watch The Bill on TV and think about the bastardry of inanimate objects.

Mandrake install process has a few hiccoughs, for instance, it aborts installing X-Windows, by this time I've given up hope anyway, let it continue, it continues. I watch more TV. Come back, and it's asking for the second CDROM, put that in, leave it to do its stuff. Eager to see if things are cooking, I come back, it's asking me for root passwords and installing users, and it -skips- the X-configuration part because it fucked up the X-Windows install. Fair enough :/

The install completed successfully, wrote a LILO boot sector, and it restarted and booted up.

Presented with a login screen. Login, IFCONFIG shows TWO network cards! Wow!

Go and manually use the command line RPM tool to install XFree86, and sundry other XFree RPM's, that all works. Configure X, maximum I run my screen at is 800 * 600, 56Hz, which is crappy, but best I can do.

X-Windows starts up. Login, and KDE starts up (flashy graphics and everything) but 800 * 600 isn't great resolution for running X, and indeed, I instantly run into problems with Kpackage and the Mandrake Configure program and even Netscape, because the screen is too little for the dialogs to fit on the screen, and so I can't see the OK buttons, or what dialogs are 'hidden' below the 'bottom' of my screen. Fudge.

Turn off my Win2K system, unplug monitor, plug it into Linux box, bring it up, 1024 * 768, and now I can see dialogs.

Elapsed time -- about 8 hours. I have two working network cards, and a working system. Amazing.

Configure the network cards with correct addresses, ping Windows boxes, and succeed. Then I realise that I haven't got the correct Roaring Pengiun PPPoE package which is on my Windows system, which is shut down cos I'm using the monitor for Linux. Shut down system, swap monitors. Configure X on Linux to go back to 800 * 600 (why it won't do 1024 * 768 like it -used- to, I don't know). Bring up windows. Try to telnet to Mandrake box -- nope.

Hmm. Try to start up Exceed (big joke), nothing.

Shit. I can ping the fucking box, why can't I telnet to it?

Go to linux, and try to use telnet -- no such program. Apparently Telnet is old hat, and has been 'replaced' with SSH. Cool bananas, except I don't HAVE SSH support in Windows 2000, so how am I going to copy the files over? FTP of course! FTP to the box, no problemo, put the RP PPPoE RPM files into my home dir on the Linux box, and install and configure my ADSL connection -- crunch time, try to bring up ADSL -- red lights blink on the TK-PPPOE panel, then GREEN, we have a network connection! WOW. Elapsed time about 10 minutes.

From the linux box, I can surf the web! Pity I can only run in 800 * 600 and can't even tell Netscape to change it's default home page to www.google.com instead of the fucking Netscape home page.

Start looking for how to do IP Masquerading advice.

For those of you blissfully unaware of what IP Masquerading is, here's a short cryptic description.

When you are on the internet your computer has an IP address. The computer you're talking to has an IP address. All the computers on the internet have UNIQUE ip addresses. You open up TCP sessions using those IP addresses to communicate. FTP, Web, IRC whatever they are all TCP/IP connections, going from your computer, through the internet routers, to a destination computer and back again.

But when you're on an Ethernet LAN, connecting to a computer which in turn, is connected to the internet via some established method (ADSL, Modem, whatever), YOUR IP address is -unique- but UNKNOWN to the rest of the internet. Indeed, your ethernet card IP address should be one of the 192.168.x.x 'private c-class' addresses that is specifically non-internet routable. (perhaps you use 10.x.x.x A class private addressing, whatever, it's the same diff). It isn't POSSIBLE for your privately addressed computer to communicate with the internet, because your address isn't VALID.

THAT is where Masquerading (or Network Address Translation) comes in. IP Masq takes your 192.168.1.2 address, and 'mangles' it to be the same IP address as the computer connected to the internet (203.10.76.91, for example), but changes which TCP -port- it uses then it shoves the packet out into the internet to the destination computer. That computer replies to the 203.10.76.91 host, which says 'ah, this is on this port, which is really for that computer over there on my local network, it mangles the IP address back to the correct one, and puts it over the ethernet, where your computer goes 'ooh, a reply' and proceeds to get mail, or news, or an IRC message, or whatever.

Clear as mud?

Read on.

"IPCHAINS" is the first answer that comes to mind, cos that is what I did under Mandrake 7.1 (IPFWADM was the Mandrake 5.1 paradigm, it changes all the fucking time). Install IPCHAINS RPM (wow, it worked) and try the command, and it comes up with 'IP Chains Not Supported by this Kernel'. FUCK.

FUCK FUCK FUCK FUCK FUCK.

I said FUCK a lot.

"Don't tell me I have to RECOMPILE THE FUCKING KERNEL to include Masquerading support. I don't think the box will do it, it's been DYING all week trying to compile simple fucking things". Without IPMASQ, I have no internal computer connectivity to the internet with the two Windows computers in here. Which is pointless.

Went to the /usr/doc directory, and found (to my horror) that there was nothing there. Not a jot. They MOVED it from /usr/doc to /usr/share/doc. Cute. Go there, and find the HOWTO directory, finally they got rid of the multipart HTM files and have monolithic HTM files, so reading the IP_MASQUERADING howto was easier. First thing I notice was that the HOWTO covered 2.0, 2.1 and 2.2 kernels, but 2.4 was 'not covered in this document'. That is to say, the HOWTO documents supplied with Mandrake 8 didn't include information on HOW TO use the new 2.4 kernal functions.

I go to the net to read up on IP Masquerading HOW-TO, and find some pages, most of them talking about IPCHAINS and IPFWADMIN, and even IPMASQADM (which had come and gone since I was fiddling with Masq before).

None of those tools work with a 2.4.x kernel. The IP management is different, and lo, there is a new tool called 'IP' which can do amazing things. INCLUDING Network Address Translation!

Well I tried and tried and tried. The usage of IP is bizarre, the files it uses are weird, the command structure is convoluted, I just couldn't cope.

I tried and tried and tried and tried. I managed to cut my Windows2000 computer -off- the Ethernet entirely (I couldn't ping anywhere, because IP rules said 'no' :), and fixed that, but I couldn't get IP Masquerading going. I was going around in circles.

At 1am I went to bed, furious.

8am, get up, and go back to the fray.

Revisit IPCHAINS -- Not supported in THIS kernel. Ok, recompile the kernel!

Find Kernel source RPM. The RPM has 'dependancies' on other RPMS which aren't installed. All of them were on the CD's I had, except for one -- NCURSES-DEVEL. Now I have an inkling why NCURSES was required, but NCURSES-DEVEL? A -development- packaged? Anyway, it wasn't on the CD, so I had to download it. ncurses-devel-5.1-8mdk.i586.rpm -- too early so I got 5.2-12.2, but that was too for my copy of Ncurses (5.2-12). Do you think there was a 5.2-12 ncurses-devel available? Not that I could find.

No matter how hard I tried (and I tried hard) I couldn't get a combination of ncurses, libncurses and ncurses-devel that would go together so that I could even UNPACK the source code in the kernel.

manually doing rpm with --force refused to install the source for me.

So I went into X-Windows and fired up kpackage, the RPM package manager. Well HAHA, the screen was TOO SMALL to show the 'install' or whaever icons. I was screwed there as well.

I thumped the desk. Hard. I crushed a coke bottle into a twisted mess to get some of the anger out of my system. I pulled at my hair, and openly wept with rage at this fucked nightmare of a system. "All I want to do ..."

Turn off systems, hook up big monitor to linux box, get X-Windows going at 1280 * 1024 (only 256 colours) and use kpackage to fucking FORCE the unpack of the source code, no matter that ncurses-devel wasn't available.

Then I did 'make xconfig', and the fucking thing worked! I got up the x-windows kernel configuration tool going (a basic action, which I was amazed at!), and finally got down to 'networking' AND THERE WAS NO MENTION OF IP-MASQUERADING SUPPORT AT ALL.

*FUCK ME*.

Go back and read the 2.4 netfilter page, it was no help at all.

Go and look for linux 2.4 howto, and find references to something called iptables (which isn't installed by the Mandrake installer). Go get the package, install it, and run the one line command

iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

and it worked.

I went to Val's machine, and I could ping the internet. She got her mail, sent a mail, got web pages, it was all working like a bought one.

One little command. Several trillion possible options, but the web page had told me what to do, and it just -worked-.

Elapsed time -- almost exactly 24 hours.

I put my monitor back, fired up Windows, and got my mail -- I read my mail WITHOUT the application silently crashing. I got my news, I replied to articles without the articles silently 'disappearing' from the face of the planet. I played network games, I surfed, I downloaded at 50+Kbytes per second. I was happy.

I still am happy. Mostly.

Then there is the mysterious use of SSH under windows (downloaded and installed) to get Exceed going. I've managed it, but I dunno how it's working. :)

Moral? Spend $300 on a NetGear RT314 router and save wear and tear on your psyche.

send mail to dac@pcug.org.au

Valid HTML 4.0!

Back to Dac's home page
back to PCUG home page
Hand Coded by Dac.