I'm experimenting reducing a Debian 9.9 xfce live ISO (just to start with a Debian image, not because it's special).
Unsquash the filesystem.squash from the live image
Enter chroot on the created directory.
Squash the directory.
Add the new filesystem.squash to a custom directory (with the live image's initrd and vmlinuz)
Geniso the custom directory.
The new image boots (VirtualBox), but when it reaches the tty1, what seems a loop (very fast, so it's difficult to read) prompts something similar to "fail autologin" and then stop to a blank cursor. From there I can access only to tty6, but can't login with any user.
Step 3: To reduce the image, I make an install of Debian netisnt without desktop environment, copy the packages installed to txt file. In my chroot enviroment, I uninstall all packages exept the ones on the txt.
Step 4: When I squash the chroot directory this appears (maybe here's the issue) but...
Failed to read file squashfs-root/etc/.pwd.lock, creating empty file [| ] 81/5804 1% Failed to read file squashfs-root/etc/group-, creating empty file [=| ] 122/5804 2% Failed to read file squashfs-root/etc/gshadow, creating empty file [=/ ] 131/5804 2% Failed to read file squashfs-root/etc/gshadow-, creating empty file [=/ ] 131/5804 2% Failed to read file squashfs-root/etc/passwd-, creating empty file [=/ ] 178/5804 3% Failed to read file squashfs-root/etc/security/opasswd, creating empty file [==/ ] 191/5804 3% Failed to read file squashfs-root/etc/shadow, creating empty file [==/ ] 195/5804 3% Failed to read file squashfs-root/etc/shadow-, creating empty file [==/ ] 195/5804 3% Failed to read file squashfs-root/etc/subgid-, creating empty file [==/ ] 201/5804 3% Failed to read file squashfs-root/etc/subuid-, creating empty file [==/ ] 202/5804 3% Failed to read file squashfs-root/etc/sudoers, creating empty file
...when I check the files, say shadow, it looks normal, not an empty file.
Step 5: I use the live image's vmlinuz and initrd, not the chroot's, because, I think obviously, the custom ISO freezes in kernel panic. The kernel is the same both live image's and netinst installation.
I'm aware that all this changes can lead surely to a broken system, but reaching the tty (well, kinda) gives me hope that it's doable. For this reason, I don't expect that a reasonable solution can be given, but I'm running out of ideas.
To resume: is possible to stop the autologin (of any user) once the system reaches the tty1? Is there another reason why this couldn't work?
EDIT: upload a picture before reaching the tty1, if it is of any use: