Install from ISO manually without booting

Hi all, I have an unusual problem. My VPS provider forces all customers to manually migrate to a new data center. Installing and migrating vyos-config is pretty straightforward, but there is one problem: there is no way to upload a custom image (like vyos rolling) - just a set of predefined images like Debian 12, GRML or Clonezilla.

Is there a way to install VyOS? Here is my current status:

  • Boot VPS with vendor-defined GRML image
  • Create a small 500MB partition on VM disk
  • Mount 500MB disk and download VyOS ISO
  • Mount ISO file as loop device

From here I’m not sure how to proceed. In any case, I still need to create one (or more) partitions and manually unpack the sqashfs file. Also, I need to manually install GRUB. But how exactly do I have to do this with VyOS?

Is there any chance of success? Any help would be greatly appreciated! Thanks!

dd of a qcow2 image to a hard drive will work for this.

Installation from an ISO is possible as well, but it is way longer and more complex, while dd installation is literally one command for the whole process.

What VPS provider? I’ve done this with Linode + DigitalOcean but they both allow some mechanism of custom images with varying levels of difficulty to prepare them.

If you can mount an external volume to the VPS and boot into a recovery mode, then you can dd the VyOS iSO to the boot disk, reboot into that boot disk, install VyOS to the volume, reboot back to the recovery mode, dd the volume to the boot disk. Power off, remove the volume, and then boot into the boot disk and it should be a fresh VyOS install.

If you can get a console, you can do DigitalOcean | netboot.xyz process to get netboot.xyz on there and boot from it. However you need DHCP, if you get a static IP from provider then it won’t be easy to do.

I quick tested the dd qcow2 image to disk and it worked great!

qemu-img dd -f qcow2 -O raw bs=4M if=vyos-1.5-rolling-202407171706.qcow2 of=/dev/vda

Thanks at all for your comments!!

I managed it today, but it wasn’t that easy. The provider is 1and1/ionos. Here is a rough description of how I did it:

  • Create raw image of VyOS according to docs
  • Loop mount it locally to shrink the image size from 10G to ~2G (using gparted), as 10G is a bit too big for the target disk
  • Transfer the shrunk image to a suitable web server
  • Boot the VPS with GRML (any working live Linux will do)
  • Write the image directly to the VM disk (curl ‘http://address.for/your.raw’ | dd conv=noerror,sync bs=4M of=/dev/vda)
  • Use gparted on the running GRML to resize the partition
  • Boot into the new VyOS

Maybe this will help someone who has the same problem :wink:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.