I have a situation similar to Oli's Question.
What I have are small Ubuntu hosts that perform like kiosks and they need a complete rebuild. The technician will attach a USB keyboard and USB stick. They will boot the USB stick, a task they've done before, and then four tasks will happen.
- A few files from the local SSD will be saved to the USB. Can this simply be a different partition on the USB, mounted rw?
The local drive will be completely overwritten with a new image.
dd if=generic-image of=local-SSD bs=1M
Restore the saved files.
- Reboot. The BIOS/uEFI boot order lists the local SSD first, so it won't boot from the USB.
The kiosks only have one 32 GB SSD, so my image will be around 32 GB in size. Boot order lists the local SSD first. If these devices are connected to a network, it can be unreliable, so Internet downloads aren't an option.
I can make a bootable USB, but where do I go from there? Modify some GRUB line to run a special script? (This seems simplest, but how?) Modify some systemd service to run once? (How?) Force Anaconda to use a simple ks.cfg that only uses %pre and %post without any %package? (How would I setup Anaconda? I've done kickstart files before, but never with no %package section.)
In the MS-DOS days, I'd have a bootable floppy disk and modify autoexec.bat to do tasks 1, 2, and 3. This can't be that hard with all the Linux tools at my disposal.
No comments:
Post a Comment