Lines Matching defs:partition

35  * This program reads the partition table on the specified device and
151 /* Maximum number of digits for a valid partition size */
154 /* Minimum partition size in cylinders */
168 " Create a partition with specific attributes:\n"
169 " id = system id number (fdisk.h) for the partition type\n"
170 " act = active partition flag (0 is off and 128 is on)\n"
171 " bhead = beginning head for start of partition\n"
172 " bsect = beginning sector for start of partition\n"
173 " bcyl = beginning cylinder for start of partition\n"
174 " ehead = ending head for end of partition\n"
175 " esect = ending sector for end of partition\n"
176 " ecyl = ending cylinder for end of partition\n"
178 " start of partition\n"
179 " numsect = partition size in sectors\n"
182 " -B Create one Solaris partition that uses the entire disk.\n"
183 " -E Create one EFI partition that uses the entire disk.\n"
185 " Delete a partition. See attribute definitions for -A.\n"
193 " VTOC slices exceeding the partition size will be truncated.\n"
195 " VTOC slices exceeding the partition size will be removed.\n"
290 static int io_ifdisk = 0; /* interactive partition */
291 static int io_nifdisk = 0; /* non-interactive partition (-n) */
297 static char *io_Afdisk = 0; /* add entry to partition table (-A) */
356 * Complete list of all the 255 partition types. Some are unknown types
430 "GoBack partition", /* 68 */
438 "Oberon partition", /* 76 */
478 "Scramdisk partition", /* 116 */
504 "Linux LVM partition", /* 142 */
620 /* Allowed extended partition menu options */
624 * Structure holding all information about the extended partition
626 * known systems allow only one extended dos partition per disk.
716 * mounted logical drives, changes to the partition table
1176 * Read extended partition only when the fdisk table is not
1239 " partition for the disk is:\n\n"
1241 "partition\n\n"
1243 "partition, otherwise type \"n\" to "
1244 "edit the\n partition table.\n");
1248 " than 2TB. Solaris partition will"
1252 /* Edit the partition table as directed */
1257 /* now set up UNIX System partition */
1271 /* create an EFI partition for the whole disk */
1278 "Error creating EFI partition\n");
1390 "fdisk: Error seeking to partition table on %s.\n",
1397 "fdisk: Error reading partition table from %s.\n",
1454 /* Did a solaris partition change location or size? */
1474 /* look to see if a EFI partition changed in relsect/numsect */
1489 * if EFI partition changed, set the flag to clear
1795 "fdisk: Cannot open prototype partition file %s.\n",
1812 "Extended partition"
1820 * If the existing extended partition's start
1822 * initialize the extended partition EBR
1864 * extended partition matches the new one and
1895 * from the given start of partition.
1912 "Invalid partition ID\n");
1925 "partition\n");
1940 * Validate the partition. It cannot start at sector
1968 * and sectors in partition table fields).
1985 * partition with the -F option that contains
1986 * a partition that runs off the end of the
2010 "fdisk: Cannot create partition table\n");
2078 "fdisk: Entry does not match any existing partition:\n"
2094 /* Validate the partition. It cannot start at sector 0 */
2097 "fdisk: New partition cannot start at sector 0:\n"
2104 * if the user wishes to add an EFI partition, we need
2140 (void) printf("Invalid partition ID\n");
2147 "Extended partition already exists.\n");
2173 * from the given start of partition.
2224 "fdisk: Cannot create partition \"%s\"\n", file);
2234 * for a single partition table entry (ti) based on the relsect
2299 /* validate partition size */
2307 /* find UNUSED partition table entry */
2355 * return partition index
2390 /* find UNUSED partition table entry */
2409 * Verify that no partition entries overlap or exceed the size of
2432 * EFI_PMBR partition must be the only
2433 * partition
2440 "for EFI_PMBR partition:\n"
2453 "EFI_PMBR partition must "
2475 /* make sure the partition isn't larger than the disk */
2494 "Cannot add partition to "
2501 "partition:\t"
2505 "partition:\t\t"
2538 "current partition overlaps"
2539 " following partition\n");
2621 * Validate that a new partition does not start at sector 0. Only UNUSED
2636 "New partition cannot start at sector 0\n");
2641 (void) fprintf(stderr, "Invalid partition ID\n");
2708 (void) printf("\nNo extended partition"
2716 /* update disk partition table, if changed */
2753 /* update disk partition table, if changed */
2795 * Create partition entry in the table (interactive mode).
2813 "The partition table is full!\n"
2814 "You must delete a partition before creating"
2830 /* Check if an extended partition already exists */
2838 " another partition.\n");
2840 "You must delete a partition before creating"
2857 "Select the partition type to create:\n"
2873 case '1': /* Solaris partition */
2876 case '2': /* UNIX partition */
2879 case '3': /* PCIXOS partition */
2882 case '4': /* OTHEROS System partition */
2897 "Extended partition already exists\n");
2912 case 'a': /* x86 Boot partition */
2916 case 'b': /* Diagnostic boot partition */
2928 case 'e': /* Extended partition, need extended int13 */
2935 "Extended partition already exists\n");
2961 "Upper limit is 2 TB for non-EFI partition ID\n");
2963 /* create the new partition */
2967 /* see if it should be the active partition */
2972 "Should this become the active partition? If "
2985 "the active partition.",
2997 * If partition created is an extended partition, null
2999 * extended partition
3022 "fdisk: Cannot create EFI partition table; \n"
3023 "current partition table is invalid.\n");
3027 "An EFI partition must be the only partition on "
3047 (void) printf("Error creating EFI partition!!!\n");
3064 * Query the user to specify the size of the new partition in
3076 struct ipart *partition[FD_NUMPART];
3082 * make a local copy of the partition table
3100 partition[i] = &localpart[i];
3103 if (partition[i]->systid == UNUSED)
3106 if (partition[j]->systid == UNUSED)
3108 if (LE_32(partition[j]->relsect) <
3109 LE_32(partition[i]->relsect)) {
3110 struct ipart *temp = partition[i];
3111 partition[i] = partition[j];
3112 partition[j] = temp;
3120 "Specify the percentage of disk to use for this partition\n"
3161 /* Verify DOS12 partition doesn't exceed max size of 32MB. */
3167 (void) printf("Maximum size for a DOS partition "
3178 * check for free space before partition i
3181 * freespace after partition 3 is unusable
3184 * freespace begins at the end of previous partition
3189 first_free = LE_32(partition[i - 1]->relsect) +
3190 LE_32(partition[i - 1]->numsect);
3196 * freespace ends before the current partition
3199 if (partition[i]->systid == UNUSED) {
3207 (LE_32(partition[i]->relsect > first_free))
3208 ? (LE_32(partition[i]->relsect) -
3220 if (partition[i]->systid == UNUSED) {
3256 "New partition cannot start at cylinder 0.\n");
3271 (void) printf("Enter partition size in cylinders: ");
3281 if (partition[i]->systid == UNUSED)
3283 t_relsect = LE_32(partition[i]->relsect);
3284 t_numsect = LE_32(partition[i]->numsect);
3300 "Maximum size for partition is %u cylinders"
3307 /* Verify partition doesn't exceed disk size or 2 TB */
3312 "Maximum size for partition is %d "
3317 "Maximum size for partition is %d "
3324 /* Verify DOS12 partition doesn't exceed max size of 32MB. */
3329 "Maximum size for a %s partition is %ld cylinders;"
3343 (void) printf("fdisk: Cannot create partition table\n");
3362 " 1. Create a partition\n"
3363 " 2. Specify the active partition\n"
3364 " 3. Delete a partition\n"
3372 " 1. Create a partition\n"
3373 " 2. Specify the active partition\n"
3374 " 3. Delete a partition\n"
3383 * Change the ACTIVE designation of a partition.
3395 "Specify the partition number to boot from"
3418 "No partition is currently marked as active.");
3420 } else { /* User has selected a partition to be active */
3429 /* a DOS-DATA or EXT-DOS partition cannot be active */
3437 (void) printf("Select another partition.");
3451 (void) printf("partition after the next reboot.");
3457 * Change between SOLARIS and SOLARIS2 partition id
3467 (void) printf("Specify the partition number to change"
3495 "Partition %d is not a Solaris partition.",
3508 * Remove partition entry from the table (interactive mode).
3518 (void) printf("Specify the partition number to delete"
3548 " extended partition\n");
3570 (void) printf("Are you sure you want to delete partition %d?"
3572 (void) printf("programs in this partition inaccessible (type"
3595 (void) printf(" This was the active partition.");
3655 * of the disk used for each partition.
3855 "Upper limit is 2 TB for non-EFI partition ID\n");
3937 /* Get an aligned copy of the partition tables */
3939 bootptr = (char *)iparts; /* Points to start of partition table */
3947 * When the DOS fdisk command deletes a partition, it is not
4047 * Check for any changes in the partition table.
4067 * Display contents of partition table to standard output or
4206 * Read the VTOC table on the Solaris partition and check that no
4207 * slices exist that extend past the end of the Solaris partition.
4208 * If no Solaris partition exists, nothing is done.
4225 * the partition.
4235 "fdisk: No Solaris partition found - VTOC not"
4250 " start of partition",
4265 " complete partition",
4300 " is larger than the partition",
4326 "partition", i, disk_vtoc.v_part[i].p_start);
4347 " than the partition",
4404 * Read the VTOC from the Solaris partition of the device.
4418 (void) fprintf(stderr, "fdisk: partition may have EFI "
4431 * Write the VTOC to the Solaris partition on the device.
4445 (void) fprintf(stderr, "fdisk: partition may have EFI "
4475 * Clear EFI labels from the EFI_PMBR partition on the device
4523 * clear the backup partition table
4531 "\tClearing backup partition table at block %lld\n",
4569 * Clear the VTOC from the current or previous Solaris partition on the
4798 * to tell if they've specified the full disk partition by checking
4799 * to see if they've specified a partition that starts at sector 0.
4917 * Convert a given partition ID to an descriptive string.
4918 * Just an index into the partition types table.
4927 * Procedure to check the validity of the extended partition menu option
4957 * Procedure to read and validate the user option at the extended partition menu
4971 * Procedure to print the list of known partition types and their IDs
4987 * partition IDs being printed.
4998 (void) printf("List of known partition types : \n");
5007 * printing the partition IDs, but one.
5028 (void) printf("Enter the partition number : ");
5054 (void) printf("Invalid partition number\n");
5067 "partition IDs ) : ");
5072 (void) printf("Invalid partition ID\n");
5084 (void) printf("Invalid partition ID\n");
5095 (void) printf("Invalid partition ID\n");
5108 /* Disallow EFI partitions within extended partition */
5111 "partition is not allowed\n");
5115 return; /* Valid partition ID is in partid */
5268 (void) printf("Invalid partition size\n");
5280 (void) printf("Invalid partition size\n");
5294 (void) printf("Invalid partition size\n");
5302 (void) printf("Invalid partition size\n");
5314 (void) printf("Invalid partition size\n");
5337 * 1. Get the starting and ending sectors/cylinder of the extended partition.
5339 * 3. Allow the user to specify the beginning cylinder of the new partition
5342 * b) If it is beyond the extended partition limits
5347 * b) If it is beyond the extended partition limits
5350 * 7. Request partition ID for the new partition.
5380 "partition\n");
5390 (void) printf("New partition with ID %d added\n", partid);
5409 (void) printf("Partition ID of partition %d changed to %d\n", pno,
5443 * partition.
5481 (void) printf("Beginning cylinder of extended partition : %u\n",
5483 (void) printf("Ending cylinder of extended partition : %u\n",
5496 * Check if partition id 0x82 is Solaris
5583 (void) printf("Extended partition menu\n");