adafruit / Adafruit-Pi-ExternalRoot-Helper

A shell script to configure a USB drive as root filesystem.
MIT License
68 stars 25 forks source link

Noobs Partition is Different #3

Open misterben opened 9 years ago

misterben commented 9 years ago

The Noobs partitioning scheme is a little different, which means that the editing of cmdline.txt and /etc/fstab doesn't work.

In Noobs, the root partition is /dev/mmcblk0p6 - unsure if there is an automatic way to discover if you're running under noobs or not....

brennen commented 9 years ago

Yeah, at the time I elected to just write this for non-NOOBS installations, but we've had enough inquiries that it seems worth looking into. No promises, but I'll investigate.

misterben commented 9 years ago

Simplest way might be to

  1. Replace mmcblk0p2 with mmcblk0p[2-9] in the sed command on line 135 - there should only be a single reference to an mmc partition in cmdline.txt
  2. Line 141 in /etc/fstab might be trickier, but you should still be able to match the line with something like:

/mmcblk0p[2-9]\s+\/\s+ext4/

(ie any mmc partition from 2 to 9 followed by whitespace then / then whitespace then ext4 - it made sense in my head, but I haven't tested it)

Obviously I'm assuming that mmcblk0p1 is going to be /boot in every case....

Lewiscowles1986 commented 8 years ago

n00bs itself has a problem with this setup. AFAIK it is programmed to install to the SD; updating the boot text file after overwriting the partition.