NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: New hard disk, copying data





Andrew Smallshaw <andrews%sdf.lonestar.org@localhost> schrieb:
On Thu, May 23, 2013 at 05:07:19PM +0200, Riccardo Mottola wrote:

1) attach the hard disk in an external USB enclosure
2) Partition int
3) Copy the data (how? using tar/untar perhaps?)
4) write the MBR (but how, from the command line? and I don't need
the boot selection anymore, just flat into NetBSD)

Briefly, fdisk then disklabel then newfs the new root partition.
No need for tar etc if you're mounting it in a USB enclosure, a
simple cp -Rp will do the trick. Making the disk bootable is
slightly more tricky, you need to install the MBR and then the
primary and secondary boot code (man installboot).

I'd also take a look at
http://www.bsdnexus.com/NetBSD_onastick/install_guide.php - it's
focused on a slightly different problem but essentially it's the
same process. In both instances you are effectively installing
without the installer.

Andrew Smallshaw <andrews%sdf.lonestar.org@localhost> schrieb:
>Briefly, fdisk then disklabel then newfs the new root partition.
>No need for tar etc if you're mounting it in a USB enclosure, a
>simple cp -Rp will do the trick.

Yes, but with cp it is afaik impossible to make shure that no files got curruptes on the way.

Another often used way offers rsync -arv - especially helpful if you have large file trees taking longer times. This allows you to restart the job any time later and/or check double just by restarting rsync or (if you want to go bit by bit with md5 sums).

With rsync, tar and cp you have to make shure that you just copy files which has to be copied from a up and running root filesystem and i.e. no other mountpoints etc..


hth,
best regards,


Niels.
--
Niels Dettenbach
Syndicat IT&Internet
http://www.syndicat.com

Home | Main Index | Thread Index | Old Index