[ale] Headless, Consoleless, DVDless, NetInstall? was: Fedora NetInstall via USB Drive

Brian Pitts brian at polibyte.com
Fri Apr 17 13:28:29 EDT 2009


Richard Bronosky wrote:
> Okay, I'm pretty impressed with the level of expertise I've seen. I
> figure I might as well try this pipe dream out on y'all.
> 
> I have a bunch of servers hosted with Peer1 "Managed*" Hosting. They
> do not give console access, so installing my own OS, setting up LVM,
> etc. requires that I pay them to do it for me. Once I have them
> install said OS, I have full control over it, but only via SSH - no
> console. It sounds to me like, as I add servers I ought to be able to
> take their bulky default LAMP stack they give for free. Drop a few
> things in carefully chosen places. Reboot. Ideally, I'd like the
> install process to start sshd very early so that I can handle
> exceptions or install interactively. I [loosely] understand the
> kickstart concept, but since this is a server that I have no physical
> access to, I'd like SSH access early.
> 

I gather from previous responses that this is doable with Red Hat. It's
also possible with Debian or Ubuntu.

First, you need to get the minimum files needed to start the installer.
For the latest Ubuntu, you can do that here [0]; for Debian, here [1]
You'll need to create a boot entry for the extracted files in GRUB and
make that the default.

To set a static ip address and activate ssh, you'll need to preseed [2]
the installer. Preseeding is the Debian equivalent of kickstart. There
are several different ways that the installer can load a preseed file.
Normally I just load one from the web or a local file, but in your case
I think the most appropriate way is to create a file named preseed.cfg
and place it in the root of the initial ramdisk (initrd). This page [3]
includes the commands needed to extract and rebuild the initrd; it's
just a gzipped cpio archive.

Here [4] is the comprehensive list of preseed options that affect the
installer. I think a good starting point for your preseed.cfg might be

# Locale sets language and country.
d-i debian-installer/locale string en_US
# Keyboard selection.
d-i console-tools/archs select at
d-i console-keymaps-at/keymap select us
# use any active network interface
d-i netcfg/choose_interface select auto
# static network configuration
d-i netcfg/disable_dhcp boolean true
d-i netcfg/get_nameservers string 192.168.1.1
d-i netcfg/get_ipaddress string 192.168.1.42
d-i netcfg/get_netmask string 255.255.255.0
d-i netcfg/get_gateway string 192.168.1.1
d-i netcfg/confirm_static boolean true
# set the hostname and domain
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
# enable ssh access to the installation
d-i anna/choose_modules string network-console
d-i network-console/password password r00tme
d-i network-console/password-again password r00tme

You could then interactively complete the installation over ssh. If
you're setting up multiple similar machines, I'd just add more preseed
commands to fully automate the installation.

As Jim said, it's crucial to extensively test an endeavor like this
locally before doing it remotely.

I gave a presentation on preseeding to the UGA LUG Thursday night; my
slides are available for viewing and download [5]. The debian docs are
probably more informative without my rambling to accompany the slides,
though.

[0]
http://archive.ubuntu.com/ubuntu/dists/intrepid/main/installer-i386/current/images/netboot/
[1]
http://debian.mirrors.crysys.hu/dists/lenny/main/installer-i386/current/images/netboot/
[2] http://wiki.debian.org/DebianInstaller/Preseed
[3] http://wiki.debian.org/DebianInstaller/Preseed/EditIso
[4] http://d-i.alioth.debian.org/manual/en.i386/apb.html
[5] http://www.uga.edu/chugalug/meetings/2009-04-16.php

-- 
All the best,
Brian Pitts


More information about the Ale mailing list