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

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


  • To: "trilok nuwal" <tc.nuwal@xxxxxxxxx>
  • From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
  • Date: Fri, 20 Apr 2007 11:50:14 +0200
  • Cc: Xen list <Xen-users@xxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 20 Apr 2007 02:50:37 -0700
  • List-id: Xen user discussion <xen-users.lists.xensource.com>
  • Thread-index: AceDK5qjVCcnZEqsQYG8Ba+N8Jly5gAADDrQ
  • Thread-topic: [Xen-users] create a partition on a file disk

 

> -----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

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. 

--
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®.