1. Create LV in rhel 7.5 environment
2.Create a file system on the LV
3.Create mount point/usr9
4.Mount LV to /usr9 (Mistake command)
Unable to execute command under /usr.Most commands are linked under /usr.
·Verified that pwd and echo can be executed.
·Forced kernel panic execution reboot
顧客 Due to the customer environment, VM restart is not possible immediately, and the kernel panic is reached by desperate measures.
I would like to know why the echo command and others could be executed in the above situations.
After a reboot recovery, we investigated the command path and found that it was referenced under /usr.
Busybox has not been introduced yet.command-line rhel
Shells such as bash and zsh have built-in commands.It was also found in Bourne Shell, the base of bash.The built-in commands do not refer to
/usr/bin and are available even if
/usr is no longer available.(If the shell is moving)
A list of built-in commands can be found using the
You can also use the
type command to determine whether it is built-in or external.
There are several reasons why it is a built-in command.Accelerate, or even if you can't execute it without a built-in command in the first place
(For example, the
cd command... because external commands will revert after execution.)
There are other examples besides shell built-in commands.
/usr is full, I would like to put it in single user mode and replace the
/usr mounting destination. Of course,
/usr does not exist in the middle of replacing the
/usr mounting destination.You can still use the commands in
/sbin under the root partition.
I mean, the various commands stored in
/sbin are made with static links to work without
/usr (at least in commercial UNIX)
Most field-built binaries are
./configure to use the following shared libraries, so you need to have
/usr to install them, so you should not use
/opt to overwrite
© 2022 OneMinuteCode. All rights reserved.