0:00
hey there welcome back to our channel in
0:03
today's tutorial I will explain how to
0:05
create partitions in Linux with FIS
0:07
command abis command is a powerful
0:10
command line tool that allows you to
0:12
create modify and delete partitions on
0:14
your Linux system before we start ensure
0:17
you have the following things in place a
0:19
running Linux system root privileges or
0:22
sud sudo user with admin Dives basic
0:25
understanding of disk and partitions I
0:27
have attached 12gb raw dis on on my
0:30
Linux system I will be using this dis to
0:33
create two partitions of size 5gb and we
0:36
format them with extended 4 and xfs file
0:39
system respectively let's get started
0:42
first step is to identify the newly
0:45
attached RW disk for that we can run the
0:56
hphl if you see the output carefully we
0:59
have have two dis SL D SDA and/ d/
1:10
GB which already has the
1:13
partitions and we have sdb2 of size 12gb
1:18
and this disc doesn't have any
1:21
partitions so we will be using this sdb2
1:24
which is a RW desk alternate way to
1:28
verify this desk dis run the command
1:37
lsblk in the output I can see there is a
1:40
disk SDA which has two partition SDA 1
1:45
SDA 2 and we have one more
1:52
sdb of size 12 GP and it doesn't have
1:56
any partitions so this confirms that
1:59
this is our newly attached row dis of
2:03
size 12 GB so we will be using this disk
2:07
to create partitions on
2:09
it in order to create partitions on the
2:12
target disk that is /d/
2:15
sdb we need to run the command
2:23
Fisk followed by the disk
2:30
it will take us to the f disk
2:34
menu if you type M here we will get the
2:38
help in order to create a new Partition
2:43
here and hit enter it will prompt you to
2:46
enter the partition type first four
2:48
partitions on any disk are considered as
2:51
primary partitions so Type e
2:55
here partition number will be one
3:01
enter it enter to accept the default
3:05
sector in the last sector specify the
3:10
partition let's say I want to give a
3:23
output confirms that it has created a
3:27
partition of type lenux of size 5 ZB and
3:32
partition number is one by default F dis
3:35
command creates a partition of type
3:39
Linux if you want to change this
3:41
partition type you need to change the
3:43
toal ID for that partition for that you
3:46
need to type T here and hit
3:53
L so this is the toggle ID for Linux
3:56
partition type if you want to change the
4:00
ID just type the number here let's say
4:03
you want to set it as swap so type 82
4:07
here and hit enter in my case I don't
4:11
want to change the partition type so I
4:13
want this partition as as Linux so type
4:17
83 here now create our second partition
4:22
n again P for primary
4:28
partition this would be our second
4:30
partition accept the first sector as
4:33
default one and the last sector specify
4:39
partition say 5G again all right in
4:43
order to write these changes to the desk
4:45
we need to type w and hit enter this
4:49
output confirms that partition table has
4:51
been altered let's verify whether the
4:54
new partitions are visible under the
4:56
disk /d/ sdb for that the
5:10
sdb as you can see we have two
5:20
lenux and whose togal ID is
5:23
83 size is 5G to use these partitions we
5:27
have to format these partition
5:30
I will format first partition with
5:32
extended 4 file system and second one
5:36
with xfs file system and the command to
5:38
do mkfs mkfs is the command to format
5:43
the partitions mkfs dot
5:55
similarly format the second
5:57
partition this time it's type would be
6:04
xfs output of both the commands confirms
6:08
that sdb1 has been formatted
6:12
successfully with the type extended four
6:17
sdb2 has been successfully formatted
6:20
with the xfs file system next create the
6:23
mount point for these partitions so I'm
6:27
creating SL opt SL data 1 as a mount
6:31
point for sdb1 and/ opt data 2 as amount
6:50
one now run the mount command to mount
7:00
in this this is the partition number so
7:07
sdb1 is the partition number and this is
7:10
the Mount point so this partition will
7:13
be mounted on this Mount Point hit
7:17
enter similarly Mount the second
7:28
command in the output you can see
7:31
sdb1 is successfully mounted
7:34
on/ op / data 1 whose file system type
7:38
is extended for size is 5gb similarly
7:43
sdb2 is mounted on opt / data 2 whose
7:48
file system type is xfs size is 5gb in
7:56
partitions on these Mount points
8:01
add these partitions entries in the/ cc/
8:05
FST file something like
8:18
partition name this is the Mount point
8:24
partition the file system type for this
8:27
partition so in this case this it is
8:35
defaults Z space z similarly add the
8:43
partition this case File system type is
8:48
xfs save and close the file now run to
9:04
now even if this Linux system gets
9:06
rebooted these partitions will be
9:09
automatically mounted on these Mount
9:11
points that's all from this video
9:14
tutorial I hope you have found it useful
9:16
and informative please do like the video
9:19
subscribe to our channel for more Tech
9:21
tutorials like this see you in the next