Raspberry Pi Disk Drives
The output from the sudo fdisk -l
command you provided displays detailed information about all the disk drives currently recognized by your Raspberry Pi's operating system.
Here's a breakdown of what this output tells you:
RAM Disks
/dev/ram0 to /dev/ram15: These entries represent RAM disks, which are block devices mapped to segments of your system's RAM. They are shown with a size of 4 MiB each, and a total of 16 such devices are listed. These are used by the system for operations that require fast data access, temporary storage, or testing purposes. Each RAM disk has:
Sector size (logical/physical): 512 bytes / 16384 bytes
I/O size (minimum/optimal): 16384 bytes
Total sectors: 8192 sectors
microSD Card
/dev/mmcblk0: This device represents your microSD card, which is the primary storage device for Raspberry Pi. It is shown with a total size of 238.75 GiB.
This is typical for a Raspberry Pi setup as the microSD card often contains the operating system and user data.
Sector size (logical/physical): 512 bytes
I/O size (minimum/optimal): 512 bytes
Total sectors: 500695040 sectors
This suggests that the entire microSD card is treated as a single block device without separate partitions listed under it, which might mean it has a basic data layout or is being read as a whole unit.
USB Flash Drive
/dev/sda: This is a USB Flash Drive connected to the Raspberry Pi, showing a total capacity of 28.91 GiB. This drive has a DOS disklabel type and contains two partitions:
/dev/sda1:
Type: W95 FAT32 (LBA)
Size: 512M
This is likely a boot partition, formatted with the FAT32 filesystem, commonly used for Raspberry Pi boot partitions or for general compatibility with various operating systems.
/dev/sda2:
Type: Linux
Size: 28.4G
This is a larger partition likely used for Linux files and data storage.
MicroSD Card
To properly analyse the microSD card on your Raspberry Pi, you can use the sudo fdisk -l
command to identify the device name and then use additional commands to gather more information.
Here's how you can analyse the microSD card:
Identify the microSD card device:
Output
Based on the output you provided, the microSD card is represented by the device /dev/mmcblk0
.
It has a total size of 238.75 GiB.
Find Partition Numbers
To find the actual partition numbers for your microSD card, you can use the lsblk
command, which lists block devices and their partitions. Here's how you can find the partition numbers:
Run the following command:
This command will display a tree-like output showing the block devices and their partitions.
Look for the entry corresponding to your microSD card (usually /dev/mmcblk0
).
Output
Check the partition layout
Output
This command displays the partition table of the microSD card, showing the partition numbers, start and end positions, sizes, and file system types.
Check the file system usage:
Output
This command displays the file system disk space usage for partitions on the microSD card.
It shows the total size, used space, available space, and mount points of each partition.
Check the file system type:
This command displays the file system type and UUID (Universally Unique Identifier) of each partition on the microSD card.
Check the file system health (this is if your MicroSD card has partitions)
Replace mmcblk0p1
and mmcblk0p2
with the actual partition numbers of your microSD card.
The fsck
command checks the file system integrity and can fix minor issues.
Analyse disk usage visually:
Replace /mount/point
with the actual mount point of the microSD card partition you want to analyse.
ncdu
provides an interactive way to explore the disk usage of directories and files on the microSD card.
Check for bad blocks
This command scans the microSD card for bad blocks, which are physical defects on the storage media. It's a destructive test, so make sure to have a backup of your data before running it.
By following these steps, you can gather detailed information about your microSD card, including its partitions, file system types, disk space usage, and health status. This information can help you understand how your Raspberry Pi's storage is organized and identify any potential issues.
Remember to be cautious when running commands with sudo
and double-check the device names and mount points to avoid accidentally modifying or damaging your system.
Last updated
Was this helpful?