Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Operating Systems

Running Old Desktops Headless? 347

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."
This discussion has been archived. No new comments can be posted.

Running Old Desktops Headless?

Comments Filter:
  • Serial console (Score:5, Informative)

    by timeOday ( 582209 ) on Sunday September 06, 2009 @11:41AM (#29331715)
    A serial console [tldp.org]. 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.

  • Good luck (Score:3, Informative)

    by gravos ( 912628 ) on Sunday September 06, 2009 @11:45AM (#29331747) Homepage
    Most of the Dell and IBM servers I've used will let you get to the BIOS/GRUB over a serial console with some configuration, but I've never seen a desktop motherboard that would do it. If you really care about power consumption the easiest route is probably to buy a cheap, low-power itx board that has VGA built in and skip the console altogether. Plus, that way you don't need a laptop to talk to the box, just an old monitor.

    Anyone know some tricks to get serial console to work with grub on a desktop mobo?
  • serial tty (Score:3, Informative)

    by SgtChaireBourne ( 457691 ) on Sunday September 06, 2009 @11:46AM (#29331761) Homepage
    If that box and another both have serial connections, then use the serial console: Get a null-modem cable. Connect that to another box. Make sure the you add console=ttyS0,19200n8 [tldp.org] or some variation to the append line in your grub entries. On the client side use cu [die.net] aka tip, minicom [tldp.org] or PuTTY [ubuntu.com] to make the serial connection, making sure that bps, parity and stop bits match.
  • by SgtChaireBourne ( 457691 ) on Sunday September 06, 2009 @11:56AM (#29331841) Homepage

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

    Very good point. The cables are easy to find, too: e.g. http://www.pccables.com/07120.htm [pccables.com] (That's a random cable picture and not an endorsement of the company. YMMV, Caveat Emptor, etc.)

  • by Anonymous Coward on Sunday September 06, 2009 @12:26PM (#29332091)

    It's tempting to use an old P4, but I don't think it's worth it in the long run based on the extra power consumption from the CPU. My old P4 used around 80 watts, that's almost $6 a month (assuming 10 cents a kwh). I decided to get an MSI wind PC which uses an Atom core ($135 from newegg). This still uses around 30 watts of power, most of it in the chipset. I'm hoping at some that they will sell equivalent devices that use under 10 watts. Once that happens it will be a no brainer to use these devices as fileservers, the power savings alone will make it worth it.

  • Re:Serial console (Score:5, Informative)

    by value_added ( 719364 ) on Sunday September 06, 2009 @12:33PM (#29332129)

    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 [kd85.com]

    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 [soekris.com]. 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. :-)

  • by AmiMoJo ( 196126 ) on Sunday September 06, 2009 @12:34PM (#29332137) Homepage Journal

    The Rage Pro 8MB is the ultimate low power card, and comes in PCI format. Less than 1W power use at idle, and supported by Linux and Windows with built-in drivers. Until 2007 many Intel servers had them on the motherboard, before ATI introduced a new line and Intel moved to their own chips.

  • Re:Good luck (Score:5, Informative)

    by Anonymous Coward on Sunday September 06, 2009 @12:59PM (#29332337)

    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!

  • Re:Serial console (Score:5, Informative)

    by 1s44c ( 552956 ) on Sunday September 06, 2009 @01:08PM (#29332393)

    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.

  • RTFLDP (Score:5, Informative)

    by itomato ( 91092 ) on Sunday September 06, 2009 @02:02PM (#29332803)
    From the Remote Serial Console HOWTO http://tldp.org/HOWTO/Remote-Serial-Console-HOWTO/configure-boot-loader-grub.html [tldp.org]
    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..

  • Re:Serial console (Score:4, Informative)

    by Sique ( 173459 ) on Sunday September 06, 2009 @03:17PM (#29333475) Homepage

    .. which need an already loaded OS to work... so what if GRUB is fucked up for some reason and the USB driver is not loaded yet to operate the serial console?

  • Re:Serial console (Score:2, Informative)

    by geekprime ( 969454 ) on Sunday September 06, 2009 @03:26PM (#29333577)

    The Intel DP965LT has a serial port header right on the motherboard, check the manual, page 11 labeled P described on page 12.
    pdf of the manual at
    http://www.intel.com/support/motherboards/desktop/dp965lt/sb/CS-022910.htm [intel.com]

    The Asus M4A78 Plus ALSO has a com1 port on the motherboard, you can look at the pretty pictures on newegg, it's in the lower right corner labeled com1, it's a light blue header.

    So we still don't have any motherboards without serial ports...

    I will concede however that they seem to have done away with them on many laptops (although I can't buy one that dosen't have one, configuring real routers & etc requires serial)

    Oh, and I just want to say that the EEE is more a netbook type device than a laptop type device.

    Question, are the USB serial adapters properly supported in linux (and windows) yet? The last time I tried one the drivers were crap and it wouldn't work above 1200 baud.

  • Re:Or shut it down. (Score:3, Informative)

    by raddan ( 519638 ) * on Sunday September 06, 2009 @04:14PM (#29333965)
    Save yourself some pain and put something like this in your /etc/profile:

    export PS1="${USER}@`hostname -s`:\w$ "

    That particular one is for ksh; it might work for bash, too. I don't really use bash.

    You could even make the machine name flash red if you wanted to.
  • Re:Or shut it down. (Score:3, Informative)

    by xaxa ( 988988 ) on Sunday September 06, 2009 @05:59PM (#29334661)

    You might be interested in molly-guard (available in Debian/Ubuntu, and presumably others):

    The package installs a shell script that overrides the existing shutdown/reboot/halt/poweroff commands and first runs a set of scripts, which all have to exit
      successfully, before molly-guard invokes the real command.

      One of the scripts checks for existing SSH sessions. If any of the four commands are called interactively over an SSH session, the shell script prompts you to enter the name of the host you wish to shut down. This should adequately prevent you from accidental shutdowns and reboots.

      This shell script passes through the commands to the respective binaries in /sbin and should thus not get in the way if called non-interactively, or locally.

    22:56:13 rock:~ > sudo shutdown -r 5
    W: molly-guard: SSH session detected!
    Please type in hostname of the machine to shutdown: box
    Good thing I asked; I won't shutdown rock ...
    W: aborting shutdown due to 30-query-hostname exiting with code 1.

    (I only have it installed on my server, so getting the question is enough to make me hit ^C. Also, my prompt is yellow on my home PC, red on my work PC, cyan on servers, and includes the hostname, so I'd need to be really tired to make a mistake.)

  • Comment removed (Score:5, Informative)

    by account_deleted ( 4530225 ) on Sunday September 06, 2009 @06:05PM (#29334699)
    Comment removed based on user account deletion
  • Re:Good luck (Score:1, Informative)

    by Anonymous Coward on Sunday September 06, 2009 @07:08PM (#29335097)

    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.

    It's not about the money: it's about the waste of power.

    My solution: dump the AGP card in a bag and tape it to the inside of the box. When stuff goes wrong plug it back in, fix the problem, then unplug it. Not an elegant solution, I know, but functional, cheap, easy, and energy efficient.

  • by Cassini2 ( 956052 ) on Sunday September 06, 2009 @10:54PM (#29336479)

    Question, are the USB serial adapters properly supported in linux (or Windows) yet? The last time I tried one the drivers were crap and it wouldn't work above 1200 baud.

    In general, USB Serial under Windows is horrible. Windows XP has many USB serial ports with buggy drivers. Most devices that I tested had either data corruption issues, or simply wouldn't do high baud rates, or both. If you use the FTDI chipset based devices, then at least no data corruption occurs at high baud rates. All of the drivers that I used would fail if the USB device was disconnected while RS-232 communication was occurring, and then reconnected again. To recover, Windows XP either had to be rebooted, or the USB port reassigned to a different COM port number. A reboot for a USB driver???

    Also, many older specialty programs won't work with USB serial ports. Essentially, Microsoft slightly changed the behavior of the polled mode ReadFile/WriteFile calls, so USB serial ports behave differently than built-in serial ports. This breaks old software.

    USB serial ports under Windows for antiquated embedded / real-time applications can be a real nightmare. The only success I had at high baud rates was with the FTDI chipset and drivers. Even they, broke old software, and required a reboot if the USB device was unplugged during communications.

    And you are worried about Linux driver support? I'm pretty sure that this is one of those cases where Linux works better than Windows.

  • by Cato ( 8296 ) on Monday September 07, 2009 @03:24AM (#29337707)

    For P4s and Celeron Prescott/Northwood using same technology, just install cpufreqd and make sure it's using the ondemand governor. cpufrequtils is also useful and doesn't clash. The actual work is done by the kernel module p4_clockmod, must be in /etc/modules.

    This makes some difference to power consumption. As for temperature, the best thing I did was to remove the old thermal paste on the CPU/cooler and apply some new Zaward paste - CPU temperature dropped by 20 degrees C (something like 30F).

  • Re:iLO (Score:2, Informative)

    by Slashcrap ( 869349 ) on Monday September 07, 2009 @05:19AM (#29338177)

    Have a look on ebay for a compaq iLo PCI card. This is a network-attached video card (also providing keyboard and mouse) allowing an administrator to get an actual screen (like VNC) over a network connection.

    You'll have access to bios as well!

    This would be a good idea if the machine was an HP server and literally the worst fucking idea I've ever heard if it isn't. An iLO card will work in certain HP servers, an RSA card will work in certain IBM servers and a DRAC card will work in certain Dell servers. A generic card which will work in anything does not exist. These things aren't generic peripherals.

  • Re:Good luck (Score:3, Informative)

    by KillerBob ( 217953 ) on Monday September 07, 2009 @07:41AM (#29338761)

    Most low-end motherboards come with some sort of on-board GPU.

    Fixed that for you. :) Most high-end motherboards don't have an on-board GPU, because most people who'd be willing to spend $250 on a motherboard (when you can get one for $60) probably won't balk at buying a discrete graphics card, and in fact, probably plan on buying a discrete graphics card anyway, because integrated graphics tend to be a generation or two out of date.

    If I were building my own server, I'd make sure to get a motherboard that had on-board graphics (as long as chipset and I/O were up to snuff). If I were re-tooling old hardware, it's a coin toss as to whether I'd have on-board graphics. Point of fact, the only systems I have ever bought that had onboard graphics were purpose built for something that doesn't require gaming. They're both HTPCs, and they're both still in use.

  • Re:Serial console (Score:3, Informative)

    by icebike ( 68054 ) on Monday September 07, 2009 @07:39PM (#29345071)

    A vga card just does not draw that much.

    Running headless, there would be a static image or black screen shown. Why would anything be drawing to the screen?

    (There is no reason any sane person would run a screen saver on a headless system, or even use runlevel 5).

    If he wanted to do Folding At home with his GPU he wouldn't be yanking out the AGP card now would he!?!??

    Substituting a trash-bin VGA card, (which every harware hacker has 8 or 10 of in the back room) saves power over anything with a smart GPU, and saves all the power that is worth saving while still preserving a monitor hook-up capability for emergencies.

    Leaving the current AGP cards in place running at the run-level 3 black screen saves just about as much. The card is not doing anything.

This file will self-destruct in five minutes.

Working...