Re: dd command: BSD analog of conv=fsync?

2012-11-19 Thread Thomas Mueller
 In the last episode (Nov 18), Thomas Mueller said:
  What is the (Free)BSD counterpart of conv=fsync in dd command?

  Command in question is

  dd if=GNOME-3.6.0.iso of=/dev/DRIVE bs=8M conv=fsync

  This is for writing to a USB stick, and of course DRIVE is replaced by the
  actual device node; also I believe bs=8M, good for Linux, would be bs=8m
  in FreeBSD.

  I don't really know if conv=fsync is necessary, but that's what was
  advised in the GNOME test-drive download page.

 It isn't.  Writing to raw devices in FreeBSD immediately writes to the
 physical media.  No flushing is needed.

 --
 Dan Nelson
 dnel...@allantgroup.com

I was able to dd GNOME-3.6.0.iso to that USB stick, a discontinued Kingston
Data Traveler model that was inaccessible to NetBSD until they fixed that
USB bug recently.  I got CAM SCSI error messages in FreeBSD, couldn't access
the USB stick in the normal way, but apparently dd worked.  These particular
Kingston Data Travelers worked normally with previous builds of FreeBSD.

That USB stick proved bootable, so I got a test drive of GNOME 3.6.0.

I had a difficult time finding my way around the graphical interface,.  When
I got to a command prompt, I found first there was no nslookup, and then found 
there was no man command.  I thought these were a standard part of (quasi-)Unix
OSes.  I didn't really get a good impression.  Also, the print/text was very
small, a recipe for eyestrain.

Tom
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: dd command: BSD analog of conv=fsync?

2012-11-19 Thread dweimer

On 2012-11-19 07:42, Thomas Mueller wrote:

In the last episode (Nov 18), Thomas Mueller said:
 What is the (Free)BSD counterpart of conv=fsync in dd command?



 Command in question is



 dd if=GNOME-3.6.0.iso of=/dev/DRIVE bs=8M conv=fsync


 This is for writing to a USB stick, and of course DRIVE is 
replaced by the
 actual device node; also I believe bs=8M, good for Linux, would be 
bs=8m

 in FreeBSD.


 I don't really know if conv=fsync is necessary, but that's what 
was

 advised in the GNOME test-drive download page.


It isn't.  Writing to raw devices in FreeBSD immediately writes to 
the

physical media.  No flushing is needed.



--
Dan Nelson
dnel...@allantgroup.com


I was able to dd GNOME-3.6.0.iso to that USB stick, a discontinued 
Kingston
Data Traveler model that was inaccessible to NetBSD until they fixed 
that
USB bug recently.  I got CAM SCSI error messages in FreeBSD, couldn't 
access
the USB stick in the normal way, but apparently dd worked.  These 
particular
Kingston Data Travelers worked normally with previous builds of 
FreeBSD.


That USB stick proved bootable, so I got a test drive of GNOME 3.6.0.

I had a difficult time finding my way around the graphical 
interface,.  When
I got to a command prompt, I found first there was no nslookup, and 
then found
there was no man command.  I thought these were a standard part of 
(quasi-)Unix
OSes.  I didn't really get a good impression.  Also, the print/text 
was very

small, a recipe for eyestrain.

Tom
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
freebsd-questions-unsubscr...@freebsd.org


Some Linux distributions tried doing away with nslookup in favor of dig 
a while back, most have added it back in though.  However it looks like 
you found something that hasn't put it back in.


--
Thanks,
   Dean E. Weimer
   http://www.dweimer.net/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: dd zero on the wrong disk. ZFS over GELI on that disk, recover possible?

2012-10-08 Thread Fabian Keil
Stefano Rossi stefa.ross...@gmail.com wrote:

 I made a tremendous mistake with a dd of=/dev/zero of=/dev/ada1 command. 
 ada1 was the wrong disk.

Ooops ...

 The command was interrupted after a few seconds (I only wanted to erase the 
 partition table), and a gpart create -s gpt ada1 was given before I 
 realized my mistake.
 On ada1 there was a single partition, type freebsd, which was labelled HD4. 
 /dev/label/HD4 was geli encrypted with a keyfile (I still have the keyfile), 
 and /dev/label/HD4.eli was a zpool (named HD4 too).
 
 Is there any way I could save at least some of the data on that zpool? I know 
 geli makes backup of the metadata, I must have them somewhere on my root 
 partition.
 
 Is there any way to recover the few lost megabytes at the start of the disk?
 Or, would it be possible to recreate the same partition table with the single 
 partition, relabel it and restore the geli backup to the labelled partition? 
 Would then zfs recognize it?

The geli and glabel meta data is located at the end of the partition
so it shouldn't be affected by the dd if you only deleted a couple of
MBs at the beginning of the disk.

If you previously weren't using a gpt layout on ada1, however,
the gpart call might have corrupted the meta data for both in
which case you'll have to recreate it.

If the glabel meta data wasn't corrupted, the label should show up
again once you recreated the partition at the previous position.

If the label shows up, it's likely that the geli meta data isn't
affected either and you can try to geli attach the provider and
import the zpool. After a zpool scrub you'll know which files were
damaged.

If the label doesn't show up after the partition table has been
corrected, you'll first have to recreate a label and geli restore
the meta data as documented in geli(8).

I'd recommend that you backup the whole disk and work on the backup
until you know that the recovery process works. This would allow you
to use zfs snapshots to be able to quickly rollback the backup if you
need several attempts to get the partition layout right and decreases
the chances that the damage gets worse.

Out of curiosity I just experimented with a 1 GB disk where the label
was on md0s1 which was created with gpart add using the whole disk
and could thus easily be recreated:

fk@r500 ~ $ls /dev/label/recovery-test 
/dev/label/recovery-test
fk@r500 ~ $zogftw cmd zogftw_clear_device /dev/md0
2012-10-08 13:48:51 zogftw: Clearing /dev/md0. Feel free to abort this with 
ctrl-C
^C28+0 records in
27+0 records out
28311552 bytes transferred in 3.715472 secs (7619907 bytes/sec)
fk@r500 ~ $ls /dev/label/recovery-test 
ls: /dev/label/recovery-test: No such file or directory
fk@r500 ~ $sudo gpart create -s GPT /dev/md0
md0 created
fk@r500 ~ $sudo gpart add -t freebsd /dev/md0
md0s1 added
fk@r500 ~ $ls /dev/label/recovery-test 
/dev/label/recovery-test
fk@r500 ~ $zogftw import
2012-10-08 13:49:57 zogftw: recovery-test's location isn't registered yet!
2012-10-08 13:49:57 zogftw: No pool name specified. Trying all unattached 
labels: recovery-test 
2012-10-08 13:49:57 zogftw: No geli keyfile found at 
/home/fk/.config/zogftw/geli/keyfiles/recovery-test.key. Not using any.

You need a passphrase to unlock the secret key for
user: Fabian Keil f...@fabiankeil.de
4096-bit ELG-E key, ID 351A59E5, created 2006-08-19 (main key ID BF2EA563)

2012-10-08 13:50:04 zogftw: recovery-test attached
2012-10-08 13:50:09 zogftw: recovery-test imported
fk@r500 ~ $sudo zpool status recovery-test
  pool: recovery-test
 state: ONLINE
status: One or more devices has experienced an unrecoverable error.  An
attempt was made to correct the error.  Applications are unaffected.
action: Determine if the device needs to be replaced, and clear the errors
using 'zpool clear' or replace the device with 'zpool replace'.
   see: http://illumos.org/msg/ZFS-8000-9P
  scan: none requested
config:

NAME   STATE READ WRITE CKSUM
recovery-test  ONLINE   0 0 0
  label/recovery-test.eli  ONLINE   0 0   116

errors: No known data errors
# Apparently a bunch of ZFS meta data was corrupted but could be
# corrected, scrub the whole pool to see what else got damaged.
fk@r500 ~ $sudo zpool scrub recovery-test
fk@r500 ~ $sudo zpool status recovery-test
  pool: recovery-test
 state: ONLINE
status: One or more devices has experienced an error resulting in data
corruption.  Applications may be affected.
action: Restore the file in question if possible.  Otherwise restore the
entire pool from backup.
   see: http://illumos.org/msg/ZFS-8000-8A
  scan: scrub repaired 1.52M in 0h0m with 3601 errors on Mon Oct  8 13:51:23 
2012
config:

NAME   STATE READ WRITE CKSUM
recovery-test  ONLINE   0 0 3.52K
  label/recovery-test.eli  ONLINE   0 0 7.78K

errors: 3601 data errors, use '-v' for a list

Re: dd to clone disks - new disk fails to boot.

2010-10-22 Thread krad
On 20 October 2010 14:55, Warren Block wbl...@wonkity.com wrote:

 On Wed, 20 Oct 2010, Modulok wrote:

  Problem: I copied from an old hard drive to a new one via FreeBSD's
 dd. The new drive won't boot. The old drive worked fine. (The new
 drive is known-to-work.)

 Background: I have a system with a 160GB disk in it. It runs windows.
 It works. I have a blank 250GB disk. I want to copy the entire 160GB
 disk onto the 250GB disk, shuffle the SATA cables and boot to it.
 Basically, I'm just replacing the small hard drive with a larger one.
 I would then extend the partition using something like gpartd.

 I booted to a live FreeBSD disk and used dd like so:

   dd if=/dev/ad4 of=/dev/ad8 bs=1m

 About an hour later it finished. No errors. I turned the machine off,
 unplugged the small disk and connected the big disk into the primary
 SATA header. The BIOS chokes on the new disk. It refuses to boot from
 it and instead reports 'disk error'.


 If the BIOS is complaining, see if the new drive has a SATA 150 jumper, or
 some other compatibility mode.

 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 freebsd-questions-unsubscr...@freebsd.org


if you still get problems, try reinstalling the boot blocks

for mbr

fdisk -B adx
bsdlabel -B adxs1a

for gpt

gpart bootcode -p /boot/gptboot -i 1 adx

if that doesnt work try stepping around the problem. dd should work but it
may be quicker to manually partition/slice up the new drive, newfs it, and
rsync the files accross. I have used this method many times in the past, and
if its a big drive with low utilization it will actually be quicker than dd.

rsync might miss a few of the chflag attributes if its an os install drive,
but they will be restored next time you make world.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: dd to clone disks - new disk fails to boot.

2010-10-20 Thread Warren Block

On Wed, 20 Oct 2010, Modulok wrote:


Problem: I copied from an old hard drive to a new one via FreeBSD's
dd. The new drive won't boot. The old drive worked fine. (The new
drive is known-to-work.)

Background: I have a system with a 160GB disk in it. It runs windows.
It works. I have a blank 250GB disk. I want to copy the entire 160GB
disk onto the 250GB disk, shuffle the SATA cables and boot to it.
Basically, I'm just replacing the small hard drive with a larger one.
I would then extend the partition using something like gpartd.

I booted to a live FreeBSD disk and used dd like so:

   dd if=/dev/ad4 of=/dev/ad8 bs=1m

About an hour later it finished. No errors. I turned the machine off,
unplugged the small disk and connected the big disk into the primary
SATA header. The BIOS chokes on the new disk. It refuses to boot from
it and instead reports 'disk error'.


If the BIOS is complaining, see if the new drive has a SATA 150 jumper, 
or some other compatibility mode.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: dd cloning slightly different disks

2010-03-31 Thread Christoph Kukulies
Thanks, Peter and all others. Indeed, in contrary to the expected, I 
went into my office this morning, swapped the
HD against the SSD, and was able to boot both FreeBSD, Windows without a 
hitch or any other tweaking.


The dd over USB 2.0 to the SSD from the WD hard disk took 21261 s 
(nearly 6 hours)
I would possibly have had better results if I had both disks connected 
to a SATA controller

and did the dd there, but so what, I'm there happily.

Thanks for sharing.

--
Christoph
Will post bonnie results later.

Peter Steele schrieb:

Theoretically, doing a straight dd copy of one disk to another and then 
swapping in that disk should work. I've done it, with no other tweaking needed. 
I've never done it with mixed OS instances on the same disk, or for that matter 
with a solid state drive. You'll lose the trailing 12GB of your disk, although 
you might be able to expand the last partition of whatever OS uses it to 
include this lost space

-Original Message-
From: owner-freebsd-questi...@freebsd.org 
[mailto:owner-freebsd-questi...@freebsd.org] On Behalf Of Christoph Kukulies
Sent: Tuesday, March 30, 2010 8:48 AM
To: freebsd-questions@freebsd.org
Subject: dd cloning slightly different disks

