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] create a partition on a file disk

To: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
Subject: Re: [Xen-users] create a partition on a file disk
From: "trilok nuwal" <tc.nuwal@xxxxxxxxx>
Date: Fri, 20 Apr 2007 15:49:10 +0530
Cc: Xen list <Xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 20 Apr 2007 03:18:09 -0700
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=dvz/WRWcJza0Qll9cxPc893xbeuC1jROsvl+Og+LIsB6M6wjmr1wxIg9Fs56V+pY4YOH1lncjN/4Dr5A+5p2aexuQH+BuMctZfiwkwReefqcBCAf3bvg1NlMWCXXtfghit73z0yg68QdHrnGLF1I83fGdIu3fKI/ei79aPMdTWA=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=M42VKFLY0rFb7HVcYlcTltN4E2uTXIzWDITGM3tward5t0SYo7yrpG2IMzNX2imzkeJds9jgmrQ3hGKV7gFvxiGeJF64S4RaO/JWsvQ/IaUpiQrjF3LElYkvi7V1UDz4Tv/rNLP2mV/In8oqjXxg7G9vEa+GtznsV6xC3WN/WHo=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <907625E08839C4409CE5768403633E0B018E1C2B@xxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <f58fc26d0704200209y2883a7c9q45d5a8ca6645e4d@xxxxxxxxxxxxxx> <907625E08839C4409CE5768403633E0B018E1C2B@xxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx


On 4/20/07, Petersson, Mats <Mats.Petersson@xxxxxxx> wrote:


> -----Original Message-----
> From: trilok nuwal [mailto:tc.nuwal@xxxxxxxxx]
> Sent: 20 April 2007 10:09
> To: Petersson, Mats
> Cc: Xen list
> Subject: Re: [Xen-users] create a partition on a file disk
>
> Hi,
>
> This is beacuse i am not installing the OS in usual way. I
> want cloning of OS. Means i want to create a OS from an
> existing install os. So i have to make partition on this disk
> manually.
>
> For para we done need any partitioning but to create an HVM
> domain we need  proper partitioning. Can you refer any
> documents to cone the inaslled OS from other machine.
>
> I think preferabbly
>
> i have to make atleast
>
> Partition table
> OS root
> and grub install
>
> Partition table will be requied because in HVM we export as a
> full disk. So OS itself will determine the partition table
> and  accorfingly i will configure fstab abnd grug.conf.

I always prefer the easy method, so what is the reason you can't just
copy the ENTIRE disk (boot sector, partition tables and all) of the
original installation?

Something like:
dd if=/dev/hda of=mydisk.img bs=512

Thanks, I cant ise this one because i am getting my os images from remote machine.
 

Otherwise, I believe "losetup mydisk.img"

Some experimenting seems to indicate that you can do this:

"losetup -f"
!! Make note of the /dev/loopN you see here.
"losetup -f mydisk.img"
"fdisk /dev/loopN"
... Do whatever fdisk activity. Finish with "w"
You then follow the hints on this page to mount the partitions of the
loop-device:
http://www.campworld.net/thewiki/pmwiki.php/Linux/DiskImagesHOWTO
[You'll probably have to modify the numbers, but the first partition is
usually 63 * 512 bytes into the device]
I managed to use "mkfs.ext3" to my 100MB "disk" with this method.

This will suit to me.

Thanks again.
 

--
Mats
>
> It looks complex to me. But i think there could be some way.
>
> Thanks,
> --Trilok
>
>
>
> On 4/20/07, Petersson, Mats <Mats.Petersson@xxxxxxx> wrote:
>
>
>
>       > -----Original Message-----
>       > From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
>       > [mailto: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
> <mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx> ] On Behalf Of
>       > trilok nuwal
>       > Sent: 20 April 2007 08:14
>       > To: Xen list
>       > Subject: [Xen-users] create a partition on a file disk
>       >
>       > Hi,
>       >
>       > I want to install a OS on file disk as HVM domain.
>       >
>       > I create a file disk useing dd and create a partition on top
>       > of this using fdisk. I want to create the file system on this
>       > partition. How i can do this, in google i found that using
>       > "losetup" we can do this.
>
>       Generally, when I want to do this, I use the
> partitioning tool inside
>       the install process of the guest. Say for example I
> want two partitions
>       in my Linux installation, I install Linux from CDROM,
> and I just create
>       a "/" and a "/home" partition in the user-interface for
> the installer.
>
>       Do you have a particular reason why you can't do it this way?
>
>       --
>       Mats
>
>
>
>
>
>



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