ading2210 / shimboot

Boot a desktop Linux distribution from a Chrome OS RMA shim.
https://shimboot.ading.dev
GNU General Public License v3.0
151 stars 47 forks source link

Error building. Useradd not found. #80

Open blaze-developer opened 2 months ago

blaze-developer commented 2 months ago

When building an image with sudo ./build_complete.sh dedede release=unstable desktop=kde

It goes through a long process, but ultimately ends in

SELINUX=disabled
/opt/setup_rootfs.sh: line 120: useradd: command not found

Build Device

OS: Arch Linux x86_64 
Host: XPS 8930 1.1.18 
Kernel: 6.10.7-arch1-1 
Uptime: 14 hours, 39 mins 
Packages: 1279 (pacman) 
Shell: bash 5.2.32 
Resolution: 1920x1080 
DE: Hyprland 
Terminal: alacritty 
CPU: Intel i7-8700 (12) @ 4.600GHz 
GPU: NVIDIA GeForce GTX 1050 Ti 
GPU: Intel CoffeeLake-S GT2 [UHD Graphics 630] 
Memory: 4052MiB / 15702MiB 
ading2210 commented 2 months ago

Can you run the build script with DEBUG=1 enabled and post the log?

blaze-developer commented 2 months ago

is the log saved in a file anywhere? If not I guess ill have to run it again but piping into a file

OtterCodes101 commented 2 months ago

can you run ls /usr/sbin/useradd for me?

blaze-developer commented 2 months ago

https://pastebin.com/zrVkCUB2,

❯ ls /usr/sbin/useradd
/usr/sbin/useradd

:3

OtterCodes101 commented 2 months ago

This means /usr/sbin is not in your path. Try running export PATH=$PATH:/usr/sbin, then try rebuilding the shimboot image.

blaze-developer commented 2 months ago

Wait but useradd is a perfectly working command on my system-

OtterCodes101 commented 2 months ago

it is, but the directory that contains useradd isn't added to the list of directories your shell looks for executables in

blaze-developer commented 2 months ago

But it seems that is is because I can simply run useradd and its a working command

OtterCodes101 commented 2 months ago

without root?

blaze-developer commented 2 months ago

with and without

OtterCodes101 commented 2 months ago

weird

blaze-developer commented 2 months ago
~
❯ which useradd
/usr/bin/useradd

~
❯ sudo which useradd
/usr/bin/useradd
Inglan commented 2 months ago

Just FYI, I am experiencing this as well (building debain unstable with gnome)

blaze-developer commented 2 months ago

What distro are you using to build? Because my personal guess is that the building script is designed for debian-based systems and somehow doesn't work for arch based systems. But if you are using a debian based distro or not arch, I would be proven incorrect.

Inglan commented 2 months ago

What distro are you using to build? Because my personal guess is that the building script is designed for debian-based systems and somehow doesn't work for arch based systems. But if you are using a debian based distro or not arch, I would be proven incorrect.

Same command you are using, but with gnome instead of kde

ading2210 commented 2 months ago

I wasn't able to reproduce this with an ARM build. I'll try it again at home once I have access to another x86 system to test on.

ading2210 commented 2 months ago

I cannot reproduce this bug on any of the devices I tested for the build. I used the exact same build command too.

ading2210 commented 2 months ago

It might be a problem with the version of debootstrap that Arch provides. The error that occurs is happening inside the Debian chroot, not on the host Arch system, which suggests that debootstrap didn't set the chroot up correctly.

blaze-developer commented 2 months ago

It might be a problem with the version of debootstrap that Arch provides. The error that occurs is happening inside the Debian chroot, not on the host Arch system, which suggests that debootstrap didn't set the chroot up correctly.

I would agree, however debootstrap on the arch repository is the same debootstrap from debian.org I believe.

https://archlinux.org/packages/extra/any/debootstrap/

If there are any differences, and this does not work on any arch-based system, I would add to your readme that this build script does not work on arch machines, or something of the like.

OtterCodes101 commented 3 weeks ago

can reproduce after attempting to run shimboot on arch