5

I've got NOOBS on my SD card, and chose to install Raspbian on it.

Now what I want to do is to remove NOOBS from my SD card, while still keeping Raspbian and all of my programs/settings.

I tried backing up my Raspberry Pi by cloning an image via win32diskimager but if I restore the image to my SD card again, NOOBS will still be there (even if I format and create 1 partition).

So was wondering what I could do to delete NOOBS, while keeping all of my settings/programs? Thanks

Piotr Król
  • 346
  • 3
  • 14
synthesis
  • 125
  • 1
  • 1
  • 5
  • Have you resolved this? If so, could you mark an answer or create a self-answer and mark that? It will help get the site Q:A ratio up, and thus move us closer to graduation. Thanks! – RPiAwesomeness Mar 18 '14 at 23:30

7 Answers7

6

You could do this if you have a Linux computer, but it is far from straightforward.

I suggest you backup your data and do a fresh install of Raspbian.

If you have data you want to preserve you could follow the suggestions in:- https://raspberrypi.stackexchange.com/a/5492/8697

Milliways
  • 54,718
  • 26
  • 92
  • 182
3

The easiest way would be to back up your data, reformat the card and then install the Debian OS to the SD Card, I realize that it seems you want to remove NOOBS without having to reinstall Debian. Doing this would be both difficult and frustrating to do, and I don't see any need for it unless you have some valuable data on the Pi that somehow can't be backed up(which I wouldn't understand why it wouldn't be able to be backed up).

JVarhol
  • 668
  • 1
  • 5
  • 16
3

I know this article is a bit stale, but I hope this helps someone:

Just had to do this same thing in order to save space on backups. It actually wasn't difficult at all, provided you have some time and an extra SD card.

I started by creating a script that backed up everything I was interested in. Credit goes to this article for getting me started. I think rsync pushing to a remote machine would be better suited for this, but I had enough space on the original SD card to go this route. I can provide instructions for rsync too needed. Rsync supports exludes also, just exclude the same directories that the following script excludes.

    tar -zcvpf /backups/fullbackup.tar.gz --directory=/ --exclude=proc --exclude=sys --exclude=dev/pts --exclude=/etc/fstab --exclude=backups .

Next, I installed Raspian on the spare SD card, then moved the backup over to the new card. To restore the backup, I ran

tar -zxvpf /fullbackup.tar.gz

If you use rsync instead, you could probably restore a backup remotely, if space on either SD card is a concern.

NOTE: I didn't exclude fstab, and the article I linked doesn't mention to do so. Because NOOBS has a different partition map, it failed to boot. I just plugged the SD card into another linux machine and edited fstab to point to the proper partition. But if you follow the above steps, you shouldn't have to do this.

ThreepE0
  • 31
  • 2
  • That's the easiest way to go. Backup your current active OS partition on an external device and restore it on a plain Raspibian image. Keep in mind: If you use the commands suggested you need a Linux system. – framp Jun 23 '15 at 21:04
1

This it what I've done and what has worked for me, but I'm not entirely sure it applies to everyone so do this at your own risk :) (based partially on this post at raspberry forum)

I've tested this steps on a 8Gb Noobs image, with only one OS (Raspbian) installed. I have RECOVERY, BOOT, ROOT (Raspbian), and SETTINGS partitions.

  1. Insert sdcard into an linux computer (I use ubuntu)
  2. Backup the entire sdcard to an image file, just in case you need to restore it if something goes wrong! (sudo dd if=/dev/xxx of=~/my_backup.img). Replace "xxx" with the actual sdcard device and "my_backup" with whatever you like.
  3. Mount RECOVERY partition in a convenient location (sudo mount /dev/xxx /some/path)
  4. Mount BOOT partition also
  5. Copy all files in BOOT to RECOVERY
  6. Edit cmdline.txt (now in RECOVERY), where it says boot=/dev/something, change it to boot=/dev/anotherthing, where /dev/anotherthing must point to your current ROOT Raspbian partition (in my case it was root=/dev/mmcblk0p5)
  7. Unmount sdcard, put it back in the raspberry pi, and boot it. Hopefully, it should work.

