SD card 32G became 15G after flash

Hi,

I flashed JP4.2 my 32G SD card with sdkmanager and I noticed I had no free space.
It look like I only see half of the memory in the partition table.

Link of my partition: Imgur: The magic of the Internet

Thanks,

I forget how that gets set because I don’t use the sdk manager but you can fix that yourself on the Nano by using parted to expand partition 1 to the remaining space then using resize2fs to resize the root filesystem to fill the partition.

Ok thank you.
Imgur
Apparently I can’t change partition 1 because it overlap other partition.

I fucked up anyway I resized to 32MiB…

That’s odd. The official sd card image has partition 1 after all the others specifically so it can be resized. Here’s mine:

GNU Parted 3.2
Using /dev/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p                                                                
Model: SD SDU64 (sd/mmc)
Disk /dev/mmcblk0: 64.1GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 2      1049kB  1180kB  131kB                TBC
 3      2097kB  2556kB  459kB                RP1
 4      3146kB  3736kB  590kB                EBT
 5      4194kB  4260kB  65.5kB               WB0
 6      5243kB  5439kB  197kB                BPF
 7      6291kB  6881kB  590kB                TOS
 8      7340kB  7406kB  65.5kB               EKS
 9      8389kB  9044kB  655kB                LNX
10      9437kB  9896kB  459kB                DTB
11      10.5MB  10.6MB  131kB                RP4
12      11.5MB  11.6MB  81.9kB               BMP
 1      12.6MB  64.0GB  64.0GB  ext4         APP

As I said, I don’t use the SDK manager so I’m not sure what’s going on.

I just reformated and flashed using sdkmanager (JetPack 4.2.2 rev02) and got the same partition as before.
Any idea how I could fix that?

I believe because of gpt table partition it doesn’t really matter if the APP partition is at the end of the table or the beginning. But I am not sure how to resize safely without erasing the OS.

So, what does the partition table look like now?

same as previous post Imgur: The magic of the Internet

Well, there’s something seriously wrong with that partition layout. Partition 1 is at the beginning instead of the end so there’s no way to resize it. I don’t understand how it got that way. Are you sure you used the correct board in the sdk manager because that’s not how a Nano Devkit should look.

The only way I can think to resize it is to take a second 32G card and dd the official nano sd card image to it to create the correct layout. Then use parted to resize partition 1 to use all available space. Then use dd again to copy partition 1 first card to partition 1 on the new card. Then use resize2fs to expand the root filesystem to use all available space in the new partition. At least doing it this way, you don’t run the risk of messing up your original card and the root filesystem’s UUID won’t change. The PART_UUID will change however so if that’s referenced in /boot/extlinux/extlinux.conf, you’ll have to change that on the new card by editing extlinux.conf and adding a root=PART_UUID=<new uuid> after ${cbootargs} so it overrides any earlier one.

I dont have any other 32G only 16G. Is that possible to dd into 16G and dd back again to the 32G ?

Sure. Just make sure that after you dd to the 16, it actually works before you blow away your 32.

Hi thomas.pegot,
If you use Nvidia’s official SD card image, the Rootfs (APP) partition will be located at the end of the partition table, so SD card will resize to its full capacity during the initial boot.

However, if you try to flash Jetson NANO using SDK manager (or) using the “Quick Start procedure” listed in https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-322/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fquick_start.html%23 , The default SD card Rootfs (APP) parition size will be limited to 14GB.

If you have followed the “Quick start procedure”, you can use the script “create-jetson-nano-sd-card.sh” in the Linux_for_Tegra/ folder, to create a proper resizeable SD card image.

$$ cd Linux_for_Tegra/
$$ sudo ./create-jetson-nano-sd-card-image.sh -o sd-blob.img -s 14G -r 200

This will create the sd-blob.img file, which can then be flashed into any SD card of size 16GB or above, using etcher or dd command.

$$ sudo dd if=sd-blob.img of=/dev/sdX bs=4M
$$ sync

where /dev/sdX is your enumerated SD card device, like /dev/sdb (or) /dev/sdc.

Hi kannan.m,
I have same issue, but in my JetPack_4.3_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra folder, I can’t found create-jetson-nano-sd-card-image.sh script, where can I get that script. thx

In Jetpack 4.3, the script name has changed. Please find the information in this official NVIDIA Jetpack 4.3 Documentation link.

Please note that as the Jetpack / L4T versions are upgraded, it is preferred to visit the online documentation to know if there are any changes to the SD card flashing script.