Notes: Migrate Debian Linode to Proxmox





These are old notes from like 2022, but the process is probably still mostly the same. Let me know if there are any issues.

  1. Download your Linode’s disk image.
  2. Import the disk image to an existing VM in Proxmox. Make sure the VM is configured for BIOS boot, not UEFI.

Our Linode image only contains the system partition, that is to say what is normally /dev/sda1 is instead the entire disk, /dev/sda. We’ll need to copy the entire disk’s data to a partition on a new disk so that we can fit a partition layout and therefore a bootloader.

  1. Create another disk of the same size and attach it to the VM.
  2. Download, attach, and boot GParted Live.
  3. Initialize partition table of other disk using MBR format.
  4. Create a partition filling the entire disk and apply the changes.
  5. Time for the terminal!
# Get root shell
sudo su
# Copy the data!
dd if=/dev/sda of=/dev/sdb1 status=progress
# Time to do some config editing...
mount /dev/sdb1 /mnt
# In fstab, comment out the line pointing to the swap partition.
nano /mnt/etc/fstab
# Remove the command line parameters from the GRUB config.
nano /mnt/etc/default/grub
# Install the GRUB bootloader
grub install --boot-directory=/mnt/boot /dev/sdb
# The output it provides is gonna be a bit screwed up for now.
# Edit the file below to replace all `root=/dev/sda` with `root=/dev/sda1`
nano /mnt/boot/grub/grub.cfg

poweroff
  1. Remove the assigned ISO and original system disk image, then boot. You should be able to get to your normal shell.
  2. More terminal!
# Get root again...
sudo su
# Fix the bootloader for real this time
update-grub
# Fix your network interfaces (https://wiki.debian.org/NetworkConfiguration)
nano /etc/network/interfaces
# Fix your APT sources by replacing all instances of `mirrors.linode.com` with `deb.debian.org`
nano /etc/apt/sources.list
# Empty this file and fix your DNS nameservers. You should probably point it to your router if you don't know what you want to put here.
nano /etc/resolv.conf
# Off to the races!
apt update
apt upgrade


Comments are currently disabled.


Enable Comments

By enabling comments, you agree to allow this website to connect to Cusdis and to the Cusdis Privacy Policy.