Skip to main content

Posts

Showing posts from January, 2019

How to make a Linux Swap partition (RHEL7)?

Hi! I am Rohit.  In this post I am going to teach you how to create a Linux Swap partition. Linux Swap makes an extra space. It is same as creating a normal partition, a little different.   I am using a virtual machine. You can list your blocks by the command ‘lsblk’ . Now, let’s start! 1    First create a partition with fdisk . 2      Now type t to select the type and the partition number which would be asked after you type t . Because I have only created this partition it would be automatically selected. You can type L to list all the codes. Let’s type 82 to change the partition to Linux Swap . Type w to alter the partition table.   Also type partprobe /dev/vdb . 3      Type mkswap /dev/vdb1 to format our swap partition. Now copy your partition’s UUID . You can use the blkid command to find out your UUID . Next, type vim /etc/fstab to edit the file. 4      Mov...

How to create a MBR partition (Red Hat Enterprise Linux 7)?

Hi! I am Rohit . This time I am going to teach you how to create a partition and mount with a file system Xfs . I am doing it in a virtual machine. The block name might be different in your systems. You can use 'lsblk' command to list block devices. I have vda and vdb, but vda is partitioned and mounted. So I am using vdb . Okay now let's start!  1   Open the terminal. Type fdisk /dev/vdb. Now a prompt will appear and type n for a   new partition. Enter p or press the enter button in the keyboard. Type 1 or press enter. Then type the first sector you want to start from or press enter (if you don’t know what is first sector just press enter).   Next type the size you want your partition   to be, like this +5G . The format to write this is +number G, M or K. 1       2  Type w so that the partition table will be altered! Then type  partprobe /dev/vdb .           3 ...