I/O Errors after apt-get dist-upgrade

Hello,

I have installed Ubuntu MATE on my RPi2.
Problem is when I update Ubuntu (apt-get dist-upgrade) and reboot afterwards, the boot screen throws I/O errors and won’t boot anymore.

I have tried to reinstall several times to no avail.

Also, after the first boot I expanded the filesystem by using the commands posted on the main page (fdisk, resize2fs).

Can someone look into this?

UPDATE: It is not the apt-get command that screws things up.
It’s the whole fdisk/resize2fs thing that gives these errors.

What I did was:

  1. Wait until OS is fully installed and booted.
  2. Typed “fdisk /dev/mmcblk0” and followed the instructions.
  3. Reboot.
  4. Type “resize2fs /dev/mmcblk0p2”.
  5. Reboot.

After this the system throws error after error.
No recovery possible.

It sounds like the Micro-SD card is showing signs of a fault, or the partitioning is corrupt (which could depend how the image was copied onto the card). I’d suggest trying another Micro-SD card and/or giving this one a zero wipe.

If you have another Ubuntu desktop/laptop, you can install a utility named gnome-disk-utility which can present a GUI that can completely format (zero wipe) the card.

sudo apt-get install gnome-disk-utility

To run, type gnome-disks or access from the Accessories menu
You can also use this tool to wipe and restore the image back onto the card.

If you prefer the terminal, you can use dd:

sudo dd if=/dev/zero of=/dev/sdX

Replace X with the letter of the card. This is potentially dangerous! You could wipe another drive if you use the incorrect letter. Note that this cannot be done on the Pi since the card in use.

If you’re on Windows, the Disk Management program should allow you to delete all partitions and start over.

I solved the problem by resizing the MicroSD card on another Linux computer.

EDIT: I was too quick drawing my conclusions. It’s still broken.
I have reformatted the drive by overwriting it with zero´s. Running another test as I speak.
If this doesn´t work, I will bring it back to the store and have it replaced by a new one.