0

I have accidentally mounted 20GB disk under /usr. Due to which i'm unable to boot or even not able to enter single user mode. Is there any way?

Even I have removed the disk No 2 under VMware console. But still I'm unable to boot.

  • Can you mount the disk if you attach it to a new VM and boot a live cd? I wonder if you overwrote `/usr` – Bert Jan 19 '22 at 01:45
  • Please tag your question with operating system distro and version. This could be a number of flavors of Linux, BSD, or UNIX, and the solution is specific to which. – John Mahowald Jan 19 '22 at 14:35
  • Thank you Bert. Yep i accidentally mounted with the fstab entries. Though we don't have live cd in the VMware console. – Saravanan Arumugam Jan 21 '22 at 05:15

1 Answers1

0

Boot into the rescue mode with the boot option rd.break=initqueue.

Run the following commands to initiate the volume manager and mount the system root

pvscan all
vgscan all
lvscan all
mkdir foo
mount -t xfs /dev/mapper/rootvg foo


vi foo/etc/fstab

Delete the entries of /usr mount point; save & Quit;

exit; reboot;

That is it. Now os loads successfully.

Bob
  • 5,335
  • 5
  • 24