Remotely kicking a CentOS install through ligthweight 1Mb iso image
source link: https://arrfab.net/posts/2017/Apr/13/remotely-kicking-a-centos-install-through-ligthweight-1mb-iso-image/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
As a sysadmin, you probably deploy your bare-metal nodes through kickstarts in combination with pxe/dhcp. That's the most convenient way to deploy nodes in an existing environment. But what about having to remotely init a new DC/environement, without anything at all ? Suppose that you have a standalone node that you have to deploy, but there is no PXE/Dhcp environment configured (yet).
The simple solution would be to , as long as you have at least some kind of management/out-of-band network, to either ask the local DC people to burn the CentOS Minimal iso image on a usb stick, or other media. But I was in a need to deploy a machine without any remote hand available locally there to help me. The only things I had were :
- access to the ipmi interface of that server
- the fixed IP/netmask/gateway/dns settings for the NIC connected to that segment/vlan
One simple solution would have been to just "attach" the CentOS 7 iso as a virtual media, and then boot the machine, and setup from "locally emulated" cd-rom drive. But that's not something I wanted to do, as I didn't want to slow the install, as that would come from my local iso image, and so using my "slow" bandwidth. Instead, I directly wanted to use the Gbit link from that server to kick the install. So here is how you can do it with ipxe.iso. Ipxe is really helpful for such thing. The only "issue" was that I had to configure the nic first with Fixed IP (remember ? no dhcpd yet).
So, download the ipxe.iso image, add it as "virtual media" (and transfer will be fast, as that's under 1Mb), and boot the server. Once it boots from the iso image, don't let ipxe run, but instead hit CTRL/B when you see ipxe starting . Reason is that we don't want to let it starting the dhcp discover/offer/request/ack process, as we know that it will not work.
You're then presented with ipxe shell, so here we go (all parameters are obviously to be adapted, including net adapter number) :
set net0/ip x.x.x.x set net0/netmask x.x.x.x set net0/gateway x.x.x.x set dns x.x.x.x ifopen net0 ifstat
From that point you should have network connectivity, so we can "just" chainload the CentOS pxe images and start the install :
initrd http://mirror.centos.org/centos/7/os/x86_64/images/pxeboot/initrd.img chain http://mirror.centos.org/centos/7/os/x86_64/images/pxeboot/vmlinuz net.ifnames=0 biosdevname=0 ksdevice=eth2 inst.repo=http://mirror.centos.org/centos/7/os/x86_64/ inst.lang=en_GB inst.keymap=be-latin1 inst.vnc inst.vncpassword=CHANGEME ip=x.x.x.x netmask=x.x.x.x gateway=x.x.x.x dns=x.x.x.x
Then you can just enjoy your CentOS install running all from network, and so at "full steam" ! You can also combine directly with inst.ks= to have a fully automated setup. Worth knowing that you can also regenerate/build an updated/customized ipxe.iso with those scripts directly too. That's more or less what we used to also have a 1Mb universal installer for CentOS 6 and 7, see https://wiki.centos.org/HowTos/RemoteiPXE , but that one defaults to dhcp
Hope it helps
Recommend
-
60
Last week, we shared our 2018 roadmap preview and today, we’re excited to announce the first of many new updates for developers: new Droplet plans. We know that price-to-performance is an important consideration when choosing where to host your...
-
49
Get ready for #AndroidDevSummit, kicking off November 7! ...
-
37
Unity is starting 2019 off right by launching into our 2019 Developer Day Tour which features both the Americas and EMEA! Unity’s Evangelism Team is out in full force across the globe to provide you with top qual...
-
50
A new area in artificial intelligence involves using algorithms to automatically design machine-learning systems known as neural networks, which are more accurate and efficient than those developed by human engineers. But...
-
9
Home » News » WhatsApp is kicking up a stink about Apple’s App Store privacy labels
-
18
Remotely reinstalling a node on CentOS 8 with DuD (Driver Disk Update /...
-
10
Kicking the habit of WM_CONCAT for a delimited list of rows, with LISTAGG Posted on May 2...
-
7
Install GIMP Image Editor on CentOS 8This tutorial will discuss the steps followed to Install GIMP 2.x on CentOS 8 / RHEL 8 Desktop Linux distribution. GIMP (GNU Image Manipulation Program) is an cross-platform, open source i...
-
8
Remotely install CentOS 5.1 on a Hetzner dedicated serverI recently had to setup CentOS 5.1 x86_64 on a remote Hetzner dedicated server . CentOS is not listed in the supported distributio...
-
11
Windows 11 build 22000.917 lets IT admins install lanuages remotely Microsoft is rolling out a new cumulative update for
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK