Re: Questions about the dd command



On Fri, Feb 29, 2008 at 5:09 PM, elmo <elmo@xxxxxxxxx> wrote:
I've spent literally hours trying to find direct answers on the dozens
of websites that discuss 'dd'
but the couldn't find what I wanted.

A few questions about the ' dd ' command:

For example: sudo dd if=/dev/sda2 of=/dev/sdb2 bs=1440

1. Which is preferrable; execute the command from an installed
ubuntu (/dev/sda2) or from a ubuntu CD?

It depends: using dd to copy the ubuntu instalation while running that
same installation could cause major problems, as files may be modified
while being copied. You should definitely use the CD to copy the OS.
If you just want to copy some other disk I'd advise you to run it from
the installation, since the installation is faster in most
applications.
Copying the OS itself to a new PC may cause all kind of problems,
because the hardware is too different (dunno, haven't tried. saw a
mate of mine do it on BSD to a laptop because the floppy drive was
lost, there were no USB connectors and no CDrom (to old....))


2. How do you modify the example to show the data as it is being
copied?
Would this have a drastic effect on how long it takes to complete
the copy
compared to just watching a blinking cursor?

Dunno, I suppose it could be echoed onto the screen with a script.
That would always decrease the speed a bit, but as these actions would
not need any disk access (if scripted correctly) that doesn't have to
be more than 1% or so.


3. What effect on the does the ' bs = ' number have on
the time to complete the copy or the accuracy of the copy? Is
there a
default number if the the bs= is omitted from the command?

The bs number is the block size number. It is a tuning option. There
is a default value and it will work without it, albeit a couple of %
slower (no more than 10 I think).
The bs number is the number of bytes copied from the input file (if)
to the memory before dd starts copying the data to the output file
(of). It is a vital setting when working with raid 0/5/6 arrays, since
the bs has to be big enough to span all disks. In this case it
shouldn't matter much except when it is bigger than your RAM. A larger
bs tends to be a bit faster, as long as the RAM is sufficient.

Neil

--
There are two kinds of people:
1. People who start their arrays with 1.
1. People who start their arrays with 0.

--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



Relevant Pages

  • Re: fluxbox
    ... for the installation? ... Server is already active for display 0 ... automatically after startup without the startx command. ... -- i installed an ubuntu 8.04 server edition and installed fluxbox from the ...
    (Ubuntu)
  • Re: GUI
    ... The result says that the command is not found. ... My feeling is that with standard ubuntu server installation, ...
    (Ubuntu)
  • Re: Help me choose the Linux desktop distribution l should use
    ... I am reading a lot about Ubuntu. ... I've installed many versions of UNIX and Linux over the past 20 years, and while it's fun and everything to do it all from a command line, I'm now happily using Ubuntu. ... If you want ease of installation and use, along with stability and really good hardware recognition/support, I highly recommend Ubuntu. ...
    (comp.os.linux.misc)
  • Re: Ubuntu installation questions
    ... installation and would like to ask a few questions ... pertaining to ubuntu. ... NT-based Windows versions - i.e. Windows NT, Windows 2000, ... Every user account created during the Ubuntu installation procedure is ...
    (comp.os.linux.setup)
  • Re: ubuntu-users Digest, Vol 46, Issue 77
    ... Ubuntu 8.04 LTS installation on ServerWorks failed to read ... Web GUI for server administration ... Justification: renders package unusable ...
    (Ubuntu)