boot sector f*ed

Polytropon freebsd at edvax.de
Tue Aug 11 18:19:28 UTC 2009


On Tue, 11 Aug 2009 13:31:52 -0400, PJ <af.gourmet at videotron.ca> wrote:
> Sorry for my ignorance, but what language is that? :-)  What's "dd with
> a bs=1m"?

That's English + UNIX, at least it should be. :-)

I could have written "dd with a bs of 1m", which does simply mean that
the program dd should be called with the parameter bs=1m, representing
a blocksize of 1 MB. The command would then be:

	# dd if=/dev/ad0 of=/dev/ad1 bs=1m

given the suggestion that ad0 is the source disk, ad1 the target disk.
It's worth mentioning that the MBR - if intact - should be copied with
this command (afterwards I think):

	# dd if=/dev/ad0 of=/dev/ad1 bs=512 count=1

Smart dd users will suggest omiting bs=512 because that's the default
value. :-)

Finally, commands can be used as verbs, such as "you then dd the ad0
onto ad1" or "can you grep that in /etc/something"? :-)



> I'm being ultra careful and checking/regenerating the target disk and
> that will t ake another 4 or 5 hours.

That's the usual amount of time. I think you said approx. 100 GB disks?
It may work faster if you don't run the transfer in master / slave mode
(same cable), but in master / master mode (each drive on own cable);
this affects (P)ATA only, as far as I know.



> I don't expect any difficulties,
> but would like to "triple check" the procedure...
> 
> Ok - boot up livefs, slice & partition the target disk; but how do I
> continue? Do I go to the shell?

Yes. You can either use the shell of FreeBSD's live system, or use
FreeSBIE, it has sysinstall on it, too, as far as I remember. But
nobody stops you from not using sysinstall, but bsdlabel and newfs
instead.

Keep an eye on newfs options, especially if you want to enable soft
updates or with to init the disks with a certain optimization, or
a non-default inode ratio.



> If that is all it is, then I don't see
> much difficulty. I'll read the man pages to check all the commands below
> so I am clear on everything.

That's a good idea. I copied the command line examples from a procedure
I once wrote for how to "clone" OS disks.



> If it is, do I need it or what do I do with it? It is obviously(?) saved
> somewhere like /tmp ...

The kernel image is saved in /var/crash directory. It can be used for
examination, in order to find out what caused the crash. Usually, the
kernel debugger is employed to do this. If you don't care any further,
you can safely delete the core files.




-- 
Polytropon
>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list