smudger
Posts: 4
Joined: Mon Oct 14, 2013 8:55 am

Removing OS's post Noobs installs

Mon Oct 21, 2013 2:26 pm

Successfully installed all available OS's via Noobs to try out - but now wish to free up SDCard.by removing the OS's I no longer want. Want to avoid starting again from scratch/reformatting and have identified the appropriate boot partions to remove which I could do with gparted on my laptop. I guess I need to identify also root partions. Also identify the RasPi equivalent of grub menu and edit out the redundant items.

If there is an easier way directly within Noobs that would be great.Is there such a way? If not what are the steps for manual OS removal without reformatting the whole SDCard.

I suspect this might be something a lot of new users might want to do as newbies would probably want to try out all available OS and then remove unwanted installs without having to reformat and start again each time they wanted to remove an OS.

Any tips welcome
.

User avatar
DeeJay
Posts: 2027
Joined: Tue Jan 01, 2013 9:33 pm
Location: East Midlands, UK

Re: Removing OS's post Noobs installs

Mon Oct 21, 2013 2:50 pm

NOOBS (at least from v.1.3) can do this for you without reformatting the SD card and re-installing NOOBS onto it.

However, it WILL need to do a re-install of your chosen OS, and thus will lose any stored files and os updates.

If you are content with that as a solution, simply get to the NOOBS Recovery Console by using Shift at Boot time, select ONLY the one OS you want to have installed, and choose Install at the top left of the screen. It will remind you that the existing content of the sd card will be overwritten.

I suspect that more complex operations on the partitions for installed Operating System will be thought beyond the scope of NOOBS, but I would urge you to raise it as an 'issue' on the NOOBS github site if you feel strongly about it. https://github.com/raspberrypi/noobs/bl ... /README.md
How To Ask Questions The Smart Way: http://www.catb.org/~esr/faqs/smart-questions.html
How to Report Bugs Effectively: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

alpacapi
Posts: 1
Joined: Sat Dec 05, 2015 9:49 pm

Re: Removing OS's post Noobs installs

Sat Dec 05, 2015 10:27 pm

You can "safely" manually remove systems installed after your primary os.
This can be done by removing those systems partitions and editing noobs menu file.

This instruction may ruine your data. Be sure to have backups or at least cleanly understand what you're doing.

NOOBS os list is located at /media/SETTINGS/installed_os.json , there you can see what OS installations use which partitions ( "partitions" property ).

Partitions layout (can be seen by cfdisk /dev/mmcblk0 ) should be look like (excluding free space gaps)

Code: Select all

- /dev/mmcblk0p1 # NOOBS boot, FAT16
- /dev/mmcblk0p2 # MBR extended
    - /dev/mmcblk0p5 # first OS boot, FAT32
    - /dev/mmcblk0p6 # first OS root, ext4
    - /dev/mmcblk0p7 # second OS boot, FAT32
    - /dev/mmcblk0p8 # second OS root, ext4
    - /dev/mmcblk0p9 # third OS boot
    - /dev/mmcblk0p10 # third OS root
   # ...
- /dev/mmcblk0p3 # NOOBS root, ext4
also there may be a 512 MB "Data" partition created by NOOBS.

You can remove any partition within mmcblk0p2 (logical), but it will cause renumbering of following partitions, so if you don't want to edit all configs, etc, then you can safely remove only partitions going after your primary OS partitions. Say if your primary is "second OS", then you can remove partitions /dev/mmcblk0p9 /dev/mmcblk0p10 and further. DO NOT REMOVE /dev/mmcblk0p3.

After that you can cleanup removed OS from /media/SETTINGS/installed_os.json , but this is not essential.

After cleanup, you can extend your last partition (probably root partition of primary OS, or data partition) to desired size. You can use one of easilly googlable manuals for that operation.

* Instruction written during resizing of OSMC root partition which was third in OS list and there was 5 more after. No data was lost.
* not sure if NOOBS will allow to install new OSes after those procedures, but probably should.

camasaki
Posts: 12
Joined: Thu Dec 08, 2016 5:58 pm

Re: Removing OS's post Noobs installs

Thu Jan 05, 2017 8:47 am

It seems the new location of the OS file is /media/pi/SETTINGS/installed_os.json (note the /pi subdirectory).

Also, I did not have any partition 3.

I've made a small guide for future reference here:
http://raspberrypi.stackexchange.com/a/59899/57747

Return to “Troubleshooting”