Groups | Search | Server Info | Login | Register


Groups > comp.os.linux.misc > #16902

Re: Is there a good "dd for dummies" tutorial around?

From "Carlos E.R." <robin_listas@invalid.es>
Newsgroups comp.os.linux.misc
Subject Re: Is there a good "dd for dummies" tutorial around?
Date 2016-03-01 11:14 +0100
Organization Netfront http://www.netfront.net/
Message-ID <0m6gqc-u53.ln1@Telcontar.valinor> (permalink)
References (1 earlier) <ck6qpc-lj9.ln1@minas-tirith.valinor> <tgcqpc-dvg.ln1@Telcontar.valinor> <adbb4675-e3d0-4d13-a513-c53127b76d59@googlegroups.com> <naodst$2400$1@adenine.netfront.net> <2d2669ad-a8d1-4d1a-8fc5-22132a2c4aac@googlegroups.com>

Show all headers | View raw


On 2016-03-01 03:05, pureheart@pacbell.net wrote:
> On Thursday, February 25, 2016 at 6:39:31 PM UTC-8, Carlos E. R. wrote:


>> That is, we can write to the disk directly, or to the formatted
>> structure that is the same disk when mounted. With files and
>> directories. Two views of the same thing.
>>
> Boy, now I finally get it.  Thanks, Carlos.
> So that means would write *anything* to the drive (or any file, I guess) 
> without regards to any formatting such as whatever ext4 et. al. does to the
> thing when it sets it up.

Yes.

> So of course if you wrote a giant text file, for example, all the formatting
> would be loss for any filesystem that happened to be there, correct?

If you write a giant text file to the raw device, using 'dd' or 'cp',
all the format in that device would be lost, yes.

> But what if you wanted to read that giant disk full of text back off?  
> Would you be successful just as long as you knew that to expect was coming 
> back off?

Yes, absolutely.
You just need to know how big your file is. ie, when to stop reading.


Notice that this is what is done when you create an USB stick for
installation of Linux (at least with some distributions like openSUSE).
You download a file, an image, and you simply copy it to the raw device
that represents the stick.


> If your output was to a file on a "mounted" device, would it then be formatted
> extX style file readable by anything?

If you write anything to the mount place, it is of course formatted
properly. If you write to the raw device (regardless if it is mounted at
the time or not), then there is no "format".


> Well, in any case, I think I'm going to stay well away from it unless I have a real need for it for some reason.

Notice that it is not about using "dd". You can do the same thing with
"cp" and other tools. See:

cp imagefile.iso /dev/sda

cat imagefile.iso > /dev/sda


Notice that if you it in the other direction:

cp /dev/sda imagefile.img

you are creating an image of the entire disk. imagefile.img will be
bigger than the original imagefile.iso.



> Thanks for taking the time to help me out.

Welcome :-)


-- 
Cheers, Carlos.

--- news://freenews.netfront.net/ - complaints: news@netfront.net ---

Back to comp.os.linux.misc | Previous | NextPrevious in thread | Find similar


Thread

Is there a good "dd for dummies" tutorial around? pureheart@pacbell.net - 2016-02-20 10:04 -0800
  Re: Is there a good "dd for dummies" tutorial around? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2016-02-20 20:24 +0200
  Re: Is there a good "dd for dummies" tutorial around? William Unruh <unruh@invalid.ca> - 2016-02-20 18:26 +0000
  Re: Is there a good "dd for dummies" tutorial around? Robert Heller <heller@deepsoft.com> - 2016-02-20 12:40 -0600
  Re: Is there a good "dd for dummies" tutorial around? Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2016-02-20 14:10 -0500
  Re: Is there a good "dd for dummies" tutorial around? "Carlos E. R." <robin_listas@invalid.es> - 2016-02-22 02:59 +0100
    Re: Is there a good "dd for dummies" tutorial around? "Carlos E.R." <robin_listas@invalid.es> - 2016-02-22 04:39 +0100
      Re: Is there a good "dd for dummies" tutorial around? pureheart@pacbell.net - 2016-02-24 15:55 -0800
        Re: Is there a good "dd for dummies" tutorial around? "Carlos E. R." <robin_listas@invalid.es> - 2016-02-26 03:39 +0100
          Re: Is there a good "dd for dummies" tutorial around? pureheart@pacbell.net - 2016-02-29 18:05 -0800
            Re: Is there a good "dd for dummies" tutorial around? The Natural Philosopher <tnp@invalid.invalid> - 2016-03-01 02:45 +0000
            Re: Is there a good "dd for dummies" tutorial around? "Carlos E.R." <robin_listas@invalid.es> - 2016-03-01 11:14 +0100

csiph-web