Though not 100% FreeBSD centric, my question, I know that disk partitioning 
experts are around here.
My noteook HD is a WD 5000BEVT, (500GB). Today I bought a Kingston SDnowV+ 
Solid State drive, 512GB, with the intention to make my notebook a bit faster. 
It's an Intel Core 2 Duo,
7400 CPU.

The WD disk shows as having 976773168 sectors (500108 MB), the SSD has 
1000215216 sectors (512110 MB).

At the moment I'm copying (dd) from the WD internal disk to the SSD which I had 
put into an external SATA Icybox.

I'm hoping to be able to use my FreeBSD and Windows partitions afterwards 
somehow, possibly with some geometry tweaking or what. Due to the different 
disk geometry I'm expecting that the partition table entries will be wrong.

Any clues how I should proceed when the copy will be done in 7 hours or so? 
(20MB/s is the transfer rate I got from a short test that I did before starting 
the big copy).

--
Christoph
  


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: dd cloning slightly different disks

2010-03-31 Thread Christoph Kukulies

This are the bonnie results:

# bonnie -s 4000
File './Bonnie.1283', size: 4194304000
Writing with putc()...done
Rewriting...done
Writing intelligently...done
Reading with getc()...done
Reading intelligently...done
Seeker 1...Seeker 2...Seeker 3...start 'em...done...done...done...
 ---Sequential Output ---Sequential Input-- 
--Random--
 -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- 
--Seeks---
MachineMB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU  
/sec %CPU
4000 118158 79.4 119134 19.0 44154 10.4 61967 53.0 104888 10.5 
5344.4 12.4


--
Christoph

Christoph Kukulies schrieb:
Thanks, Peter and all others. Indeed, in contrary to the expected, I 
went into my office this morning, swapped the
HD against the SSD, and was able to boot both FreeBSD, Windows without 
a hitch or any other tweaking.


The dd over USB 2.0 to the SSD from the WD hard disk took 21261 s 
(nearly 6 hours)
I would possibly have had better results if I had both disks connected 
to a SATA controller

and did the dd there, but so what, I'm there happily.

Thanks for sharing.

--
Christoph
Will post bonnie results later.

Peter Steele schrieb:
Theoretically, doing a straight dd copy of one disk to another and 
then swapping in that disk should work. I've done it, with no other 
tweaking needed. I've never done it with mixed OS instances on the 
same disk, or for that matter with a solid state drive. You'll lose 
the trailing 12GB of your disk, although you might be able to expand 
the last partition of whatever OS uses it to include this lost space


-Original Message-
From: owner-freebsd-questi...@freebsd.org 
[mailto:owner-freebsd-questi...@freebsd.org] On Behalf Of Christoph 
Kukulies

Sent: Tuesday, March 30, 2010 8:48 AM
To: freebsd-questions@freebsd.org
Subject: dd cloning slightly different disks

Though not 100% FreeBSD centric, my question, I know that disk 
partitioning experts are around here.
My noteook HD is a WD 5000BEVT, (500GB). Today I bought a Kingston 
SDnowV+ Solid State drive, 512GB, with the intention to make my 
notebook a bit faster. It's an Intel Core 2 Duo,

7400 CPU.

The WD disk shows as having 976773168 sectors (500108 MB), the SSD 
has 1000215216 sectors (512110 MB).


At the moment I'm copying (dd) from the WD internal disk to the SSD 
which I had put into an external SATA Icybox.


I'm hoping to be able to use my FreeBSD and Windows partitions 
afterwards somehow, possibly with some geometry tweaking or what. Due 
to the different disk geometry I'm expecting that the partition table 
entries will be wrong.


Any clues how I should proceed when the copy will be done in 7 hours 
or so? (20MB/s is the transfer rate I got from a short test that I 
did before starting the big copy).


--
Christoph


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


RE: dd cloning slightly different disks

2010-03-30 Thread Peter Steele
Theoretically, doing a straight dd copy of one disk to another and then 
swapping in that disk should work. I've done it, with no other tweaking needed. 
I've never done it with mixed OS instances on the same disk, or for that matter 
with a solid state drive. You'll lose the trailing 12GB of your disk, although 
you might be able to expand the last partition of whatever OS uses it to 
include this lost space

-Original Message-
From: owner-freebsd-questi...@freebsd.org 
[mailto:owner-freebsd-questi...@freebsd.org] On Behalf Of Christoph Kukulies
Sent: Tuesday, March 30, 2010 8:48 AM
To: freebsd-questions@freebsd.org
Subject: dd cloning slightly different disks

Though not 100% FreeBSD centric, my question, I know that disk partitioning 
experts are around here.
My noteook HD is a WD 5000BEVT, (500GB). Today I bought a Kingston SDnowV+ 
Solid State drive, 512GB, with the intention to make my notebook a bit faster. 
It's an Intel Core 2 Duo,
7400 CPU.

The WD disk shows as having 976773168 sectors (500108 MB), the SSD has 
1000215216 sectors (512110 MB).

At the moment I'm copying (dd) from the WD internal disk to the SSD which I had 
put into an external SATA Icybox.

I'm hoping to be able to use my FreeBSD and Windows partitions afterwards 
somehow, possibly with some geometry tweaking or what. Due to the different 
disk geometry I'm expecting that the partition table entries will be wrong.

Any clues how I should proceed when the copy will be done in 7 hours or so? 
(20MB/s is the transfer rate I got from a short test that I did before starting 
the big copy).

--
Christoph

___
freebsd-questions@freebsd.org mailing list 
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: dd cloning slightly different disks

2010-03-30 Thread Jerry McAllister
On Tue, Mar 30, 2010 at 05:47:44PM +0200, Christoph Kukulies wrote:

 Though not 100% FreeBSD centric, my question, I know that disk 
 partitioning experts are around here.
 My noteook HD is a WD 5000BEVT, (500GB). Today I bought a Kingston SDnowV+
 Solid State drive, 512GB, with the intention to make my notebook a bit 
 faster. It's an Intel Core 2 Duo,
 7400 CPU.
 
 The WD disk shows as having 976773168 sectors (500108 MB),
 the SSD has 1000215216 sectors (512110 MB).
 
 At the moment I'm copying (dd) from the WD internal disk to the SSD 
 which I had put into
 an external SATA Icybox.
 
 I'm hoping to be able to use my FreeBSD and Windows partitions 
 afterwards somehow,
 possibly with some geometry tweaking or what. Due to the different disk 
 geometry
 I'm expecting that the partition table entries will be wrong.
 
 Any clues how I should proceed when the copy will be done in 7 hours or 
 so? (20MB/s
 is the transfer rate I got from a short test that I did before starting 
 the big copy).

Well, this could possibly work, but I wonder why you want to do it
this way.I would be inclined to divide the disk as desired, do
the MSW install in the first slice and then get a FeeBSD fixit and
partition the other slice and then use dump/restore to move the FreeBSD
stuff over.   That way you get the best fit for the new disk, no
worries about tweaking geometry and no loss of the amount the new
drive is bigger than the old one.

jerry


 
 --
 Christoph
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: dd cloning slightly different disks

2010-03-30 Thread ill...@gmail.com
On 30 March 2010 12:11, Jerry McAllister jerr...@msu.edu wrote:
 On Tue, Mar 30, 2010 at 05:47:44PM +0200, Christoph Kukulies wrote:

 Though not 100% FreeBSD centric, my question, I know that disk
 partitioning experts are around here.
 My noteook HD is a WD 5000BEVT, (500GB). Today I bought a Kingston SDnowV+
 Solid State drive, 512GB, with the intention to make my notebook a bit
 faster. It's an Intel Core 2 Duo,
 7400 CPU.

 The WD disk shows as having 976773168 sectors (500108 MB),
 the SSD has 1000215216 sectors (512110 MB).

 At the moment I'm copying (dd) from the WD internal disk to the SSD
 which I had put into
 an external SATA Icybox.

 I'm hoping to be able to use my FreeBSD and Windows partitions
 afterwards somehow,
 possibly with some geometry tweaking or what. Due to the different disk
 geometry
 I'm expecting that the partition table entries will be wrong.

 Any clues how I should proceed when the copy will be done in 7 hours or
 so? (20MB/s
 is the transfer rate I got from a short test that I did before starting
 the big copy).

 Well, this could possibly work, but I wonder why you want to do it
 this way.    I would be inclined to divide the disk as desired, do
 the MSW install in the first slice and then get a FeeBSD fixit and
 partition the other slice and then use dump/restore to move the FreeBSD
 stuff over.   That way you get the best fit for the new disk, no
 worries about tweaking geometry and no loss of the amount the new
 drive is bigger than the old one.

 jerry


Or even a middle path of creating the slices, making sure
that the windows-to-be slice is exactly close enough, dd-ing
the windows slice over (testing that it boots), and then
running the dump/restore cycle for the freebsd portion of
the drive.

-- 
--
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: dd cloning slightly different disks

2010-03-30 Thread Christoph Kukulies

Jerry McAllister schrieb:

On Tue, Mar 30, 2010 at 05:47:44PM +0200, Christoph Kukulies wrote:

  
Though not 100% FreeBSD centric, my question, I know that disk 
partitioning experts are around here.

My noteook HD is a WD 5000BEVT, (500GB). Today I bought a Kingston SDnowV+
Solid State drive, 512GB, with the intention to make my notebook a bit 
faster. It's an Intel Core 2 Duo,

7400 CPU.

The WD disk shows as having 976773168 sectors (500108 MB),
the SSD has 1000215216 sectors (512110 MB).

At the moment I'm copying (dd) from the WD internal disk to the SSD 
which I had put into

an external SATA Icybox.

I'm hoping to be able to use my FreeBSD and Windows partitions 
afterwards somehow,
possibly with some geometry tweaking or what. Due to the different disk 
geometry

I'm expecting that the partition table entries will be wrong.

Any clues how I should proceed when the copy will be done in 7 hours or 
so? (20MB/s
is the transfer rate I got from a short test that I did before starting 
the big copy).



Well, this could possibly work, but I wonder why you want to do it
this way.I would be inclined to divide the disk as desired, do
the MSW install in the first slice and then get a FeeBSD fixit and
partition the other slice and then use dump/restore to move the FreeBSD
stuff over.   That way you get the best fit for the new disk, no
worries about tweaking geometry and no loss of the amount the new
drive is bigger than the old one.
  


Reason was: I wanted to preserve all settings (Windows XP and FreeBSD) 
and avoid any
reinstallation of packages or sth. and wanted to continue working with a 
minimum of interruption.


Maybe I could  use the 12GB overspace  either later by assigning it an 
extra partition or

grow some partition that is adjacent to the free space.

--
Christoph


jerry


  

--
Christoph

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: dd cloning slightly different disks

2010-03-30 Thread Jerry McAllister
On Tue, Mar 30, 2010 at 06:26:08PM +0200, Christoph Kukulies wrote:

 Jerry McAllister schrieb:
 On Tue, Mar 30, 2010 at 05:47:44PM +0200, Christoph Kukulies wrote:
 
   
 Though not 100% FreeBSD centric, my question, I know that disk 
 partitioning experts are around here.
 My noteook HD is a WD 5000BEVT, (500GB). Today I bought a Kingston SDnowV+
 Solid State drive, 512GB, with the intention to make my notebook a bit 
 faster. It's an Intel Core 2 Duo,
 7400 CPU.
 
 The WD disk shows as having 976773168 sectors (500108 MB),
 the SSD has 1000215216 sectors (512110 MB).
 
 At the moment I'm copying (dd) from the WD internal disk to the SSD 
 which I had put into
 an external SATA Icybox.
 
 I'm hoping to be able to use my FreeBSD and Windows partitions 
 afterwards somehow,
 possibly with some geometry tweaking or what. Due to the different disk 
 geometry
 I'm expecting that the partition table entries will be wrong.
 
 Any clues how I should proceed when the copy will be done in 7 hours or 
 so? (20MB/s
 is the transfer rate I got from a short test that I did before starting 
 the big copy).
 
 
 Well, this could possibly work, but I wonder why you want to do it
 this way.I would be inclined to divide the disk as desired, do
 the MSW install in the first slice and then get a FeeBSD fixit and
 partition the other slice and then use dump/restore to move the FreeBSD
 stuff over.   That way you get the best fit for the new disk, no
 worries about tweaking geometry and no loss of the amount the new
 drive is bigger than the old one.
   
 
 Reason was: I wanted to preserve all settings (Windows XP and FreeBSD) 
 and avoid any
 reinstallation of packages or sth. and wanted to continue working with a 
 minimum of interruption.

Well, I don't know about the MSW stuff, but for the FreeBSD part, 
the dump/restore would keep everything they way it was.

