LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 06-30-2016, 01:18 PM   #1
smantz
LQ Newbie
 
Registered: Jun 2016
Posts: 1

Rep: Reputation: Disabled
DD command and mounted drives?


I have linux on a machine and that drive is sda. I have a drive I want to clone using DD command, it is sdb. The destination drive (USB external drive) is sdc. Some basic questions:

1. Is it best to have sdb (DD IF) unmounted before using the DD command?

2. Do I need to have sdc (DD OF) unmounted before using the DD command?

3. How do I unmount the drives and how do I see unmounted drives?

4. I want to have the OF in a format on the external drive sdc that I can restore/image/clone to a blank drive. What would that be?

4. Can someone give me the actual command syntaxes I would use to capture the original drive and restore it to a new drive?
 
Old 06-30-2016, 01:26 PM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
1. Yes
2. Yes
3. See man mount, you do not need to see the drives, you can see device nodes in /dev/
4. dd does bit by bit copy, there is no way to choose a "different format"
5. Basic: dd if=/dev/sdb of=/dev/sdc bs-1M - there are many sources on these forums and on the net about dd usage
 
1 members found this post helpful.
Old 06-30-2016, 04:32 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
1, 2. Almost mandatory, if not I'd for one would always have it unmounted. Anytime I do work on some task that has /dev/xyz in the command, I make sure it is not mounted.

4. I think what the OP wants is to copy to a file on some other resource. If so then the OP would use an of= some mount point and file name and that mount point has to be mounted as opposed to making a clone. For example. dd if=/dev/sdb of=/media/usb3/driveimage.img


4(5) would really be to reverse either means you used to create image. Either bit by bit to a device or bit by bit to a file.
 
Old 07-01-2016, 12:17 AM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by smantz View Post
how do I see unmounted drives?
There are commands like blkid or lsblk that list them. Or list the /sys/block directory.
 
Old 07-01-2016, 10:20 PM   #5
d0006
LQ Newbie
 
Registered: Mar 2013
Posts: 17

Rep: Reputation: Disabled
http://www.linuxquestions.org/questi...ommand-362506/

The most awesome dd tutorial EVAR!
The Disks app will show you all the disks/drives your system can see, mounted or not, and can mount and unmount druves.

Last edited by d0006; 07-01-2016 at 10:24 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Hard drives can't be mounted any more Per Linux - Hardware 11 01-18-2016 10:34 AM
mounted drives yusufs Linux - General 1 01-27-2008 02:23 AM
Mounted Drives Pandemic187 Ubuntu 3 03-26-2007 10:19 PM
Mounted drives?? Psyco26 Slackware 4 12-18-2006 04:22 PM
cant write on my mounted drives Niflheim Linux - Newbie 5 03-26-2005 09:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration