lanwarrior
Posts: 41
Joined: Fri Aug 22, 2014 6:05 am
Location: Somewhere in the you-es-a

Tons of errors after doing apt-get update and upgrade

Sat Aug 23, 2014 7:26 am

First of all, here's my setup:

1. Raspberry B+ model
2. Samsung 32gb EVO MicroSDHC Class 10 (MB-MP32DA/AM)
3. ASUS 2.0A USB power (used to charge Nexus tablet)
4. RASPBIAN Version: June 2014; Release date:2014-06-20
5. Apple USB keyboard
6. Logitech USB mouse
7. Internet: wired

I successfully installed the OS and the Pi is working. I can change hostname, change keyboard layout, startx, etc. Internet is working, as I can ping anywhere and date is set via NTP.

I did "sudo apt-get update", which was successful. Then I did "sudo apt-get upgrade". Looks to be working, but I get an error about not enough disk space. I typed in "df -h" and noticed the partition is 94% full (total space is about 2.6 Gb).

So I went to raspi-config and expanded the partition. Rebooted and back to the OS. Ran "sudo apt-get upgrade", which is now successful. I did a "sudo reboot" command, and this is what is shown (HINT: right click on the image and select "Open Image in new tab to see the text") :

Image

Stuck like this forever, so I unplugged the power, wait for a moment, and plugged it again. These are now shown:

Image
Image

My Pi simply won't boot into the OS anymore. I couldn't figure it out - power supply is good and the microSD card should not be the problem, because I was able to use it before (see above).

Any idea what is wrong?

UPDATE: Rebooted the Pi, the error seems to happen with USB identification during boot time (see image above). I wonder if the "upgrade" have any conflict with the USB controller in B+, Apple keyboard or Logitech mouse?
Last edited by lanwarrior on Sat Aug 23, 2014 7:40 am, edited 1 time in total.

User avatar
joan
Posts: 14175
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Tons of errors after doing apt-get update and upgrade

Sat Aug 23, 2014 7:30 am

No idea, apart from SD card corruption.

I'd cut your losses and re-install from scratch, but expand the SD card before you do the upgrade.

lanwarrior
Posts: 41
Joined: Fri Aug 22, 2014 6:05 am
Location: Somewhere in the you-es-a

Re: Tons of errors after doing apt-get update and upgrade

Sat Aug 23, 2014 7:34 am

joan wrote:No idea, apart from SD card corruption.

I'd cut your losses and re-install from scratch, but expand the SD card before you do the upgrade.
That'll be the last resort. I am still Googling if this is a known issue and if anyone have other ideas.

I don't mind re-installing, but I just reinstalled the OS twice and this will be the 3rd in the last 2 hours! :(

User avatar
RaTTuS
Posts: 10406
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Tons of errors after doing apt-get update and upgrade

Sat Aug 23, 2014 7:53 am

corrupt filesystem
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
joan
Posts: 14175
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Tons of errors after doing apt-get update and upgrade

Sat Aug 23, 2014 7:57 am

A common problem (which can cause SD card corruption) is not enough voltage at the Pi. If you have a meter it would be worth (carefully) checking the voltage between pin 2 (5V) and pin 6 (Ground). Only do this if you are confident that you won't short a pin to ground.

See http://elinux.org/RPi_Low-level_periphe ... .28GPIO.29 (ignoring the fact that the B+ has additional pins 27-40).

lanwarrior
Posts: 41
Joined: Fri Aug 22, 2014 6:05 am
Location: Somewhere in the you-es-a

Re: Tons of errors after doing apt-get update and upgrade

Sat Aug 23, 2014 8:23 am

joan wrote:A common problem (which can cause SD card corruption) is not enough voltage at the Pi. If you have a meter it would be worth (carefully) checking the voltage between pin 2 (5V) and pin 6 (Ground). Only do this if you are confident that you won't short a pin to ground.

See http://elinux.org/RPi_Low-level_periphe ... .28GPIO.29 (ignoring the fact that the B+ has additional pins 27-40).
Hmm, that's interesting. I have a USB Current Voltage Multimeter, like this one:

Image

