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.
- cat /proc/partitions
- fdisk /dev/vdb
- press n (or m for help) create 100M partition
- mkfs.ext4 /dev/vdb1 -->Format it using ext4.file system.
- blkid --> check whether block id is available
- mkdir /mountPoint ---> create a mount point
- echo | blkid | grep vdb1 >> /etc/fstab
- vim /etc/fstab and add uuid , file system , defaults , 0 0
- press ESC and type :wq
- mount -a
- Reboot the system
- vim /etc/fstab
- delete some keys relevant to vdb1 uuid.
- reboot the system
- You stuck somewhere in boot process.
- 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.
- Press ctrl+X
- Then you will enter the emergency mode
- you can edit fstab now.
Comments
Post a Comment
Thank you for your comment