Running Old Desktops Headless?
CajunArson writes "I recently dug up an old P4 that is in fine working order and did what any self-respecting Slashdotter would do: I slapped Linux on it to experiment with making an NFSv4 server. One other thing I did was to remove the old AGP video card to save on power, since this is a headless machine. Now, I removed the video card after the installation, and I'm doing just fine as long as the machine will boot to a state where networking works and I can SSH to it. My question: Is there a good solution to allow me to log into this box if it cannot get on the network? I'm looking for solutions other than slapping a video card back in. In my case, I will have physical access to the machine. A few caveats to make it interesting: This question is for plain old desktop/laptop systems, not network servers designed to run headless. Also, I am aware of the serial console, but even 'old' machines may only have USB, and I have not seen any good documentation on how and whether USB works as a substitute. Finally, if there is any way to access the BIOS settings without needing a video card, that would be an extra bonus, but I'm satisfied with just local OS access starting from the GRUB prompt."
The question about bios settings is a good one though, and I don't know.
Maybe I'm way off base here, but putting in an old low memory (2-32MB) APG card isn't going to draw that much power. I totally understand your issues with wanting to run a headless machine, I have a few myself. But honestly I've found it's just a LOT easier to leave a cheapo card in the rig so that if something comes up I don't have to crack open a case.
I know there's a type of card that will push the serial interface through the network, if having a serial console (like running HyperTerminal in windows with a Null Modem cable plugged in) is not sufficient. That should allow you to get to the bios without having the monitor plugged in-- that's the theory, at least.
Also, if you're using this system as the lowest wrung sort of server, you might want to look into simply buying some Via Nano or Intel Atom hardware and just creating an ultra low-wattage server. Older desks were not renowned for their power efficiency, so over a few months, if its running 24/7, more efficient hardware might actually pay for itself in terms of energy costs, especially if you're somewhere with expensive power like California. It might be clever to cannibalize your old systems for hard disks and such and use them in this low power system, since the power usage of the hard disk will be largely a software problem, etc.
As many others have mentioned, the serial console is the way to go. Even if there's no DB9/DB25 serial port out the back, there's likely at least one serial port header on the motherboard. The header/pinout is generally standard, so go digging in that 'really old parts' box that we all have and see if you can dig up a DB9 port mounted on a plate to mount where a card would normally go. It will have a ribbon cable to attach it to the motherboard...
KVM over IP might be what you're looking for.
KVM over IP Network Card
I've never done business with this company. I just googled and took the first link.
load "$",8,1
I have no idea how much power your AGP card used, but unless it was a gaming rig in its glory days, the CPU probably absorbs most of the power, especially since you mentioned that it is a Pentium 4. I would see if there are any power-saving features in your BIOS and enable them, undervolt your processor to just the speed that you need, and get a cheap PCI video card for when problems occur. I've never used the serial port for diagnostics, but I don't think it will help much if you ever run into a situation where your system won't boot.
I have been doing something similar for half a decade now, in a firewall/storage/NAT server running Debian stable. I found that the only really critical operation is changing the kernel, and for that I have a vido card handy (by now I use a low-power board with integrated graphics). For other things, including updates, I just cross my fingers.
The options that are there to do without the spare video card are basically IPMI (expensive, needs special mainboard), virtualisation and a serial console + remote reset capability. A serial console needs for your kernel to come up, and in fairness, also needs remote reset capability. It also needs a second computer to connect the serial line to. I used that for a test machine in a computer cluster with good results for several years.
Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
Even easier, go to eBay and get a PCI video card for a couple of dollars. I got an ATI Rage with 8MB of memory for something like 2$ plus about 4$ shipping. It's only a few watts, which if you really freak out about power usage, you can recover by lowering the CPU voltage and the frequency to a bit lower than the normal. Well, anyways you'll make it more economic simply by replacing the power supply with a 80-85+ certified one, but it's probably more expensive than the whole computer, or the money saved in 2-3 years.
You're all putting WAY too much thought into this. The easiest way to do this is to take a magnet and manually adjust your hard drive until it has the SSH capability you're looking for. Everyone has at least 1 or 2 good magnets laying around, and with a steady hand this could become a great do it yourself project. Plus, you get epeen bragging rights when people start talking about how they used to code in assembly. You coded with a magnet and a HD.
Wait? That would be a pain in the ass? Almost impossible?
The AGP card is rated for 63 watts, maximum. Over a year that's 552 kWh. Paying for electricity at $0.15 a kWh you run into an additional $6.90 a month to run the AGP card.
1. Find a quarter in your couch cushions.
2. Plug the damn thing in for the 10 minutes it would take to setup a remote SSH connection using the suggestions people have put in this thread.
3. Pay the additional power bill with the quarter.
4. Move on with your life
5.....
6. Profit!
Grub works just fine with serial console. Add the following lines to your grub.conf:
serial --unit=0 --speed=38400 --word=8 --parity=no --stop=1
terminal --timeout=10 serial console
Also, make sure to add:
console=tty1 console=ttyS0,38400n8
to your "kernel" line for linux boot images so the kernel will send console messages to the console. Of course the kernel itself must be configured to support serial console too!
GRUB:
Define the serial port and configure GRUB to use the serial port, as shown in Figure 4-6. Figure 4-6. GRUB configuration for serial console
--unit is the number of the serial port, counting from zero, unit 0 being COM1. Note that the values of --parity are spelt out in full: no, even and odd. The common abbreviations n, e and o are not accepted. If there is mysteriously no output on the serial port then suspect a syntax error in the serial or terminal commands. If you also want to use and attached monitor and keyboard as well as the serial port to control the GRUB boot loader then use the alternative configuration in Figure 4-7.
Kernel:
The Linux kernel is configured to select the console by passing it the console parameter. The console parameter can be given repeatedly, but the parameter can only be given once for each console technology. So console=tty0 console=lp0 console=ttyS0 is acceptable but console=ttyS0 console=ttyS1 will not work. When multiple consoles are listed output is sent to all consoles and input is taken from the last listed console. The last console is the one Linux uses as the /dev/console device.
The syntax of the console parameter is given in Figure 5-1.
Figure 5-1. Kernel console syntax, in EBNF
Quite a bit more info at tdlp.org..
You're all putting WAY too much thought into this. The easiest way to do this is to take a magnet and manually adjust your hard drive until it has the SSH capability you're looking for.
Butterflies. What the OP needs are butterflies.
http://xkcd.com/378/
It is dangerous to be right when the government is wrong.
Actually there is an even cheaper and easier way to do it.....go talk to your friendly neighborhood local mom and pop repair shop. We are the biggest packrats there is and often have drawers filled with old PCI cards of all shapes and sizes. We are also usually quite bored and will happily sell you parts cheap, especially if you are doing something cool with them like a server, instead of dealing with the usual "I got a bug looking at pron again. Here fix it" which is what our days usually consist of. I personally have everything from a 2Mb Matrox card up to a 64Mb MX400 lying in my GPU drawer.
So go talk to your local repair shop. you'll find if you BS with us a little we're happy to let you go through the goodie drawers and will sell you cheap anything you want. Think of it like a cheap flea market for PC parts. We just really hate throwing working hardware away when we might find a use for it someday. And before somebody goes "WTF you gonna do with those old crappy GPUs?" I would point not only to this article, but point out the fact I just sold a 12Mb S3 graphics card to a guy for a whole $5 including popping it in for him. It was supposed to be just to get him through until we could get him an AGP card (which I was out of at the time) but the S3 worked great on his Win2K office PC so he said "if it ain't broke, why fix it?".
Those old PCI cards with 8-16Mb of RAM really didn't use hardly any juice at all, probably less than the average IGP does today. 20 minutes worth of BSing with your local repair guy and I'm sure you'll get one for a couple of bucks, with no shipping or waiting. Then if you want to get fancy you can pick up one of the cheapo KVM switches at Newegg, and if you have a problem with your server just "clicky clicky" on the keyboard shortcut and you are good to go. I paid a whole $30 for mine but Newegg has the same model for $26 or $16 for a 2 port. Since you already have the P4 this would be the easiest way to go headless and still have access if something goes wrong.
ACs don't waste your time replying, your posts are never seen by me.
the processor is a P4 ... why worry about the power consumption of the AGP card ?
And THAT sir is why we PC repair guys are packrats and never throw anything working away. You just never know when somebody is gonna desperately need that old crap!
My story like that is I had a guy practically in tears walk into the last shop I was hired gunning for, holding an old ISA card and asking for a PC that would fit it. I thought the guy was gonna cry when the boss said "I don't think we got anything that will take that" as he had hit every shop between his work and us, and all had told him a minimum of 2 weeks to get something that would work. I said "I got a couple of old gamer rigs in my closet at home that'll take that" and thought the guy was gonna kiss me.
It turned out that old card was a CNC controller for a lathe that made custom scroll work on columns, that he was the owners son who had FINALLY trusted the guy enough to put him in charge while he went on vacation, and naturally the lathe controller chose that week to go tits up and he had a $50k job due in 3 days and without the columns he would lose the job. he ended up paying me $300 for a pair of old boxes that weren't worth $100 together PLUS a full days pay at time and a half PLUS paying Doug to let me off for the day PLUS paying me to drop everything and spend the day setting it up for him. It turned out this lathe was made in like 86, the company went tits up in 89, and so naturally it would ONLY run in DOS 3. Lucky for him I still knew all my old DOS commands and the HDD (which was a 40Mb, IIRC) was still good so I could clone it.
All told I made close to $1000 for a single day's work, and he got not only the lathe up and running, but a spare 233MHz so the next time it happened he would be ready to go and not have any downtime. I set the 233Mhz up in the office in the corner and showed him how to boot once a month to keep the HDD spinning, and when his dad came back the man was so impressed he gave his kid a raise and more responsibility. So it just goes to show that you never know when that old POS you are hanging onto might be worth money. And if you ever need an old part your local mom and pop shop is a wealth of old hardware at cheap prices. So go talk to your local PC repair shop guy, you'll find a wealth of hardware cheap, and a great source for the DIY builder.
ACs don't waste your time replying, your posts are never seen by me.