I use this vigorously to test all kind of USB chargers (even the powered-cigarette-lighter in my car!) because many USB charger and cables doesn't output the full 1A / 2A, even though the charger is capable of 2A output, and my phones and tablets get charged really slow. The multimeter will show how much current is being pulled by the device. I.e. my Samsung note 3 need more than 1A and the multimeter will show the USB charger is putting out 1.65A when the Note 3 is getting charged - but when the phone is about 90% full, it pull less - the multimeter show 1.05A.

BTW, I am using this same USB charger and cable for the Pi. If it is good for the Note 3 (it's a power hungry phone - it will charge very slowly when connected to a 1A USB charger), I assume it is good for the Pi.

Anyway, I tested this with the Pi B+ and it shows output of 5.15v and 0.30A (?!) during boot time. Can't test it after the boot process is done since the OS is now toast. I have a feeling that the card is corrupted because during the upgrade, there was not enough disk space. If (and only if) this is true, I think the Wiki should be updated.

I'll reinstall the OS (the 3rd one tonight! ;)), but this time will expand the partition BEFORE the upgrade. I will also test the power output using the multimeter. I will provide update soon.

lanwarrior
Posts: 41
Joined: Fri Aug 22, 2014 6:05 am
Location: Somewhere in the you-es-a

Re: Tons of errors after doing apt-get update and upgrade

Sat Aug 23, 2014 9:13 am

OK, reinstalled the OS from scratch. I didn't make any significant change other than change the Location Option from the raspi-config (1st boot).

Expanded the partition --> did sudo apt-get update and then sudo apt-get upgrade.

It FAILED when trying to upgrade wolfram-engine. Same error (see picture above) shown. I unplugged the power on the Pi, and this time it can boot just fine. Changed the USB power to another 2 different ones - both I know output 2A just fine since I've been using it with my phones and tablets and the USB multimeter show output of 5.14v and 1.65A.

Dis another apt-get upgrade, which show that there is only ONE remaining upgrade --> wolfram-engine. Tried the upgrade, and it failed... error about reading directory block. All this time, the USB multimeter show power usage of 5.14v and 0.36 - 0.40A.

2nd reboot... guess what? Corrupted SD card. So I think it has to do with the wolfram-engine and not the USB power.

Can I just disable this wolfram-engine? Or is this a known issue?

fruitoftheloom
Posts: 20433
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Tons of errors after doing apt-get update and upgrade

Sat Aug 23, 2014 9:19 am

SD Cards do wear out, they do not last forever, I had this issue with some old cards I used, cut my losses and started afresh ;)
adieu

Asus CS10 Chromebit / HP Envy 4500 Wireless Printer / Raspberry Pi Model 2B v1.1 / RealVNC Software...

lanwarrior
Posts: 41
Joined: Fri Aug 22, 2014 6:05 am
Location: Somewhere in the you-es-a

Re: Tons of errors after doing apt-get update and upgrade

Sat Aug 23, 2014 9:20 am

fruitoftheloom wrote:SD Cards do wear out, they do not last forever, I had this issue with some old cards I used, cut my losses and started afresh ;)
This is a brand new SD card, though. I just purchased it. I have another one coming today, so I'll test that.

But this is really bizarre... WITHOUT doing apt-get upgrade, everything works just fine. AFTER the apt-get upgrade, everything got corrupted....twice now.

Is this has to do with the B+?

fruitoftheloom
Posts: 20433
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Tons of errors after doing apt-get update and upgrade

Sat Aug 23, 2014 9:45 am

lanwarrior wrote:
fruitoftheloom wrote:SD Cards do wear out, they do not last forever, I had this issue with some old cards I used, cut my losses and started afresh ;)
This is a brand new SD card, though. I just purchased it. I have another one coming today, so I'll test that.

But this is really bizarre... WITHOUT doing apt-get upgrade, everything works just fine. AFTER the apt-get upgrade, everything got corrupted....twice now.

Is this has to do with the B+?
What entries are in sources list ? $ nano /etc/apt/sources.list

Code: Select all

deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
deb http://raspberrypi.collabora.com wheezy web
adieu

