Where is my 2G? - MC

Scott Lockwood scott at guppylog.com
Fri Apr 13 17:32:35 UTC 2007


On Fri, 2007-04-13 at 10:19 -0700, Patton Echols wrote:
> Uhh, not me actually, I'm just lurking and trying to learn from
> other's 
> misfortune.

D'Oh! Sorry about that. I have a tendancy to use the 'royal you' so to
speak. :-)

> Ok, so I get what happens if you try to copy to the mount point with 
> nothing mounted there. Since the mount point is just a directory, the 
> files go there, when you later mount something there, the files are
> hidden.
> So what happens if I try to copy files to a unmounted partition?

Generally speaking, corruption of the data on the partition :-), but it
depends on what you're using to do it with. You can write directly to a
raw partition - that's a feature, not a bug. It's useful for a variety
of things, like swap. Suspend to disk works that way, also. dd can act
directly on unmounted, raw partitions. For example, I once did a backup
thusly:

dd if=/dev/hda1 of=harddrive.iso

and then restored it to a new drive (same type and size):

dd if=harddrive.iso of=/dev/hda1

You can also use dd this way if you're having trouble with a drive that
you just want to blank and start over with. For example:

dd if=/dev/zero of=/dev/hda

will zero out your drive, wipe the partition table, and all partitions.
You can then use fdisk, or cfdisk, or whatever you prefer to create a
new partition table, and new partitions, etc. Just like a new, never
before used drive.

So, be very careful when working with raw disk. You can do very bad
things.

> And, if you don't mind, why is that the expected / design behavior? 
> Thanks. 

Hopefully, the above gets you started. I posted some info about good
books to read, let me know if you can't find it, I'll be happy to post
it again.

-- 
Regards,
Scott Lockwood





More information about the ubuntu-users mailing list