26

How do you do a headless install of linux? No monitor, no keyboard. Machine has floopy and cd drive. Can I configure a live cd to run sshd with a preconfigured pass or something similar and manage it via that?

Instructions for fedora 8+ would be ace but anything else also welcomed.

Cheers.

crb
  • 7,928
  • 37
  • 53
sleepyjames
  • 163
  • 1
  • 3
  • 9
  • 1
    I made a live-CD based on [Debian live-build](http://live.debian.net/devel/live-build/) for this purpose. When booted from, it started a SSH server and connected to my VPN network so I could log in even if it was behind a firewall. It contained a lot of rescue utilities and it could be also used for installing a new system, but it had to be done manually using [debootstrap](http://wiki.debian.org/Debootstrap) (maybe it'd be possible to include Debian Installer too). If anyone is interested, I can put it somewhere on the web. – Petr Sep 15 '12 at 09:35

7 Answers7

23

For Redhat/CentOS/Fedora, you are looking for kickstart.

For Ubuntu and Debian you want to look at preseeding.

Both work in much the same way by feeding the installer a file that answers all the questions that the installer would normally ask you for. They also allow you to run scripts after the installation has completed, so you can customize the install.

hd1
  • 103
  • 5
  • I don't know about preseeding, but kickstart does require you to enter a command ("linux ks=") at the installation disc's boot menu, so that won't work. – Brad Beyenhof Jun 06 '09 at 21:37
  • 3
    You should be able to add that into grub if you make you own boot cd ( like http://vuksan.com/linux/kickstart_boot_cd.html ) – TonyUser Jun 06 '09 at 21:44
  • 2
    You can easily add kernel arguments in isolinux if you're doing this via CD or pxelinux if you're booting over a network. – David Pashley Jun 07 '09 at 07:28
  • ubuntu supports kickstart, too - https://wiki.ubuntu.com/KickstartCompatibility – warren Nov 07 '09 at 05:53
1

To add a bit more meat to the post from katriel, For CentOS (and may work or at least help for Fedora and RHEL) see the full step by step instructions on how to build a VNC headless install disk here:

http://wiki.centos.org/TipsAndTricks/VncHeadlessInstall

1

OpenSUSE and SLE have AutoYast.

Robert Munteanu
  • 1,542
  • 5
  • 22
  • 38
1

You can have linux (and grub and syslinux) redirect their output over the serial port to another computer, which you can then use to manage the installation. I suspect none of the standard installers will support this immediately, although it's easy enough to change if you're comfortable with rebuilding a distro iso.

kickstart will probably be quicker to setup for you, but it's hard to diagnose problems without any kind of feedback - if your kickstart script fails, you have no idea why.

Daniel Lawson
  • 5,426
  • 21
  • 27
0

You can try booting Headless Knoppix and, once that's running, installing to the running barebones system over ssh. There are lots of solutions for this, so use Google to find your favorite.

Hopefully the machine's BIOS is already set to look to the floppy and/or CD as boot devices before checking the hard drive, otherwise you're going to need to hook up some peripherals just to change that setting.

Brad Beyenhof
  • 544
  • 2
  • 7
0

For a fedora/rhel specific solution, you could create a fedora netboot CD by re-packing the isolinux directory as a bootable CD with mkisofs, while changin the isolinux.cfg file to start a VNC installation by default You should edit the isolinux/isolinux.cfg and add "vnc" to the append directive of the default boot stanza, usually something like this:

label linux
kernel vmlinuz
append initrd=initrd.img ramdisk_size=8192

would turn into:

label linux
kernel vmlinuz
append initrd=initrd.img ramdisk_size=8192 vnc 

you could also add ip=(ip) or ip=dhcp and method=(http|ftp|nfs):// (or whatever you have) so the installer gets a default/dhcp ip address and can find the network installation sources faster

edit: forgot to mention that using a static ip would be easier, 'cause then you know to where to connect with a vnc client

katriel
  • 4,407
  • 22
  • 20
0

I just finished installing Ubuntu server in this way. I started the install locally and finished it up via Putty over ssh. Instructions are here:

http://www.howtoforge.com/ubuntu-home-fileserver

cop1152
  • 2,626
  • 3
  • 21
  • 32