Subject: Re: Is NetBSD domain0 ready for production server?
To: Martti Kuparinen <martti.kuparinen@iki.fi>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: port-xen
Date: 03/30/2005 11:54:34
On Wed, Mar 30, 2005 at 12:42:12PM +0300, Martti Kuparinen wrote:
> Manuel Bouyer wrote:
> 
> >No problems here with a  3.99.2 kernel and xentools20-2.0.3nb3.
> 
> Can you please show
> 
> - the disklabel of you harddisk

Nothing fancy:
16 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:   1024128        63     4.2BSD   1024  8192 46552  # (Cyl.      0*-   1016*)
 b:   1065456   1024191       swap                     # (Cyl.   1016*-   2073*)
 c: 156312513        63     unused      0     0        # (Cyl.      0*- 155071)
 d: 156312576         0     unused      0     0        # (Cyl.      0 - 155071)
 e:  39999456   2089647        ccd                     # (Cyl.   2073*-  41755*)
 f:  39999456  42089103        ccd                     # (Cyl.  41755*-  81437*)
 g:  39999456  82088559 Linux Ext2      0     0        # (Cyl.  81437*- 121119*)
 h:   1065456 122088015 Linux Ext2      0     0        # (Cyl. 121119*- 122176*)

> - which wd0X is used for the domU operating system

wd0e and wd0f are for NetBSD domU, wd0g and wd0h are for a single linux
domU (wd0g root, wd0h swap, but disklabel doesn't know about "linux swap" :)

> - how you create image of an existing Linux installation
> - how you restore that image to your harddisk

This is the interesting part :)
The linux install comes from another, working box. On this box, I formatted
wd0g using e2mkfs from sysutils/e2fsprogs and mounted it on the NetBSD
domain0. Then I copied the files from the running linux install,
I don't remember if I used cpio or tar, but you get the idea :)
something like
ssh linux_box 'tar czf - /' | tar xzpf -

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--