Asus CS10 Chromebit / HP Envy 4500 Wireless Printer / Raspberry Pi Model 2B v1.1 / RealVNC Software...

lanwarrior
Posts: 41
Joined: Fri Aug 22, 2014 6:05 am
Location: Somewhere in the you-es-a

Re: Tons of errors after doing apt-get update and upgrade

Sat Aug 23, 2014 6:06 pm

fruitoftheloom wrote: What entries are in sources list ? $ nano /etc/apt/sources.list

Code: Select all

deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
deb http://raspberrypi.collabora.com wheezy web
Entries in sources /etc/apt/sources.list:
1). BEFORE update and upgrade

Code: Select all

deb http://mirrordirector.raspian.org/raspbian/ wheezy main contrib non-free rpi
2). AFTER apt-get update
Same as above

I rebuilt the OS again and this time I tried swapping the USB chargers (all 2.0A), USB cables and another microSD card (same model - 32gb Samsung Evo). All has been tested to output 1A< using the multimeter. As usual, everything went fine UNTIL I execute "sudo apt-get upgrade" - then is all downhill from there. I tried doing this from terminal (no XServer) and within XServer (resulting in hang and shutdown of the terminal).

At "sudo apt-get upgrade", this is what is shown:

Code: Select all

[email protected] ~ $ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be upgraded:
  apt apt-utils base-files cups-bsd cups-client cups-common dbus dbus-x11 dpkg dpkg-dev gnupg gpgv krb5-locales
  libapt-inst1.5 libapt-pkg-dev libapt-pkg4.12 libc-bin libc-dev-bin libc6 libc6-dev libcups2 libcupsimage2
  libdbus-1-3 libdpkg-perl libgssapi-krb5-2 libjpeg8 libk5crypto3 libkrb5-3 libkrb5support0 libsmbclient libssl1.0.0
  libwbclient0 libxml2 locales multiarch-support openssh-client openssh-server openssl python-picamera python-rpi.gpio
  python3-picamera python3-rpi.gpio rpi-update samba-common smbclient ssh tzdata wolfram-engine
48 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 272 MB of archives.
After this operation, 9,448 kB of additional disk space will be used.
Do you want to continue [Y/n]? 
I think I can conclude that my hardware (USB charger, cable and Pi B+ itself) are fine, it has to be the OS or the upgrade process. It can't be a coincidence that the same exact error happen even when I swapped the hardware as mentioned above. Any other input?

FYI, below are the steps I did for installing the OS:

Preparation
1). Format card with the SD Formatter program (from sdcard.org) with "Logical Address Adjustment" selected.
- Also tried formatting using OSX Disk Utility
2). Unmount the card
3). sudo dd bs=1m if=2014-06-20-wheezy-raspbian.img of=/dev/disk1

OS configuration
1). Expand filesystem
2). Set Internationalisation Options
- Change Locale
- Unselect en_GB.UTF-8 UTF-8
- Select en_US.UTF-8 UTF-8
- Asked about “Default locale for the system environment:” - answered OK
- Change Timezone
- Select US
- Select Pacific Ocean
- Change Keyboard Layout
- Generic 105-key (Intl) PC
- Select “Other”
- Select English (US)
- Select English (US) - 2nd screen
- Select “The default for the keyboard layout”
- Select “No compose key”
- Asked about “Use Control+Alt+Backspace to terminate the X server?” - answered NO
3). Select “Finish” and reboot
4). Pi booted OK - got to command prompt
5). Internet is working - ping anywhere works and date set via NTP
6). That's it, nothing else is configured...

lanwarrior
Posts: 41
Joined: Fri Aug 22, 2014 6:05 am
Location: Somewhere in the you-es-a

Re: Tons of errors after doing apt-get update and upgrade

Sat Aug 23, 2014 9:03 pm


User avatar
joan
Posts: 14175
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Tons of errors after doing apt-get update and upgrade

Sat Aug 23, 2014 9:09 pm

All I get from that is do a

sudo rpi-update

to make sure the firmware is the latest.

fruitoftheloom
Posts: 20433
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Tons of errors after doing apt-get update and upgrade

Sat Aug 23, 2014 9:21 pm

lanwarrior wrote:FYI... apparently I am not the only one...

