`test.img` info

In the root filesystem there are two data files, one swap.img that’s mounted as swap partition and one test.img:

elsaco@spark:~$ ls -lh /*.img
-rw------- 1 root root 16G Sep 12 15:07 /swap.img
-rw-r–r-- 1 root root 10G Dec 31 1999 /test.img

What is the test.img used for and can it be safely deleted? That’s a 10G file I’d rather not have there.

test.img is not created by the DGX OS install

I have the same file. It contains 8 zeros followed by apparently random data:

$ od -An -tx1z -N 64 /test.img 
 00 00 00 00 00 00 00 00 48 71 2b ee c5 c6 c0 00  >........Hq+.....<
 ec 29 41 e5 28 2a 21 81 34 9b 6c d3 ee f0 e1 81  >.)A.(*!.4.l.....<
 8c 6a 60 7a ce c3 90 3e 18 d5 c0 f4 9c 87 21 7d  >.j`z...>......!}<
 00 00 00 00 00 00 00 00 b0 f7 46 08 00 00 00 00  >..........F.....<

$ ls -lh /test.img 
-rw-r--r-- 1 root root 10G Jan  1  2000 /test.img

If you didn’t create it yourself, you can go ahead and delete it.

I also have this file, is there any specific reason this is included in default image? Of course, I can delete it, but perhaps someone put it there for some purpose… but why?

The test.img doesn’t exist in the recovery image. The root volume is split into fastos.partaa and fastos.partab and if combined and mounted this is the layout:

elsaco@texas:/mnt/dgx$ ls -l
total 16777328
lrwxrwxrwx 1 root root 7 Apr 22 2024 bin → usr/bin
drwxr-xr-x 2 root root 4096 Feb 26 2024 bin.usr-is-merged
drwxr-xr-x 5 root root 4096 Oct 9 20:36 boot
drwxrwxr-x 2 1005 1030 4096 Oct 9 20:26 cdrom
drwxr-xr-x 4 root root 4096 Aug 6 08:27 dev
drwxr-xr-x 170 root root 12288 Oct 9 20:36 etc
drwxr-xr-x 2 root root 4096 Apr 22 2024 home
lrwxrwxrwx 1 root root 7 Apr 22 2024 lib → usr/lib
drwxr-xr-x 2 root root 4096 Feb 26 2024 lib.usr-is-merged
drwx------ 2 root root 16384 Oct 9 20:28 lost+found
drwxr-xr-x 2 root root 4096 Aug 6 08:18 media
drwxr-xr-x 2 root root 4096 Aug 6 08:18 mnt
drwxr-xr-x 5 root root 4096 Oct 9 20:33 opt
drwxr-xr-x 2 root root 4096 Apr 22 2024 proc
drwxr-xr-x 2 root root 4096 Oct 9 20:33 raid
drwx------ 4 root root 4096 Oct 9 20:33 root
drwxr-xr-x 15 root root 4096 Oct 9 20:37 run
lrwxrwxrwx 1 root root 8 Apr 22 2024 sbin → usr/sbin
drwxr-xr-x 2 root root 4096 Oct 9 20:37 sbin.usr-is-merged
drwxr-xr-x 2 root root 4096 May 21 08:46 snap
drwxr-xr-x 2 root root 4096 Aug 6 08:18 srv
-rw------- 1 root root 17179869184 Oct 9 20:29 swap.img
drwxr-xr-x 2 root root 4096 Apr 22 2024 sys
drwxrwxrwt 4 root root 4096 Oct 9 20:36 tmp
drwxr-xr-x 11 root root 4096 Aug 6 08:18 usr
drwxr-xr-x 13 root root 4096 Oct 4 06:47 var

The swap.img is there but not test.img

To inspect the root volume do:

cat fastos.partaa fastos.partab > dgxos

then rename it to dgxos.img and mount it:

sudo mount -o loop ./dgxos.img /mnt/dgx

Some volume info:

elsaco@texas:~/nvidia/usbimg.customer/dgxos.img
dgxos.img: Linux rev 1.0 ext4 filesystem data, UUID=12c82291-7213-409e-8f68-f4922adae69b, volume name “root” (extents) (64bit) (large files) (huge files)

My understanding is that it’s created as part of factory quality assurance and a bug in the testing script was causing it to be left behind. You can just delete it.