Now the p command should show both partitions configured:Īll that remains is to write out the new partition table using the w command:Ĭalling ioctl() to re-read partition table. Last cylinder or +size or +sizeM or +sizeK (488-652, default 652): Since the remainder of the physical disk drive is to be used for this partition the default values offered for start and end cylinders will suffice: Once again select n, and create a primary partition, this time as partition 2. Next we need to create a swap partition for our Xen guest operating system. If we execute the p command to print out the partition table we now see our first partition:Ģ55 heads, 63 sectors/track, 652 cylinders Last cylinder or +size or +sizeM or +sizeK (1-652, default 652): +4000Mb In the following example we make the partition 4000Mb in size: This value may be specified in terms of the end cylinder of the partition, or the size in terms either kilobyte or megabyte units. Next, fdisk asks us for the size of the first partition. When prompted we specify that this is a primary partition, it is partition number 1 and is to begin at cylinder 1 (i.e. These values will differ depending on the size of your physical disk drive and the amount of space you wish to allocate to the root filesystem and swap respectively.Ī new partition is created using the c command. The remainder of this section covers the creation of one 4GB partition for the root filesystem and one 1GB partition for swap. Assuming the disk is previously unpartitioned, or that existing partitions have been removed we can now create the first partition. If existing partitions exist be sure to back up any data on these partitions and then delete them using the d command. To display any existing partitions on the device enter p to print the partition table. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Begin by launching fdisk with the physical device name (in this case /dev/sdb):ĭevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabelīuilding a new DOS disklabel. Disk partitioning is achieved using the fdisk utility. The first step in the configuration process is to create partitions on the /dev/sdb physical disk in preparation for creating both the root filesystem and the swap space for our Xen guest operating system. The second, represented as /dev/sdb is a new, unpartitioned disk drive on which we will create the root filesystem and swap space for a Xen guest (domU) operating system. The first, represented as /dev/sda contains the host operating system. In this scenario, therefore, there are two physical disk drives. 9 Modifying /etc/fstab for the Guest SystemĪn Overview of the Xen Host and Guest Physical Disksįor the purposes of this chapter the assumption is made that an entire physical disk drive is available to be dedicated to the Xen guest operating system and that it is visible to the host Linux operating system.8 Configuring System Files for the Guest Operating System.6 Cloning the Host OS on the Guest Root Partition.4 Configuring the Swap Partition for the Xen Guest System.
0 Comments
Leave a Reply. |