To the extent of my knowledge, those steps should accomplish what you were looking for.

Additional (optional?) steps:

  • You could delete all non-essential files from RECOVERY (the ones that were there previous to overwriting them, the OS images that come with NOOBS, etc).
  • You could use gparted or some other partition manager to delete BOOT partition, resize (shrink) RECOVERY partition, and move your RASPBIAN partition to the left. This would "defragment" your sdcard and allow for a smaller general footprint.
  • You could edit /etc/fstab in your raspberry to reflect the new partition structure and filesystem mount points, and avoid warnings at boot.

If you are courious about why this works, I recommend you have a look at this wiki article about NOOBS partitioning and boot process. Hope this helps!

jotadepicas
  • 394
  • 4
  • 15
1

Expanding on OceansCrashing answer, this is the rsync syntax I used to successfully copy one live Pi (with noobs) to another one (running native Raspbian):

sudo rsync -avx --rsync-path="sudo rsync" --progress --exclude=proc --exclude=sys --exclude=dev/pts --exclude=/etc/fstab --exclude=backups pi@xx.xx.xx.xx:/ /

Where xx.xx.xx.xx is the IP address of the source Pi and this command is run on the target Pi.

  • This doesn't really answer the question as it involves a new installation. It may work, but will not preserve hardlinks any you would be better using the backup procedure recommended. – Milliways Jun 21 '16 at 02:18
  • Thanks - good point about hardlinks. The `-H` (or `--hard-link`) option on rsync may take care of that issue, but fortunately the process still worked for me and I'm successfully running the "cloned" image. Agreed, this still requires a new installation, just as your answer recommended. ;-) – Jeremy Willden Jun 22 '16 at 21:18
0

NOOBS wouldn't let me expand the partition after putting the image on a larger SD Card so I ended up using moving the var folder contents of the NOOBS install, then deleted the original folder and made the change in fstab And once I remembered to make the empty var folder on the root, it worked.

Just another alternative.

-1

The partitions on NOOBS that will contain the boot and root of Raspbian, AFAIK, are 5 and 6 (/dev/mmcblk0p5 and /dev/mmcblk0p6), and this is only in the case that the NOOBS has been used to activate only one OS (Raspbian in your case). These partitions are labelled "boot" and "root". IF you have other OS's installed then they might be in other places.

see: https://github.com/raspberrypi/noobs/wiki/NOOBS-partitioning-explained

Therefore, you could take these partitions with, say, parted/gparted, and put them only on a SD-card. If you haven't done massive modifications to the boot partition you could even just copy only the root partition (save it in some other drive), then put a fresh Raspbian image on a new SD-card, and paste your saved old root partition on top of the newly created one on the new card. This would bring all your installed programs, desktop preferences etc. The two partitions are extended logical partitions, and you would have to change the boot partition to be primary and first (use gparted again). Then you would also need to edit cmdline.txt in the boot partition to tell the system where the root partition is. Also, remember to expand the root partition in order to get all the space that NOOBS was using to your own use.

This is easy to do with a linux computer, if you don't have one, you can make your windows computer into a temporary linux computer with Gparted live. It's an image that you get from the net and burn on cd/dvd/usbflash and then boot from it to a linux with gparted (a GUI-program).

tpylkkö
  • 1
  • 1
  • 1
    You obviously haven't tried this. It is not impossible, but requires a lot of other configuration changes. – Milliways Oct 23 '14 at 04:00
  • 1
    what more should one do. I realize that the boot partition atleast has to be a primary and the first partition, and if you just copy-paste the entire partition it will probably not be that... is there more? you are right, I have never done this, but I have succesfully moved the root partition from a sd-card to usb hdd and edited cmdline.txt to reflect that. This is a bit more complicated, but still doable, not? – tpylkkö Oct 23 '14 at 05:47
  • I think the problem is that there are changes in both Raspbian and NOOBS since this answer was posted. But I haven't tried it myself and if I followed this tutorial I would most likely solve the problems on my own and forget about them, forgetting to even mention it here. – Paul Stelian Aug 16 '19 at 20:27