Linux Blog

Fix For Grub Problem After Fedora Update

Filed under: General Linux — TheLinuxBlog.com at 10:06 am on Tuesday, February 24, 2009

After updating a Fedora installation a development server froze sitting there with GRUB on the screen at boot.
It had been like this all night after a successful upgrade earlier that day. yum update was run from a screen session and then connected to from home. What had caused the problem was the kernel and possibly grub had been updated. This caused the system to need a reboot, but after the reboot the drive map had changed.

Fortunately when I came in the next morning I had an e-mail with a link to this website: http://readlist.com/lists/redhat.com/fedora-list/51/259917.html with a solution to the problem.

Here are the step by step instructions since they are not clearly lined out on the site:

1) Insert Fedora installation media
2) boot to rescue mode
3) choose language, skip network settings
4) once you are at a shell, type:
5) grub –device-map=/tmp/drivemap
6) quit
7) vi,pico or nano /tmp/drivemap and move sda and sdb around, or perhaps hda.
8) chroot /mnt/sysimage
9) I had checked that /tmp/drivemap had stayed the same by running cat /tmp/drivemap
10) grub –device-map=/tmp/drivemap
11) quit
12) grub-install
13) reboot

After grub gave its usual message I rebooted, removed the CD and everything worked as expected. Excellent. I’ve always used lilo over grub, but recently the distributions I’ve been using use grub and more importantly the servers I manage. Therefore I guess I better get more accustomed to grub. Luckily the server this went wrong on was a development server and nothing mission critical, so thankfully no one had to make the long haul into the data center to fix this issue at 1:00am. Hopefully you will be just as lucky if you run into this issue.

General Linux Change Password

Filed under: General Linux,Linux Software,Quick Linux Tutorials — TheLinuxBlog.com at 4:52 am on Thursday, December 20, 2007

Changing your password under Linux is a pretty simple task providing you know how to do it, and of course since we’re talking about Linux: changing your password is as simple or complicated as you want it to be either way. You either love GUI’s or you hate them, so one method or the other can be confusing. I’m more of a console guy, but I’ll start with the GUI methods because thats probably what I think the masses want to see first. Remember what your doing tho, if you need to change the password on more than one box, I would look into changing your password by command line.

There is more than one reason to change your password, the examples below assume that you are just changing the current users password because it needs to be changed.

kdepasswd

kdepasswd example

passwd

linux change passwd

If you need to change the password for another user, log in as root and execute the following:

passwd (username)

linux change passwd

There are many ways to change your root password if you forgot it.

One way to do it is to boot up with a live CD, mount your hard drive, chroot and then execute the passwd command, once you reboot your password should be reset.