On a Raspberry Pi with the raspbian distro i need to make an extra partition that can be read from both windows and linux.
So i use FDISK on /dev/mmcblk0 (the sd card) to create a new partition which is a FAT32 partition like so
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 16 125055 125040 61.1M b W95 FAT32
/dev/mmcblk0p2 125056 2000000 1874945 915.5M 83 Linux
/dev/mmcblk0p3 * 2000001 15523839 13523839 6.5G c W95 FAT32 (LBA)
After i have written the above and rebooted the device there is no extra drive or anything listed like the above partition, which i determine by using the df -h
command:
Filesystem Size Used Avail Use% Mounted on
/dev/root 885M 442M 384M 54% /
devtmpfs 483M 0 483M 0% /dev
tmpfs 487M 0 487M 0% /dev/shm
tmpfs 487M 6.5M 481M 2% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 487M 0 487M 0% /sys/fs/cgroup
tmpfs 487M 0 487M 0% /tmp
/dev/mmcblk0p1 61M 35M 27M 57% /boot
tmpfs 98M 0 98M 0% /run/user/0
The partition needs to be visible inside the linux terminal (mounted) and also visible if i pull out the card and plug it into a windows pc
df -h
only prints mounted filesystems. What doesfile -s /dev/mmcblk*
tell you? (you need to run that as root, you do not need to umount anything to be able to run that) – grochmal Jul 26 '16 at 21:53/dev/mmcblk0p3: data
but nothing more about mmcblk0p3 – Daniel Jørgensen Jul 26 '16 at 22:16mkfs.vfat -F 32 /dev/mmcblk0p3
– grochmal Jul 26 '16 at 22:38mkfs vfat -F 32 /dev/mmcblk0p3
it returns this outputmkfs.ext2: invalid blocks '/dev/mmcblk0p3' on device '32'
. I cannot writemkfs.vfat
as that gives mecommand not found
– Daniel Jørgensen Jul 26 '16 at 22:47command not found
was because i needed dosfstools. Got that and now the command worked it seems as i got no errors when i ran the command you mentioned. But i still dont see it indf -h
. Do i need to do anything further? – Daniel Jørgensen Jul 26 '16 at 22:52