User Tools

Site Tools


qemunet:install:alpine

This is an old revision of the document!


Alpine

Download

$ wget http://dl-cdn.alpinelinux.org/alpine/v3.7/releases/x86_64/alpine-standard-3.7.0-x86_64.iso

Install Alpine

Create a raw disk image and boot the VM…

$ qemu-img create alpine.img 2G
$ qemu-system-x86_64 -enable-kvm -hda alpine.img -cdrom alpine-standard*.iso -boot d -m 512

Then, login as root (no password) and run :

$ setup-alpine

Follow instructions. Select disk “/dev/sda” with “sys” option. When the installation is complete, type “poweroff”.

$ qemu-system-x86_64 -enable-kvm -hda alpine.img -m 512

Then, you can configure Alpine for QemuNet as follow:

qemunet.cfg
# linux alpine
SYS[alpine]="linux"
FS[alpine]="$IMGDIR/alpine.img"
QEMUOPT[alpine]="-localtime -m 512"
# URL[alpine]="https://gitlab.inria.fr/qemunet/images/raw/master/alpine.tgz"

Install Alpine Packages

Once Alpine image is started with Qemu… It will by default launch DHCP client as defined in “/etc/network/interfaces”.

In order to use the edge release (under constant development), you must edit /etc/apk/repositories. Change the version number (such as v3.2) to edge.

#/media/cdrom/apks
http://alpine.mirror.wearetriple.com/edge/main
http://alpine.mirror.wearetriple.com/edge/community
http://alpine.mirror.wearetriple.com/edge/testing

Then:

$ apk upgrade --update-cache --available
$ sync
$ reboot
# install new packages
$ apk update
$ apk upgrade
$ apk add bash bash-doc bash-completion
$ apk add nano emacs-nox
$ apk add iputils iptables iproute2
$ ...

Basic configuration steps:

  1. remove root pasword: $ passwd -d root
  2. set bash as default shell, edit /etc/passwd and replace /bin/ash by /bin/bash
  3. edit /etc/fstab and add this line host /mnt/host 9p trans=virtio,defaults,nofail 0 0 to enable file sharing
  4. disable DHCP… edit /etc/network/interfaces and comment all lines for interface eth0
  5. enable startup script: ln -s /mnt/host/start.sh /etc/local.d/local.start and then rc-update add local default [fail?!?]
# clean & halt
$ rm /etc/resolv.conf
$ history -c
$ poweroff

Install Alpine Desktop

http://wiki.alpinelinux.org/wiki/XFCE_Setup

Note: to install new packages, first enable DHCP in /etc/network/interfaces.

$ setup-xorg-base
$ apk add xfce4 lxdm firefox sudo
$ adduser toto                  # password toto
$ addgroup sudo ; addgroup toto sudo
$ visudo
$ rc-update add lxdm
$ apk add faenza-icon-theme     # for icons
$ reboot  

Biblio

qemunet/install/alpine.1517489263.txt.gz · Last modified: 2024/03/18 15:05 (external edit)