This tutorial will guide you through the steps needed to have Arch Linux running on your VC1 instance.
Note: I copied the initial steps of this tutorial from the OpenBSD on a VC1 post, so thanks to zed for that.
Lets get started:
First you need a fresh VC1 instance with any of the available Linux distributions, it doesn’t really matter which one because it will get completely erased (I use Alpine Linux because is a lightweight distro and it gets created very quick).
Note: it doesn’t need to be a fresh instance, you can use an already running one, but remember that we will delete everything from it prior to installing arch, so backup everything you don’t want to loose to a separate volume or download to your local machine.
Now open the server on which you will install arch on Scaleway’s dashboard, in the server dashboard open the console and hit enter to get the login prompt.
The next steps should be done really quick because the initial loading is fast and does not give you much time to go to iPXE console.
- Open an SSH session to the server.
- Reboot the server over SSH.
- Switch to the console on Scaleway’s dashboard.
- Press CTRL+b on your keyboard.
If done properly you should no be on iPXE console and have a prompt like
dhcp and hit enter, this step is for PXE to configure the network and get internet access.
iPXE> dhcp Configuring (net0 de:19:44:0d:50:01)...... ok iPXE>
Note: in the previous snippet between parentheses is your MAC address, so it will be different to the one posted here.
This will load the arch installation iso so we can boot from it, it takes some time for the download to finish.
Note: the link to the iso posted here might go offline or get outdated, just go to the official arch linux downloads page, select a mirror from the France section and replace the link with a new one, just make sure is an iso image.
iPXE> dhcp Configuring (net0 de:19:44:0d:50:01)...... ok iPXE> initrd http://archlinux.polymorf.fr/iso/2016.10.01/archlinux-2016.10.01-dual.iso http://archlinux.polymorf.fr/iso/2016.10.01/archlinux-2016.10.01-dual.iso... ok
chain http://boot.salstar.sk/memdisk iso raw
This will bootstrap PXE to memdisk and the iso will boot.
Note: I got a strange behavior on this step, the characters on the screen got repeated, but it does not affect the installation in any way, just follow the steps.
Now you should be at your standard arch linux boot prompt where you can select which architecture to install, use the arrow keys to select either 32bit or 64bit installation and hit
TAB on your keyboard, this will allow you to edit the kernel parameters before booting to it.
console=ttyS0,115200 (there’s a space before console there) and hit return.
Now you are at the archiso login prompt, type
root and hit enter.
Note: the next step is optional, it will allow you to continue the installation over SSH and use copy/paste, but you can skip it and continue using Scaleway’s console.
Now you will start the SSH server
passwd and hit return, input a secure password when prompted, twice, and remember it.
systemctl start sshd and hit return.
Now you can log in to your server over SSH usin user root ans the password you entered.
Now you will install arch linux to the root dir
Remember I told you to backup important files, last chance… enter the following comands:
root@archiso ~ # mount /dev/vda /mnt root@archiso ~ # rm -rf /mnt/* zsh: sure you want to delete all the files in /mnt [yn]? y root@archiso ~ # pacstrap /mnt base base-devel openssh
pacstrap finishes installing all the packages we need to do the basic system configuration.
You will need the name of your server, scw-###### if you used the default, or whatever you named it otherwise. Also you need to change the
en_US.UTF-8 locale to your needs.
root@archiso ~ # arch-chroot /mnt root@archiso ~ # passwd # set a strong password here New password: Retype new password: passwd: password updated successfully root@archiso ~ # echo "my_server_name" >/etc/hostname # change "my_server_name" to your actual server name root@archiso ~ # echo "LANG=en_US.UTF-8" >/etc/locale.conf root@archiso ~ # sed -i 's/^#\(en_US.UTF-8 UTF-8\)/\1/g' /etc/locale.gen && locale-gen Generating locales... en_US.UTF-8... done Generation complete. root@archiso ~ # ln -s /usr/share/zoneinfo/Europe/Paris /etc/localtime root@archiso ~ # systemctl enable sshd root@archiso ~ # systemctl reboot