Slashdot Mirror


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

15 of 347 comments (clear)

  1. Serial console by timeOday · · Score: 4, Informative
    A serial console. As far as I know, this is what serial ports were actually put into computers for in the first place.

    The question about bios settings is a good one though, and I don't know.

    1. Re:Serial console by tverbeek · · Score: 5, Funny

      Yes, he added several conditions, effectively saying "No, I don't want to do this the easy or logical way; I want to make this unnecessarily difficult, by disabling every form of I/O built into the machine except one (the NIC), but still having a way to interact with it (other than that one)." I recommend clairvoyance and telekinesis. :)

      --
      http://alternatives.rzero.com/
    2. Re:Serial console by value_added · · Score: 5, Informative

      A serial console. As far as I know, this is what serial ports were actually put into computers for in the first place.

      Sigh. I wish more people (the home user Slashdot types) would just go buy a serial cable (and/or serial+USB adapter) and see for themselves how trivial it is to set up, and how valuable that setup can be. There's plenty of reasons why one would *want* to rely on serial, aside from the usual "What if the network is down?" scenario.

      For added fun (when there's more than one computer involved), consider something like this

      The question about bios settings is a good one though, and I don't know.

      For the OP and most of us, that's a noop. What I would have suggested instead of a powerhungry P4 (or even PIII), is a soekris box. There's no VGA at all, so the BIOS (and everything else) is accessible via serial only. My "headless" VIA boxes are a PIA by comparison.

      Granted, Soekris boxes are typically used to perform networking functions, but setting one up with a hard drive (laptop or SSD ideally) and running a web, IMAP, NFS, Samba, etc. server is common enough and performance is perfectly adequate. A few bucks more, but hey, they're rackmountable so you can impress your friends and neighbours. :-)

    3. Re:Serial console by merreborn · · Score: 4, Interesting

      I actually worked on a small project that involved deploying headless desktop-based Debian servers to locations all over the continental US.

      We'd fed-ex the boxes, and most of the time, they'd show up with a hard drive detached, or worse (one fedex ground shipment from CA to FL knocked the RAM right out of the slots on one box). What was worse, we didn't have any technical expertise on site to speak of, so even simple problems were hard to diagnose.

      The ASUS motherboards we were using happened to have serial ports, and the BIOS also happened to natively support pumping text-mode input/output over said serial interface -- so you could edit BIOS settings, tweak bootloader settings, put the machine in single user mode and fsck the whole disk, etc. etc. all over serial.

      We experimented with plugging these things into serial-over-ip devices; specifically, one like this one -- although I think we paid about $60 each. Results were mixed. For one, it was pretty painful getting things operating at a reasonable serial bitrate (especially for curses-esque interfaces like the BIOS settings interface -- characters were getting lost), and making them reliably accessible over IP wasn't easy either. You could configure these things to "phone home" when they were powered on, but the configuration interface and documentation was pretty bad.

      If I recall correctly, KVM over IP devices were a bit more pricey.

      So, long story short, when it comes to low-cost remote server management, in my experience, there's something of a lack of quality offerings.

    4. Re:Serial console by schon · · Score: 5, Funny

      I recommend clairvoyance and telekinesis.

      Now, now, there's no need for snarkiness. We can accommodate the specs without resorting to hocus-pocus and imaginary abilities.

      The solution is quite simple - he just needs to get a lemon (although lemon juice might suffice, it's not optimal, as I'll explain further.)

      How it works is simple - you put a 1/2" slice of the lemon in your mouth, then stick in the end of the ethernet cable. The juice from the lemon reacts with your metal fillings and the copper from the network cable, generating electricity, which can then be used to set up an ethernet link by humming at the correct frequencies.

      Once slice of lemon will provide approximately 8 to 10 minutes of power for this - be careful not to slice the lemon too thick or thin - too thin and you'll run out of power too soon, and too thick and you'll be wasting the juice in the center (This is why lemon juice is suboptimal - it washes away too quickly, so you'll be needing to "recharge" every 20-30 seconds.)

    5. Re:Serial console by 1s44c · · Score: 4, Informative

      Did you even read the summary? He specifically mentioned that he knows about serial console and many of these machines might not have serial ports.

      Some machines don't have serial ports. The easy solution is to buy a serial card for these machines.

      Everything else is more expensive and more complex.

  2. Just put the vid card back? by Anonymous Coward · · Score: 5, Insightful

    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.

  3. Control Card? by malevolentjelly · · Score: 4, Insightful

    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.

  4. Serial header on the motherboard by blakeyez · · Score: 5, Interesting

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

  5. Re:Good luck by Useful+Wheat · · Score: 5, Insightful

    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!

  6. Re:Good luck by Anonymous Coward · · Score: 5, Informative

    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!

  7. RTFLDP by itomato · · Score: 5, Informative
    From the Remote Serial Console HOWTO http://tldp.org/HOWTO/Remote-Serial-Console-HOWTO/configure-boot-loader-grub.html
    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

    serial --unit=0 --speed=9600 --word=8 --parity=no --stop=1
    terminal serial

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

    console=ttyS<serial_port>[,<mode>]
    console=tty<virtual_terminal>
    console=lp<parallel_port>
    console=ttyUSB[<usb_port>[,<mode>]

    Quite a bit more info at tdlp.org..

  8. Re:Good luck by dotancohen · · Score: 4, Funny

    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.
  9. Re:Good luck by hairyfeet · · Score: 5, Informative

    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.
  10. Re:Good luck by emilper · · Score: 4, Insightful

    the processor is a P4 ... why worry about the power consumption of the AGP card ?