Hello Tuyosi,

On 2015-11-04 03:38, Tuyosi Takesima wrote:
> i  use only one PC which is dual boot and has USB HDD(sd1) .
> i  write down my procedures .
> 
> 1)on linux machine , i boot openbsd by kvm and follow current .
>   and so the qcow2 image of OpenBSD-current.img was made .
>   and then i copy OpenBSD-current.img to ext2 area .
> 
> 2)on openbsd machine ,
>   i copy OpenBSD-current.img from ext2 erea fs  to openbsd erea.
> 
>   then
>   on openbsd
>   qemu-system-x86_64 -m 1024 -hda OpenBSD-current.img -net
>   nic,vlan=1,model=e1000,macaddr=fe:e1:ba:d3:e7:11 -net tap,vlan=1
> 
>   then on this virtual machine
>   scp -r / tuyosi@192.168.100.101:/MNT.
> 
>   (here mount /dev/sd1a /MNT ; chown tuyosi /MNT)
> 
> 3)rewite /MNT/et/fstab
>   /dev/sd1a / ffs rw 1 1
> 
> 4)/MNT/usr/sbin/installboot sd1
> 
> but i cannot boot openbsd of sd1 .
> there must be wrongs especially about innstalling boot loader .
> 
> please show them .


This is how I understand what you want to do. Please correct me if I
have misunderstood!


You want to:

1) Move a qcow2 image made in kvm under Linux to run under qemu on OpenBSD?

2) Make a real machine from your virtual machine, by:

3) Copying the files from the qemu image to a physical USB disk that you
have on /dev/sd1 on your real machine?

That should be possible to do.


If I understand you, this works:

1) You can make it boot with qemu on OpenBSD

2) You are logging in to your virtual machine.


Then you want to:

1) Make your sd1 disk bootable

2) Copy everything from OpenBSD/qemu to /dev/sd1a on your real machine?



This is where things are going wrong.

1) How have you set up the sd1 disk? Have you done fdisk / disklabel /
newfs on the partitions you want to use?

   * It looks like you are only using one partition for the whole system.
     That works, but it is not the recommended practice.

2) When you are copying your virtual machine, you are using scp -r.

   * This destroys ownership, groups, permissions and time stamps on the
files you are copying!

   * It will not work!

   * You need to use another way to copy the files so the metadata of
EVERY FILE is safe.

   * You need to be root in both the virtual machine and your real
machine for everything to work.

   I often use this way:

   virt_machine# cd /; tar cfz - | ssh root@real_machine "cd /MNT; tar
xvfpz -"


3) How do you want to boot the new real machine?

   * If you want to leave the USB disk where it is on your machine and
boot from there, then changing to /dev/sd1a in /dev/fstab is good.
     You will need to use a command on the boot prompt when your machine
boots, if not it will start from /dev/sd0a instead:

     boot> boot sd1a:/bsd

   * If you are going to move the disk to a new machine, change to
/dev/sd0a instead.

   * Does your installboot command work? If not, what message do you get?


If it still does not work you can help us to help you if you put the
output from the failed boot in your mail.

Also include the dmsg from the machine you are trying to run it on, if
you can.

If it is too much to write down, take pictures with your phone or a
camera of the screen and put it online somewhere, and add a link to it
in your mail.



I hope this helps. I am sorry if my language is hard to understand.
Please ask if you do not understand my English!




Regards,

/Benny

Reply via email to