Alpine Linux on Scaleway ARM64 VPS (ARMv8 SSD Cloud Servers)

3 posts / 0 new
Last post
#1 Mon, 2018-01-22 14:56
ogoudron
  • ogoudron's picture
  • Offline
  • Last seen: 2 months 1 week ago
  • Joined: 2018-01-22

Hello,
Does someone can tell me why Scaleway do not provide Alpine Linux on their ARMv8 SSD Cloud Servers ?
Is it because it does not work ?
Does someone tried to install it by himself ?

I would really like to use Alpine Linux on Scaleway ARMv8 servers because i use it on C1 and all X86 variants.

Bests regards, Olivier.

Mon, 2018-02-19 18:30
Yeocti
  • Yeocti's picture
  • Offline
  • Last seen: 1 month 1 week ago
  • Joined: 2018-02-18

Hi!

I succeeded in installing Alpine on scaleway ARM64. It works without any issues.
Here are the steps...

## Bootstrap Alpinelinux on Scaleway ARM64
 
# Installation
 
x. Boot to rescue mode
x. Format hard drive
	# mkfs.ext4 /dev/vda
x. Mount hard drive
	# mount /dev/vda /mnt
x. Download and extract apk-tools-static for aarch64
	# cd /dev/shm
	# wget <a href="http://dl-cdn.alpinelinux.org/alpine/v3.7/main/aarch64/apk-tools-static-2.8.2-r0.apk
" rel="nofollow">http://dl-cdn.alpinelinux.org/alpine/v3.7/main/aarch64/apk-tools-static-2.8.2-r0.apk
</a>	# tar xvzf apk-tools-static-2.8.2-r0.apk
x. Bootstrap Alpine Linux
	# ./sbin/apk.static --arch aarch64 -X <a href="http://dl-cdn.alpinelinux.org/alpine/v3.7/main/" rel="nofollow">http://dl-cdn.alpinelinux.org/alpine/v3.7/main/</a> -U --allow-untrusted --root /mnt --initdb add alpine-base
x. Download and copy dynamic-getty to Alpine
	# wget <a href="https://raw.githubusercontent.com/scaleway/image-alpine/master/overlay/usr/local/sbin/dynamic-getty
" rel="nofollow">https://raw.githubusercontent.com/scaleway/image-alpine/master/overlay/usr/local/sbin/dynamic-getty
</a>	# mkdir /mnt/usr/local/sbin
	# mv dynamic-getty /mnt/usr/local/sbin/
	# chmod +x /mnt/usr/local/sbin/dynamic-getty
x. Edit /etc/inittab
	# vi /mnt/etc/inittab
	> # /etc/inittab
	>
	> ::sysinit:/sbin/rc sysinit
	> ::wait:/sbin/rc default
	>
	> ::respawn:/usr/local/sbin/dynamic-getty
	>
	> ::shutdown:/sbin/rc shutdown
x. Copy resolv.conf to Alpine
	# cp /etc/resolv.conf /mnt/etc/
x. Setup apk repositories
	# echo <a href="http://dl-cdn.alpinelinux.org/alpine/v3.7/main/" rel="nofollow">http://dl-cdn.alpinelinux.org/alpine/v3.7/main/</a> > /mnt/etc/apk/repositories
x. Chroot into Alpine
	# chroot /mnt /bin/sh
x. Set correct permissions on folders
	# chmod 0755 /etc /usr /usr/local /usr/local/bin /usr/local/sbin
x. Setup root password and SSH key
	# passwd	
	# mkdir /root/.ssh
	# vi /root/.ssh/authorized_keys
	# chmod 0600 /root/.ssh/authorized_keys
	# chmod 0750 /root
x. Reboot
	# reboot
 
# Post installation
 
x. Login and run setup-alpine
	# setup-alpine
x. Setup Scaleway stuffs
	# apk add bash curl tar wget
	# wget -qO - <a href="https://j.mp/scw-skeleton" rel="nofollow">https://j.mp/scw-skeleton</a> | FLAVORS=common,docker-based,openrc bash -e
	# rc-update add scw-hostname
	# rc-update add scw-ssh-keys
	# rc-update add scw-sshd-keys
	# rc-update add scw-swapfile
	# rc-update add scw-sync-kernel-extra
	# rc-update add scw-initramfs-shutdown shutdown
x. Set correct permissions on folders
	# chmod 0755 /etc /usr /usr/local /usr/local/bin /usr/local/sbin
	# chmod 0600 /root/.ssh/authorized_keys
	# chmod 0750 /root

NB: I edited my post with the correct and tested procedure.

Wed, 2018-03-07 13:42
jodumont
  • jodumont's picture
  • Offline
  • Last seen: 16 hours 47 min ago
  • Joined: 2018-02-06

Because Alpine is very small, you could also install it into a VM (via KVM or VirtualBox)

1. such an example I install it on a 2GB hardrive
2. than make a backup of it with dd
3. zip it
4. and scp it into my remote machine which is in rescue mode
5. you just have to restore you backup via dd to your harddrive (generally sdb or vdb, ...)

hint: the command will be something like this : tar xzOf ChromeOS-Flow.tar.gz | dd of=/dev/sdb bs=1M

Log in or register to post comments