Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protectli FW2B failing to netboot #860

Open
xunholy opened this issue May 16, 2022 · 1 comment
Open

Protectli FW2B failing to netboot #860

xunholy opened this issue May 16, 2022 · 1 comment

Comments

@xunholy
Copy link

xunholy commented May 16, 2022

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
Copy link
Author

xunholy commented Jul 10, 2022

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

Ulexus added a commit to siderolabs/go-blockdevice that referenced this issue Jul 11, 2022
Adds support for reading the ReadOnly disk attribute.
Necessary for siderolabs/sidero#860.

Signed-off-by: Seán C McCord <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant