siderolabs / sidero

Sidero Metal is a bare metal provisioning system with support for Kubernetes Cluster API.
https://www.sidero.dev
Mozilla Public License 2.0
401 stars 64 forks source link

Protectli FW2B failing to netboot #860

Open xunholy opened 2 years ago

xunholy commented 2 years ago

I acquired 3x Protectli fw2b and 3x vp2410 devices in hopes to run some amd64 devices that would work better than the Raspberry Pi's (Other issues not relevant for this thread). It appears that Sidero attempts to wipe the SPI block device which is strange cause the first device booted through to Sidero without hassle, the next two had the same issue.

Thread discussion in slack - https://taloscommunity.slack.com/archives/CMARMBC4E/p1652659026418629

Image for reference

PXL_20220515_234850853

Other potentially useful links: https://doc.coreboot.org/mainboard/protectli/fw2b_fw4b.html

xunholy commented 2 years ago
user@server-01:~$ lsblk
NAME                      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0                       7:0    0  61.9M  1 loop /snap/core20/1328
loop1                       7:1    0  43.6M  1 loop /snap/snapd/14978
loop2                       7:2    0  67.2M  1 loop /snap/lxd/21835
loop3                       7:3    0  55.5M  1 loop /snap/core18/2409
loop4                       7:4    0 118.4M  1 loop /snap/docker/1779
sda                         8:0    0 111.8G  0 disk
mmcblk0                   179:0    0   7.3G  0 disk
├─mmcblk0p1               179:1    0   538M  0 part /boot/efi
├─mmcblk0p2               179:2    0   768M  0 part /boot
└─mmcblk0p3               179:3    0     6G  0 part
  └─ubuntu--vg-ubuntu--lv 253:0    0     6G  0 lvm  /
mmcblk0boot0              179:8    0     4M  1 disk
mmcblk0boot1              179:16   0     4M  1 disk
user@server-01:~$ journalctl -b |grep mmcblk0
Jul 10 23:14:25 server-01 kernel: mmcblk0: mmc0:0001 8GTF4R 7.28 GiB
Jul 10 23:14:25 server-01 kernel: mmcblk0boot0: mmc0:0001 8GTF4R partition 1 4.00 MiB
Jul 10 23:14:25 server-01 kernel: mmcblk0boot1: mmc0:0001 8GTF4R partition 2 4.00 MiB
user@server-01:~$ ls -lr /sys/block/mmcblk0boot0/
total 0
-rw-r--r-- 1 root root 4096 Jul 10 23:14 uevent
drwxr-xr-x 2 root root    0 Jul 10 23:14 trace
lrwxrwxrwx 1 root root    0 Jul 10 23:14 subsystem -> ../../../../../../../../../class/block
-r--r--r-- 1 root root 4096 Jul 10 23:54 stat
drwxr-xr-x 2 root root    0 Jul 10 23:14 slaves
-r--r--r-- 1 root root 4096 Jul 10 23:14 size
-rw-r--r-- 1 root root 4096 Jul 10 23:54 ro_lock_until_next_power_on
-r--r--r-- 1 root root 4096 Jul 10 23:16 ro
-r--r--r-- 1 root root 4096 Jul 10 23:16 removable
-r--r--r-- 1 root root 4096 Jul 10 23:54 range
drwxr-xr-x 3 root root    0 Jul 10 23:14 queue
drwxr-xr-x 2 root root    0 Jul 10 23:14 power
drwxr-xr-x 3 root root    0 Jul 10 23:14 mq
drwxr-xr-x 2 root root    0 Jul 10 23:14 integrity
-r--r--r-- 1 root root 4096 Jul 10 23:54 inflight
drwxr-xr-x 2 root root    0 Jul 10 23:14 holders
-r--r--r-- 1 root root 4096 Jul 10 23:14 hidden
-rw-r--r-- 1 root root 4096 Jul 10 23:54 force_ro
-r--r--r-- 1 root root 4096 Jul 10 23:54 ext_range
-rw-r--r-- 1 root root 4096 Jul 10 23:54 events_poll_msecs
-r--r--r-- 1 root root 4096 Jul 10 23:54 events_async
-r--r--r-- 1 root root 4096 Jul 10 23:54 events
-r--r--r-- 1 root root 4096 Jul 10 23:54 discard_alignment
lrwxrwxrwx 1 root root    0 Jul 10 23:17 device -> ../../mmcblk0
-r--r--r-- 1 root root 4096 Jul 10 23:14 dev
-r--r--r-- 1 root root 4096 Jul 10 23:54 capability
lrwxrwxrwx 1 root root    0 Jul 10 23:54 bdi -> ../../../../../../../../virtual/bdi/179:8
-r--r--r-- 1 root root 4096 Jul 10 23:54 alignment_offs
user@server-01:~$ find /sys/block/mmcblk0boot0/ -name ro -exec cat \{\} \;
1

The kernel is telling us it is read-only, so we can just skip block devices which are marked as read-only