Q.) One RHEL 8.8 VM is unable to boot and it is unable to find any root filesystem :
mount: special device /dev/mapper/vg1/data does not exist.
On rescue mode prompt, it is showing this :
#lvs
-bash: lvs: command not found
# lvdisplay
-bash: lvdisplay: command not found
How will you tackle this situation ?
Q.) Suppose somebody has removed the package responsible for /bin/cat and you are unable to use the cat command - how will you figure out which package provides the cat utility and install it ?
Q.) Below is the output of "yum history" command :
[root@workstation ~]$ yum history
Loaded plugins: fastestmirror, priorities, universal-hooks
ID | Command line | Date and time | Action(s) | Altered
----------------------------------------------------------------------
17 | install vim-go | 2024-10-23 04:18 | Install | 5
16 | install vim | 2024-10-23 04:16 | Install | 1
15 | --assumeyes --config /et | 2024-10-22 14:09 | I, U | 84
What will happen if I run “ yum history rollback 15 ” ?
Bonus Q.) What will happen in the above scenario if I run “ yum history undo 16 ”
Level L2 and above
I'll be posting a series of Linux-related questions covering various skill levels. Feel free to share your insights and expertise. Your contributions will benefit learners at all stages, from those in current roles to those preparing for Linux interviews.
@Trevor You are surely a Terminator from Skynet !! Good job!
for learners, refer this YUMmy cheatsheet for important commands and options :
https://access.redhat.com/sites/default/files/attachments/rh_yum_cheatsheet_1214_jcs_print-1.pdf
Q. What will happen if I run “ yum history rollback 15 ” ?
Answer:
The dnf history rollback command allows us to undo a transaction (or multiple
transactions executed after a specific transaction within the system’s package
history.
In this context, a "transaction" refers to a set of package-related actions
performed together, such as installing,updating, or removing packages.
By using the dnf history rollback command, we can effectively revert the system
to a previous state, erasing all package changes after the specified transaction.
With "15" as the transaction id, the command in the question will undo the installation
of the "vim" and "vim-go" packages.
Bonus Q.) What will happen in the above scenario if I run “ yum history undo 16 ”
Answer:
Any and all dependencies for "vim-go" will be erased!
since transaction ID 16 belongs to installation of vim , the undo 16 command will remove this package and its dependencies.
Oh my goodness! Did I actually, completely, ignore vim!!!!!!
Lesson learned here is NOT to attempt multitasking while
responding to any of these questions. I don't recall what I
was doing, but one thing is for sure - I wasn't paying attention!!!
Wow! Wow! Wow! Ouch!
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.