McGooch
Posts: 13
Joined: Mon Jul 02, 2012 11:34 pm
Location: Victoria, Canada

Fails to boot after apt-get dist-upgrade

Fri Apr 22, 2016 7:40 pm

I'm currently using the latest Raspbian image (Jesse 2016-03-18) with the Pi 3 and having terrible luck.

Firstly, I get errors on boot saying "Failed to start login service" but it does eventually boot into X. Then a dialog opens saying "No session for pid 775" (the actual id value may change).

So I tried updating to see if that would help:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

Now it doesn't boot into X at all. Just a black screen after the initial boot spew. Can anyone tell me what is going on here? Was this image tested on the Pi 3?


Patrick

klricks
Posts: 8392
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA

Re: Fails to boot after apt-get dist-upgrade

Fri Apr 22, 2016 11:25 pm

Did you install with NOOBS or the standalone version (Win32Diskimager)? If standalone, did you expand the filesystem to fill the card?
Unless specified otherwise my response is based on the latest and fully updated RPi OS Bullseye w/ Desktop OS.

McGooch
Posts: 13
Joined: Mon Jul 02, 2012 11:34 pm
Location: Victoria, Canada

Re: Fails to boot after apt-get dist-upgrade

Fri Apr 22, 2016 11:32 pm

This is with the standalone image (not NOOBS).
This is from the first boot. Nothing resized.

klricks
Posts: 8392
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA

Re: Fails to boot after apt-get dist-upgrade

Fri Apr 22, 2016 11:46 pm

McGooch wrote:This is with the standalone image (not NOOBS).
This is from the first boot. Nothing resized.
You MUST expand the filesystem and reboot before attempting to do any upgrades or software installations.
On first boot or ASAP, go to the Raspberry Pi Configuration in [Menu] --> [Preferences] or run sudo raspi-config from a LXterminal command prompt. Do the first option in either method.
You will likely need to start again and re-image your card then do the expand in order to recover from the errors you have.
Last edited by klricks on Fri Apr 22, 2016 11:50 pm, edited 1 time in total.
Unless specified otherwise my response is based on the latest and fully updated RPi OS Bullseye w/ Desktop OS.

McGooch
Posts: 13
Joined: Mon Jul 02, 2012 11:34 pm
Location: Victoria, Canada

Re: Fails to boot after apt-get dist-upgrade

Fri Apr 22, 2016 11:50 pm

Fair enough for the upgrades, but what about "Failed to start login service"? Is that expected?

klricks
Posts: 8392
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA

Re: Fails to boot after apt-get dist-upgrade

Fri Apr 22, 2016 11:55 pm

McGooch wrote:Fair enough for the upgrades, but what about "Failed to start login service"? Is that expected?
No.
When you don't expand there is only 115MB free space to spare regardless of the size of the SD card. If you run out of disk space during an update/upgrade then the OS can get trashed in any number of ways.
Unless specified otherwise my response is based on the latest and fully updated RPi OS Bullseye w/ Desktop OS.

peterlite
Posts: 722
Joined: Sun Apr 17, 2016 4:00 am

Re: Fails to boot after apt-get dist-upgrade

Sat Apr 23, 2016 12:55 am

You can also expand the partition using something like gparted. There are stand alone gparted and Linux distributions you can load onto a USB stick then boot on any PC without using the PC OS. You then expand partition 2, the Ext4 partition, to fill the rest of the card.

McGooch
Posts: 13
Joined: Mon Jul 02, 2012 11:34 pm
Location: Victoria, Canada

Re: Fails to boot after apt-get dist-upgrade

Sat Apr 23, 2016 9:33 pm

Just to follow up. The error messages during boot do go away if I resize the partitions from another machine prior to first boot in the Pi.

After that, the dist-uprade etc. works as expected. Is there some reason why there are no warnings or error messages that the partition is out of space and the OS is about to be corrupted? Seems pretty fragile.

Thanks for then help everyone!

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: Fails to boot after apt-get dist-upgrade

Sat Apr 23, 2016 9:56 pm

McGooch wrote: Is there some reason why there are no warnings or error messages that the partition is out of space and the OS is about to be corrupted? Seems pretty fragile.
This is discussed in these forums about every day, several times a day, so you are correct that it needs some sort of heads up. But it is true that this issue, needing to expand the partition, is a requirement essentially every time someone writes an OS image to a partition since that image is going to be cut down to minimum size and tons of extra free space is just wasted, unless it's compressed somehow. Probably the best plan would either involve a MOTD screaming at the user on first boot, or the first boot just going into raspi-config for the expansion. Perhaps both are in order.

DirkS
Posts: 10748
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Fails to boot after apt-get dist-upgrade

Sat Apr 23, 2016 10:11 pm

stderr wrote:Probably the best plan would either involve a MOTD screaming at the user on first boot, or the first boot just going into raspi-config for the expansion. Perhaps both are in order.
RPF Raspbian images will auto expand on first boot in the near future.

Return to “Raspberry Pi OS”