dd question

William A. Mahaffey III wam at hiwaay.net
Sun Sep 27 13:00:01 UTC 2015


On 09/27/15 06:52, Warren Block wrote:
> On Sun, 27 Sep 2015, Polytropon wrote:
>
>> On Sat, 26 Sep 2015 19:37:51 -0453.75, William A. Mahaffey III wrote:
>>> Update: I tried the dd again w/ 'bs=1m' & it worked much faster:
>>
>> It's a more "native" block size suited for the devices in question.
>> 512 blocks aren't much common anymore.
>
> It's not really about the native block size of the device, but the 
> overhead.  Copying 1M with the default blocksize takes 2,048 
> transactions.  Setting bs=1M does it in only one.  It works the same 
> with spinning disks, although the buffer does not need to be as large. 
> Usually 64K or 128K is enough there.
>
> Incidently, the Handbook installation chapter does show the right way 
> to install image files.
>

*Booooyah* !!!! That is almost exactly what I did, minus the 
'conv=sync', & it worked AOK. I noticed that the dd-ed image had no slices:

[root at kabini1, /etc, 8:02:02am] 566 % fdisk /dev/da0
******* Working on device /dev/da0 *******
parameters extracted from in-core disklabel are:
cylinders=471 heads=255 sectors/track=63 (16065 blks/cyl)

parameters to be used for BIOS calculations are:
cylinders=471 heads=255 sectors/track=63 (16065 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
<UNUSED>
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
     start 0, size 50000 (24 Meg), flag 80 (active)
         beg: cyl 0/ head 0/ sector 1;
         end: cyl 1023/ head 254/ sector 63
[root at kabini1, /etc, 8:02:06am] 567 % bsdlabel da0
# /dev/da0:
8 partitions:
#          size     offset    fstype   [fsize bsize bps/cpg]
   a:    1401120          0    4.2BSD        0     0     0
   c:    1401120          0    unused        0     0     # "raw" part, 
don't edit
[root at kabini1, /etc, 8:02:08am] 568 %


i.e. no da0s1, is that necessary to use the drive for install ? I also 
noticed that when I manually mount the drive, it reports a size much 
smaller than the whole drive:


[root at kabini1, /etc, 8:03:48am] 569 % df
Filesystem            Type      1024-blocks      Used      Avail 
Capacity  Mounted on
/dev/ada0p3           ufs          20307196  12141044    6541580 65%    /
devfs                 devfs               1         1          0 100%    
/dev
/dev/stripe/usr_str   ufs          60921596  10477380   45570492 19%    /usr
/dev/stripe/home_str  ufs        3684793728 220044180 3169966052 6%    /home
procfs                procfs              4         4          0 100%    
/proc
tmpfs                 tmpfs         8388608        32    8388576 0%    /tmp
linprocfs             linprocfs           4         4          0 100%    
/compat/linux/proc
fdescfs               fdescfs             1         1          0 100%    
/dev/fd
/dev/da0a             ufs            698671    651741      -8963 101%    
/media/sd
[root at kabini1, /etc, 8:03:49am] 569 %


I.e. 698-ish MiB on a 4-ish GB (3.6-ish GiB) drive. Can I fix that in 
place ? I would like the rest of the drive space to possibly log details 
of the install in case of questions. Thanks & TIA & have a nice weekend.


-- 

	William A. Mahaffey III

  ----------------------------------------------------------------------

	"The M1 Garand is without doubt the finest implement of war
	 ever devised by man."
                            -- Gen. George S. Patton Jr.



More information about the freebsd-questions mailing list