Remote touchless install with a static IP?
Holland, Jake
jholland at akamai.com
Wed Sep 30 05:20:03 CEST 2020
Greetings,
I'm looking at FAI, and I think I can almost figure out how to do
what I want, but I thought I'd ask for some advice here since I
haven't been able to find the last few bits in the docs or
examples.
I'm trying to do a new install of any sane linux to a remote
machine where I don't have physical access.
My target machine is starting as an unusual and disturbingly old
build (an ubuntu 14.04 with a custom kernel) that's missing many
of the normal basics you'd expect to be there, and for complicated
reasons I can't fix, an ordinary do-release-upgrade path does not
work (there are a number of key packages suppressed by some kind of
jail the root user is in).
However, I do have curl, grub 2.02, ssh access with root, and the
power to mount things, plus disk space I can blow away. So I'm
thinking I can get to where I want to be by installing from an FAI
iso image and using a manual grub menuentry for the iso like they
describe in
https://help.ubuntu.com/community/Grub2/ISOBoot
But it looks like the FAI docs really want me to use dhcp, and I
cannot do this thing. I don't have control of the environment there
where the machine is located. If that's truly a requirement for FAI,
I'll have to find another way.
But I'm hopeful I can get this to work, because FAI seems to have
*almost* everything I need, and is a lot closer than, say, an ubuntu
server iso as a starting point for a remote install where I won't be
able to use a console or keyboard.
I found an old mailing list post that said this worked once for
someone:
https://lists.uni-koeln.de/pipermail/linux-fai/2014-July/010657.html
I'm trying to figure out how to make something similar work for me
now, though I'd rather use a local iso mount than nfs for this.
I found a few things in the FAI iso that look like they can do what
I want, but I'm not sure how to make them happen.
Specifically, I pulled down a Debian 10 (buster) FAI image, mounted
it, mounted the LiveOS/squashfs.img inside that, and then mounted the
LiveOS/ext3fs.img inside that.
Inside that at the var/lib/fai/config/scripts/DEBIAN/30-interface
file, I see some promising support for METHOD=static, both in
netplan_yaml and in iface_stanza. (I could not find this file in
the fai github repo, but if you want to see the code I'm talking about,
it was pasted in an earlier message here:
https://lists.uni-koeln.de/pipermail/linux-fai/2018-May/012019.html )
What I'm confused about at this point is how to set the variables
those things depend on, such as METHOD=static, and IPADDR, NETMASK,
GATEWAYS, and BROADCAST as my target's current values, in the way
that makes them get picked up during the installation.
I get the impression it's possible to do this from the grub menuentry,
but I haven't figured out how yet (Perhaps export? But I'm not sure,
this seems a different use than the examples the grub docs give.)
I'm going to start doing some trial and error on this in the morning
with some local machines that I do have physical access to, and that
I can bring back to the same state as my target machine after I break
them.
But if there's anyone out there who knows the magic syntax I should
use, or who can make a good suggestion of things to try, I would be
very grateful.
I'm not very familiar with grub, so I'm expecting this will be a long
and painful trial and error process unless someone comes to the rescue
with a good suggestion. So I thought I'd send out this plea before I
begin.
Wish me luck, and please send advice if you're able. I'll try to post
again if I find something that works.
Cheers,
Jake
More information about the linux-fai
mailing list