[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] create a partition on a file disk


  • To: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
  • 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
  • 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=
  • List-id: Xen user discussion <xen-users.lists.xensource.com>



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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.