Skip to content

strange behaviour with binary paths depends on running context #87

@alexminder

Description

@alexminder
# grep initrd_generator=ugrd /etc/kernel/install.conf
initrd_generator=ugrd
# emerge --config =sys-kernel/hardened-kernel-6.10.13

A binaries in result image placed in the /usr/bin

# xz -d -c /boot/xxx/6.10.13-hardened/initrd |cpio -tv|grep mount
-rwx--x--x   1 root     root        55328 Oct 22 16:24 usr/bin/mount
lrwxrwxrwx   1 root     root            9 Oct 18 09:17 usr/bin/mount.bcachefs -> bcachefs
-rwx--x--x   1 root     root        34848 Oct 22 16:24 usr/bin/umount
-rwxr-xr-x   1 root     root       449160 Oct 22 16:24 usr/lib/libmount.so.1.1.0
lrwxrwxrwx   1 root     root           27 Oct 22 16:24 usr/lib/libmount.so.1 -> /usr/lib/libmount.so.1.1.0

When I run ugrd manualy binaries placed in the /usr/sbin:

# ugrd /initrd.ugrd.img

# xz -d -c /initrd.ugrd.img |cpio -tv|grep mount
-rwxr-xr-x   1 root     root       449160 Oct 22 16:24 usr/lib/libmount.so.1.1.0
lrwxrwxrwx   1 root     root           27 Oct 22 16:24 usr/lib/libmount.so.1 -> /usr/lib/libmount.so.1.1.0
-rwx--x--x   1 root     root        55328 Oct 22 16:24 usr/sbin/mount
-rwx--x--x   1 root     root        34848 Oct 22 16:24 usr/sbin/umount
lrwxrwxrwx   1 root     root            9 Oct 18 09:17 usr/sbin/mount.bcachefs -> bcachefs

With one of case symlink module [symlinks.xxx] fails to work

ERROR    | ugrd                                       | [Errno 2] No such file or directory: '/var/tmp/portage/sys-kernel/hardened-kernel-6.10.13/temp/initramfs_build/usr/sbin/mount.bcachefs'

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions