Ch-7-Lab: Partitions Objective
Ch-7-Lab: Partitions Objective
Ch-7-Lab: Partitions Objective
OBJECTIVE:
To create a new partition on the hard disk
PRE-REQUISITE:
Machine with Linux Installed
TOPOLOGY:
Syntax:
[root@clientl ~]# fdisk <option>
[root@clientl ~]# fdisk -I
Result:
Disk/dev/sda: 41.9 GB, 41875931136 bytes, 81788928 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00040059
Device Boot Start End Blocks Id System /dev/sdal * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 21506047 10240000 83 Linux /dev/sda3 21506048 37890047
8192000 83 Linux
/dev/sda4 37890048 81788927 21949440 5 Extended
/dev/sda5 37894144 54278143 8192000 83 Linux
/dev/sda6 54280192 58376191 2048000 83 Linux
/dev/sda7 58378240 62474239 2048000 82 Linux swap / Solaris
Syntax:
[root@clientl ~]# partprobe <disk_name>
[root@clientl ~]# partprobe /dev/sda
Verification:
No error message means updated successfully
[root@clientl ~]# fdisk -I
Syntax:
[root@clientl ~]# mkfs.ext4 <partition no>
[root@clientl ~]# mkfs.ext4 /dev/sda8
Result:
mke2fs 1.42.9 (28-Dec-2013)
Filesystem too small for a journal Filesystem label=
OS type: Linux Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks 128 inodes, 1024 blocks 51 blocks (4.98%)
reserved for the super user First data block=l
Maximum filesystem blocks=1048576 1 block group
8192 blocks per group, 8192 fragments per group 128 inodes per group
Allocating group tables: done
Result:
/dev/sda8: UUID=M08b85639-6ce3-4d4c-8d55-19c24ab0756aM TYPE=Mext4M
Syntax:
[root@clientl ~]# mount <partition_no.> <directory>
[root@clientl ~]# mount /dev/sda8 /mnt/linux
[root@clientl linux]# Is
ameerpet bhills dsnr lost+found myfile myfilel myfile2 secbad
END