Bug #1071
closedXeon uses mmcblk1 while PiBox is using mmcblk0 so S21package don't get installed.
Added by Hammel 6 months ago. Updated 6 months ago.
100%
Description
S21packages needs to be fixed.
Related issues
Updated by Hammel 6 months ago
- Related to Action Item #1072: Sync init scripts from PiBox to Xeon buildroot skeleton. added
Updated by Hammel 6 months ago
This may be due to the following line in firstboot:
for part in $(ls -1 /dev/disk/by-label)
The subshell expansion might not be working as expected. I've changed it to the following.
for part in /dev/disk/by-label/*
Interestingly, shellcheck recommended this change but I ignored it.
rootfs rebuild in progress in xeon1 sandbox. Will test later.
Updated by Hammel 6 months ago
That didn't work either, because there are no directories under /dev/disk during firstboot. Here is the firstboot log showing that.
Jan 18 08:50:37 (none) user.debug kernel: ### Running genModel Jan 18 08:50:37 (none) user.debug kernel: ### Appending board type to pibox-version. Jan 18 08:50:37 (none) user.debug kernel: ### Disks directories: Jan 18 08:50:37 (none) user.debug kernel: ### Jan 18 08:50:37 (none) user.debug kernel: ### Disks by label: Jan 18 08:50:37 (none) user.debug kernel: ### Jan 18 08:50:37 (none) user.debug kernel: ### Running symlink updates Jan 18 08:50:37 (none) user.debug kernel: ### Symlink processing for *... Jan 18 08:50:37 (none) user.debug kernel: ### Saving logs
So I need to either fix it so firstboot finds those directories or rerun the symlink creation on second boot. No modules are loaded on second boot so I don't know what's missing on firstboot. It might be problem with udev vs mdev processing since I use the latter for event processing with blockhandler.sh, but that seems unlikely.
Updated by Hammel 6 months ago
After reading this discussion I found that I can find the matching device name by the label, as in the following.
# blkid -L BOOT /dev/mmcblk1p1 # blkid -L rootfs /dev/mmcblk1p2 # blkid -L data /dev/mmcblk1p3
So this means I can use a different mechanism on Xeon than is used in PiBox systems to create these symlinks. I've tested this on Xeon after 2nd boot but will still need to verify it works on firstboot.
Updated by Hammel 6 months ago
- % Done changed from 50 to 80
The problem here appears to be that the Xeon postbuild.sh was not merged with PiBox's. That one moved udev init script before mdev's which makes the /dev/disk/* directories show up as expected and allows firstboot to properly create the symlinks.
With that fixed, the S21package script can now use /media/data to find packages to install.