27

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
  • 8,026

7 Answers7

24

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

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.

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.

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,547
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,736