Update caused failure

My last update apparently did not complete. The result is my Pi will not boot, nor can I force it into Rescue mode by holding down the shift key.

I have a Linux Mint laptop. I tried pulling the SD card from the Pi and inserting it into the card reader slot on the pc. I can read the boot partition just fine. However, the rootfs partition will not mount. It gives me an error that it is read only. I tried doing a remount rw and that too fails. I tried fsck and it will only run with the -n option due to it being read only. When I run it in that manner it shows no errors. I also ran a bad sector check and it says the card is fine… I would very much like to at least be able to read the card to copy off the latest snapshot. Can someone please offer suggestions?

Thanks very much,
Mike

Mount the partition read only then ? Or did I misunderstand this ?

It will not mount at all.

Not even as read only (with the -r command line option) ? What does mount say as error ?

There is a dialog box that pops up. The title bar states:

Unable to mount rootfs.

Then below that it states:

Error mounting /dev/sdb2 at media/mernst/rootfs1: cannot mount /dev/sdb2 read-only

Well that’s not a very helpful error message. Are you running mount from a CLI console ? Strange it opens a dialog box. There should be more info available on the reason of the failure. Try with the -v option (and run from a terminal console, not from some UI run dialog). Is there anything relevant in dmesg after you inserted the sd card and after you attempted the mount ?

So let me preface this by saying I am a Windows person far more than Linux. I can do the basic in Linux, but nothing very sophisticated.

That being said, I am running Linux Mint on the laptop. So that dialog box is showing up in the file explorer window.

If I open a terminal console and type mount /dev/sdb2 it states:
mount: /dev/sdb2: can’t find in /etc/fstab

Same thing with a -v

Not sure what to do to look at dmesg

Alright. So in the console window you’ll first create a folder where we’re going to (try to) mount the partition. That’s called the mount point:

mkdir rootfs1

Next, we’ll try to mount the partition:

sudo mount -r -v /dev/sdb2 ./rootfs1

Then check what the output is.

Next you can try the dmesg log and look at error messages near the end:

sudo dmesg

I just figured out dmesg. Obviously it is a very long file, however, near the bottom it is telling me it found a new USB Mass Storage device. It says write protect is on. Mode Sense: 03 00 80 00

No Caching mode page found
Assuming drive cache: write through
INFO: recovery required on readonly filesystem
write access unavailable, cannot proceed (try mounting with noload)

Then if i try to mount with noload, I get

mount: noload: mount point does not exist

You need to specify noload like this (from my example above):

sudo mount -o ro,noload /dev/sdb2 ./rootfs1

That gives me

mount: ./rootfs1: mount point does not exist.

I also tried ./rootfs - since that is what the partition is named

You didn’t follow the instructions :slight_smile:

You need to create the mount point first:

mkdir rootfs1

Do all this in a console window while in your home directory (it should put you there when you open it). You can call the mount point folder anything you want. It just has to exist.

SO I tried blockdev --report

It shows sdb, sdb1 and sdb2. all with the expected info. However, the size listed for sdb is 125069950976. This is a 128Gb micro sd card. That seems pretty close to being full. Is that a potential cause?

No, that’s normal. It shows the total size of the block device.

Did you try to mount with noload, as shown above ?

I did and it looks like it worked. Now how do I see the files and get them off, or better yet fix the issue? so it will boot.

if the mount worked, the files should be in the mount point folder you created, so rootfs1 in my example. Before trying anything else, make a copy of your snapshot or anything important first.

After that, once you have your important files backed up, I would reformat the thing and start over. The botched update might have damaged important files and it might never boot.

Awesome, thank you so much for your help!!!

You’re welcome, glad it worked. Always sucks to lose data.