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

[BUG] Installer is missing devices with pmbr_boot flag set #7380

Closed
mglae opened this issue Jan 14, 2023 · 1 comment · Fixed by #7393
Closed

[BUG] Installer is missing devices with pmbr_boot flag set #7380

mglae opened this issue Jan 14, 2023 · 1 comment · Fixed by #7393
Labels

Comments

@mglae
Copy link
Contributor

mglae commented Jan 14, 2023

Describe the bug

There is a report in the forum about not being able to (clean) install over an existing installation. The device /dev/sda is not detected.

Informations

  • LE Version: 10.0.3 (but 9.x and 11 should be affected too).
  • Hardware Platform: Generic

Log file

Log
LibreELEC Installer - LibreELEC (official): 10.0.3 started at:
Fri Jan 13 20:04:52 UTC 2023

#################################################################
# System status
#################################################################

# cat /proc/mounts
devtmpfs /dev devtmpfs rw,relatime,size=3844436k,nr_inodes=961109,mode=755 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
tmpfs /run tmpfs rw,nosuid,nodev,size=1592404k,nr_inodes=819200,mode=755 0 0
/dev/sdb1 /flash vfat ro,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro 0 0
/dev/loop0 / squashfs ro,relatime 0 0
none /storage tmpfs rw,relatime 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,size=4096k,nr_inodes=1024,mode=755 0 0
cgroup2 /sys/fs/cgroup/unified cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,name=systemd 0 0
none /sys/fs/bpf bpf rw,nosuid,nodev,noexec,relatime,mode=700 0 0
cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0
cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,nosuid,nodev,noexec,relatime 0 0
tracefs /sys/kernel/tracing tracefs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /var tmpfs rw,relatime 0 0
tmpfs /tmp tmpfs rw,nosuid,nodev,size=3981012k,nr_inodes=409600 0 0
fusectl /sys/fs/fuse/connections fusectl rw,nosuid,nodev,noexec,relatime 0 0
configfs /sys/kernel/config configfs rw,nosuid,nodev,noexec,relatime 0 0

# df
Filesystem           1K-blocks      Used Available Use% Mounted on
devtmpfs               3844436         4   3844432   0% /dev
tmpfs                  1592404     13168   1579236   1% /run
/dev/sdb1               524008    271368    252640  52% /flash
/dev/loop0              249856    249856         0 100% /
none                   3981008       176   3980832   0% /storage
tmpfs                  3981008         0   3981008   0% /dev/shm
tmpfs                     4096         0      4096   0% /sys/fs/cgroup
tmpfs                  3981008         4   3981004   0% /var
tmpfs                  3981012         4   3981008   0% /tmp

# df -h
Filesystem                Size      Used Available Use% Mounted on
devtmpfs                  3.7G      4.0K      3.7G   0% /dev
tmpfs                     1.5G     12.9M      1.5G   1% /run
/dev/sdb1               511.7M    265.0M    246.7M  52% /flash
/dev/loop0              244.0M    244.0M         0 100% /
none                      3.8G    176.0K      3.8G   0% /storage
tmpfs                     3.8G         0      3.8G   0% /dev/shm
tmpfs                     4.0M         0      4.0M   0% /sys/fs/cgroup
tmpfs                     3.8G      4.0K      3.8G   0% /var
tmpfs                     3.8G      4.0K      3.8G   0% /tmp

# parted -s -m -l
BYT;
/dev/sda:512GB:scsi:512:512:gpt:ATA Samsung SSD 850:pmbr_boot;
1:1049kB:544MB:543MB:ext4:System:boot, legacy_boot, esp;
2:544MB:380GB:380GB:ext4:Storage:;
3:380GB:380GB:114MB::primary:bios_grub;
4:380GB:423GB:43.0GB:ext4:primary:msftdata;
5:423GB:424GB:667MB:linux-swap(v1):primary:msftdata;
6:424GB:512GB:88.0GB:ext4:primary:msftdata;

BYT;
/dev/sdb:7965MB:scsi:512:512:gpt:Generic USB SD Reader:;
1:4194kB:541MB:537MB:fat16:system:legacy_boot, msftdata;
2:541MB:575MB:33.6MB:ext4:storage:;


