2

I created my own Rasbian image, with the following partitions:

$ sudo fdisk -l 2018-11-13-raspbian-stretch-lite.img
Disk 2018-11-13-raspbian-stretch-lite.img: 2,5 GiB, 2705326080 bytes, 5283840 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x7ee80803

Device                                Boot   Start     End Sectors  Size Id Type
2018-11-13-raspbian-stretch-lite.img1         8192   98045   89854 43,9M  c W95 FAT32 (LBA)
2018-11-13-raspbian-stretch-lite.img2        98304 4292607 4194304    2G 83 Linux
2018-11-13-raspbian-stretch-lite.img3      4292608 4395007  102400   50M 83 Linux
2018-11-13-raspbian-stretch-lite.img4      4395008 5283839  888832  434M  c W95 FAT32 (LBA)

When I insert my sd-card in a Windows PC I expect to be able to access to the FAT32 partitions (first and last one). Instead only the first one is shown.

What's wrong here? I cannot see differences between the two.

migrated from serverfault.com Jan 10 at 17:41

This question came from our site for system and network administrators.

1

This is "normal" in Windows systems, except Windows 10 from version 1703.

This article was posted just after the issue was fixed. As far as I know it was fixed in Windows 10 only. Few quotes:

Microsoft has added secretly a new feature to Windows 10 Creators Update: This is the first Windows build that supports multiple partitions on removable media (like USB-Sticks). […]

Storage media like hard discs and removable media (USB sticks) are classified into two categories:

  • Hard disks and media with Fixed Media Bit set
  • Removable media (like USB sticks) with Removable Media Bit (RMB) set

The Fixed or Removable Media Bit is set by the firmware of a media controller.

[…]

Media with Removable Media Bit (RMB) set are treated in Windows as removable devices. Windows has restrictions for removable media – for instance, Windows file system (Windows Explorer) can mount only the first partition on such a device.

It’s possible, to create multiple partition on a USB stick using third party tools or Linux or even Windows command line tool diskpart. But (in contradiction to Linux) Windows will show only the first partition in Explorer for instance. All other partitions are ignored. This causes conflicts, if a multi-partition USB stick created under Linux shall be formatted in Windows. Windows formats only the first partition.

According to my best knowledge there is no technical reason (nor ever was a reason) to treat removable media this way. Especially since for some media it's possible to flip the relevant bit and then Windows magically starts to treat them right. The whole issue seems to be just an effect of some obscure arbitrary decision made by Microsoft many years ago.

So my guess is you're using either outdated Windows 10 or any older Windows and what you experience is "normal".

The obvious advice is to use up-to-date Windows 10 or Linux. If for any reason you want to stick to your current Windows and still access the "missing" partition, these are your options:

  • Dual boot: Windows + Linux.
  • An SD card reader that will introduce your SD card as a fixed drive. I suppose it's possible but I don't expect you can easily find such reader.
  • An application that will read the FAT32 filesystem and give you access to it. Technically possible but maybe such application doesn't even exist, because "what for? doesn't Windows support FAT32 by itself?"
  • Virtual Linux (e.g. in VirtualBox) with your current Windows as a host. Then you connect a USB card reader and use the "USB pass-through" option. This way Linux detects the reader as if it was directly connected, you can mount any partition. Strange mounting rules in Windows won't affect this. The approach is inconvenient because any transfer between Windows and the SD card must go through Linux. This may be your best option though.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.