Linuxs Partition Techniques fdisk parted and blkid











>> YOUR LINK HERE: ___ http://youtube.com/watch?v=bruFWHxVXm4

Topics Covered in this videos: • To view the existing partitions • #fdisk –l (or) parted –l • Partition Administration using fdisk • To enter into disk utility, the syntax is • #fdisk disk name • #fdisk /dev/sda • Creating a new partition • #fdisk /dev/sda • 1.Use p to list out the partition information first and • 2.Use n to create a new partition • Deleting a partition • Let’s delete the partition we’ve created above i.e. /dev/sda7 • Use d to delete a partition and specify the device name, in our case it is 7. • Note:- Never delete the system partitions i.e. 1-7 • Saving the partition changes • Every time you make a partition or delete a partition, the changes made has to be saved using • w, otherwise the creation and deletion will not be considered to be happen. For practice • purpose you can make any no. of partition and delete it and just quit using q so that it will not • be saved. • Updating the partition table without restarting the system: • After creating or deleting a partition the changes will be effected in the partition table only • after the restart of the system. But there is a way to avoid this circumstance. We can use • partprobe or partx command to update the partition information without restarting the system • #partprobe /dev/sda • Or • #partx –a /dev/sda • Or • #kpartx /dev/sda • Formatting a partition with ext4 filesystem: • After creating a partition we need to assign some file system to it so that we can start storing • the data into it. To format a partition the following syntax is used. • #mkfs.file system type partition name • #mkfs.ext4 /dev/sda7 (where sda7 is our newly created partition) • •Likewise you can format the different partitions with different file systems like • #mkfs.ext3 /dev/sda8 • #mkfs.vfat /dev/sda9 • Mounting a partition: • Mounting is a procedure where we attach a directory to the file system. There are two types of • mounting which will be used in Linux or any UNIX. • 1. Temporary Mounting • 2. Permanent Mounting • Temporary Mounting: • In a temporary mount point we will create a directory and mount it, but this mount point will • last only till the system is up, once it is rebooted the mounting will be lost. • Syntax: • #mount device name directory name (mount point) • #mount /dev/sda7 /mnt/kernel • To View all the mounted partitions • #mount • To add the data access the mount point: • #cd /kernel • Add the data and exit the directory • Unmounting a partition • #umount mount point directory • #umount /kernel • verify it with mount command. • Permanent Mounting : • Permanent mounting procedure is exactly same like temp mounting, but here we will update • the /etc/fstab file with the mounting details, so that it will be mounted even after the system is • reboot. • Steps To make a permanent mount point: • 1.Make a directory or use an existing directory • 2.Add entry in /etc/fstab file • 3.Use mount –a command to check it is mounting. (mount –a will mount all the entry placed in /etc/fstab) • 4.Here we will be using our existing /kernel directory as mount point which is created previously. • #vim /etc/fstab • /dev/sda4 /mnt/newM etx4 defaults 0 0 • #mount –a • To view the usage information of mounted partition: • To view the usage information of mounted partition use the command df –h • #df -h • To view the usage information of files and directories: • #du –h • du -h /mnt/newM/ • du -h /root • Assigning label to the partition: • #e2label partition name label To check the label • #e2label /dev/sda7 ktdisk • To check the label: • #e2label /dev/sda7 • Mounting a partition using its label: • Mounting a /dev/sda7 partition with its label GREEN, verify it with mount command • #mkdir /mnt/MM • #mount /dev/sda7 /mnt/MM • #e2label /dev/sda7 GREEN • #e2label /dev/sda7 • #mount -l • Making a permanent mount point using label • As we know that to make a permanent mount point, an entry has to be made in /etc/fstab file. • #vim /etc/fstab • LABEL=GREEN /mnt/MM ext4 defaults 0 0 • Now use mount –a command and verify it with mount command whether it is mounted or • not. • Mounting a partition permanently with its block id (UUID) • 1.To check the uuid of a partition use blkid /dev/sda5 command. • 2.Copy the uuid • 3.Make an entry in /etc/fstab using UUID • 4.Verify it with mount –a option • #blkid /dev/sd7 ( to get UUID number) • #vim /etc/fstab • UUID=f40752a7-0851-48d0-a3a2-1f4a8e6e3705 /mnt/MM ext4 defaults 0 0 • We can check fstab file entries with mount –a command. • This command will mount everything listed in /etc/fstab file. • So if we made any mistake while updating this file, we will get an error as the output of this command. • #mount -a • fdisk,parted,partprobe,partx,kpartx,blkid,mount,e2label,mkfs.etx4,mkfs.xfs,umount,linux,ext4,ubuntu,file system,linux tutorial,fdisk command in linux,how to create partition in linux,fdisk command,fdisk command linux,create partition in linux,xfs file system,ext2,rhce,cli,disk partitioning in linux,Linux's Partition Techniques: fdisk,ext4 file system,and blkid,Linux's Partition Techniques: fdisk, parted, and blkid

#############################









Content Report
Youtor.org / YTube video Downloader © 2025

created by www.youtor.org