jerry

 
 Maybe I could  use the 12GB overspace  either later by assigning it an 
 extra partition or
 grow some partition that is adjacent to the free space.

 
 --
 Christoph
 
 jerry
 
 
   
 --
 Christoph
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 freebsd-questions-unsubscr...@freebsd.org
 
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: dd cloning slightly different disks

2010-03-30 Thread Mike Clarke
On Tuesday 30 March 2010, Christoph Kukulies wrote:

 At the moment I'm copying (dd) from the WD internal disk to the SSD
 which I had put into
 an external SATA Icybox.

 I'm hoping to be able to use my FreeBSD and Windows partitions
 afterwards somehow,
 possibly with some geometry tweaking or what. Due to the different
 disk geometry
 I'm expecting that the partition table entries will be wrong.

Having created problems for myself by doing something similar in the 
past I'd be wary of using dd for this, 
http://preview.tinyurl.com/yzckfx5 will take you to Google Groups for 
the relevant thread in comp.unix.bsd.freebsd.misc.

The safe approach would be to use fdisk to create the desired slices on 
the new disk, use bsdlabel to partition the FreeBSD slice and then use 
dump|restore to copy the data.

You should be able to copy your Windows partition with DriveImage XML, 
free for private use from http://www.runtime.org/driveimage-xml.htm

-- 
Mike Clarke
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: dd cloning slightly different disks

2010-03-30 Thread Warren Block

On Tue, 30 Mar 2010, Mike Clarke wrote:

On Tuesday 30 March 2010, Christoph Kukulies wrote:


At the moment I'm copying (dd) from the WD internal disk to the SSD
which I had put into an external SATA Icybox.

...

You should be able to copy your Windows partition with DriveImage XML,
free for private use from http://www.runtime.org/driveimage-xml.htm


Clonezilla is open source and has worked for me:
  http://www.clonezilla.org

-Warren Block * Rapid City, South Dakota USA
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: dd (to erase disk) from emergency holographic shell

2009-12-06 Thread Jerry McAllister
On Sun, Dec 06, 2009 at 05:34:31PM +, Anton Shterenlikht wrote:

 I need to erase all of my fbsd disk.
 I booted the installation cd, launched
 Emergency Holographic Shell, but
 cannot find any command, except rm and pwd.

The holograqphic shell is not the one you want.
You want the Fixit.

jerry
  
 
 I'd like to erase my disk with dd if=/dev/null of=/dev/ad0
 
 Please advise
 
 many thanks
 anton
 
 -- 
 Anton Shterenlikht
 Room 2.6, Queen's Building
 Mech Eng Dept
 Bristol University
 University Walk, Bristol BS8 1TR, UK
 Tel: +44 (0)117 331 5944
 Fax: +44 (0)117 929 4423
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: dd (to erase disk) from emergency holographic shell

2009-12-06 Thread Anton Shterenlikht
On Sun, Dec 06, 2009 at 12:39:20PM -0500, Jerry McAllister wrote:
 On Sun, Dec 06, 2009 at 05:34:31PM +, Anton Shterenlikht wrote:
 
  I need to erase all of my fbsd disk.
  I booted the installation cd, launched
  Emergency Holographic Shell, but
  cannot find any command, except rm and pwd.
 
 The holograqphic shell is not the one you want.
 You want the Fixit.

I thought these are identical things.
In the sysinstall menu I chose Fixit,
and in the following menu I chose Start an
Emergency Holographic Shell. Is this not it?

Or do I need to prepare a separate Fixit CD or
floppy?

I was under the impression I've used this
holo shell before, but can't remember how now.

many thanks
anton

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Solved: Re: dd (to erase disk) from emergency holographic shell

2009-12-06 Thread Anton Shterenlikht
On Sun, Dec 06, 2009 at 05:54:52PM +, Anton Shterenlikht wrote:
 On Sun, Dec 06, 2009 at 12:39:20PM -0500, Jerry McAllister wrote:
  On Sun, Dec 06, 2009 at 05:34:31PM +, Anton Shterenlikht wrote:
  
   I need to erase all of my fbsd disk.
   I booted the installation cd, launched
   Emergency Holographic Shell, but
   cannot find any command, except rm and pwd.
  
  The holograqphic shell is not the one you want.
  You want the Fixit.
 
 I thought these are identical things.
 In the sysinstall menu I chose Fixit,
 and in the following menu I chose Start an
 Emergency Holographic Shell. Is this not it?
 
 Or do I need to prepare a separate Fixit CD or
 floppy?
 
 I was under the impression I've used this
 holo shell before, but can't remember how now.

I burned a separate livefs CD, launched Fixit from there.

sorry for the bother

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Solved: Re: dd (to erase disk) from emergency holographic shell

2009-12-06 Thread Polytropon
On Sun, 6 Dec 2009 18:49:10 +, Anton Shterenlikht me...@bristol.ac.uk 
wrote:
 I burned a separate livefs CD, launched Fixit from there.
 
 sorry for the bother

Don't mind. If you want a more comfortable live fs
environment for Fixit (and other operations, such as
diagnostics or recovery preparations), you could use
FreeSBIE.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


RE: dd mini-iso image to USB pendrive?

2006-12-11 Thread Murray Taylor
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Bill-Schoolcraft
 Sent: Tuesday, 12 December 2006 6:19 AM
 To: freebsd-questions@freebsd.org
 Subject: dd mini-iso image to USB pendrive?
 
 Hello Family,
 
 I'm trying to get my server to boot off my Sandisk Cruzer 1-gig pen
 drive with an ISO image dd'd to the pendrive.
 
 It fails and the same ISO image will boot off the USB CDROM with no
 issues.
 
 Is there any specific howto on doing this?
 
 TIA
 
 -- 
   Bill Schoolcraft * http://wiliweld.com
 
 Health nuts are going to feel stupid someday,
 lying in hospitals dying of nothing.
 -- Redd Foxx
 

Try the minibsd sites for more info as they 
target building bootable flash images

4.X  https://neon1.net/misc/minibsd.html
5.X  http://www.ultradesic.com/index.php?section=86
6.X  http://www.ultradesic.com/index.php?section=125

HTH
mjt
---
The information transmitted in this e-mail is for the exclusive
use of the intended addressee and may contain confidential
and/or privileged material. Any review, re-transmission,
dissemination or other use of it, or the taking of any action
in reliance upon this information by persons and/or entities
other than the intended recipient is prohibited. If you
received this in error, please inform the sender and/or
addressee immediately and delete the material. 

E-mails may not be secure, may contain computer viruses and
may be corrupted in transmission. Please carefully check this
e-mail (and any attachment) accordingly. No warranties are
given and no liability is accepted for any loss or damage
caused by such matters.
---

### This e-mail message has been scanned for Viruses by Bytecraft ###
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd wont work

2006-06-26 Thread Lowell Gilbert
Migs [EMAIL PROTECTED] writes:

 I've already looked around and found that dd will work on cd's only if
 the bs=2k argument is present.

 However, ive tried it both without (before knowing this) and with the
 argument, but I still cant pick up an image of the cd.

 I know that this should work:

 dd if=/dev/cd0 of=~/file.iso bs=2k

 but it doesn't. I always get a

 dd: /dev/acd0: Invalid argument
 0+0 records in
 0+0 records out
 0 bytes transferred in 0.000225 secs (0 bytes/sec)

 I'm on 6.1 releng by the way, and the cd im trying to dd is
 knoppix. My combo drive is a 'LITE-ON ' 'COMBO SOHC-5236V' 'R$09'
 Removable CD-ROM thats a slave on ide0. What else should I be looking
 at?

Are you actually copying from cd0, or acd0?
Are you sure the problem isn't with the CD itself?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd wont work

2006-06-26 Thread Migs
Lowell Gilbert wrote:
 Migs [EMAIL PROTECTED] writes:

   
 I've already looked around and found that dd will work on cd's only if
 the bs=2k argument is present.

 However, ive tried it both without (before knowing this) and with the
 argument, but I still cant pick up an image of the cd.

 I know that this should work:

 dd if=/dev/cd0 of=~/file.iso bs=2k

 but it doesn't. I always get a

 dd: /dev/acd0: Invalid argument
 0+0 records in
 0+0 records out
 0 bytes transferred in 0.000225 secs (0 bytes/sec)

 I'm on 6.1 releng by the way, and the cd im trying to dd is
 knoppix. My combo drive is a 'LITE-ON ' 'COMBO SOHC-5236V' 'R$09'
 Removable CD-ROM thats a slave on ide0. What else should I be looking
 at?
 

 Are you actually copying from cd0, or acd0?
 Are you sure the problem isn't with the CD itself?

   
Sorry about that... I was trying both cd0 and acd0, and yes, i know that
the disc is fine since I used to be able to dd from it. I also know that
the drive is fine  because I could dd from it back when  I was still
using slackware. This only showed up when I started with FreeBSD about 2
months ago.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd wont work

2006-06-26 Thread Bill Schoolcraft
At Mon, 26 Jun 2006 it looks like Lowell Gilbert composed:

 Migs [EMAIL PROTECTED] writes:
 
  I've already looked around and found that dd will work on cd's only if
  the bs=2k argument is present.
 
  However, ive tried it both without (before knowing this) and with the
  argument, but I still cant pick up an image of the cd.
 
  I know that this should work:
 
  dd if=/dev/cd0 of=~/file.iso bs=2k
 
  but it doesn't. I always get a
 
  dd: /dev/acd0: Invalid argument
  0+0 records in
  0+0 records out
  0 bytes transferred in 0.000225 secs (0 bytes/sec)
 
  I'm on 6.1 releng by the way, and the cd im trying to dd is
  knoppix. My combo drive is a 'LITE-ON ' 'COMBO SOHC-5236V' 'R$09'
  Removable CD-ROM thats a slave on ide0. What else should I be looking
  at?
 
 Are you actually copying from cd0, or acd0?
 Are you sure the problem isn't with the CD itself?

That happens to me too, I have a Plextor DVD-RW/CD-RW drive.

I have followed the device too to it's link in /dev/* and zilch.

I was trying to dd an umounted FreeBSD iso to file.

-- 
 Bill Schoolcraft || http://wiliweld.com
   
  To be unhappy over what one lacks is to 
 waste what one already possesses.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd to create .iso of a cd

2006-05-25 Thread Jonathan Horne
 Jonathan Horne wrote:
 i hate to ask another back when i used linux question, but here goes:

 back when i used linux, i would create a .iso file of a cd like this:

 dd if=/dev/cdrom of=/path/destfile.iso

 ... and it would just work.  made a perfect copy every time
 (specifically,
 of microsoft cds at the office, and each one was able to burn to a
 bootable copy of what ever it was).  well, i tried to do this in
 freebsd,
 but no luck.  i was able to take a .iso file, but it did not make a
 bootable disk once it was burned.  my command was the same as above, but
 added bs=2048 at the end(as per what i read in the handbook).

 can anyone recommend how to create a .iso image in freebsd that will
 render a bootable .iso file?  i hate to have to keep a linux box around
 the office just for the purpose of successfully creating a .iso file  :)


 Hi,

 This is weird because it works for me. I do:

 $dd if=/dev/acd0 of=file.iso bs=2048
 $burncd -f /dev/acd0 data file.iso fixate

 My burnt copies boot boxen without problems. How do you burn your ISOs?

 Cheers,
 Mikhail.


 --
 Mikhail Goriachev
 Webanoide

 Telephone: +61 (0)3 62252501
 Mobile Phone: +61 (0)4 38255158
 E-Mail: [EMAIL PROTECTED]
 Web: http://www.webanoide.org

 PGP Key ID: 0x4E148A3B
 PGP Key Fingerprint: D96B 7C14 79A5 8824 B99D 9562 F50E 2F5D 4E14 8A3B

generally, from windows, with nero's burn image option.  has always
worked 100% of the time for me in the past, so i need to figure out what
im going to do with freebsd as my replacement.

i guess i should also note, that my only burner is in my windowsXP box,
and at this time, im not in a position to move it permenantly to my
freebsd box.

cheers,
jonathan


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd to create .iso of a cd

2006-05-25 Thread David Kelly
On Thu, May 25, 2006 at 03:35:29PM +1000, Mikhail Goriachev wrote:
 Jonathan Horne wrote:
  
  can anyone recommend how to create a .iso image in freebsd that will
  render a bootable .iso file?  i hate to have to keep a linux box around
  the office just for the purpose of successfully creating a .iso file  :)
 
 This is weird because it works for me. I do:
 
 $dd if=/dev/acd0 of=file.iso bs=2048
 $burncd -f /dev/acd0 data file.iso fixate
 
 My burnt copies boot boxen without problems. How do you burn your ISOs?

