apparently it’s better to choose ubuntu rather than debian in this case, according to their kernel build guide
also note we need space available to setup LVM2. and the scaleway installer json custom partitioning setup does NOT work.
# need to boot in rescue mode fdisk -l fsck -y /dev/mmcblk0p3 resize2fs /dev/mmcblk0p3 13G export DEBIAN_FRONTEND=noninteractive apt -q update && apt -q -y install parted parted /dev/mmcblk0 resizepart 3 15G resize2fs /dev/mmcblk0p3 fdisk /dev/mmcblk0 n t 44 # Linux LVM w
we need the drbd kernel module in place
export DEBIAN_FRONTEND=noninteractive apt update apt purge rsyslog apt install wget bash-completion colordiff ifupdown inetutils-syslogd plocate man-db fdisk cd /boot/ mv boot.its boot.its.bak wget https://lab.nethence.com/nunux/GFS2-AND-OCFS2-AND-DRBD9/6.9.0-rc3%2B.boot.itb mv 6.9.0-rc3+.boot.itb* boot.itb cd /lib/modules/ wget https://lab.nethence.com/nunux/GFS2-AND-OCFS2-AND-DRBD9/6.9.0-rc3%2B.tar.gz tar xzf 6.9.0-rc3+.tar.gz rm -rf 6.9.0-rc3+.tar.gz depmod -a 6.9.0-rc3+
cd /etc/ cp bash.bashrc bash.bashrc.dist cat >> bash.bashrc <<EOF case "\$-" in *i*) source /usr/share/bash-completion/bash_completion alias ll='ls --color=auto -alh' alias ls='ls --color=auto' alias diff='colordiff' alias cp='cp -i' alias mv='mv -i' alias rm='rm -i' w ;; esac export MAKEFLAGS=-j4 EOF #source bash.bashrc
apt purge cloud-init cloud-guest-utils cloud-initramfs-copymods cloud-initramfs-dyn-netconf apt autoremove --purge rm -rf /var/lib/cloud/ /etc/cloud/ systemctl list-unit-files | grep network systemctl stop systemd-networkd.service systemctl stop systemd-networkd.socket systemctl disable systemd-networkd.service systemctl disable systemd-networkd.socket vi /etc/network/interfaces ... cp -pi /etc/hosts /etc/hosts.dist vi /etc/hosts ... ls -lF /etc/resolv.conf* # no symlink cp -pi /etc/resolv.conf /etc/resolv.conf.dist reboot
export DEBIAN_FRONTEND=noninteractive apt install drbd-utils ocfs2-tools gfs2-utils dlm-controld corosync inetutils-syslogd systemctl stop postfix systemctl disable postfix cd /etc/ mv drbd.d/ drbd.d.dist/ mv drbd.conf drbd.conf.dist vi drbd.conf ... cd /etc/ocfs2/ vi cluster.conf ... cd /etc/ mkdir dlm/ cd dlm/ vi dlm.conf ... cd /etc/corosync/ mv corosync.conf corosync.conf.dist vi corosync.conf ... fdisk -l /dev/mmcblk0 pvcreate /dev/mmcblk0p4 TBD cd /etc/ cp fstab fstab.dist vi fstab /dev/drbd0 /data_ocfs2 ocfs2 rw,noatime,nodiratime,_netdev 0 0 /dev/drbd1 /data_gfs2 gfs2 rw,noatime,nodiratime,_netdev,noquota,discard 0 0
modprobe: ERROR: could not insert 'drbd': Exec format error
==> unsetteled: _sometimes+ happens with drbd 9.1.23 or 9.2.12 after a successful build
FAILED: load BTF from vmlinux: Invalid argument
==> CONFIG_DEBUG_INFO_BTF=n
– no pahole required
em-rv1-c4m16s128-a.dts:3:10: fatal error: th1520-lichee-cluster-4a-16g.dts: No such file or directory 3 | #include "th1520-lichee-cluster-4a-16g.dts" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
==> vanilla 5.10 or 5.16 won’t do, use scw/th1520 kernel source instead
building with th1520 5.16 commit 40c843218f11625722e9a7c3ced81a83b95ecf05
gettimeofday.h:71: Error: unrecognized opcode `csrr a5,0xc01', extension `zicsr' required
==> …
https://github.com/scaleway/kernel-tools
https://askubuntu.com/questions/1293505/how-to-shrink-ext4-partition-using-parted-cli