当前位置:网站首页>One to one copy of core board system image using USB flash disk

One to one copy of core board system image using USB flash disk

2022-06-10 05:19:00 YOULANSHENGMENG

One 、 Use the command copy method

1.1 format U Disk and partition

1. format sd Card as ext4, Use The graphical interface Just format it , Load after formatting sd Card to system .

2. Use command sudo fdisk -l see U Naming of disks , According to u The memory of the disk determines whether it is the target disk . My disk is named dev/sdb

3. Select File System

sudo mkfs.ext4 /dev/sdb

The above figure shows that the format is successful  

4.  see mount File system

sudo fdisk -l

5. Formatted U Disk needs to create partition

First execute the following statement

sudo fdisk /dev/sdb

Then input  m Check out the help manual

m : Display menu and help information 
a : Active zone marker / Boot partition 
d : Delete partition 
l : Show partition type 
n : New partition 
p : display partition information 
q : Exit without saving 
t : Set partition number 
v : Check the area 
w : Save changes 
x : Expand applications , Advanced features 

  Next input n, Indicates that you want to create a new partition

The two letters appearing above indicate :p Create primary partition for   e Create extended partitions for . Next press p

After performing the above operations , It's done For formatted U Partition operation of disk . The last step is to save and exit , Input W, End operation

 

 6. View the created partition

sudo fdisk -l

7、 Format the created partition

sudo mkfs.vfat /dev/sdb

 1.2 Mount operation after partition

Why U After the disk is mounted , Can be used : because Linux Treat all hardware devices as files , So when using hardware devices such as optical drives , It must be mounted to the system , That's the only way Linux To recognize

1./mnt The directory stores manually mounted hardware ;

2. /media The directory stores automatically mounted hardware ( Loading points are automatically created and deleted by the system )

3. /dev It is not a device driver , But as an interface to access external device files . such as , our U disc , Insert linux After the system , use fdisk -l Check the partition , The display file is /dev/sda1.

/dev/sda1 Is a block type file , Block type Linux The system cannot be accessed directly ; If you want to access, you have to go through mount Command to mount to the file directory for access . 

How to mount U disc (mount)

1. The mount point must be a directory .

2. Mount on an existing directory , This directory can not be empty , But after mounting, the previous contents in this directory will not be available ,umount It will return to normal in the future .

3. Compact disc 、 floppy disk 、 The format of the file system used by other operating systems is similar to linux The file system format used is different . The CD is ISO9660; Floppy disk is fat16 or ext2;windows NT yes fat16、NTFS;windows98 yes fat16、fat32;windows2000 and windowsXP yes fat16、fat32、 NTFS. Know before mounting linux Whether the file system format to be mounted is supported .

First create a new directory  

cd /mnt
sudo mkdir usb

And then U The disk is mounted in this directory ,u The name of the disk is after partition . The name shown in the red box , Use sudo fdisk -l Command to see , As shown in the red box in the figure .

Example 1: mount FAT32 Of U disc  

sudo mount -t vfat /dev/sdb1 /mnt/usb

Check if the mount is successful

df -h -- Check the device mounting , The following is a successful mount .

After successfully mounting , You can copy the system .

If an error occurs in the mount . Uninstall can be performed

 for example :
 Already mounted  /dev/sdb1              29G   16G   13G  55% /mnt/usbFAT32
umount /dev/sdb1     perhaps    umount /mnt/usbFAT32    Can be uninstalled 

Example 2: mount NTFS The mobile hard disk

mkdir /mnt/usbNTFS   --/mnt  Create a manually mounted directory under the directory 
fdisk -i              -- View the attached device information ( need root Users can view )
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1      121601   976760001    7  HPFS/NTFS
mount /dev/sdb1 /mnt/usbNTFS -- Without specifying the file system type 
mount: you must specify the filesystem type -- Tips : You must specify the file system type 
mount -t ntfs /dev/sdb1 /mnt/usbNTFS -- If there is no prompt ok
mount: unknown filesystem type 'ntfs'  -- Tips :‘ntfs’ Unknown file system type , Self installation required ntfs-3g( Tools running in C++ Under the language , If you cannot compile, you need to install  gcc-c++  Tools )
df -h -- Check the device mounting , The following is a successful mount .
/dev/sdb1              123G   1G   122G  98% /mnt/usbNTFS

 1.3  System copy operation

Copy the entire system to U disc

sudo cp -ax / ‘/mnt/usb’

After executing this sentence , Will start copying , In the process of copying , The following errors will occur , It's just that the permissions can't be copied , No problem :

failed to preserve ownership for .. 

Refer to the post :

Jetson AGX stay SD Card start system _Monster_fsk The blog of -CSDN Blog

Two 、Jetson Nano Use USB Start after image burning

      because Jetson Nano16G Space is often not enough in actual development and application , Fortunately Jetson Nano Support USB Starting mode , You can burn the system to 32G Or larger capacity U To use .

about U Disk startup mode , There are several points to note :

1. Jetson Nano The system version and U The system version of the disk should correspond to , such as U The disc has been burned V4.5.1 edition , that Jetson Nano The system version of the core board must also be V4.5.1, Otherwise, we can't USB start-up .

2. USB The idea of startup is to start the system in the core board first , Then the system of the core board leads to U On disk start .

3.  The system in the core board needs to use SDKManger To burn the system ,U The system in the disk needs to use Win32DiskImager To burn the system .

 

2.1 How to make img File is written to u disc take img File is written to u The steps of the disk  

Refer to the post :

How to make img File is written to u disc take img File is written to u The steps of the disk - System City installation master

jetson nano ubuntu Back up the system to u disc / mobile hard disk drive _ A blog full of gibberish -CSDN Blog _jetson nano u disc

The video tutorial is :

JETSON NANO SUB Version motherboard settings U Disk start _ Bili, Bili _bilibili

原网站

版权声明
本文为[YOULANSHENGMENG]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/160/202206091104212571.html