Page 1 of 1

RPI recovery partition

Posted: Wed Feb 05, 2020 11:10 pm
by andrein
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.

Re: RPI recovery partition

Posted: Thu Feb 06, 2020 3:48 pm
by Botspot
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.

Re: RPI recovery partition

Posted: Thu Feb 06, 2020 4:16 pm
by DougieLawson
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).

Re: RPI recovery partition

Posted: Thu Feb 06, 2020 5:26 pm
by B.Goode
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.

Re: RPI recovery partition

Posted: Thu Feb 06, 2020 6:19 pm
by Botspot
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".

Re: RPI recovery partition

Posted: Mon Jun 22, 2020 8:30 pm
by st999
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.

Re: RPI recovery partition

Posted: Mon Jun 22, 2020 8:41 pm
by drgeoff
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.

Re: RPI recovery partition

Posted: Mon Jun 22, 2020 9:45 pm
by Botspot
In that case you may want to make your SD Card read-only. There's an option for it in raspi-config.

Re: RPI recovery partition

Posted: Mon Jun 22, 2020 11:08 pm
by procount
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.