Date: Mon, 01 Aug 2005 15:21:34 -0700 From: garys@opusnet.com (Gary W. Swearingen) To: "Alexandre D." <alexandre.delay@free.fr> Cc: freebsd-questions@freebsd.org Subject: Re: Migrate primary disk (duplicate) Message-ID: <a94qa947td.qa9@mail.opusnet.com> In-Reply-To: <MAEBLPAGHGPMOKCBICBNMEKKCHAA.alexandre.delay@free.fr> (Alexandre D.'s message of "Mon, 1 Aug 2005 18:59:27 %2B0200") References: <MAEBLPAGHGPMOKCBICBNMEKKCHAA.alexandre.delay@free.fr>
next in thread | previous in thread | raw e-mail | index | archive | help
"Alexandre D." <alexandre.delay@free.fr> writes: > Here is the complete process I follow: > > sysctl kern.geom.debugflags=16 > dd if=/dev/zero of=/dev/${disk} bs=1k count=1 Shouldn't be needed, but if you're concerned, write enough sectors to zero the start of {disk} and the start of {disk}s1 -- something like 63+16; bs=100k maybe. > fdisk -BI ${disk} Again, -B and -I don't sound like a good combo. > disklabel -B -w -r ${disk}s1 auto You said you were running 5.4. AFAIK, there's no "-w", "-r", and no "auto". Other than that it looks fine. :) (But knowing the way some developers think, they might have been removed from the manpage only. Grrrr.) > disklabel -R ${disk}s1 generique.disklabel > newfs /dev/${disk}s1a > newfs /dev/${disk}s1d > mount /dev/${disk}s1a ./mnt > cd ./mnt > dump 0uafL - / | restore xf - Looks like you're dumping to a file named "./mnt/L". Does ./mnt really have anything else in it after that restore? > -----generique.disklabel file------- > a: 41943040 0 4.2BSD > b: 2097152 * swap > d: * * 4.2BSD Could be. Have it print out the resulting disklabel and see if looks OK. > If I do the same with /stand/sysinstall in stead of > dd if=/dev/zero of=/dev/${disk} bs=1k count=1 > fdisk -BI ${disk} > disklabel -B -w -r ${disk}s1 auto > It works well. Could it be because it uses "boot0cfg" and you use "fdisk"? (You haven't said whether you're telling sysinstall to install a standard MBR or a FreeBSD MBR or none.) If you're curious, you can dump the two main boot sectors a readable file and compare the sysinstall version with the fdisk version and /boot/mbr and /boot/boot0. dd if=/dev/ad0 count=1 | hd >/tmp/ad0 dd if=/dev/ad0s1 count=1 | hd >/tmp/ad0s1
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a94qa947td.qa9>