Interrupt the kernel to change the fstab - RHCSA

What is fstab? 

fstab is a file, used enter information about partitions with options. Such as if we want to persistently mount hard disk we add its uuid and file type to fstab. When boot-up process, fstab is read.
fstab is in /etc/fstab 
You can view it using vim text editor. vim /etc/fstab. Then you will receive following.

 If there is an error, boot-up process will be stucked at some point. Then we need to enter the emergency mode. 
First Create a partition. Use following steps. I am going too use vdb disk.
  1. cat /proc/partitions  
  2. fdisk /dev/vdb
  3. press n (or m for help) create 100M partition
  4. mkfs.ext4 /dev/vdb1 -->Format it using ext4.file system.
  5. blkid --> check whether block id is available
  6. mkdir /mountPoint ---> create a mount point
  7. echo | blkid | grep vdb1 >> /etc/fstab
  8. vim /etc/fstab and add uuid , file system , defaults , 0 0   
  9. press ESC and type :wq
  10. mount -a
  11. Reboot the system
  12. vim /etc/fstab 
  13. delete some keys relevant to vdb1 uuid. 
  14. reboot the system
  15. You stuck somewhere in boot process.
  16.  
  17. You are asked to provide root password to move emergency mode. If not while rebooting press e to interupt the kernel and find the line which was started with "linux" and add systemd.unit=emergency.target at the end of that line. Before that you can delete upto vcconsole.keymap=us. change ro to rw.
  18.  
  19. Press ctrl+X 
  20. Then you will enter the emergency mode
  21. you can edit fstab now.

Comments

Popular posts from this blog

Basic Configurations in Windows Server 2016 (2)

Controlling the boot process - RHCSA