setting up scaleway riscv bare-metal system

scaleway-riscv scaleway-riscv-kernel scaleway-riscv-drbd scaleway-riscv-gfs2

descr

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

env sysprep

export DEBIAN_FRONTEND=noninteractive
apt update
apt purge rsyslog
apt install \
    bash-completion \
    colordiff \
    fdisk \
    file \
    locales \
    ifupdown \
    inetutils-syslogd \
    man-db \
    plocate \
    wget

dpkg-reconfigure locales
perl -e exit

cd /etc/
cp -i bash.bashrc bash.bashrc.dist

vi bash.bashrc

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

source bash.bashrc

network & init sysprep

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

auto lo
iface lo inet loopback

auto end0
iface end0 inet static
    address x.x.x.x/xx
    gateway x.x.x.x

auto end0.xxxx
iface end0.xxxx inet static
    address 10.3.3.x/24

cp -pi /etc/hosts /etc/hosts.dist
vi /etc/hosts

127.0.0.1 localhost

10.3.3.2        risc1
10.3.3.3        risc2

x.x.x.x     risc1
x.x.x.x     risc2

ls -lF /etc/resolv.conf* # no symlink
cp -pi /etc/resolv.conf /etc/resolv.conf.dist

reboot

kernel prep

we need the drbd kernel module in place

cd /boot/
mv boot.its boot.its.bak

ver=6.9.0-rc3+

wget https://lab.nethence.com/nunux/GFS2-AND-OCFS2-AND-DRBD9/$ver.boot.itb
mv $ver.boot.itb* boot.itb

cd /lib/modules/
wget https://lab.nethence.com/nunux/GFS2-AND-OCFS2-AND-DRBD9/$ver.tar.gz
tar xzf $ver.tar.gz
rm -rf $ver.tar.gz
depmod -a $ver

resources

shrink partition

https://askubuntu.com/questions/1293505/how-to-shrink-ext4-partition-using-parted-cli

https://unix.stackexchange.com/questions/137482/how-to-to-resize-an-ext4-partition-from-the-command-line


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun