Easy way to reduce number of partitions?


I’ve skimmed over this:

and it seems like each of the 12 partitions partition is needed.

Is there an easy way to reduce the number of partitions?

In my use case, I will capture data to the micro SD card, and then transfer that data to a Windows machine. When the micro SD card is inserted into a Windows machine, 12 dialog boxes, one per partition, pop up saying “You need to format the disk in drive X: before you can use it. Do you want to format it?”.

In addition, after closing the dialog box, another dialog box pops up saying “X: is not accessible…”, and I get one of these per partition.

So that’s a total of 24 dialog boxes that the user needs to cancel/dismiss whenever the card is inserted into a Windows machine.

Is there an easy way to collapse the 12 partitions into a smaller number of partitions, say 1 or 2, to alleviate this?

The partitions (other than root filesystem) are binary data and cannot be mounted or used as regular partitions. Embedded systems do not have a BIOS/UEFI, and as a result, that functionality tends to exist on partitions. Those partitions are used for booting.

Windows has no understanding of Linux filesystem types, and so the root partition cannot be mounted by Windows, although any Linux system can handle that.

In the case of the Nano I’m not sure what the best way is to add more space (other than a bigger SD card). Having windows understand the root filesystem is not much of an option until Microsoft adds ext4 support (not sure how well it will work on a Nano, but Samba is typically used on Linux to create a “network neighborhood” mount for Windows).

I don’t think you’re really supposed to do that. FWIW, it works find in a Linux machine and only mounts the root partition. That should work in a VM as well but you may still have to bypass the format warnings on card insert. You’re not going to be able to mount the root partition directly in Windows because Windows does not currently support mounting ext4 partitions.

Yes, the partitions are necessary because of the tegra boot flow. Please see the L4t development guide for more details. It also will tell you (nearly) anything you want to know about the board in general.

I would suggest just not trying to mount the card in Windows. If you need to transfer files on and off, sshfs / sftp is what I use, and that can work from any os.

I wasn’t very clear, sorry about that.

We currently use a RaspberryPi-like device that, similar to the nano, requires an SD card containing an ext4 partition in order to boot.

We use this same SD card to store image data captures taken by our users. Our users are non-programmers and are predominantly Windows users.

So what our users currently do is, after they’ve used the RPi-like device to capture the data that they need, they power off the device, remove the SD card, insert the card into a Windows machine, and copy their captured data from the card onto their Windows PC.

In order to do this, the SD card is formatted with two partitions: a FAT32 partition, and an ext4 partition. The ext4 partition contains the /boot directory needed to boot the machine, while the FAT32 partition holds the user’s data captures. (I believe the RaspberryPi uses a similar partitioning scheme on their SD cards, i.e. an ext4 partition and a FAT32 partition.)

In our current setup, when a user inserts this card into their Windows machine, they see two popup boxes:

  1. One saying “You need to format the disk in drive X: before you can use it. Do you want to format it?”
  2. and another saying "“X: is not accessible…”.

We just tell our users to dismiss these two popup boxes.

Now, we are looking at migrating our system to the nano, and we’re looking at doing something similar with the SD card (adding a FAT32 partition), but instead of seeing just two popup boxes as our users currently do, our users will instead see 24.

So I was just wondering if there was an easy way to merge the 12 partitions into one or two big ones instead of several small ones, to reduce the number of popup boxes that our users will have to dismiss.

The Pi needs a fat32 partition to boot, actually, and the system lives in the very large ext4 partition which is not accessible from Windows, so it’s the same issue.

No. It’s not possible. My recommendation would be the same as before: set up a network share so that the device can be connected to remotely.

Samba is a good option for local networks that just works but should never be exposed to the internet. Simply setting up ssh will let you use sftp and sshfs. That’s more secure option, especially if you require public key authentication, and will let your customers access a Nano/Pi/nearly_anything from nearly anywhere.

There is no risk of accidentally formatting partitions this way and no more need to ever remove the sd card unless something goes wrong.