User Tools

Site Tools


qemunet:install:alpine

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
qemunet:install:alpine [2018/02/01 11:38] orelqemunet:install:alpine [2024/03/18 15:06] (current) – external edit 127.0.0.1
Line 21: Line 21:
  
  
-Then, you can configure Alpine for QemuNet as follow:+Then, you can add Alpine to QemuNet with these lines:
  
 <code bash qemunet.cfg> <code bash qemunet.cfg>
Line 28: Line 28:
 FS[alpine]="$IMGDIR/alpine.img" FS[alpine]="$IMGDIR/alpine.img"
 QEMUOPT[alpine]="-localtime -m 512" QEMUOPT[alpine]="-localtime -m 512"
-# URL[alpine]="https://gitlab.inria.fr/qemunet/images/raw/master/alpine.tgz" 
 </code> </code>
  
 ==== Install Alpine Packages ==== ==== Install Alpine Packages ====
-  + 
 Once Alpine image is started with Qemu... It will by default launch DHCP client as defined in "/etc/network/interfaces". 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 [[https://wiki.alpinelinux.org/wiki/Edge | edge]] release (under constant development), you must edit /etc/apk/repositories. Change the version number (such as v3.2) to edge. 
 +
 +<code /etc/apk/repositories>
 +#/media/cdrom/apks
 +http://alpine.mirror.wearetriple.com/edge/main
 +http://alpine.mirror.wearetriple.com/edge/community
 +http://alpine.mirror.wearetriple.com/edge/testing
 +</code>
 +
 +
 +Then:
 +
 +  $ apk upgrade --update-cache --available
 +  $ sync
 +  $ reboot
  
 <code bash>   <code bash>  
Line 40: Line 55:
 $ apk upgrade $ apk upgrade
 $ apk add bash bash-doc bash-completion $ apk add bash bash-doc bash-completion
-$ apk add nano+$ apk add nano emacs-nox
 $ apk add iputils iptables iproute2 $ apk add iputils iptables iproute2
 $ ... $ ...
Line 51: Line 66:
   - edit ''/etc/fstab'' and add this line ''host  /mnt/host  9p  trans=virtio,defaults,nofail  0  0'' to enable file sharing   - edit ''/etc/fstab'' and add this line ''host  /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''   - 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 then ''rc-update add local default'' [fail?!?]+  - enable startup script: ''ln -s /mnt/host/start.sh /etc/local.d/local.start'' and then ''rc-update add local''
  
  
Line 61: Line 76:
 </code>   </code>  
  
-In order to use the [https://wiki.alpinelinux.org/wiki/Edge | edge] release (under constant development), you must edit /etc/apk/repositories. Change the version number (such as v3.2) to edge. Then:+==== Install Alpine Desktop ====
  
-  $ apk upgrade --update-cache --available +Let's create a new QemuNet image called "alpinex" 
-  $ sync + 
-  $ reboot+  $ cp --sparse=auto alpine.img alpinex.img  # be careful, when you copy sparse files! 
 +   
 +Then, add these lines in qemunet.cfg: 
 + 
 +<code bash qemunet.cfg> 
 +# linux alpinex 
 +SYS[alpinex]="linux" 
 +FS[alpinex]="$IMGDIR/alpinex.img" 
 +QEMUOPT[alpinex]="-localtime -m 512" 
 +</code> 
 +   
 +Then run this image in raw mode: 
 + 
 +  $ ./qemunet.sh -l alpinex 
 + 
 +First enable DHCP in /etc/network/interfaces and reboot... 
 + 
 +To enable french keyboard:  
 + 
 +  $ apk add kbd setxkbmap 
 +  $ setxkbmap fr                  # for french keyboards 
 + 
 +Then install Xorg and XFCE desktop environment: 
 + 
 +  $ setup-xorg-base 
 +  $ apk add alpine-desktop        
 +  $ apk add faenza-icon-theme      # for icons   
 +  $ apk add xf86-input-mouse xf86-input-keyboard # useful? 
 +  $ apk add xf86-video-modesetting # recommended for Qemu guests? 
 +  $ apk add dbus lxdm sudo 
 +  $ rc-update add dbus ; rc-service dbus start 
 +  $ rc-update add udev ; rc-service udev start 
 + 
 +Add a desktop user (as sudoer): 
 + 
 +  $ adduser toto                  # password toto 
 +  $ addgroup sudo 
 +  $ addgroup toto sudo 
 +  $ emacs /etc/sudoers            # %sudo ALL=NOPASSWD: ALL   
 + 
 +Launch the XFCE4 desktop with LXDM: 
 + 
 +  $ rc-service lxdm start     # don't forget to select xfce session, before to log in! 
 +  
 +If it works... quit XFCE 
 +   
 +  $ rc-update add lxdm   
 +  $ reboot   
 + 
 +To enable "fr" keyboard in Xorg, add this section: 
 + 
 +<code text /etc/X11/xorg.conf> 
 +Section "InputClass" 
 + Identifier "Keyboard Default" 
 + MatchIsKeyboard "yes" 
 + Option "XkbLayout" "fr" 
 +EndSection 
 +</code> 
 + 
 +Try to get lightweight system by replacing "alpine-desktop" meta-package by "xfce4 + firefox"
 + 
 + 
 +__More details:__ http://wiki.alpinelinux.org/wiki/XFCE_Setup
  
 ==== Biblio ==== ==== Biblio ====
qemunet/install/alpine.1517485111.txt.gz · Last modified: 2024/03/18 15:05 (external edit)