Some CD/DVD readers handle EOM differently than others. For fun use
the same dd command on the copied CD and compare it to the output of the
first dd from original.

I suggest Jonathan install sysutils/cdrtools from ports (if not already
installed) and use the readcd(1) utility which is part of that
collection. Its a bit of a hassle if your DVD/CD is ATAPI as the
atapicam(4) SCSI/ATAPI translation layer needs to be added to your
kernel. readcd(4) knows a bit more about what it is reading than dd so
it does a better job.

-- 
David Kelly N4HHE, [EMAIL PROTECTED]

Whom computers would destroy, they must first drive mad.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd to create .iso of a cd

2006-05-24 Thread Mikhail Goriachev
Jonathan Horne wrote:
 i hate to ask another back when i used linux question, but here goes:
 
 back when i used linux, i would create a .iso file of a cd like this:
 
 dd if=/dev/cdrom of=/path/destfile.iso
 
 ... and it would just work.  made a perfect copy every time (specifically,
 of microsoft cds at the office, and each one was able to burn to a
 bootable copy of what ever it was).  well, i tried to do this in freebsd,
 but no luck.  i was able to take a .iso file, but it did not make a
 bootable disk once it was burned.  my command was the same as above, but
 added bs=2048 at the end(as per what i read in the handbook).
 
 can anyone recommend how to create a .iso image in freebsd that will
 render a bootable .iso file?  i hate to have to keep a linux box around
 the office just for the purpose of successfully creating a .iso file  :)


Hi,

This is weird because it works for me. I do:

$dd if=/dev/acd0 of=file.iso bs=2048
$burncd -f /dev/acd0 data file.iso fixate

My burnt copies boot boxen without problems. How do you burn your ISOs?

Cheers,
Mikhail.


-- 
Mikhail Goriachev
Webanoide

Telephone: +61 (0)3 62252501
Mobile Phone: +61 (0)4 38255158
E-Mail: [EMAIL PROTECTED]
Web: http://www.webanoide.org

PGP Key ID: 0x4E148A3B
PGP Key Fingerprint: D96B 7C14 79A5 8824 B99D 9562 F50E 2F5D 4E14 8A3B
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd question

2006-05-04 Thread Paul Chvostek
On Wed, May 03, 2006 at 05:36:46PM -0500, Andrew wrote:
 On Wed, 2006-05-03 at 14:11 -0600, Chad Leigh -- Shire.Net LLC wrote:
   Can I used dd from my freebsd box to  
  completely copy the whole disk, partition tables and all, to another  
  disk?
...
 have another suggestion. If you think the disk will be ok, use dd to
 zero-out the rest of the drive; i.e.
...
 One of these days, I am going to write a tool to do just this sort of
 thing, since it seems to be a fairly common practice.

I believe that tool would be g4u, http://www.feyrer.de/g4u/, along with
the FAQ at http://www.feyrer.de/g4u/#shrinkimg .

p

-- 
  Paul Chvostek [EMAIL PROTECTED]
  it.canadahttp://www.it.ca/

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd question

2006-05-04 Thread Andrew
On Thu, 2006-05-04 at 10:15 -0400, Paul Chvostek wrote:
 On Wed, May 03, 2006 at 05:36:46PM -0500, Andrew wrote:
  On Wed, 2006-05-03 at 14:11 -0600, Chad Leigh -- Shire.Net LLC wrote:
Can I used dd from my freebsd box to  
   completely copy the whole disk, partition tables and all, to another  
   disk?
 ...
  have another suggestion. If you think the disk will be ok, use dd to
  zero-out the rest of the drive; i.e.
 ...
  One of these days, I am going to write a tool to do just this sort of
  thing, since it seems to be a fairly common practice.
 
 I believe that tool would be g4u, http://www.feyrer.de/g4u/, along with
 the FAQ at http://www.feyrer.de/g4u/#shrinkimg .

You are correct; although g4u is a collection of shell scripts, not an
executable. There is some debate about whether or not it needs to be
anything more than a shell script, but I think it makes sense. 

Right now we are using a re-write of g4u with FreeSBIE to install images
in a lab on campus. It sort of has a GUI; we're using 'cdialog' based
menus. I would like to re-write it in C, and add most of the features
listed at http://www.feyrer.de/g4u/#size. I know it would be quite
difficult, but I would like to add filesystem support to this
yet-to-be-written tool as well. And I think it should be multithreaded
too. This list of features seems to make this more of a programming
exercise than question of what's actually necessary to get the job done.
Anyway... When I get around to it...

-Andrew 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd question

2006-05-03 Thread Mike Hunter
On May 03 at 14:11, Chad Leigh -- Shire.Net LLC wrote:

 I have a Windows machine that also has some linux partitions.  lilo  
 is the main boot manager.  Can I used dd from my freebsd box to  
 completely copy the whole disk, partition tables and all, to another  
 disk?  The disk in the machine is starting to appear to be a little  
 flaky and I have another of the same mechanisms here and would like  
 to just basically clone the whole thing over.  I seldom use the  
 machine but when I do need it I need it (tax time, an old website  
 that uses a specific windows tool for updating, etc)

I've done this and had success.  You can boot the machine that you want to
dupe with a live CD, then dd from the disk to either a file somewhere or
straight to another disk, then you should be able to just boot from the
new disk (the new disk must be = the size of the old disk, people have
said that the exact same size is required, but I haven't found that to be
the case.)

A couple other quick plugs, check out ddrecover if you have bad sectors.
Last but not least, I've used netcat with success to do these dupes across
a (secure) network.

Mike
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd question

2006-05-03 Thread Andrew
On Wed, 2006-05-03 at 14:11 -0600, Chad Leigh -- Shire.Net LLC wrote:
 I have a Windows machine that also has some linux partitions.  lilo  
 is the main boot manager.  Can I used dd from my freebsd box to  
 completely copy the whole disk, partition tables and all, to another  
 disk?  The disk in the machine is starting to appear to be a little  
 flaky and I have another of the same mechanisms here and would like  
 to just basically clone the whole thing over.  I seldom use the  
 machine but when I do need it I need it (tax time, an old website  
 that uses a specific windows tool for updating, etc)
 
 Thanks
 Chad

I've done this several times, and it works reasonably well. Someone
recommended piping the output through netcat, which will work; however I
have another suggestion. If you think the disk will be ok, use dd to
zero-out the rest of the drive; i.e.

dd if=/dev/zero of=zeros;
rm zeros; 
dd if=/dev/ad0 of=- | gzip - - | nc $HOSTNAME $PORT;

I've always used FTP instead of netcat, but you should be just fine.
netcat may even be a bit faster, since you don't have the overhead of
the FTP protocol. 

On the receiving end, just do the reverse:

nc -l $PORT | gzip -d - - | dd if=- of=/dev/ad0;

You can play around with blocksize too; sometimes it will speed up the
process a little bit.

One of these days, I am going to write a tool to do just this sort of
thing, since it seems to be a fairly common practice.

-Andrew


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd issues

2006-05-02 Thread Jim Stapleton

That doesn't sound like a backup to me.  dd isn't a backup program,
and CDs are not normally things you back up.


A backup is just a copy of the data on a different media than the
source (in this case, a hard drive). People back up CDs alll the time,
in case they get scratched or damaged, and they don't want to have to
deal with finding/obtaining replacements. In some cases, the
replacements aren't even possible, such as if the distributing company
went out of business.


Use the conv=sync
operation to transfer the last incomplete block correctly.


Ahh, that will be useful. Thank you.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd issues

2006-05-01 Thread Greg 'groggy' Lehey
On Monday,  1 May 2006 at 19:44:00 -0400, Jim Stapleton wrote:
 I'm trying to back up some of my software, and I'm having some
 problems, I found something in the archives specifying the need to set
 a block size of 2k or greater. This makes a backup (I've not tested it
 yet).

 My questions are:
 (1) Why does this work?

Why shouldn't it?

 (2) Is it possible that not using the default/found block size will
 cause issues?

Yes.

Without more background in what you're trying to do (you don't even
say what backup program or what medium you're trying to back up to),
or what your concerns are, it's difficult to answer this question.
There are no specific issues with block size on most archivers, but in
general large block sizes (64 kB or larger) will give better
performance.

Greg
--
When replying to this message, please copy the original recipients.
If you don't, I may ignore the reply or reply to the original recipients.
For more information, see http://www.lemis.com/questions.html
See complete headers for address and phone numbers.


pgptR7e7CVpJY.pgp
Description: PGP signature


Re: dd issues

2006-05-01 Thread Jim Stapleton

On 5/1/06, Greg 'groggy' Lehey [EMAIL PROTECTED] wrote:

On Monday,  1 May 2006 at 19:44:00 -0400, Jim Stapleton wrote:
 I'm trying to back up some of my software, and I'm having some
 problems, I found something in the archives specifying the need to set
 a block size of 2k or greater. This makes a backup (I've not tested it
 yet).

 My questions are:
 (1) Why does this work?

Why shouldn't it?


Because the alternative does not work (default block size, block size
less than 2k).



 (2) Is it possible that not using the default/found block size will
 cause issues?

Yes.

Without more background in what you're trying to do (you don't even
say what backup program or what medium you're trying to back up to),
or what your concerns are, it's difficult to answer this question.
There are no specific issues with block size on most archivers, but in
general large block sizes (64 kB or larger) will give better
performance.


program is dd, source medium is CD, destination medium is hard drive.
Possible later medium is compressed files on HD DVD-RW
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd issues

2006-05-01 Thread Greg 'groggy' Lehey
On Monday,  1 May 2006 at 21:21:26 -0400, Jim Stapleton wrote:
 On 5/1/06, Greg 'groggy' Lehey [EMAIL PROTECTED] wrote:
 Without more background in what you're trying to do (you don't even
 say what backup program or what medium you're trying to back up to),
 or what your concerns are, it's difficult to answer this question.
 There are no specific issues with block size on most archivers, but in
 general large block sizes (64 kB or larger) will give better
 performance.

 program is dd, source medium is CD, destination medium is hard
 drive.

That doesn't sound like a backup to me.  dd isn't a backup program,
and CDs are not normally things you back up.  But they have a sector
size of 2 kB, so you will need to transfer in multiples of 2 kB.  As I
said above, 64 kB or larger is a good idea.  Use the conv=sync
operation to transfer the last incomplete block correctly.

Greg
--
When replying to this message, please copy the original recipients.
If you don't, I may ignore the reply or reply to the original recipients.
For more information, see http://www.lemis.com/questions.html
See complete headers for address and phone numbers.


pgprpbqJGg5wH.pgp
Description: PGP signature


Re: dd - cloning a disk.

2006-03-12 Thread Glenn Dawson

At 03:29 PM 3/11/2006, Joseph Vella wrote:

On Saturday 11 March 2006 14:43, Wojciech Puchar wrote:
 
  Here is a simple (I think!) question for the I/O savy among you:
 
  If I had two identical disks, say, 73 GB Seagate 10K SCSIs, one 
completely

  operational fully setup FreeBSD with all the trimmings, and the other
blank,
  or perhaps loaded but no longer usable, is 'dd' and appropriate tool to
  completely clone the Good disk to the not so good 
disktherefor making

the
  second disk identical to the first? Bootable and all?

 yes

 dd if=/dev/firstdisk of=/dev/seconddisk bs=64k

 and yes it is bootable, but if you boot from second disk, FreeBSD kernel
 will mount root from first disk anyway, unless you will reconfigure it.


Would this also work to copy CDs?  If so, does it matter what os 
and/or format

they would have?


You can get an image of a data cd with:

dd if=/dev/acd0 of=foo.iso bs=2048

You can then use burncd to make a copy.  Also note that the block 
size is important here.


-Glenn



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd - cloning a disk.

2006-03-12 Thread Wojciech Puchar

list sometime in the last 3-5 weeks.  Giorgios Keramidas
commented that dd was too slow for his tastes and


dd is the fastest, but probably he used small block size. 64K is OK

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd - cloning a disk.

2006-03-12 Thread Andrew Pantyukhin
On 3/12/06, Wojciech Puchar [EMAIL PROTECTED] wrote:
 
  It is, with a few 'buts'. Firstly, the source should be mounted

 but may not - unless system is generally idle. fsck will be checking the
 copy then, but with success.

No matter what fsck says later, it's too dangerous. A FreeBSD
system (as well as any other complicated OS) is never really
idle in terms of disk I/O.


On 3/12/06, Wojciech Puchar [EMAIL PROTECTED] wrote:
  list sometime in the last 3-5 weeks.  Giorgios Keramidas
  commented that dd was too slow for his tastes and

 dd is the fastest, but probably he used small block size. 64K is OK

