User avatar
gdw35
Posts: 29
Joined: Thu Nov 15, 2012 10:46 am
Location: Paris, France

Help needed - boot problems

Wed Dec 28, 2016 5:19 pm

I have managed to get myself into a right mess.

A few days ago I got my Pi out for the first time in a while wanting to play some retro games. Everything was working just fine until I decided to do some updates. The SD card I have was set up with Raspbian Wheezy distribution. After updating RetroPie I was told that I needed to update to a later version of Raspbian to allow it to run so this is when my troubles started.

I followed the process to upgrade the distribution. Both running "apt-get update" and "apt-get upgrade" pointing to the Jessie distribution worked just fine however when running "apt-get dist-upgrade" an error was encountered when attempting to upgrade vsftp and the update aborted. I tried re-running several times but each time it failed when attempting to update vsftp. In frustration I ran the command "apt-get remove vsftp" and then tried running the upgrade again. This time nothing was processed so I thought it was all OK to reboot. Bad idea.

On reboot I was just shown the rainbow screen, nothing else. Removing the SD card and having a look on my Mac showed that the boot directory was empty. I tried renaming boot.bak to boot but this just ended up with the same result.

In frustration I reformatted the SD card. I did make a back up of the SD card with my Mac early in the year so I thought I could just restore it and start again. I now get an error when I attempt to restore the backup image onto the card. Here is the message:

Code: Select all

bash-3.2# dd bs=1m if=Grants-Pi-SD-080215.img of=/dev/rdisk3
dd: /dev/rdisk3: Input/output error
60907+0 records in
60906+0 records out
63864569856 bytes transferred in 4022.555946 secs (15876614 bytes/sec)
After this failure I eject the card from my Mac and then reinsert it. Both partitions are accessible, both called "Untitled". If I then eject the SD card and try it in my Pi the Pi will start to boot and then fails stating that it cannot mount the disk. Putting the car back in my Mac only the BOOT partition mounts. The other partition is visible in Disk Utility but is not being mounted.

I suspect that there is an issue with the main partition of the SD card. How can I fix this with my Mac. Any help would be appreciated as I do not want to lose everything I have done.

User avatar
B.Goode
Posts: 10404
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Help needed - boot problems

Wed Dec 28, 2016 6:22 pm

Might the restoration of the backup work if you restore to a target microSD card that is 'one size larger' than the original? (ie. if your original was an 8G card will it restore correctly to an 16G card?)

User avatar
gdw35
Posts: 29
Joined: Thu Nov 15, 2012 10:46 am
Location: Paris, France

Re: Help needed - boot problems

Wed Dec 28, 2016 6:33 pm

B.Goode wrote:Might the restoration of the backup work if you restore to a target microSD card that is 'one size larger' than the original? (ie. if your original was an 8G card will it restore correctly to an 16G card?)
Thanks for your reply. SD card and image are 64GB, really not wanting to go out and buy a 128GB card. Besides, the image (backup), I have was made from the SD card I am trying to restore to (on Mac).

User avatar
DougieLawson
Posts: 39560
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Help needed - boot problems

Wed Dec 28, 2016 6:38 pm

You can get an X86 linux system running with the PIXEL X86 DVD or USB ISO.

http://sirlagz.net/2013/03/10/script-au ... downsizer/
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

User avatar
B.Goode
Posts: 10404
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Help needed - boot problems

Wed Dec 28, 2016 6:57 pm

the image (backup), I have was made from the SD card I am trying to restore to (on Mac).
Sadly, it looks as though a block on the SD card has failed (become unwritable) since the backup was taken, so there isn't room to reinstate the original data.

A more convoluted solution, still involving the purchase of a usb card reader, is to do a fresh installation of Raspbian onto the SD card and then using that system as your workstation mount the image of the backup and extract any important files or resize (shrink) the backup.

A variation on this, as @Dougie Lawson has suggested, is to boot a conventional laptop with the new Pixel for x86 in live CD mode and use that to recover your work.

User avatar
gdw35
Posts: 29
Joined: Thu Nov 15, 2012 10:46 am
Location: Paris, France

Re: Help needed - boot problems

Wed Dec 28, 2016 7:03 pm

Thanks all for help.

Current status is that I am now able to mount both partitions on my Mac and have full access to both. I guess that is good new. Fortunately I have ExtFS for Mac installed so am able to mount and check ext partitions. When I do a check of the main ext3 partition I get an error, as follows:

Code: Select all

Verifying file system.
Checking volume /dev/rdisk3s2...                                               
Step 1: Checking inodes, blocks, and sizes                                     
Step 2: Checking directory structure                                           
Step 3: Checking directory connectivity                                        
Step 4: Checking reference counts                                              
Step 5: Checking group summary information                                     
ERROR read bitmaps: while retrying to read bitmaps                             
ERROR Check aborted                                                            
Check finished                                                                 
     60.10 GB total disk space.                                                
         0 KB in 106586 files.                                                 
         0 KB in 11181 directories.                                            
         0 KB in bad blocks in 0 fragments.                                    
         4 KB in each allocation unit.                                         
  15753984 total allocation units on volume.                                   
  12893400 allocation units available on volume (49.18 GB).                    
No repairs were necessary for volume /dev/rdisk3s2.                            
File system check exit code is 0.
No options to do a repair.
Boot is still failing on Pi when trying to mount main partition.
I guess my only option now is to reformat and install a new distribution and then try and remember everything I have to reinstall to get my Pi back to what it was before. Unless anyone else has some bright ideas.

Return to “Troubleshooting”