8 Partitions

8 Partitions

Partitioning • Pre-Installation tool – Disk Druid • Post-Installation tools – Fdisk – Parted – Cfdisk – sfdisk Naming Conventions Controller Master / Slave Linux Solaris Primary Master hda c0d0 IDE-0 Primary Slave hdb c0d1 Secondary Master hdc c1d0 IDE-1 Secondary Slave hdd c1d1 Commands To view list of partitions [root@comp1 ~]#fdisk -l <device name> Creation of Partition Creating a new partition [root@comp1 ~]#fdisk <device name> Creation of Partition Creating a new partition [root@comp1 ~]#fdisk /dev/hda The number of cylinders for this disk is set to 4865. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): m Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only) Command (m for help): Commands Updates the partition table to kernel without restarting [root@comp1 ~]#partprobe Ext2 vs Ext3 Ext2 Ext3 • No journaling support • Journaling supported • Less speed • More speed • Less secure • More secure Formatting of partition To format partition using ext3 filesystem [root@comp1 ~]#mkfs.ext3 <partition> To format partition using ext2 filesystem [root@comp1 ~]#mkfs.ext2 <partition> To format partition using vfat filesystem [root@comp1 ~]#mkfs.vfat <partition> Mounting Filesystem Created a directory for mounting the partition [root@comp1 ~]#mkdir <directory name> To mount the filesystem on the created directory [root@comp1 ~]#mount <partition> <directory name> To unmount the filesystem [root@comp1 ~]#umount <directory name> Mounting Filesystem - Permanently To mount filesystem permanently [root@comp1 ~]#vi /etc/fstab /etc/fstab To add the entry # This file is edited by fstab-sync - see 'man fstab-sync' for details LABEL=/1 / ext3 defaults 0 0 /dev/hda1 /boot ext3 defaults 1 2 None /dev/pts devpts gid=5,mode=620 0 0 None /dev/shm tmpfs defaults 0 0 LABEL=/home1 /home ext3 defaults 0 0 none /proc proc defaults 0 0 none /sys sysfs defaults 0 0 /dev/hda2 /usr ext3 defaults 0 0 LABEL=/var1 /var ext3 defaults 1 2 LABEL=SWAP-hda7 swap swap defaults 0 0 /dev/hdd /media/cdrom auto pamconsole,exec,noauto,managed 0 0 /dev/hda10 /mnt ext3 defaults 0 0 Converting from Ext2 to Ext3 Unmount the partition [root@comp1 ~]#umount <partition> Converting from Ext2 to Ext3 filesystem [root@comp1 ~]#tune2fs –j <partition> Mount the partition to use it [root@comp1 ~]#mount <partition> <directory name> [root@comp1 ~]#mount Converting from Ext3 to Ext2 Unmount the partition [root@comp1 ~]#umount <partition> Converting from Ext3 to Ext2 filesystem [root@comp1 ~]#tune2fs –O ^has_ journal <partition> Mount the partition to use it [root@comp1 ~]#mount <partition> <directory name> [root@comp1 ~]#mount Label To assign label [root@comp1 ~]#e2label <partition> <label_name> To view existing label [root@comp1 ~]#e2label <partition> To see mounted partition with Label [root@comp1 ~]#mount -l How swap works ? New Process D Process RAM HDD Swap Process C Partition Process B hda3 Idle Process A hda2 Operating hda1 System RAM FULL Creation of Swap partition Creating a new partition [root@comp1 ~]#fdisk <options> <partition> To make a partition swap partition [root@comp1 ~]#mkswap <partition> Swap Partition To enable swap on the swap partition [root@comp1 ~]#swapon <partition> To check the status of swap used [root@comp1 ~]#swapon -s <partition> To disable the swap partition [root@comp1 ~]#swapoff <partition>.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    18 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us