Boot on /sda1 and get rid of /mmcblk0p1

Hi Community,

The title says it all: I want to get rid of this (really annoying) mmcblk0p1 partition on the latest Ubuntu image and boot directly into /sda1. The current mmcblk0p1 partition is only 14GB large on my 64GB SDcard, which means I just loose ~40GB of storage! I can’t even apply system updates!

I’ve already installed some applications onto mmcblk0p1: is there any way to copy everything to sda1 before deleting the partition?

Thanks in advance for any help!

Hi jeanluc.garnier,

Are you using the devkit from NVIDIA or custom board for Jetson Nano?

How did you flash the image?
Could you help to share the result of lsblk and df -h on your board?

Hi Kevin,

I’m using the devkit and used BalenaEtcher to flash the latest image on a 64GB SDcard.

$ lsblk
loop0          7:0    0    16M  1 loop 
mmcblk0      179:0    0  14,7G  0 disk 
├─mmcblk0p1  179:1    0    14G  0 part /
├─mmcblk0p2  179:2    0     1M  0 part 
├─mmcblk0p3  179:3    0     6M  0 part 
├─mmcblk0p4  179:4    0    80K  0 part 
├─mmcblk0p5  179:5    0    64M  0 part 
├─mmcblk0p6  179:6    0     1M  0 part 
├─mmcblk0p7  179:7    0     6M  0 part 
├─mmcblk0p8  179:8    0    80K  0 part 
├─mmcblk0p9  179:9    0    64M  0 part 
├─mmcblk0p10 179:10   0   192K  0 part 
├─mmcblk0p11 179:11   0   256K  0 part 
├─mmcblk0p12 179:12   0    63M  0 part 
├─mmcblk0p13 179:13   0   512K  0 part 
├─mmcblk0p14 179:14   0   256K  0 part 
├─mmcblk0p15 179:15   0   256K  0 part 
├─mmcblk0p16 179:16   0   300M  0 part 
└─mmcblk0p17 179:17   0 185,4M  0 part 
mmcblk0boot0 179:32   0     4M  1 disk 
mmcblk0boot1 179:64   0     4M  1 disk 
mmcblk0rpmb  179:96   0     4M  0 disk 
zram0        252:0    0 494,5M  0 disk [SWAP]
zram1        252:1    0 494,5M  0 disk [SWAP]
zram2        252:2    0 494,5M  0 disk [SWAP]
zram3        252:3    0 494,5M  0 disk [SWAP]
$ df -h
Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur
/dev/mmcblk0p1      14G     13G  213M  99% /
none               1,7G       0  1,7G   0% /dev
tmpfs              2,0G     83M  1,9G   5% /dev/shm
tmpfs              2,0G    100M  1,9G   6% /run
tmpfs              5,0M    4,0K  5,0M   1% /run/lock
tmpfs              2,0G       0  2,0G   0% /sys/fs/cgroup
tmpfs              396M     16K  396M   1% /run/user/1000

Thanks in advance for your help!

Are you sure that current mmcblk0 is SD card? Or it is internal eMMC?
Could you help to try if you board could boot up w/o SD card connected?

Could be… 🤔 I’m out of the office for some days and will try to boot w/o the SD card as soon as I’m back.
Thanks again for your help!

Hi Kevin,

Back to the office this morning, I tried to remove the SD card and boot the machine: you guessed right as the board booted on its internal mmcblk0 card.

Now the obvious question: how can I 1) copy all my software from the internal eMMC to the SD card and 2) deactivate the eMMC to boot on the SD card (or change the boot options)?

Thanks in advance for your help!

Not an answer, but some related information: Since this has eMMC, it is not a dev kit. It is a separately purchased module with a third party carrier board. Most likely it requires the third party board support package for any kind of flash (which is usually the same as dev kit, but with modified device tree).

SD card models (dev kits) have the SD card slot on the module itself; third party setups with an eMMC module have the SD card on the carrier board, and not on the module. Drivers and device tree differ quite a bit for these, and normally SD card boot is not supported on a third party carrier board without additional work (e.g., it might use an initrd flash).

SD card content on a dev kit is just the rootfs. There are a lot of other partitions, and they will either be found in QSPI memory (on the module; part of a dev kit), or in those other eMMC partitions. Boot content intended to be on an eMMC partition will need to remain there even if you are booting to an SD card rootfs. See this regarding some of the “extra” partitions of an eMMC model:

Don’t even try to put those extra partitions on an SD card for an eMMC model.

Thanks a lot for this clear explanation! I understand I’ve tried to copy/paste things on different boards and that is never a recipe for success! 🤦‍♂️

I’ll then dig deeper into the manufacturer’s documentation to see how I can 1) keep the system on the eMMC and 2) use the SD card (which is indeed on the carrier board 😉) as the /home partition where my software will run.

Thanks again! 👍

Your carrier board manufacturer will have the information for that. You’ll likely end up with all of the non-rootfs partitions on eMMC, and the rootfs on the SD card. This would open up a lot of space on eMMC (the rootfs is by far the majority of space used on eMMC). However, it is possible that you still need the “/boot” on eMMC if it chain loads to SD. An actual flash with correct parameters would be needed to avoid chain loading from eMMC to SD (the boot partitions are not part of the chain loading other than perhaps pointing at the first extlinux.conf file to use; if the pointer is set during flash to look for the SD card, then it will look there first, and only the non-rootfs of eMMC is needed).

Surprising: I thought keeping rootfs partitions on the eMMC would be better, as the system is rather stable, whereas the application, which will collect thousands of images, would better fit on the SD card… 🤔
By the way, thanks for the hint, I’ll check this against the manufacturer’s documentation! 🙏

FYI, if you have a separate SD card (not with rootfs), and if you just want to mount this at some particular location other than “/”, then this is fairly trivial. As an example, most of the space consuming NVIDIA optional software goes to “/usr/local” (as do many third party packages). One could create a large SD card partition, format it as ext4, and mount in on “/usr/local” (probably after cloning the original “/usr/local” content). Then add a proper “/etc/fstab” mount specification. This is trivial. However, if you want to do this, please ask since an incorrect fstab entry could cause boot to halt when the SD card is not present (the usual fstab entry can be modified to make it tolerate a missing SD card).

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.