Other languages English ; |
Please remove this {{Draft}}template, when you're sure the page is complete and correct.
|
Contents
How to install and configure Mageia 8 on your Raspberry Pi board
Raspberry Pi 4 aka RPi4 board
This instructions are tested on RPi4 board and might be adjusted for other Raspberry Pi boards like RPi3.
- First you should choose your image for your Desktop Environment which you can change/install later if needed. Note that there are only 64 bit images currently available but you can build your own with our scripts.
- Then you can use IsoDumper or any other tool for writing the image on your SD card. Note that you need to extract it first if your tool doesn't support compressed images.
- After successful write you just boot your RPi4 board from SD card. It's very easy if you connect the board to the monitor or TV and keyboard especially if already installed Mageia on a regular computer. Headless install is also possible but it's not covered here.
- The Mageia install should boot to the Desktop Environment of your chosen image or command line interface aka CLI if that was your choice.
- Before you install or update any packages make sure that the repositories are for Mageia 8 (note bug 28818) and those that you prefer (mandatory is
core repositories
one, others are of course optional:nonfree repositories
,tainted repositories
andbackports
).
It's very easy with MCC (see documentation and in CLI too (see below).
Please be aware that although this can work great and looks stable, there are currently some missing functionalities like missing sound, gpio export not possible (no bug report yet as more tests are needed) and possibly some other bugs too (like no working keyboard in some cases, initrd symlink not updated with kernel upgrade).
Information: Some hardware features are not yet tested. Like Bluetooth, Wi-Fi, most of the GPIO connector functions. Install and tests were started with Mageia-8-rpi-aarch64-noDE.img.gz image. Be brave and contribute your helpful experience. |
CEC status
Supposedly, there is hardware support for CEC on the HDMI. Needs some experimentation to see if this works.
Raspberry Pi 3 aka RPi3 board
Mageia works stable on RPi3 too. The instructions should work the same as on RPi4. Note that there are only 64 bit images currently available but you can build your own with our scripts.
Workaround
After trying Mageia 8 and Cauldron image, i have facing of the following bug :
https://bugs.mageia.org/show_bug.cgi?id=26277
Last answer say image work for PI4.
My workaround isn't complete clean, but work.
Download an official image, let's say http://mageia.ip-connect.info/distrib/8/aarch64/install/images/Mageia-8-rpi-aarch64-gnome.img.gz
use your file explorer to uncompress the file, then double click on the image should mount /boot partition and rootfs on /dev/loop
But first we just need to adjust /boot, so sudo unmount /dev/mmcblk0p2
now we need official raspberry pi /boot, two options, you have a running RPI or you download and mount the official image of raspian.
If double click don't work, use : sudo mkdir -p /mnt/chroot/mageia/boot sudo mount -o rw /dev/mmcblk0p1 /mnt/chroot/mageia/boot
then copy /mountpoint/boot to ~/tmp/
then update mageia/boot with the raspian/boot For example : cp -fr /boot/* /mnt/chroot/mageia/boot/*
Erase back with the previous backup cp -fr ~/tmp/boot/* /mnt/chroot/mageia/boot/*
now we need rootfs, either double click on the download MGA image or : sudo mount -o rw /dev/mmcblk0p2 /mnt/chroot/mageia
With root privileges, edit /mountpoint/boot/grub2/grub.cfg find the entry and edit the linux= command line to add : audit=0 nokmsboot=1 noiswmd=1 rd.debug rd.retry=5 vga=788
sudo umount -R /your/mount/point
Plug the SD card into the PI3 and power on.
Raspberry Pi 400
Mageia should work on Raspberry Pi 400 too. The instructions should work the same as on RPi4. Note that there are only 64 bit images currently available but you can build your own with our scripts.
Older Raspberry boards
Boards as Raspberry Pi Zero, and 1 are currently unsupported due to older (ARMv6) architecture. But our scripts can build image for Raspberry Pi 2 (32 bit), Raspberry Pi 3 (32 bit or 64 bit) and even Compute Module other than 1.
using PXE
Some boards (RPI > 3 ?), support some form of PXE, however, they need to be booted on microSD first to enable PXE; it would be great if we had some kind of repos for images per board that turn on PXE and reboot, so if you have multiple RPI's, you can just use the same microSD.
RPI 4
Intro
Normally, I would make a manual install using urpmi-root on the pxe/nfs host directly, then fix the initrd and boot into it. However, the rpms have trigger scripts which need to execute in aarch64, so I need a aarch64 system to do this (and also making the initrd image).
So, the plan was to use the rpi mga image on the microSD, boot into that, then make the urpmi-root on the nfs path directly, then remove microSD and reboot.
However, the mga8 (and cauldron) image did not boot for this rpi4 8GB, some kind of u-boot issue about memory not allocated.
This left me with the only system being the raspian lite that i used to turn on PXE booting, but that does not have urpmi.
So, I thought, I'll boot into the raspian chroot into a rw copy of the mga8 image, and use that to prepare the nfs root.
That did not work, at first i figured it was the chrooting with urpmi --urpmi-root, but it appears you just cannot urpmi stuff on a nfs mount directly? there's some kind of weird locking issue with the nfs mount. Later, it seemed like this was a nfs version 4 issue, nfs version 3 did not have this problem, maybe user/group mapping issue
So then, I chrooted into the mga8 and did the urpmi setup on a dir of the physical microSD, then rsynced it later to the nfs mount.
because the u-boot didn't work, i also used the raspian upstream firmware to boot the mga kernel on the tftp server.
steps
- download raspian lite ( https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit don't download the desktop one, it's a whole hassle ) and mga8 rpi image ( /mageia/distrib/cauldron/aarch64/install/images/Mageia-cauldron-rpi-aarch64-noDE.img.gz on your favorite mirror)
- xz -k -d *-arm64-lite.img.xz # unzip the img for dd
- gunzip -k Mageia-cauldron-rpi-aarch64-noDE.img.gz # unzip for losetup
- dd if=*-arm64-lite.img.xz of=/dev/sdX bs=64k oflag=direct # copy the image onto the microSD
- nfs server: make a dir "mga-img" and "src"
- nfs server: losetup -f Mageia-cauldron-rpi-aarch64-noDE.img
- nfs server: losetup -a # check which loop device is used
- nfs server: partx -a /dev/loopX
- nfs server: mount the correct /dev/loopXpY partition to the src folder (only the / is important, we don't care about the /boot or other)
- nfs server: rsync -aH src/. mga-img/
- boot rpi4 with the microSD
- rpi4: raspi-config # go into advanced, into boot order, and choose the PXE one
- rpi4: mount the nfs folder "mga-img" from your nfs server
- rpi4: mkdir /dst
- rpi4: mkdir mga-img/dst
- rpi4: mount --bind /dev mga-img/dev
- rpi4: mount --bind /sys mga-img/sys
- rpi4: mount --bind /dst mga-img/dst # empty dir to install into
- rpi4: chroot mga-img
- rpi4: mount /proc
- rpi4: urpmi.addmedia --urpmi-root /dst --distrib '<fav mirror>/mageia/distrib/8/aarch64'
- rpi4: urpmi.update --urpmi-root /dst --no-ignore "Nonfree Release" "Nonfree Updates" "Tainted Release" "Tainted Updates"
- rpi4: urpmi.update --urpmi-root /dst -a
- rpi4: urpmi --urpmi-root /dst --no-recommends locales-XX urpmi basesystem-minimal nfs-utils vim-enhanced bash-completion openssh-server kernel-desktop-latest man dhcp-client ntp curl console-setup usermode-consoleonly ...
- rpi4: umount /proc
- rpi4: exit # out of chroot
- rpi4: umount mga-img/dst
- rpi4: umount mga-img/dev
- rpi4: umount mga-img/sys
- rpi4: mount --bind /dev /dst/dev
- rpi4: mount --bind /sys /dst/sys
- rpi4: chroot /dst
- rpi4: mount /proc
- rpi4: echo "NETWORKING=yes" > /etc/sysconfig/network
- rpi4: mkdir /root/.ssh
- rpi4: chmod 700 /root/.ssh
- rpi4: vim /root/.ssh/authorized_keys # paste your ssh pub keys in here so you can ssh into it
- rpi4: vim /etc/systemd/journald.conf # change Storage into Volatile and set RunTimeLimit to 8MB or something
- rpi4: vim /etc/fstab # put "none /proc proc defaults 0 0" into it with the nfs mount and maybe other nfs mounts
- rpi4: vim /etc/dracut.conf # remove network from omit modules
- rpi4: dracut -N --add "nfs network" /boot/initrd-kernelversion.img kernelversion
- rpi4: chmod +r /boot/vmlinuz # this is so the vmlinuz will be available with tftp
- rpi4: umount /proc
- rpi4: exit # chroot
- rpi4: umount /dst/sys
- rpi4: umount /dst/dev
- rpi4: mkdir /nfs
- rpi4: mount nfs-server:/nfs /nfs
- rpi4: mkdir /nfs/path/to/rpi-img
- rpi4: rsync -aH /dst/. /nfs/aarch64/rpi-img/
- rpi4: rsync -aH /boot/. pxe-server:/boot-rpi/
- rpi4: poweroff
- unplug rpi and microSD
- pxe server: mkdir /var/lib/tftpboot/aarch64
- pxe server: mv /boot-rpi /var/lib/tftpboot/aarch64/linux
- pxe server: cd /var/lib/tftpboot/aarch64/linux
- pxe server: mkdir raspian
- pxe server: mv kernel* raspian/
- pxe server: mkdir nfs
- pxe server: mount nfs-server:/nfs/aarch64 nfs
- pxe server: ln -s nfs/rpi-img/boot/vmlinuz vmlinuz
- pxe server: ln -s nfs/rpi-img/boot/initrd.img initrd.img
- pxe server: vim config.txt # add 4 lines: "dtoverlay=upstream-pi4" "cmdline=cmdline.txt" "kernel=vmlinuz" "initramfs initrd.img followkernel"
- pxe server: vim cmdline.txt # change root to /dev/nfs and add "nfsroot=nfsserver:/nfs/aarch64/rpi-img,nfsvers=3,tcp,rw ip=dhcp rootfstype=nfs" after it
- pxe server: cd /var/lib/tftpboot
- pxe server: tcpdump udp port 69
- boot up the rpi and look at tcpdump, one of the first file requests will be some 8 char hex string as a dir, with config.txt after it
- pxe server: ln -s aarch64/linux 8-char-hexstring
- the rpi should boot up and you should be able to ssh to it with your pub key
How to install and configure Mageia 8 on your Banana Pi board
Mageia 8 can be also installed on Banana Pi board. You can find 32 bit images here and even build your own with our scripts.
Other ARM boards
More experienced can use our scripts to build generic aarch64 image.
First boot
Image without Desktop Environment aka command line interface
- login name for first boot is root, new password is required
- Workaround for changing the repositories in CLI (to be done before any urpmi command):
- to check to which version URL points
# cat /etc/urpmi/urpmi.cfg |
- copy, to be on the safe side
# cp /etc/urpmi/urpmi.cfg /etc/urpmi/urpmi_original.cfg |
- the magic command to change
# sed -i 's/cauldron/8/g' /etc/urpmi/urpmi.cfg |
- to check the result
# cat /etc/urpmi/urpmi.cfg |
- refresh or even better
# urpmi.update -a |
- refresh and update
# urpmi.update -a && urpmi --auto-select |
- add important parts of mcc
# urpmi drakconf draklocale |
- add your locale if non English, note that Slovenian one is just an example. use <Tab> autocompletion if you don't remember exactly (not strange as there are more than 180).
# urpmi locales-sl |
- setup your language
# urpmi locales-sl |
- and tune your keyboard layout and add a nonroot user
# drakconf |
- change default hostname rpi-aarch64 if you wish or need
# hostnamectl set-hostname your_desired_hostname |
- You can install Desktop Environment (GUI aplication can come handy even in headless configuration)
- for example or slightly thinner task-xfce-minimal
# urpmi task-xfce |
# startx |
- or startxfce4
Image with Desktop Environment
If you use your ARM board with monitor or TV, everything should work the same as in your ordinary computer. There's also nice documentation available.