Home | News | Download | Packages | Forum | Wiki | Github

Guide: How to install Void on an OVH VPS


(Jannis Christ) #1

This guide aims to be beginner-friendly because I think that many users want to run their own virtual server on Void but I do not know any hoster that supports it yet.
It only covers the glibc-based variant, if you need help with musl just ask and I will add all the required steps.
Feel free to respond with your suggestions.

  1. Reboot your server to rescue mode from the OVH Manager (it’s a Debian image with a few tools and full disk access):
  2. select expert mode
  3. open the reboot my VPS dialog, select rescue mode and confirm
  4. wait a few minutes, you will then receive the password via e-mail
  5. ssh into the rescue image
  6. Prepare a Void chroot environment to install from (we need need the xbps for the installation and it is not currently available for Debian)
  7. unmount the virtual drive with the previous installation (it’s automounted in rescue mode):
    umount /dev/vdb1
  8. Grab the latest Void rootfs image, e.g.:
    wget https://repo.voidlinux.eu/live/current/void-x86_64-rootfs-20160420.tar.xz
  9. extract the image into a new directory:
    mkdir void-rootfs tar xf void-x86_64-musl-rootfs-20160420.tar.xz -C void-rootfs
  10. bind /sys, /proc and /dev into the image so that it can access disks and other hardware:
    mount --rbind /sys void-rootfs/sys mount --rbind /proc void-rootfs/proc mount --rbind /dev void-rootfs/dev
  11. Copy the OVH-specific resolv.conf that is needed for internet connection:
    cp /etc/resolv.conf void-rootfs/etc/
  12. Finally chroot:
    chroot void-rootfs
  13. You should now have access to all xbps applications, e.g. xbps-install and the virtual disks, e.g. with lsblk -f
  14. Perform a manual Void installation to the disk
  15. Configure the virtual drive. Bear in mind:
    Just one partition was used by the preconfigured images from OVH. This way you don’t waste any space on the disk and you can also create a swapfile later which is even more flexible than a complete LVM setup with a swap partition. XFS did not seem to work for some reason, but ext4 is also reliable:
    mkfs.ext4 /dev/vdb1
  16. mount it:
    mount /dev/vdb1 /mnt
  17. install the base system and GRUB to the virtual drive
    xbps-install -S -R http://repo.voidlinux.eu/current -r /mnt base-system grub
  18. Do the required post-istallation tasks
    Now you have to chroot into the new installation so some steps will seem familiar:
  19. bind /sys, /proc and /dev into the new installtion:
    mount --rbind /sys /mnt/sys mount --rbind /proc /mnt/proc mount --rbind /dev /mnt/dev
  20. again the resolv.conf:
    cp /etc/resolv.conf /mnt/etc/
  21. chroot into it:
    chroot /mnt
  22. install GRUB:
    grub-install /dev/vdb
  23. enable sshd and dhcpd:
    ln -s /etc/sv/sshd /etc/runit/runsvdir/default ln -s /etc/sv/dhcpcd-eth0 /etc/runit/runsvdir/default
    Note: eth0 is in fact the virtualised network interface (no new naming convention like enp1s0)
  24. ensure ssh access, either:
    • for password login comment out #PasswordAuthentication yes in /etc/ssh/sshd_config
    • for public key authentication create the directory /root/.ssh and add the content of your local ~/.ssh/id_ed25519.pub to /root/.ssh/authorized_keys
  25. add the required lines for your disk setup to /etc/fstab, in my example /dev/vda1 ext4 defaults 0 0.
  26. set and rebuild glibc locale:
    echo "LANG=en_US.UTF-8" > /etc/locale.conf echo "en_US.UTF-8 UTF-8" >> /etc/default/libc-locales xbps-reconfigure -f glibc-locales
  27. optimize dracut to build a machine-specific initramfs (the generic one as fallback):
    echo "hostonly=yes" > /etc/dracut.conf.d/hostonly.conf
  28. rebuild kernel image:
    xbps-reconfigure -f linux4.6
    (or whatever linux version you installed, you can check with xbps-query --regex -s "linux.\..")
    Note: This will also configure GRUB.
  29. You have to restart your server again from the OVH Manager instead of running reboot so that you don’t boot the rescue mode again

Guide: Installing void on prgmr.com
#2

Thanks for following through jannisch!


(Aditya Goturu) #3

Hi, is anyone interested in a similar guide for installing void linux on prgmr?


#4

Please share as well. Perhaps they can be merged into an ongoing wiki page for running Void on various cloud hosting providers.


(Aditya Goturu) #5

Sure! Just will take a little while, as I need to migrate some stuff off of the vm before I can do that.


(Jannis Christ) #6

A wiki page with multiple hosters and an unopportunistic comparison would be great I think!
If several people are interested, we could also use a thread here on the forums to inform about new entries.


(Aditya Goturu) #7

Well, that took WAY longer than expected… I am currently writing it.


(Aditya Goturu) #8

done. anyway, I am probably going to get my hands on Vultr sometime this month…


(Jannis Christ) #9

Thanks. When you are done with your last tutorial we should create a Wiki page.


(Aditya Goturu) #11

ummm so I got vultr. Not much there. Just stick in the ISO url, boot and install. Nothing special.

Should I write a from-other-live-cd-as-scratch gentoo-style install guide for void?


(Aditya Goturu) #12

Ummm… digitalocean?
Lemme try
(yeah I got a web dev internship thingy so I got a bunch of these…)


(Aditya Goturu) #13

So far it seems like a major pain unless I create a support ticket and tell them to boot the iso…


(Jannis Christ) #14

Do you have any updates @aditya3098?
If you write another guide you should definitely do so in Markdown, as Void tries to replace the wiki with a markdown documentation in the future.

We should really keep up the work since I couldn’t even find this small thread quickly on Bing.

Regards


(Aditya Goturu) #15

So far I have not had any luck without the support ticket, but I am working on modifying https://github.com/gh2o/digitalocean-debian-to-arch to work with void instead…


(Aditya Goturu) #16

Should I whip up a template something for the static-site generator? What are you looking into exactly? I would imagine a command linux client for something like this would be amazing to be included in the default install… And search functionality of some form.


(Jannis Christ) #17

Sorry for the late reply. I actually just forgot to submit it :no_mouth:

I see. The script should at least be well-documented so that users can understand the principles if something in the installation process changes.

No, I just recommend using markdown if you write any content for now. We will see how the initiative develops, maybe we can help in the future.


(Aditya Goturu) #18

Well, 12 dollars later, still working on it