Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Is there any linux image which I can boot from grub, runs in the RAM and provides ssh access?

I need this to setup a remote system to which I don't have console access and the defaults provided don't fit my needs.

share|improve this question
Can you be a bit clearer on what you need to setup? Is there nothing installed on the server at the moment? Or do you have access to an OS currently installed on the server? –  Coops Jul 1 '11 at 11:04

3 Answers 3

If we're talking about normal installation media for installation or diagnostic/recovery purposes, the Debian installer (media, installation guide) can be run over ssh after the console user answers a few questions in expert mode.

This comment includes preseed settings you can use to have the installer automatically start up sshd, reproduced below for a system that will get its address over DHCP:

# Locale sets language and country.
d-i debian-installer/locale select en_US

# Keyboard selection.
d-i console-keymaps-at/keymap select us

### Network configuration
# netcfg will choose an interface that has link if possible. This makes it
# skip displaying a list if there is more than one interface.
d-i netcfg/choose_interface select auto

# Any hostname and domain names assigned from dhcp take precedence over
# values set here. However, setting the values still prevents the questions
# from being shown, even if values come from dhcp.
d-i netcfg/get_hostname string newdebian
d-i netcfg/get_domain string local

# Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
# The wacky dhcp hostname that some ISPs use as a password of sorts.
#d-i netcfg/dhcp_hostname string radish

d-i preseed/early_command string anna-install network-console

# Setup ssh password
d-i network-console/password password install
d-i network-console/password-again password install

You can either use the method given in the link above to put the preseed file directly on the system's boot media, or you should be able to put a URL for the preseed file in the boot configuration.

share|improve this answer

Per Wikipedia, Damn Small Linux offers a version which runs entirely out of the initrd and never pivots over to a full system. I've never actually taken the time to set this up, but it seems like what you're looking for. The Wikipedia page notes that you could even use this initrd to netboot from PXE.

share|improve this answer

The solution that worked very well for me was sysresccd

So here are the steps:

  1. Create a partition of about (500MB) or use an existing one (for this answer I'll use /dev/sda2, for grub it is (hd0,1), and mounted at /rescue)
  2. Mount the sysresccd and copy all files to the root of the partition
  3. Edit your current /boot/grub/menu.lst and add sysresccd to it. Make sure it boots this entry by default (default=0 it you add this at the top of your list)

    root (hd0,1)
    kernel /isolinux/rescue64 rootpass=... ethx=... gateway=... dns=... nodhcp docache
    initrd /isolinux/initram.igz
  4. Reboot and voila! You should be able to do remote system recovery even if it's not provided by your hoster.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.