Every couple days something on my RHEL 7 box goes into a swapstorm and uses up all the memory. I think it’s Firefox, but I never figured out why, generally I have four different Firefoxes running with four different profiles, so it’s hard to tell which one’s failing (if it even is that). Anyway, sometimes it makes the screen lock crash or something, and I can’t get in, and I can never remember what process you have to kill to get back in, so here it is: gnome-shell
. You have to killall -9 gnome-shell
, and it lets you back in. Also killall -STOP firefox
and killall -STOP "Web Content"
are handy if the swapstorm is still under way.
Category: Fedora
Building GDB on a freshly installed machine FAQ
So you just installed Fedora, RHEL or CentOS and now you want to build GDB from source.
- How do you make sure everything you need to build it is installed?
# dnf builddep gdb
- Did it say,
No such command: builddep
? Do this, then try again:# dnf install dnf-plugins-core
- Did it say,
dnf: command not found…
? You’re using yum, try this:# yum-builddep gdb
- Did it say,
yum-builddep: command not found…
? Do this, then try again:# yum install yum-utils
Thank you, you’re welcome.
Resetting the root password on Fedora
Yesterday I made a Fedora 30 VM on my RHEL 7 box, and for some reason I couldn’t log in as root after the installation finished. Well, it’s been a while, so I had to look it up, and following the instructions didn’t work either—I finally managed to get a shell, but the terminal was corrupted. Because it was a VM? Because the instructions were out of date? I’ve no idea. Anyway, here’s what I did, with the stuff that wasn’t in the instructions kind of yellowish:
- Reboot and wait for the GRUB menu to appear. You may need to be pressing Shift for this to happen.
- In the menu, highlight any entry and press
e
to edit it. - Find the line beginning with
linux
. Remove therhgb
andquiet
options, then addinit=/bin/sh
at the end of the line. - Press Ctrl-X to boot with those options. After a while you should get a root shell. The prompt was
sh-5.0#
on my system, notsh-4.2#
like the instructions say, but it doesn’t matter. - Run the commands in the instructions:
/usr/sbin/load_policy -i mount -o remount,rw / passwd root mount -o remount,ro /
- The instructions say to reboot now, but none of the commands to reboot the system worked at this point. Probably they expected systemd. No problem, I hit “Force Reset” in Virtual Machine Manager. I probably should have run a
sync
or two beforehand, but I didn’t think to.
Ta-da, working system!