2

I have to automate the installation of a Linux image. The perfect behavior would be that I plug the USB, turn on the device and it runs the dd command in order to flash the image stored in the USB into the device. Ideally only the USB port can be used.

What I think maybe could be done is to launch a script from the USB that changes the configuration of the device and copies a .sh file, reboots it and uses that .sh file at the beginning to, using the dd command, flashes the image that is stored in the USB into the device.

5
  • 3
    This has been asked before, and it's rather risky (in my opinion). If it was plugged into any computer and booted it would wipe clean the system it was booted into replacing it with the 'new' image.
    – guiverc
    Jul 16, 2019 at 9:40
  • 2
    At a recycler I volunteered at we had a (uncased) 'box' which when turned on booted it's first hdd (40gb) and cloned the installed Ubuntu [image] onto all other drives that were plugged into. That first disk could have been a thumb-drive, but we called it our cloning system. The disks could be any size (>=40gb), but when completed we just turned 'box' off & moved the drives to their new boxes & performed final-tuning script which was our QA anyway & added any extra drivers if required. A 'box' like that I feel is less risky than a thumb-drive; but removing & adding disks we were doing anyway.
    – guiverc
    Jul 16, 2019 at 9:56
  • Maybe this link can help you.
    – sudodus
    Jul 16, 2019 at 10:58
  • Thanks for the info! Although the solution given implies manipulate the target computer and the goal is to do it in a non-interactive way. would clonezilla server edition maybe useful? Jul 16, 2019 at 12:34
  • I use Clonezilla, but not the server edition. Maybe it will be a good option, but I would guess that some interactive actions will be necessary.
    – sudodus
    Jul 16, 2019 at 13:13

0

You must log in to answer this question.

Browse other questions tagged .