I need help in troubleshooting a bug that just cropped up. Everything was working until just recently. So obviously something changed, but I cannot figure out what.
A little background
Basically the script creates a loop device, named test.img and the loop device is partitioned and formatted.
Then pacstrap is run and installs all the packages necessary for an operating system.
Next various configuration files and other files are copied to test.img in preparation for arch-chroot.
In chroot, a new user named āalarmā is created right at the beginning and for troubleshooting the results are displayed. Following are the scriptās commands for creating a user named alarm
useradd -d /home/alarm -m -u 1001 alarm
echo alarm:alarm | chpasswd
echo root:root | chpasswd
I created a break point in the script that displays the results. commands are indented
ls /home
total 4
drwx------ 3 alarm alarm 4096 Aug 9 19:44 alarm
id alarm
uid=1001(alarm) gid=1001(alarm) groups=1001(alarm)
passwd & Shadow results for alarm
alarm:x:1001:1001::/home/alarm:/bin/bash
alarm:$6$6aGiB2Y84awl4rF0$bSGdQHjsG3pl4BwVn3tVDdBwT0WYtEiXVTI8RkcJDyinQk7pE/BSZyc6Gk0FBJkYl/JZ/yLc1ITlzyGoS2E.40:19578:0:99999:7:::
passwd & Shadow results for root
root:x:0:0::/root:/bin/bash
root:$6$36B4a.KCC4LrF/mx$NinXn2DIfiyezXyFM3iugBd/VaqSzu1eztgBIe8qmiGvonfrHxMyqZmf7YZ3nvM..fAl0eBrbefmAxov83GzK.:19578::::::
The results shows that user āalarmā was created, alarmās home directory is established, UID & GID are there, and /bin/bash is the desired shell. the passwd file shows alarm in which the x indicates the alarm passwd is in the shadow file. Everything looks OK.
Still in chroot, some more user configuration occurs
printf "alarm ALL=(ALL:ALL) NOPASSWD: ALL\n" >> /etc/sudoers
gpasswd -a alarm wheel
printf "export DISPLAY=':0'\nxhost +SI:localuser:alarm\nxhost +SI:localuser:root\nexec openbox-session\n" >> /home/alarm/.xinitrc
printf "if [ -z \"\${DISPLAY}\" ] && [ \"\${XDG_VTNR}\" -eq 1 ]; then\n exec startx\nfi\n" >> /home/alarm/.bash_profile
chown alarm:alarm /home/alarm/.xinitrc
chmod 644 /home/alarm/.xinitrc
then more configurations. As part of trouble shooting, the last thing done in chroot is to repeat the break point and display alarmās settings/
alarmās settings are stil displayed as above. So user alarm still exists and is unchanged at this point
CHROOT exited.
at this point, the only thing that occures is compressing test.img to either a rootfs image with bsdtar or into a dd compatible image using xz
The problem is when the image (either rootfs or xz image) is copied to a uSD card, and when the completed uSD card is booted it should auto login user āalarmā, start openbox, and present the launch.sh script. Instead when trying to auto login, it gives the following error.
āUser not known to the underlying authentication moduleā
If I then take the uSD card and mount the partitions, arch-chroot into the uSD and ls -l /home yields nothing. The user alarm is not there anymore.
I donāt think the problem occurs during compression as I can dd the non-compressed test.img to a uSD and still get the same results.
If interested, the scripts are available at
and the main script is āeos-arm-buildā and the chroot script is āeos-arm-chrootā.
I donāt know what changed, but I would like to fix it. So far it has me stumped. I guess I should look for a work around.
If you got to here, thank you for your time and interest.
Pudge