CS3353: Linux Manual Disk Partitioning Preamble

Дата канвертавання22.04.2016
Памер11.54 Kb.
CS3353: Linux Manual Disk Partitioning

Preamble: Most Linux distributions allow the user to customize the disk partitions for the OS installation. However, there are times when the custom partitioning does not work. With a minimal amount of knowledge, one can use the manual OS commands without the installation GUI. Experience shows that about 25% of the attempts to custom partition the disk will be unsuccessful. This is when the SA must do the partitioning manually.
Linux Commands: The commands for manual partitioning are many, but one can get by with only a few. Everything depends on the user being logged on as root.

  1. df – This command will identify the file system name.

Simply type from the command line: df or df –a

If you have several file systems to choose from, be sure to identify the correct file system to change because the contents of the disk will be lost!

  1. Identify the file systems on your computer and list each and its function:

ID: ____________________ Function: ___________________________

ID: ____________________ Function: ___________________________
Insert your memory device. Use the df command to get its identifier and write USB device in the function field above.

  1. After the device has been mounted, un-mount the device. This insures your device is in the hardware table.

umount device_name

  1. fdisk – this utility comes with built-in instructions. This command will build the partition table. It is a curses based application complete with a menu, options, and instructions.

m – print the menu of fdisk options (shown here)

p – print (display) the partition table

d – delete a partition

n – create a new partition

a – set the boot flag for a partition.

t – set the partition system ID. It is 83 for all partitions except swap. Swap is 82.

v – verify the partition table (do this before you save with the w option).

w – write the partition table when you are finished creating your partitions.

q – quit without saving changes.

  1. ______ Type fdisk followed by the ID for your memory device.

  2. ______ print the partition table

  3. ______ delete all the partitions

  4. ______ create new partitions for root, home, and swap, and leave at least 1GB of unused space. PCLinuxOS MiniMe requires a minimum of 4 GB to work, make it bigger.

  5. ______ Make root bootable.

  6. ______ Set the partition system IDs.

  7. ______ Verify the partition table

  8. ______ write the partition table.

  1. After you have manually partitioned your USB memory device, write the changes and exit the fdisk utility.

  1. mke2fs – After exiting the fdisk utility, make each of the journaled file-system partitions using the mk32fs command.

mke2fs -j /dev/sd?X or mke3fs /dev/sd?X or

mkfs.ext3 /dev/sd?X
where X is set to the partition number assigned by fdisk.

  1. fschk – verifies and repairs partitions. Check each of your ext3 partitions.

fsck.ext3 /dev/sd?X

  1. mkswap is used to make the swap patition.

mkswap –c /dev/sd?X

  1. Install PCLinuxOS on your USB device.

База данных защищена авторским правом ©shkola.of.by 2016
звярнуцца да адміністрацыі

    Галоўная старонка