Skip to main content

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      Type w so that the partition table will be altered! Then type partprobe /dev/vdb.  
 
     
3  Type mkfs –t xfs /dev/vdb1 to make a file system.
     

4   Now make a directory in mnt to mount it with the partition.

 Copy the UUID of the partition and type vim /etc/fstab to edit the file.



6   Move the cursor to the first UUID shown here and press o to insert and paste the UUID of the partition you created. Keep a space and enter the directory you are going to mount, that is /mnt/Rohit for me. Keep a space and now type xfs which is our partition type.  Keep a space and type defaults. Put a space and type a 0 then put a space and type again a 0. So that it wouldn’t take much time to boot. Press Esc button. Type :wq! to save(it will appear down).

     


7  Type mount /dev/vdb1 /mnt/Rohit to mount the partition to /mnt/Rohit. Now type df –Th to check if it is successfully mounted. 

    



Hope you understood. If there are any doubts please comment and if you liked this please share. Bye for now. 

Comments

Popular posts from this blog

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...

A new thing everyone is trying to do in HTML!

Hi! Long time no see. This time I am going to introduce HTML. So Now I am going to teach you to make sections with ordered tags. For example, like this. In order to do like this we should use some CSS and also create multiple pages! Now let’s start! 1  Now make the base of the page in notepad and save it. 2  Copy this and make 3 or 4 files and save it. 3  Now fill your html pages with contents. 4  After you filled your contents in the webpage according to what you want, start the style tag inside the head tags to write CSS in all of your sub pages and page. 5  If you are familiar with ordered lists you can do like this. First, start the ul tags and add the link of our subpages. We should write the path of our subpages in the href attribute. 6  Start writing CSS inside the style tags. Start with the ul tags. We need to specify the background color, overflow, padding and margin and style type. Next, inside the li {...

How to change the password of the root user when you forget the previous password?

Hi, welcome to my blog! Here I am going to show you to change the password when you are not logged in as a unprivileged user but with full sudo access, or as root . Actually I am posting this for RHEL 7 (Red Hat Enterprise Linux 7) users. One thing you must know is that if there is any mistake it will affect the Linux OS. So be careful. Here is the video. If there are any doubts please comment.   And if you liked this please share. Bye for now.