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. #dd if=/dev/zero of=/opt/rhel5 count=1 bs=1 seek=4000 #then i set ''cylenders'' 4000 on this disk using fdisk exta function features. #then create a partition on this fdisk -l /opt/rhel5 Disk /opt/rhel5: 0 MB, 0 bytes 255 heads, 63 sectors/track, 0 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /opt/rhel5p1 1 4000 32129968+ 83 Linux Can anybody tell me how i can craete the file system on this partition. Sorry this is not exactly related with xen. Thanks, ---Trilok _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] 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@lists.xensource.com http://lists.xensource.com/xen-users
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. It looks complex to me. But i think there could be some way. Thanks, --Trilok On 4/20/07, Petersson, Mats <Mats.Petersson@amd.com> wrote:> > > > > -----Original Message----- > > From: xen-users-bounces@lists.xensource.com > > [mailto:xen-users-bounces@lists.xensource.com] 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@lists.xensource.com http://lists.xensource.com/xen-users
> -----Original Message----- > From: trilok nuwal [mailto:tc.nuwal@gmail.com] > 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@amd.com> wrote: > > > > > -----Original Message----- > > From: xen-users-bounces@lists.xensource.com > > [mailto: xen-users-bounces@lists.xensource.com > <mailto:xen-users-bounces@lists.xensource.com> ] 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@lists.xensource.com http://lists.xensource.com/xen-users
On 4/20/07, Petersson, Mats <Mats.Petersson@amd.com> wrote:> > > > > -----Original Message----- > > From: trilok nuwal [mailto:tc.nuwal@gmail.com] > > 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=512Thanks, 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@amd.com> wrote: > > > > > > > > > -----Original Message----- > > > From: xen-users-bounces@lists.xensource.com > > > [mailto: xen-users-bounces@lists.xensource.com > > <mailto:xen-users-bounces@lists.xensource.com> ] 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@lists.xensource.com http://lists.xensource.com/xen-users
trilok nuwal wrote:> 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.Then don''t bother with LVM, create a few separate partitions with your Dom0 LVM, and mount those *directly* as /dev/sda1, /dev/sda2, etc. in the DomU. LVM is cool and neat and wonderful, but it''s also pretty flipping pointless to put on top of an existing LVM system. Like gzipping a file twice, you don''t gain much and it costs you management and computational overhead to deal with. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> -----Original Message----- > From: Nico Kadel-Garcia [mailto:nkadel@gmail.com] > Sent: 20 April 2007 11:49 > To: trilok nuwal > Cc: Petersson, Mats; Xen list > Subject: Re: [Xen-users] create a partition on a file disk > > trilok nuwal wrote: > > 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. > Then don''t bother with LVM, create a few separate partitions > with your > Dom0 LVM, and mount those *directly* as /dev/sda1, /dev/sda2, etc. in > the DomU. LVM is cool and neat and wonderful, but it''s also pretty > flipping pointless to put on top of an existing LVM system. Like > gzipping a file twice, you don''t gain much and it costs you > management > and computational overhead to deal with.Except of course that Trilok was talking about a HVM domain, and HVM domains don''t allow partitions to be used directly - only complete disks are seen by the guest. -- Mats> > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Could we carete VG ( Volume group ) on file baked disks. Because i might have any disk to make os image. On 4/20/07, Nico Kadel-Garcia <nkadel@gmail.com> wrote:> > trilok nuwal wrote: > > 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. > Then don''t bother with LVM, create a few separate partitions with your > Dom0 LVM, and mount those *directly* as /dev/sda1, /dev/sda2, etc. in > the DomU. LVM is cool and neat and wonderful, but it''s also pretty > flipping pointless to put on top of an existing LVM system. Like > gzipping a file twice, you don''t gain much and it costs you management > and computational overhead to deal with. >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users