Github: https://github.com/raspberrypi/linux/issues/398
Other post: http://www.raspberrypi.org/forums/viewt ... 28&t=75298

Code: Select all

sudo rpi-update
If you have undertaken the rpi-update, then it may be prudent to roll back to an earlier version
adieu

Asus CS10 Chromebit / HP Envy 4500 Wireless Printer / Raspberry Pi Model 2B v1.1 / RealVNC Software...

lanwarrior
Posts: 41
Joined: Fri Aug 22, 2014 6:05 am
Location: Somewhere in the you-es-a

Re: Tons of errors after doing apt-get update and upgrade

Sat Aug 23, 2014 9:25 pm

fruitoftheloom wrote:
lanwarrior wrote:FYI... apparently I am not the only one...

Github: https://github.com/raspberrypi/linux/issues/398
Other post: http://www.raspberrypi.org/forums/viewt ... 28&t=75298

Code: Select all

sudo rpi-update
If you have undertaken the rpi-update, then it may be prudent to roll back to an earlier version
I have not. The update && upgrade was done before the rpi-update.

But based on @joan suggestion, I am now trying to do the rpi-update, then update && upgrade.

fruitoftheloom
Posts: 20433
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Tons of errors after doing apt-get update and upgrade

Sat Aug 23, 2014 9:27 pm

lanwarrior wrote:
fruitoftheloom wrote:
lanwarrior wrote:FYI... apparently I am not the only one...

Github: https://github.com/raspberrypi/linux/issues/398
Other post: http://www.raspberrypi.org/forums/viewt ... 28&t=75298

Code: Select all

sudo rpi-update
If you have undertaken the rpi-update, then it may be prudent to roll back to an earlier version
I have not. The update && upgrade was done before the rpi-update.

But based on @joan suggestion, I am now trying to do the rpi-update, then update && upgrade.
Maybe try:

Code: Select all

sudo apt-get update
sudo apt-get dist-upgrade
After undertaking rpi-update recently
uname -a
Linux raspberrypi 3.12.26+ #704 PREEMPT Wed Aug 20 22:35:11 BST 2014 armv6l GNU/Linux
adieu

Asus CS10 Chromebit / HP Envy 4500 Wireless Printer / Raspberry Pi Model 2B v1.1 / RealVNC Software...

lanwarrior
Posts: 41
Joined: Fri Aug 22, 2014 6:05 am
Location: Somewhere in the you-es-a

Re: Tons of errors after doing apt-get update and upgrade

Sat Aug 23, 2014 9:49 pm

fruitoftheloom wrote: Maybe try:

Code: Select all

sudo apt-get update
sudo apt-get dist-upgrade
OK, did the following in order:

Code: Select all

sudo rpi-update
Reboot...

Code: Select all

sudo apt-get update
sudo apt-get dis-upgrade
...and.... corrupted SD again. The upgrade was able to fetch all the new package and during installation, it corrupted the entire SD card (see picture below), just like before.