dd can be slower than dump/restore in quite a few cases,
especially when disk is far from full.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd - cloning a disk.

2006-03-12 Thread Mike Jeays
On Sun, 2006-03-12 at 16:53 +0300, Andrew Pantyukhin wrote:
 On 3/12/06, Wojciech Puchar [EMAIL PROTECTED] wrote:
  
   It is, with a few 'buts'. Firstly, the source should be mounted
 
  but may not - unless system is generally idle. fsck will be checking the
  copy then, but with success.
 
 No matter what fsck says later, it's too dangerous. A FreeBSD
 system (as well as any other complicated OS) is never really
 idle in terms of disk I/O.
 
 
 On 3/12/06, Wojciech Puchar [EMAIL PROTECTED] wrote:
   list sometime in the last 3-5 weeks.  Giorgios Keramidas
   commented that dd was too slow for his tastes and
 
  dd is the fastest, but probably he used small block size. 64K is OK
 
 dd can be slower than dump/restore in quite a few cases,
 especially when disk is far from full.
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]

I have done this 'safely', by booting Knoppix, and using dd to copy the
disk in the knowledge that all the UFS filesystems are closed and clean.
Use a large blocksize; you can go a lot bigger than 64K.
-- 
Mike Jeays
http://ca.geocities.com/[EMAIL PROTECTED]

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd - cloning a disk.

2006-03-12 Thread Andrew Pantyukhin
On 3/12/06, Mike Jeays [EMAIL PROTECTED] wrote:
 I have done this 'safely', by booting Knoppix, and using dd to copy the
 disk in the knowledge that all the UFS filesystems are closed and clean.
 Use a large blocksize; you can go a lot bigger than 64K.

Single-user mode is more than enough and arguably less
hassle-free.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd - cloning a disk.

2006-03-11 Thread Andrew Pantyukhin
On 3/11/06, Grant Peel [EMAIL PROTECTED] wrote:
 Hi all,

 Here is a simple (I think!) question for the I/O savy among you:

 If I had two identical disks, say, 73 GB Seagate 10K SCSIs, one completely
 operational fully setup FreeBSD with all the trimmings, and the other blank,
 or perhaps loaded but no longer usable, is 'dd' and appropriate tool to
 completely clone the Good disk to the not so good disktherefor making
 the second disk identical to the first? Bootable and all?

It is, with a few 'buts'. Firstly, the source should be mounted
read-only. Secondly, you should copy the drive device itself
(ie da0 to da1) instead of its partitions (ie da0c).
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd - cloning a disk.

2006-03-11 Thread Wojciech Puchar


Here is a simple (I think!) question for the I/O savy among you:

If I had two identical disks, say, 73 GB Seagate 10K SCSIs, one completely 
operational fully setup FreeBSD with all the trimmings, and the other blank, 
or perhaps loaded but no longer usable, is 'dd' and appropriate tool to 
completely clone the Good disk to the not so good disktherefor making the 
second disk identical to the first? Bootable and all?


yes

dd if=/dev/firstdisk of=/dev/seconddisk bs=64k

and yes it is bootable, but if you boot from second disk, FreeBSD kernel 
will mount root from first disk anyway, unless you will reconfigure it.


so for booting from 2-nd disk, swap SCSI IDs
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd - cloning a disk.

2006-03-11 Thread Wojciech Puchar


It is, with a few 'buts'. Firstly, the source should be mounted


but may not - unless system is generally idle. fsck will be checking the 
copy then, but with success.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd - cloning a disk.

2006-03-11 Thread Joseph Vella
On Saturday 11 March 2006 14:43, Wojciech Puchar wrote:
 
  Here is a simple (I think!) question for the I/O savy among you:
 
  If I had two identical disks, say, 73 GB Seagate 10K SCSIs, one completely 
  operational fully setup FreeBSD with all the trimmings, and the other 
blank, 
  or perhaps loaded but no longer usable, is 'dd' and appropriate tool to 
  completely clone the Good disk to the not so good disktherefor making 
the 
  second disk identical to the first? Bootable and all?
 
 yes
 
 dd if=/dev/firstdisk of=/dev/seconddisk bs=64k
 
 and yes it is bootable, but if you boot from second disk, FreeBSD kernel 
 will mount root from first disk anyway, unless you will reconfigure it.
 

Would this also work to copy CDs?  If so, does it matter what os and/or format 
they would have?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd - cloning a disk.

2006-03-11 Thread Kevin Kinsey

Grant Peel wrote:


Hi all,

Here is a simple (I think!) question for the I/O savy among you:

If I had two identical disks, say, 73 GB Seagate 10K SCSIs, one 
completely
operational fully setup FreeBSD with all the trimmings, and the other 
blank,

or perhaps loaded but no longer usable, is 'dd' and appropriate tool to
completely clone the Good disk to the not so good disktherefor
making the second disk identical to the first? Bootable and all?

-Grant




Hi, Grant:

Yes, dd, will copy/clone a disk.

There was a fairly long, good thread on this subject on this
list sometime in the last 3-5 weeks.  Giorgios Keramidas
commented that dd was too slow for his tastes and
suggested dump and restore for this type of work.

Now, I'm no expert at fdisk and bsdlabel scripting, but here's
a plan I adopted as a result of that thread.  It includes manual
labor via the sysinstall front end to fdisk and bsdlabel, and
then is automagic.

1.  Set up the hardware--- I'm assuming extant drive on primary
IDE master and new drive as same channel slave.

2.  Run sysinstall as root, choose Configure (Post Install Configuration)
and run Fdisk.  Dedicate the entire new disk and set it bootable.  Write
out the changes with, um W, isn't it (IIRC)

3.  Exit sysinstall and then start it up again.  Run the disk label editor
and set up partitions of a sufficient size for the clone procedure 
(generally,
same size or larger; in a pinch, could be smaller than the original 
partition
but, obviously, must be large enough for the data on the original 
partition).

Write out the changes, exist sysinstall.

4.  Run this script (edit it to reflect your actual layout):

   #!/bin/sh

   mkdir -p /1
   mkdir -p /2
   mkdir -p /3

   mount /dev/ad1s1a /1
   mount /dev/ad1s1d /2
   mount /dev/ad1s1e /3

   dump -0 -a -L -f - / | ( cd /1 ; restore -ruvf - )
   dump -0 -a -L -f - /var | ( cd /2 ; restore -ruvf - )
   dump -0 -a -L -f - /usr | ( cd /3 ; restore -ruvf - )

Quick, easy, fast.  Probably someone with a better handle on
fdisk/bsdlabel could script steps 2-3 above.  And, with thought,
#4 could be improved, too.  But, it is faster.

Basically, I'm thinking this:

A.  With the dd approach, you don't need to know anything
about the extant filesystem's layout.

B.  But, if you use dump | restore, you trade a little foreknowledge
of the extant filesystem's layout for flexibility (disk doesn't have
to be identical); and speed (the only thing copied is the data, not the
blank space, and from a filesystem viewpoint instead of block level
copying).

We've used this successfully to create a number of disks for
cheap workstations at a client of ours---as a result, they have
plenty of stations available with almost no time spent in tweaking
the installation other than hostname and interface configuration
in rc.conf.

YMMV, and all that.  HTH, (or at least provides another perspective).

Kevin Kinsey

--
My doctorate's in Literature, but it seems like a pretty good 
pulse to me.



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: dd is so slow on my SCSI disc

2005-08-23 Thread Ted Mittelstaedt

dd works a lot better if you set the buffersize to higher than
the default.

Ted

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Danny MacMillan
Sent: Monday, August 22, 2005 5:58 PM
To: Sebastian Pahlke
Cc: freebsd-questions@freebsd.org
Subject: Re: dd is so slow on my SCSI disc


Sebastian Pahlke wrote:
 Hi all,

 I'm trying to clean a disc before selling them:

 dd if=/dev/zero of=/dev/da0

You may want to consider using /dev/random instead of, or in combination
with, /dev/zero.  Zeroing out a disk isn't a significant barrier to
forensic analysis.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to
[EMAIL PROTECTED]

--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.14/79 - Release Date:
8/22/2005

--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.14/79 - Release Date: 8/22/2005

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd is so slow on my SCSI disc

