fickit: Handle raid and non-raid setup

This commit is contained in:
nemunaire 2022-06-02 11:40:43 +02:00
commit 152bbe178f
5 changed files with 94 additions and 31 deletions

View file

@ -13,13 +13,30 @@ files:
- path: /init
contents: |
#!/bin/sh -x
modprobe xhci_pci
modprobe ahci
modprobe megaraid_sas
modprobe e1000e
modprobe tg3
modprobe bnxt_en
echo -n "Waiting module loading... "
sleep 3
echo
mount -t devtmpfs none /dev
mount -t proc none /proc
mount -t sysfs none /sys
mdev -s
mdadm --auto-detect
mdadm --assemble /dev/md2 /dev/sd*1
if [ -b /dev/sdb ]; then
mdadm --auto-detect
mdadm --assemble /dev/md2 /dev/sd*1
BOOT_PART=/dev/md2
else
BOOT_PART=/dev/sda1
fi
ip a add 10.10.10.5/29 dev eth0
ip link set eth0 up
@ -39,7 +56,7 @@ files:
/bin/ash
done
mount /dev/md2 /boot/ &&
mount "${BOOT_PART}" /boot/ &&
/root/update_imgs ||
/bin/ash