Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: rsd0d or sd0d



Cem Kayali <cemkayali%eticaret.com.tr@localhost> writes:
> Referrring to guide
> http://www.netbsd.org/docs/guide/en/chap-misc.html#chap-misc-delete-disklabel'
>
> I would like to delete disklabel of a usb disk and noticed that
> following command does not delete disk label + mbr though guide says
> it deletes:
>
> dd if=/dev/zero of=/dev/rsd1d bs=1m

You really want to use count=100 say instead of bs=1m.

Anyway, this works fine for me -- I do it routinely.

> And once i tried following command, it deleted disklabel and mbr properly:
>
> dd if=/dev/zero of=/dev/sd1d bs=1m

That's going through the buffer cache -- you are better off gong through
the raw device.

> Is this what expected, and guide should be corrected? What is (should
> be) the differences between rsd0 and sd0 actually?

r* is a character device that goes straight out to the disk.

non-r is a block device, suitable for mounting as a file system -- it
goes through the buffer cache, or the modern equivalent.

Perry
-- 
Perry E. Metzger                perry%piermont.com@localhost


Home | Main Index | Thread Index | Old Index