# blkid
/dev/sda1: LABEL="System" UUID="ae7e0943-7f78-4d53-bc79-c59e3a7617cb" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="System" PARTUUID="25cc62b1-2c85-4aab-ad4d-748cbe78ae9a"
/dev/sda2: LABEL="Storage" UUID="b89b388a-eefe-4b01-8099-d6bd81155e79" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Storage" PARTUUID="7ba723c0-9ad7-4ddd-8e6f-42d1666bbd43"
/dev/sda4: UUID="36a7ba9c-bd31-49c0-8a70-99752ce35273" BLOCK_SIZE="4096" TYPE="ext4" PTTYPE="dos" PARTLABEL="primary" PARTUUID="3a726908-6fea-4492-bd55-014f3ccc7614"
/dev/sda5: UUID="62d402ef-460a-418e-843d-15960403bb2c" TYPE="swap" PARTLABEL="primary" PARTUUID="d24835ba-f2b3-4e99-809c-09263438d566"
/dev/sda6: UUID="dbda6cc7-23c1-481c-ae77-e8faed874170" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="primary" PARTUUID="e8b514a9-ee4c-4097-a38f-81db6bed3ef3"
/dev/sdb1: SEC_TYPE="msdos" LABEL_FATBOOT="LIBREELEC" LABEL="LIBREELEC" UUID="1410-5427" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="system" PARTUUID="17c8ec22-0a74-47b6-8f39-82faf378c78a"
/dev/sdb2: LABEL="STORAGE" UUID="5cf99e17-2367-45eb-9609-0e1c64f407b0" BLOCK_SIZE="1024" TYPE="ext4" PARTLABEL="storage" PARTUUID="e10328cc-b802-462e-bb79-cc4ddabee84f"
/dev/sda3: PARTLABEL="primary" PARTUUID="0f74f297-51c9-46f2-8659-7c28b8da2692"
/dev/loop0: TYPE="squashfs"

# UEFI (if directory exists)
total 0
drwxr-xr-x    5 root     root             0 Jan 13 20:04 .
drwxr-xr-x    6 root     root             0 Jan 13 20:04 ..
-r--r--r--    1 root     root          4096 Jan 13 20:04 config_table
dr-xr-xr-x    2 root     root             0 Jan 13 20:04 efivars
drwxr-xr-x    3 root     root             0 Jan 13 20:04 esrt
-r--r--r--    1 root     root          4096 Jan 13 20:04 fw_platform_size
-r--r--r--    1 root     root          4096 Jan 13 20:04 fw_vendor
-r--r--r--    1 root     root          4096 Jan 13 20:04 runtime
-r--------    1 root     root          4096 Jan 13 20:04 systab
drwxr-xr-x   61 root     root             0 Jan 13 20:04 vars

# Disk sizes (bytes)
/sys/block/loop0/size:498384
/sys/block/nbd0/size:0
/sys/block/nbd1/size:0
/sys/block/nbd10/size:0
/sys/block/nbd11/size:0
/sys/block/nbd12/size:0
/sys/block/nbd13/size:0
/sys/block/nbd14/size:0
/sys/block/nbd15/size:0
/sys/block/nbd2/size:0
/sys/block/nbd3/size:0
/sys/block/nbd4/size:0
/sys/block/nbd5/size:0
/sys/block/nbd6/size:0
/sys/block/nbd7/size:0
/sys/block/nbd8/size:0
/sys/block/nbd9/size:0
/sys/block/ram0/size:32768
/sys/block/ram1/size:32768
/sys/block/ram10/size:32768
/sys/block/ram11/size:32768
/sys/block/ram12/size:32768
/sys/block/ram13/size:32768
/sys/block/ram14/size:32768
/sys/block/ram15/size:32768
/sys/block/ram2/size:32768
/sys/block/ram3/size:32768
/sys/block/ram4/size:32768
/sys/block/ram5/size:32768
/sys/block/ram6/size:32768
/sys/block/ram7/size:32768
/sys/block/ram8/size:32768
/sys/block/ram9/size:32768
/sys/block/sda/size:1000215216
/sys/block/sdb/size:15556608
/sys/block/sdc/size:0
/sys/block/sdd/size:0
/sys/block/sde/size:0
/sys/block/sdf/size:0
/sys/block/sr0/size:2097151

Additional context

Using the provided log the failing installer line is identified as

DEVICES=$(parted -s -m -l 2>/dev/null | grep -E '^/dev/sd|^/dev/mmcblk|^/dev/nvme' | grep -E -v '.?rpmb|.?boot?' | cut -f1 -d ":")

grep -E -v '.?rpmb|.?boot?' is removing parted line /dev/sda:512GB:scsi:512:512:gpt:ATA Samsung SSD 850:pmbr_boot;

The RE is looking weird and was added with 9d1d032.

What is the intention of this grep? Has anyone seen rpmb or boot in EMM context?

ATM my intention is to remove this grep.

@mglae
Copy link
Contributor Author

mglae commented Jan 15, 2023

After looking into the mmc driver: rmpb and boot are special mmc areas and should not be used for installation. Names like /dev/mmcblk0rmpb or /dev/mmcblk0boot1 are created.

The RE must only match the device name e.g. '^[^:]*rpmb|^[^:]*boot'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant