Operating System - HP-UX
1834375 Members
1587 Online
110066 Solutions
New Discussion

Re: dd command in single user mode

 
SOLVED
Go to solution
JEAN TAYLOR
Occasional Advisor

dd command in single user mode

we're trying to make a duplicate of a disk drive in single user mode. The command is
dd if=/dev/rdsk/c1t15d0 of=/dev/rdsk/c3t15d0 bs=64
the > prompt returns and we can't exit. Any ideas? Thanks.
6 REPLIES 6
JEAN TAYLOR
Occasional Advisor

Re: dd command in single user mode

this is an A400 server running hp-ux 11.0
Rodney Hills
Honored Contributor
Solution

Re: dd command in single user mode

Not sure why you are getting ">" (continuation prompt), but the "bs=" option according to the man page, says it should be a multiple of the sector size of the disks you are copying.

So bs=64 means you are requesting 64 byte copies. Most drives are 512 or 1024 byte sectors.

-- Rod Hills
There be dragons...
harry d brown jr
Honored Contributor

Re: dd command in single user mode

You'd probably have to mount /usr/lib and possibly some others, as this is a dynamically linked program.

live free or die
harry
Live Free or Die
A. Clay Stephenson
Acclaimed Contributor

Re: dd command in single user mode

I do this every weekend as part of my cron'ed lifeboat creation.

My values are:
dd if=/dev/rdsk/c1t15d0 of=/dev/rdsk/c3t15d0 bs=8000k

I do assume that you have checked the device nodes and that /dev/rdsk/cXtydZ actually do refer to raw disk devices. Just because the have the names correct does not mean that the major/minor device numbers are correct. That's all the box cares about.

Also, for this to work well, the drives must be identical. Don't worry if dd can't read a full 8000k on the last block. It will read as much as it can and write that.


Regards, Clay

If it ain't broke, I can fix that.
Frank Slootweg
Honored Contributor

Re: dd command in single user mode

The ">" continuation prompt is often caused by a typing error such as a single (') or double (") quote without a closing quote.

Anyway, when that happens, CTRL+C will probably abort the command and give you a prompt.

As others have stated, the bs= parameter is in bytes, i.e. 64 is way too small. 64k (64 Kilo Bytes) would be more logical.
JEAN TAYLOR
Occasional Advisor

Re: dd command in single user mode

Thanks for all of the replies. I think we had problems with TERM settings. We started over and it's working great. We do have identical disk drives and we're going to experiment with bs. Thanks again. Jean