On 08/20/11 11:05, Yannis Milios wrote:
Ok i created a new scsi hd (30gb) and put it as second disk on vm.
Booted OpenBSD and on boot prompt i gave boot sd0a:/bsd.rd
Then i choose (I) for installation and selected the 2nd disk (sd1).Using
disklabel it automatically created all partitions and i just resized f:
(/usr) partition and gave it extra space by shrinking k: partition (/home)
saved the settings but i did not proceed to the installation,i just reboot
the vm.
I booted normally on sd0 and ran disklabel -h sd0 and then disklabel -h sd1
and i confirmed that partitions are exactly the same on both disks with the
exception of f: (/usr) which now is bigger.So far so good...now i reboot
again boot sd0a/bsd.rd and i select (S) shell option.At this point i am a
bit confused how i will mount the 2 disks and copy all the contents from sd0
to sd1 by using cp command? thank you again




On Sat, Aug 20, 2011 at 11:21 AM, Dmitrij Czarkoff<czark...@gmail.com>wrote:

The easier way - create a new disc image and use bsd.rd to partition and
label it as needed. When done with it, mount all of Your volumes and use tar
or cp to populate the new image. A side effect of this approach is that You
can test the new image before loosing the old one.


cp does not preserve hard links tar or pax should be used.
You should do something like this to mount and copy..

mount /dev/sd0a /mnt
mount /dev/sd0k /mnt/home
mount /dev/sd0f /mnt/usr
... mount other partitions for disk sd0

mount /dev/sd1a /mnt2
mount /dev/sd1k /mnt2/home
mount /dev/sd1f /mnt2/usr
... mount other partitions for disk sd1

cd /mnt
pax -rw -p e . /mnt2
or tar -cf - . | tar -xphf - -C /mnt2

/usr/mdec/installboot /mnt2/boot /usr/mdec/biosboot sd1

Reply via email to