dd major image This is a topic that many people are looking for. saibabalinks.org is a channel providing useful information about learning, life, digital marketing and online courses …. it will help you have an overview and solid multi-faceted knowledge . Today, saibabalinks.org would like to introduce to you Copy a disk image to a physical hard drive using DD. Following along are instructions in the video below:
“Today. I m going to show you how to copy a disk image or an an image file to an actual physical disk using linux so i m going to copying the raspbian operating system the image that you download from the raspberry pi website onto a micro sd card to do that i m going to use a linux mint desktop or it s based on a bun so right now. What you re seeing is my bun desktop or the command line for a bun desktop and the first thing that i need to do is figure out what disks are already installed in my computer. I don t want to overwrite any data that s for one of my permanent disks.
So i need to run sudo. Which basically gives me a super user access or administrative access to access all of the disks and then i want to list the disks using a utility called eff disk and we use the switch l. And the eff disk utility is a utility that handles disk management and l. Means list.
Now if i just run that directly it s going to give me a lot of extra information that i don t necessarily need so. I m going to also run sudo f. Disk and then i m going to pipe this kind of up and down bar. We call it a pipe.
I m going to pipe that output into another program called grep so sudo. Fdisk l. Grep and grep is a search utility tool used for searching and i m going to grep or search for slash dev and what this will do is basically filter out all of these lines. And only show me the ones that contain slash dev because they re the ones that i m interested in so in this case.
Instead of giving getting all of the extra text. We just have only the the devices. The lines with devices shown so here we have disk dev sta..
Which is my first physical disk and dev sta. 1. Which is my first partition or my first logical disk on dev sta. So using this i can see that i have four four drives.
Four disks built in right now. So i have these four physical disks and i have one partition on each physical disk. So i want to make sure i do not touch any of these whenever i m whenever i m copying my data down and then i have also these virtual drives. But i don t need to worry about those so much i also don t want to modify them obviously.
But i m really interested more in my physical disks so now that i know what physical disks. I have in my system. I m going to insert my micro sd card into the computer now a window pops up because it had filesystem already so if i run the command again. Then you ll see we ve added disk dev mmc blk zero.
Which is sixteen gigabytes. Which is what i would expect okay so i know that that is the disk that i ve just inserted. It s what i want to run to it currently has a fat32 filesystem and one partition. We re going to wipe this partition out so i don t care about that i m very interested only in this dev mmc block zero okay.
So now we need to go find our disk image that we re going to copy to this i ll put a link to all the the raspberry pi disk images in the information bar. But this will work with any any physical disk image. Sometimes you you might get a logical disk image..
But we re dealing with a physical disk image now so we re gonna copy it directly to the physical. A physical device so in this case. I m going to use a program first off. I need to use sudo to get super user permissions to be able to write to the disk.
I m going to use a program called dd and what dd does is copy at the bit level from the disk image to the physical disk. So makes its copies at the bit level. And that s what we re looking for here and then i have my input interface my input interface i say i f and if means my input interface and my disk image is called 2016 oh 3. 18.
Raspbian jessie and if you notice whenever. I was typing. I just typed 2016 and a dash and because the only file name that i have in my downloads folder that s 2000 that starts with 2016 is my image whenever i type the first part of the name if i hit tab then tab will autocomplete than the file name. So if you re not using that i really recommend starting to use tab to autocomplete all of your all of your lines.
So now we have our input interface so i want to input this disk image into dd right when dd needs a place to output it to so our next our next part of this is output interface equals or oh f. Equals. And then i need to give it where i want to copy the data to so. In this case i want to copy the data to slash dev slash mmc blk 0.
Okay remember mmc blk 0 in my case is my micro sd card that i just inserted so here we have administrator privileges use dd the input interface is my disk image my output interface or oh f equals. My actual physical micro sd card not a partition so i do not want to put for example p1. We are not looking for that we are looking for only the physical disk itself ok..
And if i if i hit enter right. Now. Then dd would go ahead and copy copy that image directly. However dd does not report on how much data has been written.
Which is fine if you don t care if you don t care about monitoring. It then then you can just run that command and it will work just fine. I normally use that but i m also going to show you another tool. That is exactly like dd with a few more features built.
In and it s called d. Cf. L. Dd.
D. Cf 2 l. Dd. Like i said has a you more features than didi.
But most importantly. It will tell you how much data has been written to the disk already so it s very good for keeping track of when something is going to be done you have to install dcfldd separately. It is in the apt..
Repository didi is normally built in two most linux and unix systems. So i m going to run. Now sudo dcfldd or just dd. I f.
Equals. And that s the input interface. And then oh f. Equals.
And that s the output interface. So what i m copying what i will copy and where i will copy it to okay. So now i m going to press enter and then it starts usually very quickly and it will slow down pretty quickly as well actually that s going faster than i expected okay so because i m using dcfldd then i could see this kind of blocks written and the amount of data written. If you just used dd you won t see that but once it s finished.
You will see this overall records in and overall records out okay. So now we can just eject our micro sd card. And that s it you should have raspbian installed on the card and ready to boot up in your raspberry pi. Thanks for watching.
If you liked that ” ..
Thank you for watching all the articles on the topic Copy a disk image to a physical hard drive using DD. All shares of saibabalinks.org are very good. We hope you are satisfied with the article. For any questions, please leave a comment below. Hopefully you guys support our website even more.