qemunet:install:alpine
This is an old revision of the document!
Table of Contents
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:
- remove
root
pasword:$ passwd -d root
- set bash as default shell, edit
/etc/passwd
and replace /bin/ash by /bin/bash - edit
/etc/fstab
and add this linehost /mnt/host 9p trans=virtio,defaults,nofail 0 0
to enable file sharing - disable DHCP… edit /etc/network/interfaces and comment all lines for interface
eth0
- enable startup script:
ln -s /mnt/host/start.sh /etc/local.d/local.start
and thenrc-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 dbus lxdm sudo $ apk add xfce4 # or alpine-desktop $ apk add firefox $ adduser toto # password toto $ addgroup sudo ; addgroup toto sudo $ visudo # %sudo ALL=NOPASSWD: ALL $ apk add xf86-input-mouse xf86-input-keyboard $ apk add kbd setxkbmap $ setxkbmap fr # for french keybords $ apk add faenza-icon-theme # for icons $ rc-update add dbus ; rc-service dbus start $ rc-update add udev ; rc-service udev start $ rc-update add lxdm ; rc-service lxdm start $ reboot
Biblio
qemunet/install/alpine.1517562633.txt.gz · Last modified: 2024/03/18 15:05 (external edit)