ⓘ This article may have been partially or fully translated using automatic tools. We apologize for any errors this may cause.
If you have a computer that is not running Linux then you faced a problem, you cannot read the partition rootfs
SD cards from your Raspberry Pi from your PC!
We will see how you can read Linux partitions, and therefore rootfs
, from a Windows or Mac OS system.
- List the partitions: Use parted -l to identify the storage device you want to partition.
- There are plenty of reasons for having Ubuntu run on a Mac, including the ability to broaden your technology chops, learn about a different OS, and run one or more OS-specific apps. You may be a Linux developer and realize that the Mac is the best platform to use, or you may simply want to try out Ubuntu.
The material used
Linux – and anything resembling Unix, really – doesn’t quite work that way. The way Linux works is that it puts everything onto a tree. If you have another partition or disk, it gets “mounted” as a branch in a specific folder, usually /media or /mnt. The directory that a partition gets mounted to is called a “mount point.”. Follow the steps below to make space for Windows Partition, make sure don’t touch the macOS. Installer USB we’re gonna need it again. Open Disk Utility. Select your SSD and Click Partition. Click on (+) and adjust the slider for the new partition. Select the Format MS-DOS (FAT). Extremely powerful partition manager. Copy, clone partitions. Can also resize NTFS.
To be able to read Linux partitions from Windows or Mac, it's all about software. To follow this tutorial you will therefore only need:
- A PC capable of reading SD cards, or a USB / MicroSD adapter.
Why can't I read rootfs from Windows or Mac?
The big problem with computers, contrary to what one might think, is not the lack of standards. Rather, it is their overabundance …
In our case the score rootfs
uses a named format ext4
which is a Linux format. The problem is, Windows and Mac use different standards for their file systems. Consequently, it is not possible to read systems ext4
from Windows or Mac.
To be able to read our score rootfs
we will therefore have to find a way to read ext4
from Mac and Windows.
Read Linux partitions from Windows and Mac OS.
Obviously, the easiest way to read Linux partitions would be to install Linux on your machine or make a bootable USB stick with a temporary system. There is, however, another solution that does not require you to restart your PC every time.
For this, we will install software capable of reading a Linux file system and mounting it on a Windows or Mac OS file system. There are several software programs that can do this, but personally I use Paragon Linux Filesystems from Parangon Software, especially since it is available for Windows and Mac and has a free version.
You will therefore need to download and install this software, here for Windows and here for Mac OS.
Linux Partition Manager
All you have to do is launch the software, click on your SD card icon and on 'Mount'.
Linux List Partitions
Your score rootfs
is now accessible from the file explorer!
Linux Partitions Setup
Flags indicate that a certain property, characteristic, or feature is active or is present. Flags can either be on or off. If the flag is not seen, then it is off or inactive/non-existent. Certain flags are only supported on particular filesystems and partitioning tables. The GUID Partitioning Table (GPT) and MS-DOS partitioning table support the most flags. The flags (on GPT) are actually 128-bit GUIDs on the GUID partitioning table. Each flag has its own GUID.
Parted can be used to format a storage device with a particular partitioning table (also called a 'disk-label'). Doing so will erase all partitions and data on the selected storage device. The command is 'parted mklabel DISKLABEL'. The command requires Root privileges. The user will need to create new partitions for the storage device. Supported partitioning tables (supported by parted) include the listed below.
- bsd
- loop (raw disk access)
- gpt
- mac (Apple Partition Map (APM))
- msdos (commonly called MBR)
- pc98
- sun
NOTE: Other partitioning tables exist, but parted does not support all of them.
To configure a flag on a partition, the parted command is 'parted set PARTITION# FLAG ON/OFF'. Use this command with Root privileges. For example, to set partition 3 as the boot partition, the command would be 'parted set 3 boot on'. The flag name is case-sensitive.
Below are descriptions and explanations for many flags as well as a list of the partitioning tables that support it (in brackets). This may not be a complete list of flags.
Install Linux Partitions
- atvrecv - [GPT] This is a flag for Apple TV Recovery Partitions.
- bios_grub - [GPT] The partition with this flag is used as the GRUB BIOS partition. The partition usually uses about a megabytes of space and is not needed by EFI-booting systems.
- boot - [Mac, MS-DOS, GPT, PC98] This flag indicates that the partition is bootable. On MS-DOS partitioning tables, only one partition may have this flag. However, other partitioning tables allow multiple partitions to have this flag.
- DIAG - [MS-DOS] The partition is used for recovery and diagnostics.
- esp - [MS-DOS, GPT] This flag indicates an UEFI System Partition. GPT uses this flag as an alias for 'boot'. The UEFI firmware stores files on this partition.
- hidden - [MS-DOS, PC98] Partitions with this flag are hidden from Microsoft operating systems.
- hp-service - [GPT] This the flag for HP Service Partitions. This partition uses the FAT filesystem.
- irst - [MS-DOS, GPT] Intel Rapid Start Technology partitions use this flag.
- lba - [MS-DOS] This flag is used by DOS, Windows 9x, and Windows ME and tells the system to use Linear Mode (Logical Block Addressing).
- legacy_boot - [GPT] Some software (mostly legacy) recognize this flag as indicating that the GPT partition may be bootable.
- LVM - [MS-DOS] This flag indicates to Linux that the partition is a physical volume.
- msftdata - [GPT] This flag is applied to Microsoft Basic Data Partitions (BDP), such as NTFS and FAT filesystems including drive C:. This flag can only be removed if the flags 'boot' or 'msftres' is applied.
- msftres - [GPT] Windows uses this flag to indicate a Microsoft Reserved Partition (MSR). This is only used on GPT partitioning tables and not MS-DOS (MBR) partitioning tables. Since GPT and the UEFI specification do not allow hidden partitions (exceptions apply), Microsoft Reserved Partitions are needed to replace hidden sectors sometimes used by Windows. Windows (on GPT) needs this partition and it must be before the primary and bootable partitions, but after the EFI System Partition (ESP) and OEM service partitions.
- PALO - [MS-DOS] The marked partition can use the Palo bootloader (used by Linux/PA-RISC).
- PREP - [MS-DOS, GPT] On PowerPC PReP and IBM RS6K/CHRP hardware, this flag indicates that the marked partition supports PReP booting. The PreP partition is not the same as the /boot/ directory or mountpoint.
- raid - [MS-DOS] Linux recognizes this flag as a software RAID partition.
- root - [MAC] This flag is used to inform Linux which partition is the root.
- swap - [MAC] This is used to indicate that a swap partition is for a Linux system.
Further Reading
Best Partition For Linux
Partitioning Mac For Linux
- GUID Partition Table (GPT) - https://en.wikipedia.org/wiki/GUID_Partition_Table
- Filesystem Reading Guide - http://www.linux.org/threads/filesystem-article-index.6028/
- Partition Tables - http://www.linux.org/threads/partition-tables.4895/