$ wget http://archlinuxarm.org/os/ArchLinuxARM-rpi-armv7-latest.tar.gz
$ sudo mkdir controlpi
$ sudo mount -t tmpfs none controlpi/
-$ sudo tar -xpf ArchLinuxARM-rpi-armv7-latest.tar.gz -C controlpi/
+$ sudo tar xpf ArchLinuxARM-rpi-armv7-latest.tar.gz -C controlpi/
```
In chroot wechseln und erstes Upgrade:
## Image erstellen und aufspielen
Von außerhalb des chroot:
```console
-$ sudo tar -czf controlpi.tar.gz -C controlpi/ .
+$ sudo tar czf controlpi.tar.gz -C controlpi/ .
$ fallocate -l 4G 20YY-MM-DD-controlpi-arch.img
$ sudo losetup --find --show 20YY-MM-DD-controlpi-arch.img
$ sudo parted --script /dev/loop0 mklabel msdos
$ sudo mount /dev/loop0p2 /mnt
$ sudo mkdir /mnt/boot
$ sudo mount /dev/loop0p1 /mnt/boot
-$ sudo tar -xpf controlpi.tar.gz -C /mnt/
+$ sudo tar xpf controlpi.tar.gz -C /mnt/
$ sudo umount /mnt/boot
$ sudo umount /mnt
$ sudo losetup --detach /dev/loop0
│ ├── chrony.conf
│ ├── iptables
│ │ └── iptables.rules
-│ ├── pam.d
-│ │ └── cage
│ ├── sysctl.d
│ │ └── 60-router.conf
│ └── systemd
│ │ ├── 20-extern.network
│ │ └── 20-intern.network
│ └── system
-│ ├── cage@.service
-â\94\82Â Â â\94\9câ\94\80â\94\80 default.target -> /usr/lib/systemd/system/graphical.target
-│ ├── graphical.target.wants
-│ │ └── cage@tty1.service -> /etc/systemd/system/cage@.service
+│ ├── getty.target.wants
+â\94\82Â Â â\94\82Â Â â\94\94â\94\80â\94\80 getty@tty1.service -> /usr/lib/systemd/system/getty@.service
+│ ├── getty@tty1.service.d
+│ │ └── autologin.conf
│ └── multi-user.target.wants
│ └── chronyd.service -> /usr/lib/systemd/system/chronyd.service
└── home
└── pi
+ ├── .bash_profile
└── index.html
```
+++ /dev/null
-auth required pam_unix.so nullok
-account required pam_unix.so
-session required pam_unix.so
-session required pam_systemd.so
+++ /dev/null
-[Unit]
-Description=Cage Wayland compositor on %I
-After=systemd-user-sessions.service plymouth-quit-wait.service
-Before=graphical.target
-ConditionPathExists=/dev/tty0
-Wants=dbus.socket systemd-logind.service
-After=dbus.socket systemd-logind.service
-Conflicts=getty@%i.service
-After=getty@%i.service
-
-[Service]
-Type=simple
-Environment="XKB_DEFAULT_OPTIONS=numpad:mac"
-ExecStart=/usr/bin/cage /usr/bin/qiosk file:///home/pi/index.html
-Restart=always
-User=pi
-UtmpIdentifier=%I
-UtmpMode=user
-TTYPath=/dev/%I
-TTYReset=yes
-TTYVHangup=yes
-TTYVTDisallocate=yes
-StandardInput=tty-fail
-PAMName=cage
-
-[Install]
-WantedBy=graphical.target
-Alias=display-manager.service
-DefaultInstance=tty7
+++ /dev/null
-/usr/lib/systemd/system/graphical.target
\ No newline at end of file
--- /dev/null
+/usr/lib/systemd/system/getty@.service
\ No newline at end of file
--- /dev/null
+[Service]
+ExecStart=
+ExecStart=-/usr/bin/agetty --autologin pi --noclear %I $TERM
+++ /dev/null
-/etc/systemd/system/cage@.service
\ No newline at end of file
--- /dev/null
+#
+# ~/.bash_profile
+#
+
+[[ -f ~/.bashrc ]] && . ~/.bashrc
+
+# On first virtual console, try to start sway:
+if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]
+then
+ export XKB_DEFAULT_OPTIONS="numpad:mac"
+ exec cage qiosk file:///home/pi/index.html
+fi