2005-08-23 Thread Dmitry Mityugov
On 8/23/05, Sebastian Pahlke [EMAIL PROTECTED] wrote:
 Hi all,
 
 I'm trying to clean a disc before selling them:
 
 dd if=/dev/zero of=/dev/da0
 
 Do I make something wrong because the transfer rate is only 60932
 bytes/sec??? These are 60 kbytes/sec, slower than my internet connection!!!
 :(
 
 I tried to increase the block size, with bs=32768 I get 3416071 bytes/sec.
 But this is still very poor. The system is a PIII 800MHz and a SCSI-3 disc
 in single user mode booted from FreeBSD release 5.4 live-cd.
 
 Any ideas how to analyze this? Thanks in advance!

In addition to other replies, there are drives that test their blocks
on first write to them. This makes first write operations slow but
that's normal - subsequent writes to the same spots on the drives
should be fast.

-- 
Dmitry Mityugov, St. Petersburg, Russia
I ignore all messages with confidentiality statements

We live less by imagination than despite it - Rockwell Kent, N by E
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd is so slow on my SCSI disc

2005-08-22 Thread Andrew P.
On 8/23/05, Sebastian Pahlke [EMAIL PROTECTED] wrote:
 Hi all,
 
 I'm trying to clean a disc before selling them:
 
 dd if=/dev/zero of=/dev/da0
 
 Do I make something wrong because the transfer rate is only 60932
 bytes/sec??? These are 60 kbytes/sec, slower than my internet connection!!!
 :(
 
 I tried to increase the block size, with bs=32768 I get 3416071 bytes/sec.
 But this is still very poor. The system is a PIII 800MHz and a SCSI-3 disc
 in single user mode booted from FreeBSD release 5.4 live-cd.
 
 Any ideas how to analyze this? Thanks in advance!
 

Hmm, I'd start with increasing block size up to megabytes
and if that doesn't help - I'd try to copy a large file to/from
the disk and measure the speed.

Also, the smartmontools port can tell you much if the drive
supports SMART.


Andrew P.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd is so slow on my SCSI disc

2005-08-22 Thread Emanuel Strobl
Am Montag, 22. August 2005 22:13 CEST schrieb Sebastian Pahlke:
 Hi all,

 I'm trying to clean a disc before selling them:

 dd if=/dev/zero of=/dev/da0

 Do I make something wrong because the transfer rate is only 60932
 bytes/sec??? These are 60 kbytes/sec, slower than my internet
 connection!!!

 :(

 I tried to increase the block size, with bs=32768 I get 3416071
 bytes/sec. But this is still very poor. The system is a PIII 800MHz and
 a SCSI-3 disc in single user mode booted from FreeBSD release 5.4
 live-cd.

 Any ideas how to analyze this? Thanks in advance!

Hmm, what dows systat (-vm 1) tell you? What's the disk load, maybe you're 
suffering from interrupt storms? I can't you help much with specific SCSI 
parts, but maybe you want to try 6.0-BETA3, if I remember correctly there 
were some adaptec problems fixed...

-Harry


 greetings,

 Sebastian Pahlke


 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 [EMAIL PROTECTED]


pgpomUGrzprjr.pgp
Description: PGP signature


Re: dd is so slow on my SCSI disc

2005-08-22 Thread Danny MacMillan
Sebastian Pahlke wrote:
 Hi all,
 
 I'm trying to clean a disc before selling them:
 
 dd if=/dev/zero of=/dev/da0

You may want to consider using /dev/random instead of, or in combination
with, /dev/zero.  Zeroing out a disk isn't a significant barrier to
forensic analysis.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd is so slow on my SCSI disc

2005-08-22 Thread Mike Jeays
On Mon, 2005-08-22 at 20:57, Danny MacMillan wrote:
 Sebastian Pahlke wrote:
  Hi all,
  
  I'm trying to clean a disc before selling them:
  
  dd if=/dev/zero of=/dev/da0
 
 You may want to consider using /dev/random instead of, or in combination
 with, /dev/zero.  Zeroing out a disk isn't a significant barrier to
 forensic analysis.
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]

Using /dev/random is much, much slower than /dev/zero.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd is so slow on my SCSI disc

2005-08-22 Thread Emanuel Strobl
Am Dienstag, 23. August 2005 04:29 CEST schrieb Mike Jeays:
 On Mon, 2005-08-22 at 20:57, Danny MacMillan wrote:
  Sebastian Pahlke wrote:
   Hi all,
  
   I'm trying to clean a disc before selling them:
  
   dd if=/dev/zero of=/dev/da0
 
  You may want to consider using /dev/random instead of, or in
  combination with, /dev/zero.  Zeroing out a disk isn't a significant
  barrier to forensic analysis.
 
[...]

 Using /dev/random is much, much slower than /dev/zero.

He quoted correctly and his statment wasn't about speed, but about the 
purpose of the original action; To clean discs before selling
I'm not sure if single-writing nulls or randoms makes any difference; I 
think it doesn't, but his post wasn't incorrect!

-Harry


pgpxw63pTj3Eu.pgp
Description: PGP signature


Re: dd to unused partition (Hey! someone stole my foot-shooting gun!)

2005-07-12 Thread Lee Harr

Oh, and the cd drive is not bootable.

So, I want to boot the cd image from the hard drive, and
use the cd drive for the install after it boots.


I dont think you can just copy CD image to slice and make it boot :-(



Hmm...  Now that I think about it, maybe what I did
before was to use the boot.flp floppy disk image.

Does that make a difference?

_
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.com/


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd to unused partition (Hey! someone stole my foot-shooting gun!)

2005-07-11 Thread Mario Hoerich
# Lee Harr:
 dd if=iso of=/dev/ad0s1
 
 but what I am getting now is ...
 
 dscheck(#ad/0x22): fixlabel: invalid magic
 fixlabel: invalid magic
 dd: /dev/ad0s1: Read-only filesystem

This error isn't new, it just, well, doesn't happen very
often:

kern/subr_diskslice.c:
| static char *
| fixlabel(sname, sp, lp, writeflag)
[...]
|   /* These errors can't happen so don't bother reporting details. */
|   if (lp-d_magic != DISKMAGIC || lp-d_magic2 != DISKMAGIC)
|   return (fixlabel: invalid magic);

Prior reports seem to indicate this fails if non-ufs slices
somehow got themselves a disklabel.

According to URL:http://makeashorterlink.com/?S37C2186B[1]
a workaround might be using

  dd if=/dev/foo of=/dev/ad0 oseek=63


 HTH,
Mario
___
[1]: This is really
URL:http://groups.google.de/group/mailing.freebsd.questions/browse_frm/thread/46bc3662805a349c/146b0cdc6e294288?q=dscheck+fixlabelrnum=3hl=de#146b0cdc6e294288.
  
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd to unused partition (Hey! someone stole my foot-shooting gun!)

2005-07-11 Thread Lee Harr

dd if=iso of=/dev/ad0s1
dd: /dev/ad0s1: Read-only filesystem



According to URL:http://makeashorterlink.com/?S37C2186B[1]
a workaround might be using

  dd if=/dev/foo of=/dev/ad0 oseek=63




Ah. Ok. That should have been obvious  :oP

What about those first few bytes, though? I think I am not
getting what I need ...

dd if=iso of=/dev/ad0s2 oseek=63
dd if=/dev/ad0s2 of=iso2
truncate -r iso iso2
diff iso iso2
(Binary files iso and iso2 differ)



What I am doing is using a 4.11 system to copy a 5.4 boot iso
to an unused partition, so that I can boot it and install 5.4.

I know it seems roundabout, but it is a very old laptop with
either floppy or cd (not both) and the pccard ethernet iface
which is working fine under 4.11 is not working in the 5.4
installer -- so no network install.

Oh, and the cd drive is not bootable.

So, I want to boot the cd image from the hard drive, and
use the cd drive for the install after it boots.


Anyhow, I used the oseek=63 and copied the iso to ad0s2 ...
but I can't boot it.

boot: 0:ad(0,2,a)/boot/loader
Invalid partition

Of course, I am not really sure how to specify ad0s2 from the
boot: prompt.

Thanks for your help.

_
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd to unused partition (Hey! someone stole my foot-shooting gun!)

2005-07-10 Thread Lee Harr

dd if=iso of=/dev/ad0s1



dd: /dev/ad0s1: Read-only filesystem



I guess I can boot from the install floppies and use the fixit
floppy Ok. I will go that route, but now I am wondering
why has my favorite foot-blaster been taken away? And...
for future reference, how can I get around the block?




I just tried the same thing from the fixit floppy, and I get
the same message about ad0s1 being a Read-only
filesystem

What am I missing here?

_
FREE pop-up blocking with the new MSN Toolbar - get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd to unused partition (Hey! someone stole my foot-shooting gun!)

2005-07-10 Thread Lowell Gilbert
Lee Harr [EMAIL PROTECTED] writes:

 dd if=iso of=/dev/ad0s1
 
 dd: /dev/ad0s1: Read-only filesystem
 
 I guess I can boot from the install floppies and use the fixit
 floppy Ok. I will go that route, but now I am wondering
 why has my favorite foot-blaster been taken away? And...
 for future reference, how can I get around the block?
 
 
 
 I just tried the same thing from the fixit floppy, and I get
 the same message about ad0s1 being a Read-only
 filesystem
 
 What am I missing here?

Raised securelevel?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd to unused partition (Hey! someone stole my foot-shooting gun!)

2005-07-10 Thread Lee Harr

dd if=iso of=/dev/ad0s1

dd: /dev/ad0s1: Read-only filesystem



I just tried the same thing from the fixit floppy, and I get
the same message about ad0s1 being a Read-only
filesystem

What am I missing here?


Raised securelevel?



Well... I am not sure why the securelevel would be raised by
the installer and fixit floppy, but I cannot check what the
level is (at least not the way I know how to check ...)

# sysctl -a | grep secure
sysctl: not found

I guess I could customize fixit.flp to add sysctl but is it really
likely that the installer raises the securelevel?

_
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd cd image

2005-03-18 Thread Darksidex
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Osmany Guirola Cruz escribió:
| Hi people
|  I am trying to do an iso image of DATA CD and i am using this command
line
|
| %dd if=/dev/acd0 of=cd.iso
| and this is the error
|
| dd: /dev/acd0: Invalid argument
| 0+0 records in
| 0+0 records out
| 0 bytes transferred in 0.000304 secs (0 bytes/sec)
|
|
| How can i made and iso image of a data cd ?
without mkisofs you can use cat:
cat /dev/acd0  cd.iso
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (MingW32)
iD8DBQFCOspULWSOuibjjvIRAmI6AKCR6/GEfCB/T4lZdeuPxFk4/iE8RwCfdqUm
UpBqCLwD/J9aDYVtwAFF/e8=
=yPz6
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd cd image

2005-03-18 Thread Kevin Kobb
Osmany Guirola Cruz wrote:
 Hi people
  I am trying to do an iso image of DATA CD and i am using this command line
 
 %dd if=/dev/acd0 of=cd.iso
 and this is the error
 
 dd: /dev/acd0: Invalid argument
 0+0 records in
 0+0 records out
 0 bytes transferred in 0.000304 secs (0 bytes/sec)
 
 
 How can i made and iso image of a data cd ?
 
 
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 [EMAIL PROTECTED]
 
I think if you specify a block size (bs=2k or greater) it will work.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd on samba

2005-03-15 Thread Pietro Cerutti
On Mon, 14 Mar 2005 19:53:12 -0300, Alejandro Pulver
[EMAIL PROTECTED] wrote:
 
 Hello,

Hi there,

 
 I have free space between two slices to I tried to do the same as you.

Thank you!
 
 When you have the image of a slice generated by 'dd', it contains its
 partitions and filesystems. First you may want to make that slice image
 (file) to appear in '/dev', so you can manipulate its partitions. This
 is done (in FreeBSD 5.X, if you use 4.X use'vnconfig', there are
 examples in the Handbook) like with a CD-ROM ISO image (see the
 Handbook-Storage):
 
 mdconfig -a -t vnode -f file -u n
 
 It will appear in '/dev' as 'mdn', with its partitions, like the
 following:
 
 md1a
 md1c
 [...]
 
 So you can mount them, dump them, etc., like with a slice (in fact,
 it is an image of a slice).
 
 When you end what you want to do with it, do (after unmounting the
 partitions):
 
 mdconfig -d -u n
 
 Best Regards,
 Ale
 

Great, this is what I was searching for!
Thank you once more!

Best regards,


-- 
Pietro Piter Cerutti
[EMAIL PROTECTED]
[EMAIL PROTECTED]

Beansidhe - SwiSS Death / Thrash Metal
www.beansidhe.ch

Windows: Where do you want to go today?
Linux: Where do you want to go tomorrow?
FreeBSD: Are you guys coming or what?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd on samba

2005-03-14 Thread Peter Ulrich Kruppa
On Mon, 14 Mar 2005, Pietro Cerutti wrote:
Hi folks,
I need to backup my whole disk, re organize my partitions, and then
restore the whole thing.
The problem is that the only place where I can put the backup 
is a samba mount.

dd and dump won't work (they won't put the data on a directory).
What else could I do?
There probably are some dozen possibilities, but you could try
/usr/ports/net/rsync
Regards,
Uli.
Don't forget that I also need to backup the whole / and /var (which
gives sometimes problems with some unreadable files)
Thank you!
--
Pietro Piter Cerutti
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Beansidhe - SwiSS Death / Thrash Metal
www.beansidhe.ch
Windows: Where do you want to go today?
Linux: Where do you want to go tomorrow?
FreeBSD: Are you guys coming or what?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]

*
* Peter Ulrich Kruppa - Wuppertal - Germany * 
*
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd on samba

2005-03-14 Thread Pietro Cerutti
On Mon, 14 Mar 2005 13:27:19 +, Pietro Cerutti
[EMAIL PROTECTED] wrote:
 dd and dump won't work (they won't put the data on a directory).

Maybe I solved it, by  making
# dd if=/dev/ad0 of=/mnt/some_file.dd bs=2m

But how is goint to be to restore the whole filesystem?

Thanks!


-- 
Pietro Piter Cerutti
[EMAIL PROTECTED]
[EMAIL PROTECTED]

Beansidhe - SwiSS Death / Thrash Metal
www.beansidhe.ch

Windows: Where do you want to go today?
Linux: Where do you want to go tomorrow?
FreeBSD: Are you guys coming or what?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd on samba

2005-03-14 Thread Alejandro Pulver
On Mon, 14 Mar 2005 13:34:17 +
Pietro Cerutti [EMAIL PROTECTED] wrote:

 On Mon, 14 Mar 2005 13:27:19 +, Pietro Cerutti
 [EMAIL PROTECTED] wrote:
  dd and dump won't work (they won't put the data on a directory).
 
 Maybe I solved it, by  making
 # dd if=/dev/ad0 of=/mnt/some_file.dd bs=2m
 
 But how is goint to be to restore the whole filesystem?
 
 Thanks!
 
 
 -- 
 Pietro Piter Cerutti
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 
 Beansidhe - SwiSS Death / Thrash Metal
 www.beansidhe.ch
 
 Windows: Where do you want to go today?
 Linux: Where do you want to go tomorrow?
 FreeBSD: Are you guys coming or what?

Hello,

I have free space between two slices to I tried to do the same as you.

When you have the image of a slice generated by 'dd', it contains its
partitions and filesystems. First you may want to make that slice image
(file) to appear in '/dev', so you can manipulate its partitions. This
is done (in FreeBSD 5.X, if you use 4.X use'vnconfig', there are
examples in the Handbook) like with a CD-ROM ISO image (see the
Handbook-Storage):

mdconfig -a -t vnode -f file -u n

It will appear in '/dev' as 'mdn', with its partitions, like the
following:

md1a
md1c
[...]

So you can mount them, dump them, etc., like with a slice (in fact,
it is an image of a slice).

When you end what you want to do with it, do (after unmounting the
partitions):

mdconfig -d -u n

Best Regards,
Ale
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd

2004-03-24 Thread Gary W. Swearingen
Vasil Dimov [EMAIL PROTECTED] writes:

 Oh, yes, ofcourse I love `dd' but Ron was asking about *filesystem*

You didn't read his message as closely as you should have.  He said:

   I have set up a primary partition with ext2 filesystem to act as a
   single data partition accessable from all OSs.

Notice the to act as a single data partition part.  I thought it
reasonable to tell him alternative ways to implement a shared data
partition, since I had little hope that he would find a good, reliable
file system, including FAT32.  If I'm wrong, great, but I'd suggest
that people test their little-used filesystem code with diffs and
checksums and etc., before relying on it.

I'm sorry that I mis-addressed my last message to you; I quoted only
the OP (any thoughts?) and my thoughts did not include any intent to
disparage your knowledge of dd, etc.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd

2004-03-23 Thread Vasil Dimov
On Tue, Mar 23, 2004 at 09:26:05AM -0800, Gary W. Swearingen wrote:
  
  Any thoughts?
 
 SOMETIMES no file system is the best file system.  E.g., by putting
 a raw file on a partition with dd, cat, or , maybe with the
 raw file being a .pax, .tgz, or other archive file.  Creative use
 of dd options should permit multiple files per partition but I've
 only ever used a single (archive) file.
Oh, yes, ofcourse I love `dd' but Ron was asking about *filesystem*
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd of mounted filesystem

