当前位置:网站首页>Create a telepresence USB drive using the DD command

Create a telepresence USB drive using the DD command

2022-06-24 03:34:00 User 9042463

There are many graphical tools that can be used to create telepresence live USB Driver .Linux Upper  Etcher  Probably the most popular . So ,Ubuntu I also developed my own startup disk creation tool .

however , Senior Linux Users may prefer to use  dd  Command in Linux Create a telepresence in the terminal USB, It will be faster and easier .

dd  The order is a   Command line   Tools , It provides powerful functions for copying and converting files .

A common use example is , The user to use  dd  The order will ISO Files are written to their external storage devices ( for example USB Drive disk ), To install a new... On their computer or laptop Linux Distribution version .

That's what I'll show in this tutorial . I'll show you the commands you need , Find our... From the terminal USB Driver , Then on ISO The file is actually swiped .

Use dd Command from the ISO Image creation Telepresence USB

Before I show you the steps , Let me take you through the command you are going to use and explain its function .

This is a command brush ISO Example :

dd if="./filename.iso" of="/dev/sdb" status="progress" conv="fsync"

Let's see  dd command   What has actually been done .

understand dd command

Explanation of the dd command for live USB creation

First , You type  dd. you 're right , This is the name of the program you want to run .

Next , You specify  if="./filename.iso".if  Represents the input file input file, tell  dd  Command which file you are going to write to the external storage device .

after , You type  of="/dev/sdb". and  if  equally ,of  Represents the output file output file.

Remember that , The output file does not technically have to be a file on the system . You can also specify things such as external device paths ( As shown in the example ), It looks like a normal file on the system , But actually point to the device connected to your machine .

status  It can be set to 3 An option :nonenoxfer  and  progress.

  • You set up  progress  Option will make  dd  The task displays information about how many ISO Periodic statistics on file transfers to storage drives , And right  dd  An estimate of how long it will take before the task is completed .
  • If you change the settings  none  Options ,dd  The task is writing ISO Only error messages are printed during the file , And delete the progress bar and so on .
  • noxfer  Option hides some information printed after the transfer is completed , For example, the time from start to finish .

Last , You will be  conv  Option set to  fsync. This can lead to  dd  The task is in the whole ISO File is written to USB The drive will not report a successful write before .

If you omit this option ,dd  The task will work well ( And it may actually seem to run faster ), But you may find that your system takes a long time to tell you to remove USB The drive is safe , Because it will be done in the background ISO Write the contents of , This allows you to do other things during this period .

Now you understand what you have to do , Let's see how to do .

matters needing attention The command line is a double-edged sword . When you use something like... On the command line  dd  You must be very careful when ordering . You must make sure that your target output file is the correct device . A wrong step may format your system hard disk , Your operating system will also be damaged .

The first 0 Step : Download what you need ISO Mirror image

Needless to say , You need to have a ISO The image file can be written to USB On .

I will use Ubuntu 20.04 ISO To test what I introduced before  dd  command .

The first 1 Step : obtain USB Disk character

Insert your USB Driver .

I am for  of  The specific path of parameter input is  /dev/sdb.USB Disks are usually labeled  /dev/sdb, But it's not a hard rule .

This path may vary depending on your system , You can use  lsblk  Order confirmation USB Path to disk . Just look for one that looks like you from the list USB Disk size drive , That's all right. .

If you are more familiar with GUI Program , You can also use GNOME Disks Wait for tools to find the path of the drive .

Now you have confirmed the path of the external drive , Let's start creating telepresence USB.

The first 2 Step : take ISO File is written to USB disk

In the download ISO The directory of the file opens a terminal , Then run the following command ( If  /dev/sdb  Different from your storage device name , Remember to replace it with ):

sudo dd if="./ubuntu-20.04.2.0-desktop-amd64.iso" of="/dev/sdb" status="progress" conv="fsync"

after , Give Way  dd  Do the rest , It will print a completion message when it is finished :

Just like this. , You are already in Linux Used in terminal  dd  The command is written ISO file !

summary

Now? , You can do more things through the terminal , Greatly improve your work efficiency .

原网站

版权声明
本文为[User 9042463]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/09/20210926191929976v.html