WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

RE: [Xen-users] Creating a Bootable Image file

To: <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-users] Creating a Bootable Image file
From: "Gordon Carlyle" <Gordon.Carlyle@xxxxxxxxx>
Date: Thu, 31 Jul 2008 11:54:00 -0700
Delivery-date: Thu, 31 Jul 2008 11:54:44 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <VA.000032f2.00c0e096@xxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <1C20F2CFF66C0E449CE60E951812E77603DE4143@xxxxxxxxxxxxxxxx> <VA.000032f2.00c0e096@xxxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcjvCudYo22biyXPTOiNWFhKf0UygwEM3XUQ
Thread-topic: [Xen-users] Creating a Bootable Image file
You were correct about the *almost*.   Great help!

Thanks very much.

Gord


-----Original Message-----
From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx 
[mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Kai Schaetzl
Sent: July-26-08 03:31
To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Creating a Bootable Image file

Gordon Carlyle wrote on Fri, 25 Jul 2008 15:52:26 -0700:

> dd if=/dev/zero if=generic.img bs=1024k count=10000
> 
> mkfs.ext3  -t ext3 generic.img

you can omit the -t ext3

> 
>  
> 
> >From a working image that I shut down I then copied the directories into
> the file:
> 
> mount -o loop generic.img /mnt/generic
> 
> cp -ax /mnt/image1/{root,dev,var,etc,usr,bin,sbin,lib} /mnt/generic

do not copy dev, just create it like below! You forgot to copy /boot !

> 
> mkdir /mnt/generic/{proc,sys,home,tmp}

this leaves you with a tmp that has wrong permissions, copy it as well or 
add the necessary steps afterwards. I assume, home is empty or you do not 
want to copy it?

Do you want to go from xvda image to an ext3 file system or what is the 
purpose? The procedure is straight-forward and it looks like you have done 
it *almost* correctly. I assume you followed an instruction that wants to 
boot from an external kernel, there is a nice wiki with a lot of good 
explanations about this out there. However, these instructions are nonsense 
for  paravirtualized CentOS/RHEL guests, probably all PV guests. You simply 
copy *everything* *as is* to the new location, except for the "special 
directories" dev, proc, sys. 
Then you just boot the VM like normal with the pygrub boot loader. e.g. 
copy the config file from your original virt-install/virt-manager created 
setup, do *not* change it according to the instructions for external kernel 
booting you found!

Kai

-- 
Kai Schätzl, Berlin, Germany
Get your web at Conactive Internet Services: http://www.conactive.com




_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>