Reset Linux Root Password

December 6th, 2014

There are a couple of reasons why you might want to reset a Linux root password. If the current password is known to you, just log in as root and issue the passwd command. What if you’ve forgotten the password and can’t log in? Resetting a Linux root password is simple if you have access to the machine. There are 2 main methods.

Method #1

First, we boot the machine up. If LILO is in use, enter linux init=/bin/bash at the ‘LILO:’ prompt. If GRUB is in use, then press key ‘e’. We’ll need to edit the kernel line, beginning ‘linux’, and append init=/bin/sh:

Boot Step #3 Boot Step #1 Boot Step #2

 
Read the rest of this entry »

Local and Remote Kernel Upgrades – Failsafe Grub

February 28th, 2009

Grub (and LILO too for that matter) has a useful ‘failsafe’ feature that can be configured. This proves especially useful for remote kernel upgrades, where a failed boot will render your machine offline and unavailable.

Here is my standard grub config. I have just added my new 2.6.28 kernel.
Read the rest of this entry »

Adam’s Custom Kernel

September 16th, 2008

I haven’t been doing much custom kernel building lately. I find that the only kernels I change are those on my VM host machines, and/or using apt-get for a general upgrade.

Nevertheless, here’s how I go about building my custom kernels for VM host machines running debian etch, using 2.6.18 of course:

apt-get install linux-source-2.6.18

Read the rest of this entry »