2003-12-12 Thread Dru


On Thu, 11 Dec 2003, Dan Nelson wrote:

 In the last episode (Dec 11), Matthew Seaman said:
  On Thu, Dec 11, 2003 at 02:54:12PM -0500, Dru wrote:
   Can anyone describe or point me to resources explaining why it is
   dangerous to dd a filesystem while it is mounted? Is it still
   considered to be dangerous if the system is first dropped down to
   single-user mode?
 
  Remember that dd(1) traverses the block device sequentially, but that
  most FS accesses are random, so any particular change can span either
  side of dd(1)'s offset.  Also that dd'ing from the block device
  bypasses the usual machinery for doing file IO -- machinery that is
  designed under the premise that it will have sole control over what
  gets read or written where and when.

 On current you can get around the consistency problem by dd'ing a
 snapshot of the filesystem, just like dump's -L flag does.

You mean, run makesnap_ffs first? I've been meaning to play with that
one, I'll have to try it out.

Dru
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd of mounted filesystem

2003-12-11 Thread Matthew Seaman
On Thu, Dec 11, 2003 at 02:54:12PM -0500, Dru wrote:

 Can anyone describe or point me to resources explaining why it is
 dangerous to dd a filesystem while it is mounted? Is it still considered
 to be dangerous if the system is first dropped down to single-user mode?

I assume you're talking about dd of the filesystem block devices,
rather than anything else.

dd'ing from a mounted filesystem is generally safe, although you won't
get any sort of sensible result unless the source filesystem is
inactive -- remounting the FS read-only should be sufficient.

Using dd(1) to write to the block device of a mounted filesystem will
at minimum create a horrible mess and at worst could well crash the
machine.

Remember that dd(1) traverses the block device sequentially, but that
most FS accesses are random, so any particular change can span either
side of dd(1)'s offset.  Also that dd'ing from the block device
bypasses the usual machinery for doing file IO -- machinery that is
designed under the premise that it will have sole control over what
gets read or written where and when.

dd'ing to a mounted filesystem will overwrite the original inode
structure, but the dd(1) process is going to be competing with the
buffer cache, which will tend to write data back using it's cached
version of the previous structure.  You'll end up with a mess that
fsck(1) probably couldn't sort out.  Even if the target FS is mounted
read-only the filesystem code will still probably throw a wobbly when
it finds the disk contents have been changed out from underneath it.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


pgp0.pgp
Description: PGP signature


Re: dd of mounted filesystem

2003-12-11 Thread Dan Nelson
In the last episode (Dec 11), Matthew Seaman said:
 On Thu, Dec 11, 2003 at 02:54:12PM -0500, Dru wrote:
  Can anyone describe or point me to resources explaining why it is
  dangerous to dd a filesystem while it is mounted? Is it still
  considered to be dangerous if the system is first dropped down to
  single-user mode?
 
 Remember that dd(1) traverses the block device sequentially, but that
 most FS accesses are random, so any particular change can span either
 side of dd(1)'s offset.  Also that dd'ing from the block device
 bypasses the usual machinery for doing file IO -- machinery that is
 designed under the premise that it will have sole control over what
 gets read or written where and when.

On current you can get around the consistency problem by dd'ing a
snapshot of the filesystem, just like dump's -L flag does.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd of mounted filesystem

2003-12-11 Thread Drew Tomlinson
- Original Message - 
From: Dru [EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 11:54 AM

 Can anyone describe or point me to resources explaining why it is
 dangerous to dd a filesystem while it is mounted? Is it still
considered
 to be dangerous if the system is first dropped down to single-user
mode?

I'm guessing between this thread and your unmounting / thread that
you're attempting to duplicate your root drive?  I just tried this in
single user mode a few days ago with dd and it didn't work.  The
resulting file system was dirty so I used 'fsck' to clean it.  The
results were a complete unusable mess.

I tried another method described in my thread Trouble Adding New Boot
Drive but couldn't quite get it right.  However I think I'm overlooking
something quite simple.  You might like to look over the steps I took
and see if they make sense.  Then if you get it to work, I'd be most
appreciative if you'd let me know what I missed.  I'll send the message
to you if you want.

Good Luck!

Drew

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd to duplicate a disk.

2003-09-14 Thread Sebastian Ssmoller
Am Son, 2003-09-14 um 16.31 schrieb Lewis Thompson:
 Hi,
 
 I'm trying to setup a vinum mirrored root fs.  I've not got very far
 (although I have some excellent help once I get past this stage ;) --
 I'm trying to duplicate my disk.

why do u want to double ur disk ? i have no knowledge about vinum yet
but some time ago i set up a mirror with linux which doubled the disks
automatically first time i add a new disk to the raid array ... guess
this would be similar with vinum (?)


 
   Right now I have /dev/ad0s1(n) and I'd like an exactly copy of that
 slice on /dev/ad2s1.  I've been trying to use dd (which I know very
 little about):
 
 dd if=/dev/ad0s1 of=/dev/ad2s1
 
 I don't know if that's the right way to go about it or not, but I get
 the error ``dd: /dev/ad2s1: Operation not permitted'', which leads me to
 believe I've messed something up.  I'm in single user when trying to do
 this and the /dev/ad0s1(n) partitions are mounted.

i am not sure whether u can move partitions/slices in this way. if u
really wonna double ur disk
dd if=/dev/ad0 of=/dev/ad2 is the command i would use (NOT TESTED!)


seb

 
   Any tips would be greatly appreciated.  Thanks,
 
 -lewiz.
 
 -- 
 I was so much older then, I'm younger than that now.  --Bob Dylan, 1964.
 
 -| msn:[EMAIL PROTECTED] | jab:[EMAIL PROTECTED] | url:http://lewiz.net |-


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd syntax

2003-07-24 Thread Andy Farkas
On Thu, 24 Jul 2003 [EMAIL PROTECTED] wrote:

 I have a freebsd 5.1 machine with 2 harddrives ad0 and ad2. I need to duplicate ad2 
 to a 3rd
 hardrive so what I did is the following:

 dd if=/dev/ad2 of=freebsd5.1.bin

 Now when I'm done dd'ing, I can replace ad2 with the harddrive and issue the command
 dd if=freebsd5.1.bin of=/dev/ad2

 Both harddrives are exactly the same, so hopefully the following steps should work, 
 correct?

Yep, thats exactly what you do.

Add a 'bs=64k' to the dd command line for better copying efficiency.

