Project

General

Profile

Actions

Bug #1071

closed

Xeon uses mmcblk1 while PiBox is using mmcblk0 so S21package don't get installed.

Added by Hammel 6 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Immediate
Assignee:
Target version:
Start date:
06 Nov 2023
Due date:
% Done:

100%

Estimated time:
Severity:
01 - Critical

Description

S21packages needs to be fixed.


Related issues

Related to Xeon - Action Item #1072: Sync init scripts from PiBox to Xeon buildroot skeleton.ClosedHammel06 Nov 2023

Actions
Actions #1

Updated by Hammel 6 months ago

  • Related to Action Item #1072: Sync init scripts from PiBox to Xeon buildroot skeleton. added
Actions #2

Updated by Hammel 6 months ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50

This is fixed in the init script updates from RM #1072. Once that one is closed this one can be verified too.

Actions #3

Updated by Hammel 6 months ago

The init scripts are updated, but this problem remains. I don't know what's going on yet, possibly that the devices are not mounted yet so firstboot's attempt to make symlinks fails.

Actions #4

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.

Actions #5

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.

Actions #6

Updated by Hammel 6 months ago

I might be wrong about udev vs mdev

Actions #7

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.

Actions #8

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.

Actions #9

Updated by Hammel 6 months ago

  • % Done changed from 80 to 90

Packages are installed automatically now but reboot doesn't happen because S99zzreboot is using the PiBox mmcblk0 instead of /media/data.

Actions #10

Updated by Hammel 6 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

Fixed S99zzreboot. Tested on hardware.

Committed and pushed. Closing issue.

Actions

Also available in: Atom PDF