- Create a Linode instance [linode cloud dashboard]
- Remove all disk [linode cloud dashboard]
- Remove all configurations [linode cloud dashboard]
- Create 2GBs sized RAW disk, label boot [linode cloud dashboard]
- Create 2GBs sized RAW disk, label installer [linode cloud dashboard]
- Installer profile [linode cloud dashboard]
- Label: Installer.
- Kernel: Direct Disk.
- /dev/sda: Boot disk image.
- /dev/sdb: Installer disk image.
- root / boot device: Standard /dev/sdb.
- Boot profile [linode cloud dashboard]
- Label: Boot.
- Kernel: Direct Disk.
- /dev/sda: Boot disk image.
- root / boot device: Standard /dev/sda.
- Remove all Filesystem/Boot Helpers.
-
Boot into Rescue Mode with your Installer disk mounted to
/dev/sda
, and connect to your Linode using the Lish Console. -
Place the image to the previously created Installer disk.
curl http://ftp.debian.org/debian/dists/testing/main/installer-amd64/current/images/netboot/mini.iso | dd of=/dev/sda
-
Empty the cache so that you have enough space to unpack and install the image.
sync; echo 3 > /proc/sys/vm/drop_caches
- Boot into the Installer profile, and connect to your Linode using the GLish Console.
- Do installation
- Manually do the disk partitioning and let the installer to devide the /dev/sda according its needs.
- Do not install any GUI desktops.
- Install the SSH server.
-
Boot into the Boot profile, and connect to your Linode using the GLish Console.
-
Update the following settings in your
/etc/default/grub
file.GRUB_TIMEOUT=10 GRUB_CMDLINE_LINUX_DEFAULT="" GRUB_CMDLINE_LINUX="console=ttyS0,19200n8 net.ifnames=0"
-
Re-generate the grub configuration.
update-grub
-
Update the following settings in your
/etc/systemd/network/05-eth0.network
file.[Match] Name=eth0 [Network] DHCP=yes IPv6PrivacyExtensions=false
-
Restart the Linode and check that networking works.
-
Create a new ext4 disk. The new disk should be large enough to accommodate the root filesystem that was created on your raw disk. You can make this as large as you’d like, but you should leave enough space for a separate swap partition. Name this disk Root. [linode cloud dashboard]
-
Create the second new disk and choose swap for the disk type. The size of this disk will depend upon your needs, but it’s recommended that you make it between 256-512MB to start. Name this disk Swap. [linode cloud dashboard]
-
Create a new configuration profile and it will use the following options:
Production profile [linode cloud dashboard]
- Label: Production.
- Kernel: GRUB 2.
- /dev/sda: Root disk image.
- /dev/sdh: Swap disk image.
- root / boot device: Standard /dev/sda.
- Remove all Filesystem/Boot Helpers except the Disable updatedb.
-
You should still be booted into your Boot profile using direct disk boot; if not, boot into it now.
-
Before you update your
/etc/fstab
file, make sure you know the current root partition of your custom distro. You can use thelsblk
command to confirm which partition has/
as its mount point:root@custom-kvm:~# lsblk ... └─sda2 8:1 0 7.5G 0 part / ...
-
Next, update your
/etc/fstab
file to match the following:/dev/sda / ext4 noatime,errors=remount-ro 0 1 /dev/sdb none swap sw
-
Note that you’re using
/dev/sda
instead of thesda2
root partition that was identified previously.
-
Now that you’ve updated the necessary configuration files, you’re ready to move your root filesystem to the ext4 disk you created previously. To get started, boot your Linode into Rescue Mode with the following disk assignments:
- Boot disk mounted to
/dev/sda
. - Root disk mounted to
/dev/sdb
.
- Boot disk mounted to
-
In Rescue Mode, connect via Lish and transfer your root filesystem from the
/dev/sda2
partition to your new ext4 disk:dd if=/dev/sda1 of=/dev/sdb bs=1M
-
Boot your Linode into Rescue Mode with the following disk assignments:
- Root disk mounted to
/dev/sda
.
- Root disk mounted to
-
Mount all required items.
mount /dev/sda /mnt mount --bind /dev /mnt/dev mount --bind /proc /mnt/proc mount --bind /sys /mnt/sys
-
Re-generate the grub configuration.
chroot /mnt update-grub
Boot your Linode into the Production profile.