ading2210 / shimboot

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

Error building. Useradd not found. #80

Open blaze-developer opened 1 week ago

blaze-developer commented 1 week 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 1 week ago

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

blaze-developer commented 1 week 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 1 week ago

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

blaze-developer commented 1 week ago

https://pastebin.com/zrVkCUB2,

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

:3

OtterCodes101 commented 1 week 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 1 week ago

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

OtterCodes101 commented 1 week 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 1 week ago

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

OtterCodes101 commented 1 week ago

without root?

blaze-developer commented 1 week ago

with and without

OtterCodes101 commented 1 week ago

weird

blaze-developer commented 1 week ago
~
❯ which useradd
/usr/bin/useradd

~
❯ sudo which useradd
/usr/bin/useradd
Inglan commented 5 days ago

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

blaze-developer commented 5 days 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 5 days 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 5 days 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 5 days 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 5 days 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 4 days 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.