--

 :{ [EMAIL PROTECTED]

Andy Farkas
System Administrator
   Speednet Communications
 http://www.speednet.com.au/



___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd an audio cd on 5.x ?

2003-07-08 Thread Lowell Gilbert
Ion-Mihai Tetcu [EMAIL PROTECTED] writes:

 I need to make an image (I do need a copy so saving and writting 
 individual tracks is of no use) of an audio CD, but when I try:
 # dd if=/dev/acd0c of=bizprez.iso bs=2048

That command will copy a data disk, but you have separate
tracks on this thing.

  I get :
 dd: /dev/acd0c: Invalid argument
 because devfs is nicely making the acd0t0nn files in /dev and no acd0c.

Which is appropriate, because there isn't *any* filesystem
on your disk.

 How can this be overcome ?

The closest I think you can get is the suggestion in the
cdrecord manual, which uses cdda2wav and cdrecord to get as
much of the lead-in, lead-out, and CD-text information
correct as possible.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd an audio cd on 5.x ?

2003-07-08 Thread Ion-Mihai Tetcu
On Tuesday 08 July 2003 22:55, Lowell Gilbert wrote:
 Ion-Mihai Tetcu [EMAIL PROTECTED] writes:
  I need to make an image (I do need a copy so saving and writting
  individual tracks is of no use) of an audio CD, but when I try:
  # dd if=/dev/acd0c of=bizprez.iso bs=2048

 That command will copy a data disk, but you have separate
 tracks on this thing.

Ok. And if I want to copy bit by bit ?

   I get :
  dd: /dev/acd0c: Invalid argument
  because devfs is nicely making the acd0t0nn files in /dev and no
  acd0c.

 Which is appropriate, because there isn't *any* filesystem
 on your disk.

I know.


  How can this be overcome ?

 The closest I think you can get is the suggestion in the
 cdrecord manual, which uses cdda2wav and cdrecord to get as
 much of the lead-in, lead-out, and CD-text information
 correct as possible.

I'll try, thanks

IOnut
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd an audio cd on 5.x ?

2003-07-08 Thread Chuck Swiger
Ion-Mihai Tetcu wrote:
On Tuesday 08 July 2003 22:55, Lowell Gilbert wrote:
[ ... ]
That command will copy a data disk, but you have separate
tracks on this thing.
Ok. And if I want to copy bit by bit ?
You'd have to obtain the glass master used to press the original to get an 
absolutely exact copy.  bit-by-bit accuracy of the raw CD is not very easy or 
even desirable to obtain due to ECC hardware fixing minor errors: for audio, you 
want a bit-by-bit accurate copy of the data after ECC processing, not before.

Better CD-burners let you do something known as DAO+96 ot TAO+96, which lets you 
override the ECC hardware when reading or writing, and thus copy even the errors 
from the original, which can be useful for copy-protected data CD's rather than 
for audio

--
-Chuck
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd an audio cd on 5.x ?

2003-07-08 Thread Ion-Mihai Tetcu
On Tuesday 08 July 2003 23:43, Chuck Swiger wrote:
 Ion-Mihai Tetcu wrote:
  On Tuesday 08 July 2003 22:55, Lowell Gilbert wrote:

 [ ... ]

  That command will copy a data disk, but you have separate
  tracks on this thing.
 
  Ok. And if I want to copy bit by bit ?

 You'd have to obtain the glass master used to press the original to
 get an absolutely exact copy.  bit-by-bit accuracy of the raw CD is
 not very easy or even desirable to obtain due to ECC hardware fixing
 minor errors: for audio, you want a bit-by-bit accurate copy of the
 data after ECC processing, not before.

OK, do you know any method to do it under BSD ? There are some cdtools 
in the ports that claim to do DAE - but I haven't the time to look in 
thecode to see how it is done and if there is any difference between 
using a SCSI an an IDE drive.

 Better CD-burners let you do something known as DAO+96 ot TAO+96,
 which lets you override the ECC hardware when reading or writing, and
 thus copy even the errors from the original, which can be useful for
 copy-protected data CD's rather than for audio

We have a potential client who asked about studying both cases and make 
him a app that could say if it's an original or not so this sounds 
interesting (we're pretty new on this).

Thanks,
IOnut
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd an audio cd on 5.x ?

2003-07-08 Thread Viktor Lazlo


On Tue, 8 Jul 2003, Ion-Mihai Tetcu wrote:

 On Tuesday 08 July 2003 22:55, Lowell Gilbert wrote:
  Ion-Mihai Tetcu [EMAIL PROTECTED] writes:
   I need to make an image (I do need a copy so saving and writting
   individual tracks is of no use) of an audio CD, but when I try:
   # dd if=/dev/acd0c of=bizprez.iso bs=2048
 
  That command will copy a data disk, but you have separate
  tracks on this thing.

 Ok. And if I want to copy bit by bit ?

12.5.5 Duplicating Audio CDs gives instructions on using dd to duplicate
an audio CD.

Cheers,

Viktor
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd an audio cd on 5.x ?

2003-07-08 Thread Viktor Lazlo


On Tue, 8 Jul 2003, Viktor Lazlo wrote:



 On Tue, 8 Jul 2003, Ion-Mihai Tetcu wrote:

  On Tuesday 08 July 2003 22:55, Lowell Gilbert wrote:
   Ion-Mihai Tetcu [EMAIL PROTECTED] writes:
I need to make an image (I do need a copy so saving and writting
individual tracks is of no use) of an audio CD, but when I try:
# dd if=/dev/acd0c of=bizprez.iso bs=2048
  
   That command will copy a data disk, but you have separate
   tracks on this thing.
 
  Ok. And if I want to copy bit by bit ?

 12.5.5 Duplicating Audio CDs gives instructions on using dd to duplicate
 an audio CD.

Heh oops, that was meant to be:

Section 12.5.5 Duplicating Audio CDs of the Handbook gives instructions on
using dd to duplicate an audio CD.

Cheers,

Viktor
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd an audio cd on 5.x ?

2003-07-08 Thread Ion-Mihai Tetcu
On Wednesday 09 July 2003 01:05, Viktor Lazlo wrote:
 On Tue, 8 Jul 2003, Ion-Mihai Tetcu wrote:
  On Tuesday 08 July 2003 22:55, Lowell Gilbert wrote:
   Ion-Mihai Tetcu [EMAIL PROTECTED] writes:
I need to make an image (I do need a copy so saving and
writting individual tracks is of no use) of an audio CD, but
when I try: # dd if=/dev/acd0c of=bizprez.iso bs=2048
  
   That command will copy a data disk, but you have separate
   tracks on this thing.
 
  Ok. And if I want to copy bit by bit ?

 12.5.5 Duplicating Audio CDs gives instructions on using dd to
 duplicate an audio CD.

Which is from where i've started this thred ;) kinnda.
I don't want gest to copy the tracks, but also the rest. And know if I 
get the same CDDB discid.

Thanks,
IOnut

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd an audio cd on 5.x ?

2003-07-08 Thread Chuck Swiger
Ion-Mihai Tetcu wrote:
[ ... ]
You'd have to obtain the glass master used to press the original to
get an absolutely exact copy.  bit-by-bit accuracy of the raw CD is
not very easy or even desirable to obtain due to ECC hardware fixing
minor errors: for audio, you want a bit-by-bit accurate copy of the
data after ECC processing, not before.
OK, do you know any method to do it under BSD ? There are some cdtools 
in the ports that claim to do DAE - but I haven't the time to look in 
the code to see how it is done and if there is any difference between 
using a SCSI an an IDE drive.
Modern CD-ROM burners use the SCSI command set and thus behave much like a SCSI 
device modulo various per-device quirks: the ATAPICAM module connects IDE 
CD-ROM's (ATAPI CD-ROM's) via the SCSI CAM system.

Better CD-burners let you do something known as DAO+96 ot TAO+96,
which lets you override the ECC hardware when reading or writing, and
thus copy even the errors from the original, which can be useful for
copy-protected data CD's rather than for audio
We have a potential client who asked about studying both cases and make 
him a app that could say if it's an original or not so this sounds 
interesting (we're pretty new on this).
2048 bytes of actual data get turned into ~2536 bytes of Reed-Solomon ECC 
encoded data.  There is also a 94 byte subchannel + 2 byte checksum (for 96) 
which is used to contain CD+G data and other information, which is probably a 
part of what you'll need to consider to have the CDDB diskid match.

For example, man burncd has the following:

 vcd   Set the write mode to produce VCD/SVCD tracks for the fol-
   lowing image files on the command line.  This automatically
   sets DAO (-d) and ``no gaps'' (-n) modes.
A good copy of a professionally mastered audio disk obviously will not have 
2-second gaps between tracks (burned DAO and not TAO), will be closed 
(fixate), etc.  I'm not an expert, however-- perhaps talk to sos at 
freebsd.org who wrote a goodly portion of this infrastructure for FreeBSD...

--
-Chuck
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd an audio cd on 5.x ?

2003-07-08 Thread Ion-Mihai Tetcu
On Wednesday 09 July 2003 01:43, Chuck Swiger wrote:
 Ion-Mihai Tetcu wrote:
 [ ... ]

  You'd have to obtain the glass master used to press the original

thanks for all

IOnut
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd

2003-03-31 Thread Jack L. Stone
At 10:00 PM 3.30.2003 -0500, taxman wrote:
On Sunday 30 March 2003 07:57 pm, Grant Peel wrote:
 Hi all,

 I am about to make the trip to shutdown one of our servers and 'dd' the
 first SCSI drive to the second.

 from what I have read, and what some of you have kindly offered, I just
 kick into single user mode, with only root mounted on the primary drive,

ro, I assume

 and away we go...

 dd if=/dev/da0 of=/dev/da1 bs=1m

That'll copy the data, but you'll want to prep the disk.  I've seen 
recommendations something along the lines of: read data off the whole new 
disk first  dd if=/dev/da1 of=/dev/null  then write the data you want on it, 
then read it off to /dev/null again.
Something to the effect of populating the drives on disk bad sector
records.  
There may be more burn in recommended, but I couldn't find anything in the 
archives.

 One last question, the second drive is identical to the first, but should
 it be right out odf the box condition, formatted, fdisk'ed partiitioned or
 does any of that matter since it will be copies bit for bit?

None of that matters for the reason you noted.

 TIA!

You'll just need to FDisk and label the new HD so the system knows its
there. Then, your command for 'dd' is fine, except perhaps the choice of
the bs=1m which can influence the time it takes to do the dd considerably.
In my experimenting (but only with IDE), I found low settings (like
bs=8192) to take 4 times as long as bs=102400. When I exceeded the 102400,
the time increased again. If this is a 1-shot thing, this may not be
important to you, but I believe it has to do with I/O ability  you can
check it first. Here is my I/O test check for an IDE:

#iostat ad0 1
tty ad0 cpu
   tin tout  KB/t tps  MB/s  us ni sy in id
 03  5.19   7  0.03  11  0  4  1 84
 0  126 127.36 183 22.74   0  0  6  2 92
 0   44 128.00 190 23.76   0  0  2  0 98
 0   44 128.00 191 23.89   0  0  5  0 95
 0   44 128.00 191 23.88   0  0  7  1 92

Best regards,
Jack L. Stone,
Administrator

SageOne Net
http://www.sage-one.net
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd

2003-03-30 Thread taxman
On Sunday 30 March 2003 07:57 pm, Grant Peel wrote:
 Hi all,

 I am about to make the trip to shutdown one of our servers and 'dd' the
 first SCSI drive to the second.

 from what I have read, and what some of you have kindly offered, I just
 kick into single user mode, with only root mounted on the primary drive,

ro, I assume

 and away we go...

 dd if=/dev/da0 of=/dev/da1 bs=1m

That'll copy the data, but you'll want to prep the disk.  I've seen 
recommendations something along the lines of: read data off the whole new 
disk first  dd if=/dev/da1 of=/dev/null  then write the data you want on it, 
then read it off to /dev/null again.
Something to the effect of populating the drives on disk bad sector records.  
There may be more burn in recommended, but I couldn't find anything in the 
archives.

 One last question, the second drive is identical to the first, but should
 it be right out odf the box condition, formatted, fdisk'ed partiitioned or
 does any of that matter since it will be copies bit for bit?

None of that matters for the reason you noted.

 TIA!

np,

Tim
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dd

2003-03-22 Thread Mike Meyer
In [EMAIL PROTECTED], Grant Peel [EMAIL PROTECTED] typed:
 Hi again all,
 
 Are there any 'dd' experts out there who would be willig to talk of list.

I'm pretty handy with dd. I'm not sure about talking off-list, though.

What's the problem.

mike
-- 
Mike Meyer [EMAIL PROTECTED]  http://www.mired.org/consulting.html
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message


Re: dd *very* slow. Now 75x faster thanks to Kirk's suggestion!

2003-03-08 Thread S W
..snip..

 I dropped that idea, but I'd read a post somewhere about dd, I tried...

 dd if=/dev/ad2 of=/dev/da0

 ...now the IDE activity LED has been on solid for about 4hours
dd's performance is highly depending on the size of its buffers, which are
abysmally small (512 bytes) by default:
[EMAIL PROTECTED]:~$ dd if=/dev/zero of=/tmp/foo count=1
1+0 records in
1+0 records out
512 bytes transferred in 0.74 secs (6916211 bytes/sec)
You can increase this by specifying your own buffer size:

[EMAIL PROTECTED]:~$ dd if=/dev/zero of=/tmp/foo count=1 bs=16384
1+0 records in
1+0 records out
16384 bytes transferred in 0.000173 secs (94654927 bytes/sec)
Before starting the full transfer, do something like:

dd if=/dev/ad2 of=/dev/da0 bs=512 count=16384

and keep doubling the size of the bs argument until the throughput values
stop increasing noticably, then use that value to duplicate your drive.  It
will still be somewhat slow, but I guarantee you can speed it up by at least
5 times.
--
Kirk Strauser
In Googlis non est, ergo non est.
 attach3 
Here's the results of doubling the buffer size as you suggested:

BS  bytes/sec
512 60808 (default)
1024121614
2048240212
4096470312
8192898897
16384   1652020
32768   2848452
65536   4490871*
131072  3811765
262144  3438026...
iostat now reports a steady 4+MB/s (75x increase).

Thanks alot, Kirk!
Boink
_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message


Re: dd *very* slow (0.5KB/s) from IDE to SCSI - longish

2003-03-06 Thread Kirk Strauser
At 2003-03-07T03:03:51Z, S W [EMAIL PROTECTED] writes:

 I dropped that idea, but I'd read a post somewhere about dd, I tried...

 dd if=/dev/ad2 of=/dev/da0

 ...now the IDE activity LED has been on solid for about 4hours

dd's performance is highly depending on the size of its buffers, which are
abysmally small (512 bytes) by default:

[EMAIL PROTECTED]:~$ dd if=/dev/zero of=/tmp/foo count=1
1+0 records in
1+0 records out
512 bytes transferred in 0.74 secs (6916211 bytes/sec)

You can increase this by specifying your own buffer size:

[EMAIL PROTECTED]:~$ dd if=/dev/zero of=/tmp/foo count=1 bs=16384
1+0 records in
1+0 records out
16384 bytes transferred in 0.000173 secs (94654927 bytes/sec)

Before starting the full transfer, do something like:

dd if=/dev/ad2 of=/dev/da0 bs=512 count=16384

and keep doubling the size of the bs argument until the throughput values
stop increasing noticably, then use that value to duplicate your drive.  It
will still be somewhat slow, but I guarantee you can speed it up by at least
5 times.
-- 
Kirk Strauser
In Googlis non est, ergo non est.


pgp0.pgp
Description: PGP signature


Re: dd problem

2003-02-25 Thread Toomas Aas
 Ok, I admit, most of my experience is on Solaris, but hey, I'd never
 expect such a command to fail on FreeBSD:
 
 # df -k
 Filesystem  1K-blocksUsedAvail Capacity  Mounted on
 /dev/ad0s1a   2064302   74140  1825018 4%/
 /dev/ad0s1f   9247246 1895878  661159022%/usr
 /dev/ad0s1e  15483630  380750 13864190 3%/var
 procfs  4   40   100%/proc
 #
 # dd if=/dev/ad01sa of=/dev/ad2s1a bs=4096k
 dd: /dev/ad01sa: No such file or directory
 #
 
 What am I doing wrong? Feel like in the newbies time  :/

Perhaps what you are doing wrong is using ad01sa instead of ad0s1a ? 

;-)
--
Toomas Aas | [EMAIL PROTECTED] | http://www.raad.tartu.ee/~toomas/
* The trouble with the global village are all the global village idiots.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message


Re: dd problem

2003-02-22 Thread Miguel Mendez
On Sat, 22 Feb 2003 13:06:10 +0100 (CET)
Luca Pizzinato [EMAIL PROTECTED] wrote:

Howdy,

 # df -k
 Filesystem  1K-blocksUsedAvail Capacity  Mounted on
 /dev/ad0s1a   2064302   74140  1825018 4%/
 /dev/ad0s1f   9247246 1895878  661159022%/usr
 /dev/ad0s1e  15483630  380750 13864190 3%/var
 procfs  4   40   100%/proc
 #
 # dd if=/dev/ad01sa of=/dev/ad2s1a bs=4096k
 dd: /dev/ad01sa: No such file or directory

You probably meant `ad0s1a' instead of `ad01sa' ?

Cheers,
-- 
Miguel Mendez - [EMAIL PROTECTED]
GPG Public Key :: http://energyhq.homeip.net/files/pubkey.txt
EnergyHQ :: http://www.energyhq.tk
Of course it runs NetBSD!


pgp0.pgp
Description: PGP signature


Re: dd

2002-12-16 Thread Franklin Pierce
- Original Message -
From: Brian Henning [EMAIL PROTECTED]
Date: Mon, 16 Dec 2002 12:52:11 -0600
To: freebsd [EMAIL PROTECTED]
Subject: dd

 Hello,
 
 i have a floppy disk that is formated 1680 that i would like to make an file
 image of. I would also like to write the image back to a new floppy. Do i
 need a device /dev/fd0.1680?
 
 
 dd if=/dev/fd0 of=image.img doesn't seem to work.
 any advice?
 

Start working with unstressed disk formats?
make(1) hay while . . .
But seriously, are you running this as root or user?
Have you amortised the cost of acceptance across your 5 year plan?
Where is your darling /dev/rfd0, just in case you need a backup for the backup?
Oh yeah, it's probably still stressed on a 2.88 drive, but aren't we all?

Love,
Franklin Pierce
-- 
___
Get your free email from http://mymail.operamail.com

Powered by Outblaze

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message