ARMTC Forum

Full Version: autologin broken after upgrading the O/S
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
For another task I had to install the latest version of rpitc and decided to upgrade the O/S. Ralph had mentioned that He had issues after the upgrade. For the most part the upgrade was successful with the exception of auto login. Here's the scoop:

After a fresh install I updated the repos and upgraded the O/S:

Code:
sudo apt-get update
sudo apt-get upgrade

During the upgrade I watched the space get down to 180 mb free only on /dev/root. I thought I was going to run out of space but luckily I didn't.

But I wasn't happy about how little space I had left so I did the following to clean up the archives:

Code:
sudo apt-get autoclean
sudo apt-get clean

This resulted in my /dev/root folder increasing to 448 MB free.

It's tight but it appears that upgrading the O/S is doable. I'm running my rpitc as is on a 4 GB SDHC card but if you want to be safe you can use raspi-config to expand root-fs to give you more space.

After the reboot I've now noticed that the autologin doesn't work. It does appear that things don't 'just work' after the upgrade. But if I login with the rpitc userid and password it starts without issue and I have my desktop back.

What would have caused this? Does anyone know how to turn back on the autologin function for rpitc?
Hi, I got this problem too.

But I had found how to resolve this, to do this you need to go in this file:

Code:
sudo nano /etc/inittab

If you had a line in this file add an "#".

And now you need to add this line:

Code:
1:2345:respawn:/bin/login -f rpitc tty1 </dev/tty1 >/dev/tty1 2>&1

It's worked for me, so i hope that's gonna help you.
Hi Arag Mond (we meet again Smile )...thanks for the reminder on ensuring my inittab has this line.

What's strange though is after my upgrade I have no inittab file in /etc? Very strange. It's like it disappeared.

I think at this time I'll need to reflash my SD card and see my inittab file...maybe back it up first and then run through the upgrade again and see if it disappears again.

I'll update this post with my results.

Thanks!
Yea this update delete the inittab file... I got the same problem 4 weeks ago.

That's nice, I can help people with their problems now Big Grin.
I know the feeling...it's nice to finally be able to help others! Smile

Interesting...makes me wonder what else has disappeared after an upgrade?
I don't know what else has disappeared, and I don't know why the inittab file has disappear too...
I was a little confused about this myself. However, the latest version (never tried the earlier versions) of RPiTC don't have an inittab even before updating (just flashed another card to compare). Adding the inittab did not work for me. I think it has to do with moving from inittab to systemctl - haven't been following the changes in Linux kernels over the past few years.

Anyway, what I did to solve my problem was to copy the getty service script. (cp /lib/systemd/system/getty@.service /lib/systemd/system/autologin@.service)

Then, edit the autologin@.service script. Change the ExecStart line to ExecStart=-/sbin/agetty --autologin rpitc --noclear %I $TERM

Then, delete the old TTY1 link (rm /etc/systemd/system/getty.target.wants/getty@tty1.service)

Replace it with the new symbolic link to point to your new script (ln -s /lib/systemd/system/autologin@.service /etc/systemd/system/getty.target.wants/getty@tty1.service)

Restart - and TTY1 will auto login to the rpitc user. TTY2-TTY6 will still require a login. Which is also a result of the upgrade as the original installation had the root user auto login for TTY2-TTY6 when tabbing through different consoles.