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...
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 ?