I don't know what else to do... I can use my B+, I just can't upgrade any of the packages. :(

Image

User avatar
joan
Posts: 14175
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Tons of errors after doing apt-get update and upgrade

Sat Aug 23, 2014 10:03 pm

It certainly doesn't seem to like that SD card. Have you tried with another card?

fruitoftheloom
Posts: 20433
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Tons of errors after doing apt-get update and upgrade

Sat Aug 23, 2014 10:09 pm

joan wrote:It certainly doesn't seem to like that SD card. Have you tried with another card?
+1 SD Card knackered, maybe http://www.cgsecurity.org/wiki/TestDisk ?
adieu

Asus CS10 Chromebit / HP Envy 4500 Wireless Printer / Raspberry Pi Model 2B v1.1 / RealVNC Software...

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1423
Joined: Sat Sep 10, 2011 11:43 am

Re: Tons of errors after doing apt-get update and upgrade

Sun Aug 24, 2014 6:54 am

Have you tried a different sd card type / manufacturer? Just to see if the problem is related to the SD card type / manufacturer, makes it much easier to reproduce

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

gkreidl
Posts: 6041
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Tons of errors after doing apt-get update and upgrade

Sun Aug 24, 2014 7:02 am

Maybe the controller of the "ultra fast" 32gb Samsung Evo simply cannot handle lots of open files being written to at the same time. This will never happen in a digital camera, but on a linux system this is normal. Try another brand.

BTW, for about the same price you'll get a small HD. Use a simple small SD card for the boot directory and move the root FS to the HD. End of all corruption problems.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

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

Re: Tons of errors after doing apt-get update and upgrade

Sun Aug 24, 2014 1:35 pm

Don't know if this will help and maybe I am over cautious, but I always reboot the RPi right after expanding the filesystem without attempting to do any other configurations.
Of course I use a proper shutdown/ reboot command ...... sudo shutdown -r now ....... or similar.

You might want to check that the filesystem actually got expanded. Your errors are similar to what I got when I let a SD card get too full and then did update/upgrade.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

lanwarrior
Posts: 41
Joined: Fri Aug 22, 2014 6:05 am
Location: Somewhere in the you-es-a

Re: Tons of errors after doing apt-get update and upgrade

Sun Aug 24, 2014 9:26 pm

gkreidl wrote:Maybe the controller of the "ultra fast" 32gb Samsung Evo simply cannot handle lots of open files being written to at the same time. This will never happen in a digital camera, but on a linux system this is normal. Try another brand.
I choose the Samsung Evo because it's proven to be very reliable (it's #1 item in Amazon). I use it in Mac, PC and Android with no problem and it is fast. I even use it for Time Machine and Carbon Copy (tons of files read/write) and it works well. My though is that this will be good for the B+, since Pi can be "finicky" on SD card.

However, I have been rebuilding the OS and played around with the B+ since yesterday, WITHOUT doing any update && upgrade, and no SD corruption whatsoever. I added wireless USB dongle, enabled SSH, tried to browse the Internet with built-in browser (it's a slow browser!), etc. The moment I did apt-get upgrade... BAM!! SD card corruption.

Regardless, reading through the SD card "compatibility" page (http://elinux.org/RPi_SD_cards#Is_this_reliable.3F), it seems that there are certain cards that the Pi just won't take, regardless of brand, size or speed. So it could be the Samsung Evo is not compatible when doing the upgrade.

In any case, I am going to procure another SD card now - maybe something like class 4 and 8gb / 16gb.
Last edited by lanwarrior on Sun Aug 24, 2014 11:58 pm, edited 1 time in total.

lanwarrior
Posts: 41
Joined: Fri Aug 22, 2014 6:05 am
Location: Somewhere in the you-es-a

Re: Tons of errors after doing apt-get update and upgrade

Sun Aug 24, 2014 9:26 pm

klricks wrote:Don't know if this will help and maybe I am over cautious, but I always reboot the RPi right after expanding the filesystem without attempting to do any other configurations.
Of course I use a proper shutdown/ reboot command ...... sudo shutdown -r now ....... or similar.

You might want to check that the filesystem actually got expanded. Your errors are similar to what I got when I let a SD card get too full and then did update/upgrade.
I did. After reboot, I executed "df -h" to verify the space.

lanwarrior
Posts: 41
Joined: Fri Aug 22, 2014 6:05 am
Location: Somewhere in the you-es-a

Re: Tons of errors after doing apt-get update and upgrade

Mon Aug 25, 2014 1:26 am

UPDATE:

I got a SandiskUltra microSDHC 16GB Class 10 UHS-1 30MB/s (SDSDQUA-016G-A11A) from my local store. After the 2nd reboot, I got another SD corruption. <sigh>.

I do have a really old, 8Gb Sandisk Class 4, which has been sitting in my drawer for about a year. I don't even know the model number, so I can check't it @ RPi SD Card. So I tried it and... work OK! Update & upgrade works. Tried further configuration, like setting up wifi, SSH, etc. No problem so far.

I will do more testing to see if this card is solid, but looks like B+ doesn't like Class 10 microSDHC cards. Can anyone let me know which Class 10 will work with the B+ and what size? Class 10 cards now is cheap ($14 here in the US), so I am hoping I can use one.

Return to “Troubleshooting”