Flashing using (latest) sdkmanager results in sdcard appear at /dev/mmcblk2p1 and hence not able to ...

Hi,

Majority of the last year, I was using TX2 with an SD Card such that the rootfs is on SD Card. The JetPack was 3.3.

It was my understanding that the sequence of boot is “sd card”, “eMMC” so as long as I have a proper extlinux.conf in the sd card it would work. Indeed it was the case.

Today I used sdkmanager to reflash my device (Jetpack 4.2.2). The flash worked fine and I booted using eMMC

I then inserted a freshly formatted SD Card (ext4) and my first surprise was that it appeared as

/dev/mmcblk2p1

I know from other threads that SD Card should appear as /dev/mmcblk1p1

The card is accessible and functional.

I still copied the rootfs and modified extlinux.conf (in sd card) to use /dev/mmcblk2p1 but it did not boot using SD Card.

I believe the root cause of issue here is my SDCard appearing as /dev/mmcblk2p1 and not /dev/mmcblk1p1.

I have followed the standard and documented process of using sdkmanager to flash so not sure if it is because of anything that I did different.

I also tried different sdcards to be sure and they all appear as /dev/mmcblk2p1.

Would appreciate the help as with out sdcard I do not have much space in eMMC to do my development

Regards
Kapil

Hi ksachdeva,

For rel-32, you can reference Topic-1060950 steps to flash on external device.

Hi carolyuu,

While your instructions at the link mentioned above or for that matter here https://devtalk.nvidia.com/default/topic/1066210/jetson-tx2/jetpack-instalation-on-ssd-on-jetson-tx2/post/5399617/#5399617 may make sense to people skilled in low level details of linux bootup process and partition disks etc unfortunately they become very cryptic for data scientists and machine learning engineers who intend to use the products (TX2 etc in this case) from nvidia.

That said, I did try many many things to partition etc but none of them went anywhere. After spending lot of hours I guess I would have to content with the fact that this kind of thing requires a different level of expertise.

It would have been really great to have a detailed steps written for people who are not very skilled related to all things partitioning and then copying rootfs.

Regards
Kapil

Some clarifications…not really step by step instructions, though, follow.

Every block storage device, whether SD card, eMMC, SATA drive, so on, needs to be partitioned. The older style partition from when 2GB partitions were problematic is the BIOS style partition, whereas the newer style is the GPT partition scheme. There is more than one program to do this partitioning, but the most basic command line version is “gdisk”. “gdisk” is rather primitive, and can be used either from the Jetson or from a host PC running Linux. If not for the fact that Windows does not understand Linux partitions, then I would say Windows could also do this (Windows can create GPT partitions, but it can’t label them correctly for use with Linux…Linux can label for most any operating system).

Before you use an application like gdisk you will need to know the name of your device. SATA drives are typically ordered with “/dev/sda” being the first disk, “/dev/sdb” being the second disk, so on. If you get the wrong one, then you will destroy everything on the disk, so it is important to know the right one.

For SD cards typically it would be in order “/dev/mmcblk0”, “/dev/mmcblk1”, so on.

The above are all examples of whole disks. Partitions within a disk are numbered like this…I’m showing the first partition of each of the disks mentioned above:

/dev/sda1
/dev/sdb1
/dev/mmcblk0p1
/dev/mmcblk1p1

If you look online there are a lot of simple tutorials on using gdisk, but basically you would do the following to partition the second SD card where it is “/dev/mmcblk1” (the first device is “0”):

sudo gdisk /dev/mmcblk1

The device would have to be unmounted (not in use) at the time. Then the “?” key gives a help menu. You’d create a partition, then set the label to a Linux type.

A far easier GUI tool is “gparted”. I am going to guess you have to install this, e.g., “sudo apt-get install gparted”. Then perhaps “sudo gparted /dev/mmcblk1” if you are to edit the second SD card. Gparted will be more or less self-explanatory and simpler to use than gdisk.

If you have removable media, then if you monitor “dmesg --follow” as you insert the media, it should tell you the device name.

Note that physical numbering, e.g., the second partition of the second SATA drive (“/dev/sdb2”), is not the only way to identify partitions. When you partition and format there will be a “Universally Unique ID” (UUID) also created. Instead of relying on the physical device number you can name UUIDs instead for saying which partition is your SD card or other rootfs. In the referred instructions at the other URL he created a partition (VFAT, not ext4) with label ‘018eff62-2d07-4ca5-8619-c30c18b0a181’ (note that each device can have a UUID, and so can each partition…though a partition would be referred to as the partition ID). This means programs capable of using labels or IDs would respond to that exact partition regardless of whether it is the first or 10th hard drive, and regardless of whether it is the first or 10th partition of that drive.

To see a list of all current UUIDs, and where mounted, run this command:

lsblk -f

The “blkid” command, and other commands in that other post, were for creating partitions and IDs. The “blkid” command isn’t needed if the partition is already set up, and if IDs exist. The boot software is trying to use those IDs, and the partitioned and formatted disk could use “lsblk -f” to non-destructively find the IDs.

The actual copy of the filesystem to that device is a different set of instructions, but you can ask more when you get to that step.