andrein
Posts: 2
Joined: Wed Feb 05, 2020 10:49 pm

RPI recovery partition

Wed Feb 05, 2020 11:10 pm

Hi,

I am trying to reinstall Raspbian due to a segmentation fault that causes apt get to malfunction. I read that this is the best alternative for fixing segmentation fault issues. When I was trying to format the SD card i noticed a recovery partition on my RPI and I was wondering how I can use that instead of going to the whole process of formatting the SD card, if possible. I looked for answers on the forum but I didn't find anything.

I'm sorry if I posted in the wrong place or in the wrong way.

User avatar
Botspot
Posts: 1241
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas
Contact: Website

Re: RPI recovery partition

Thu Feb 06, 2020 3:48 pm

It's probably going to be easier for you to just use Etcher on a computer to flash Raspbian Buster to the SD card.

But if flashing the SD card with another computer is not convenient for you, AFAIK you can "factory reset" the Raspbian:
  • Boot the Raspberry Pi. (plug it in)
  • As soon as you plug it in, press and hold Shift to get into the NOOBS Recovery Mode.
  • Delete your existing Raspbian and then download a fresh one. This answer on stackexchange lists everything you can do in NOOBS recovery mode.
Want to make your own Raspbian image?
  • Hard way: Mess with confusing terminal commands.
  • Easy way: Let Pi-Power-Tools do it all for you!
Boot your image in a VM, Flash from the Internet at top speed, Mount (to drop files in), Edit partitions, Shrink/Expand, Repair, and more. Enjoy! :)
https://github.com/Botspot/Pi-Power-Tools

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

Re: RPI recovery partition

Thu Feb 06, 2020 4:16 pm

Botspot wrote:
Thu Feb 06, 2020 3:48 pm
It's probably going to be easier for you to just use Etcher on a computer to flash Raspbian Buster to the SD card.

But if flashing the SD card with another computer is not convenient for you, AFAIK you can "factory reset" the Raspbian:
  • Boot the Raspberry Pi. (plug it in)
  • As soon as you plug it in, press and hold Shift to get into the NOOBS Recovery Mode.
  • Delete your existing Raspbian and then download a fresh one. This answer on stackexchange lists everything you can do in NOOBS recovery mode.
Forget NOOBS use PINN. It has a self-updater and can replace any existing oS with a new version. NOOBS can only re-install the original version (stored in the wasted 1.3GB on the NOOBS SDCard).
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 non-medical doctors are on my foes list.

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

Re: RPI recovery partition

Thu Feb 06, 2020 5:26 pm

andrein wrote:
Wed Feb 05, 2020 11:10 pm
When I was trying to format the SD card i noticed a recovery partition on my RPI and I was wondering how I can use that instead of going to the whole process of formatting the SD card, if possible.


If you have a recovery partition on the microSD card it probably means that it was created using the NOOBS Installer.

So the documentation for the NOOBS Installer is helpful:
On first boot NOOBS will repartition your SD card and allow you to select which OSes you want to install from a list. This OS list is automatically generated from both locally available OSes (i.e. those contained in the /os directory on disk) or those available from our remote repository (network connection required).

Only the latest version of each OS will ever be displayed meaning that you can be sure that you have installed the most up-to-date release of your selected OS.

On any subsequent boot you can then press the SHIFT key to enter the NOOBS interface and easily reinstall your choice of OSes.
Ref: https://github.com/raspberrypi/noobs/bl ... E.md#about


The functionality provided by the option highlighted above seems to be what you are looking for.

User avatar
Botspot
Posts: 1241
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas
Contact: Website

Re: RPI recovery partition

Thu Feb 06, 2020 6:19 pm

DougieLawson wrote:
Thu Feb 06, 2020 4:16 pm
Forget NOOBS use PINN.
True, PINN or a direct flash from the downloads page is superior. But it sounds like the OP does not have easy access to another computer to do the formatting when they said "i noticed a recovery partition on my RPI and I was wondering how I can use that instead of going to the whole process of formatting".
Want to make your own Raspbian image?
  • Hard way: Mess with confusing terminal commands.
  • Easy way: Let Pi-Power-Tools do it all for you!
Boot your image in a VM, Flash from the Internet at top speed, Mount (to drop files in), Edit partitions, Shrink/Expand, Repair, and more. Enjoy! :)
https://github.com/Botspot/Pi-Power-Tools

st999
Posts: 1
Joined: Mon Jun 22, 2020 1:41 pm

Re: RPI recovery partition

Mon Jun 22, 2020 8:30 pm

How could I implement auto recovery from recovery partition when RPi 4 faied to boot into the primary partition? "Auto recovery" means no users attend on-site, this usually happened when sudden power outage and some OS system files are corrupted.

drgeoff
Posts: 10676
Joined: Wed Jan 25, 2012 6:39 pm

Re: RPI recovery partition

Mon Jun 22, 2020 8:41 pm

st999 wrote:
Mon Jun 22, 2020 8:30 pm
How could I implement auto recovery from recovery partition when RPi 4 faied to boot into the primary partition? "Auto recovery" means no users attend on-site, this usually happened when sudden power outage and some OS system files are corrupted.
Even if that were possible it may not be that useful to you. AIUI the recovery partition can restore back to original Raspbian/RPiOS that was in the NOOBS download. It won't have any OS updates that you invoked manually. It won't have any programs that you added. It won't have any network settings other than DHCP on the ethernet jack. It won't have any cron or auto-run jobs that you have configured. Etc.

User avatar
Botspot
Posts: 1241
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas
Contact: Website

Re: RPI recovery partition

Mon Jun 22, 2020 9:45 pm

In that case you may want to make your SD Card read-only. There's an option for it in raspi-config.
Want to make your own Raspbian image?
  • Hard way: Mess with confusing terminal commands.
  • Easy way: Let Pi-Power-Tools do it all for you!
Boot your image in a VM, Flash from the Internet at top speed, Mount (to drop files in), Edit partitions, Shrink/Expand, Repair, and more. Enjoy! :)
https://github.com/Botspot/Pi-Power-Tools

User avatar
procount
Posts: 2209
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: RPI recovery partition

Mon Jun 22, 2020 11:08 pm

st999 wrote:
Mon Jun 22, 2020 8:30 pm
How could I implement auto recovery from recovery partition when RPi 4 faied to boot into the primary partition? "Auto recovery" means no users attend on-site, this usually happened when sudden power outage and some OS system files are corrupted.
PINN also has the ability to backup an OS to USB stick with can then be restored in the case of failure. You can even restore remotely with VNC, but you need to be able to reboot your failed OS into PINN in the first place.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

Return to “Beginners”