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

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

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