How to update Zos boot USB remotely with iLO

Hello farmers,

I’d like to share a technique I developed for overwriting a node’s boot USB over the network using the iLO management system in HPE machines. A similar process might work with other systems like Dell’s iDRAC but I can’t speak to that. Also, I’ll be showing screenshots from iLO 4 and things might look different on a different version.

My two HPE mini servers are in the basement at my house, and sometimes I need to change their boot media to test something (like the farmerbot most recently). Rather than walk down there and disturb the spiders, I cooked up this method to boot a live Linux image and write the new media to the USB sticks.

Prep

Here’s what you’ll need:

  1. HPE system with iLO that you have access to (network connection and login credentials)
  2. Some live Linux ISO file to boot using the virtual media function. Small is best and I found that the Alpine Linux standard image works well. Get it here, Standard > x86_64
  3. Your new boot media in .img format. Go to bootstrap.grid.tf and download either the EFI USB or the legacy USB option, to match whatever boot method you’re already using

iLO remote console

When you log into iLO, you’ll see the default page as shown below (or if not, select it). We want to open the HTML5 remote console using the link in the center of the page. If you don’t see that one, then do an update on iLO.

The console screen will open. In the upper left you’ll see a disk icon. Click it, and then under CD/DVD, click Local *.iso file. Now you’ll have a chance to select a file from your local computer. Select the Alpine Linux iso file you downloaded earlier.

image

After that, navigate to the Boot Order menu on the left under Virtual Media. Select CD/DVD Drive, then hit Apply. Now you can press Server Reset to reset the system. Note that you could also just reboot via the remote console and use the on screen menu to choose the CD/DVD drive as boot device, if you want.

Now the system is going to boot up, and if everything goes will it will boot from that Alpine Linux iso. This can take a while, since the iso is being uploaded from your computer over the network. Give it some time, and you should eventually see a login prompt.

image

Just type root and hit enter. There is no password. If you ever have trouble typing into the remote console, just try closing it and opening it again. You’ll pick up right where you left off.

The next thing to do is check the disks connected to the system and figure out which one is your boot USB. Assuming you don’t have any other disk with the same size as the USB stick, just using the size is the easiest thing to do.

Run fdisk -l and inspect the output. Look for the lines that start with Disk, as highlighted below:

In this case, I know that my USB stick is 1gb, so I can positively identify it as /dev/sdc based on the size. You’ll also notice the type on the right side is listed as Win95 FAT16 only for this disk. Since Zos doesn’t use that type, this is a good hint too.

Now we’ll attach our new boot media using the same menu in the remote console that we used to attach the iso. Just choose Floppy this time:

image

Select the .img file from your local computer. Then you can run fdisk -l again. You should see a new disk, in this case it’s /dev/sdd:

To be sure, check the size: 2mb for the Zos boot image. Now copy the image to the USB stick with dd. Set the input file to the new boot image (/dev/sdd in this example) and the output file to the USB stick (/dev/sdc):

dd if=/dev/sdX of=/dev/sdY

It will work for a bit, then show this output when finished:

image

When that’s complete, you can reboot the system, either by typing reboot in the console or by issuing a reboot command through iLO (hamburger menu in the remote console window, or power section in the bottom right, for example). Before you do this, use the media menu to eject the .img file, just to make sure that the system actually boots from the USB stick:

image

Finished

The system should boot up with the new boot media. Keep an eye on the remote console screen to make sure that the Zos bootstrap that you intended to use was successfully copied on to the USB stick.

Did it work for you? Do you know a better way? Let me know in the replies :slight_smile:

2 Likes

Interesting concept. To piggy back on this, how should we retain info like this? The forum is a great way to “publish” new info, but not find it. Is the existing manual good for this, or maybe a wiki?

1 Like

It’s a good question. One idea that’s been kicking around is to “graduate” forum posts of sufficient merit into the manual. It’s relatively simple to do since both use markdown.

The only question is around how much content we want to absorb and maintain in the manual. Forum posts have a date stamp and it’s expected that some will fall out of date. The manual, on the other hand, should be kept current.

1 Like

I agree with you @FLnelson . This guide is very nice and would be a great addition to the manual.

We are restructuring the manual and also moving the old library to the manual. The goal is to have everything organized and as simple as can be: the TF manual, the TF website (threefold.io) and the TF forum.

I think there’s definitely something we should do about all the good stuff in the forum.

For example here are two propositions, that aim at resolving some of the potential downsides discussed by @scott .

  1. We have a section in the manual where we posts links to the tf forum content
    1. so we can better organize the tf forum and link the tf forum and the manual together, without having to keep all the tf forum stuff up to date in the manual.
  2. We take (some of) the guides from the tf forum and put them in the manual, with some light editing to make sure it fits the manual’s presentation (as Scott said it’s already in markdown so no big leap needed). We could indicate on each TF guide from the forum, now in the manual, the date it has been checked/written, so if they “fall” out of date, as Scott wrote, at least it would be documented/knowable. (e.g. post written/checked 09/06/23)

We can have variants on these 2 propositions.

For now, I think we could start a forum thread where we list all the good stuff of the forum that would be a good addition to the TF manual, and then we can check such posts and transfer them to the manual.

If it’s advanced stuff like this guide, it can be in the Farming, Advanced section (so level 2 of this architecture).