Questions on FreeBSD Installerconfig and firstboot

I was experimenting with installerconfig and I added adduser at the end of installerconfig before powering off. It worked great.

I've built a custom iso (just changed the kernel name) and I wanted the adduser prompt to come up post installation before login prompt so I added a firstboot rc.d script with just adduser. It showed up before login prompt, post installation boot. And I saw the directories in the skel - it was exactly what I wanted but then I did a reboot and logged in as the same user and I got this message:

No home directory. Logging in with home = "/"

This thing happens if I do this post installation and with firstboot. The /home directory just disappears. Never happens with installerconfig.

PS. I also want to know if it's possible to launch a twm session at the end of installerconfig before I shut it down.

This is my adduser.conf:
Code:
udotdir=/usr/share/skel
defaultgroups="video operator"
defaultshell=/usr/local/bin/zsh

I also added homeprefix=/home in the adduser.conf earlier but didn't seem to make any difference. I'm not sure what is happening.

I'm in FreeBSD 14.3.
 
I added a firstboot rc.d script with just adduser.
To create /home/<user> directories by adduser(8) from a system startup rc(8) script, the file system has to be mounted first. Accordingly the # REQUIRE: FILESYSTEMS keyword should be set (see rc(8) and /etc/rc.d/FILESYSTEMS for description):

Example firstboot_sentinel (rc.conf(5)) rc(8) script:

/etc/rc.d/firstboot
Code:
#!/bin/sh
#
# REQUIRE: FILESYSTEMS
#
adduser

PS. I also want to know if it's possible to launch a twm session at the end of installerconfig before I shut it down.
This shouldn't be a problem as long as xorg, twm, a specific (drm-kmod (Intel, AMD), nvidia-driver), or generic (xf86-video-scfb) video driver is installed, a xorg video driver configuration file created, and startx is executed, all from the installerconfig script.
 
To create /home/ directories by adduser(8) from a system startup rc(8) script, the file system has to be mounted first. Accordingly the # REQUIRE: FILESYSTEMS keyword should be set (see rc(8) and /etc/rc.d/FILESYSTEMS for description): Example firstboot_sentinel (rc.conf(5)) rc(8) script: /etc/rc.d/firstboot
Code:
 #!/bin/sh # # REQUIRE: FILESYSTEMS # adduser
This shouldn't be a problem as long as xorg, twm, a specific (drm-kmod (Intel, AMD), nvidia-driver), or generic (xf86-video-scfb) video driver is installed, a xorg video driver configuration file created, and startx is executed, all from the installerconfig script.

Thanks for the help, I'll give it a try. The REQUIRE: FILESYSTEMS part was something I didn't know about.
 
Back
Top