Whenever I try to update my pi using sudo apt-get update && sudo apt-get upgrade
it will often hang at some point during the installation. It's been different ones each time, but the last was pulse audio.
Furthermore, I am able to ping the pi and an ssh appears to connect, but never gives me a prompt. I've had another terminal open at the same time and top
shows the CPU around 90+%
Has anyone else encountered this?
I can attach logs once I am able.
3 Answers 3
I also had a problem with a hanging update. The reason was the power source. I had a 400mA power source that was to low for the RaspberrPi. I've changed to 1000mA and it was running nicely. Perhaps you can check that?
-
It seems to be my problem! With another power source everything is OK.Valeriy Van– Valeriy Van2014年10月05日 10:47:35 +00:00Commented Oct 5, 2014 at 10:47
Updating the system is an I/O-intensive operation. The OS does not immediately write data to the SD card, instead it will buffer it in the RAM. At some point, it will try to write these buffers to the SD card. Since the SD card is not fast enough the OS will look unresponsive when flushing buffers.
Another possibility is that your system is running out of memory, thereby causing swapping. If you do not have swap space, the OS will start killing random processes. If you do have swap, but on slow media, it will still take some time before processes can continue.
-
Would you suggest transferring the OS to the HDD that is attached and only using the SD card for boot then?whotyjones– whotyjones2013年05月11日 00:01:51 +00:00Commented May 11, 2013 at 0:01
-
@whotyjones That is a possibility, but personally I would just get a fast SD card from a well-known brand and update the system when daemons and GUI are closed. (I have the
SDSDU-008G-U46
, 8 GB myself for 9ドル.00)Lekensteyn– Lekensteyn2013年05月11日 08:17:03 +00:00Commented May 11, 2013 at 8:17 -
I'll order one and see how it works. It's something I'd considered but I didn't think it would cause that much of an issue.whotyjones– whotyjones2013年05月12日 21:32:48 +00:00Commented May 12, 2013 at 21:32
It failed for me upgrading a Raspberry Pi 2 W when upgrading the wpasupplicant when using the command 'sudo apt-upgrade -y'. When I used 'sudo upgrade -y' it worked the first time.
sudo apt-get upgrade
procedure stopped at some moment. And after that I can not connect to my RPi via SSh. But I can still have access to my server test page. The ACT-led is shining all the time. And this continues for 3 days.free -m
. There was still about 300M free and no swap in use. Currently, it's hanging and has been for 10 hours. It's not just an issue with OS unresponsiveness during disk flush.