Accessing the RECOVERY/BOOT partition
Windows and macOS X do not support the ext4 format, so when you read the SD card, only the File Allocation Table (FAT) partitions will be accessible. In addition, Windows only supports the first partition on an SD card, so if you've installed NOOBS, only the RECOVERY partition will be visible. If you've written your card manually, you will be able to access the BOOT partition.
The data partition (if you installed one via NOOBS) and the root partition are in ext4 format and won't usually be visible on non-Linux systems.
Access the partitions from Raspberry Pi. To view the currently mounted partitions, use df, as shown in the following screenshot:
To access the BOOT partition from within Raspbian, use the following command:
cd /boot/
To access the RECOVERY or data partition, we have to mount it by performing the
following steps:
- Determine the name of the partition as the system refers to it by listing all the partitions, even the unmounted ones. The sudo fdisk -l command lists the partitions, as shown in the following screenshot:
The following table shows the names of partitions and their meanings
If you have installed additional operating systems on the same card, the partition identifiers shown in the preceding table will be different.
- Create a folder and set it as the mount point for the partition; for the RECOVERY partition, use the following command:
mkdir ~/recovery sudo mount -t vfat /dev/mmcblk0p1 ~/recovery
To ensure that they are mounted each time the system is started, perform the following steps:
- Add the sudo mount commands to /etc/rc.local before exit 0. If you have a different username, you will need to change pi to match:
sudo nano /etc/rc.local sudo mount -t vfat /dev/mmcblk0p1 /home/pi/recovery
- Save and exit by pressing Ctrl + X, Y, and Enter.
If you have to install additional operating systems on the same card, the partition identifiers shown here will be different.