How do I configure GRUB to see all of my memory?
You can specify the amount of memory on your system if your computer is not recognizing all of it. For example if your system says you only have 128 MB of RAM and you know for sure you have 256 MB, then you can specify that in your grub.conf file, located at /boot/grub/grub.conf
What you want to do is add the following syntax mem=M to the kernel line of your grub.conf file. So for instance if you were specifying your system had 256 MB in the grub.conf file, it would look something like this.
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Enterprise Linux AS (2.4.21-15.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-15.EL ro root=LABEL=/ mem=256M
initrd /initrd-2.4.21-15.EL.img
title Red Hat Enterprise Linux AS (2.4.21-9.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-9.EL ro root=LABEL=/ mem=256M
initrd /initrd-2.4.21-9.EL.img
Password Protecting GRUB Using Boot Loader Passwords
GRUB can be configured by adding a password directive to its configuration file. To do this, first decide on a password, then open a shell prompt, log in as root, and type:
When prompted, type the GRUB password and press Enter. This returns an MD5 hash of the password.
Next, edit the GRUB configuration file /boot/grub/grub.conf. Open the file and below the timeout line in the main section of the document, add the following line:
Replace with the value returned by /sbin/grub-md5-crypt
The next time the system boots, the GRUB menu does not allow access to the editor or com-mand interface without first pressing p followed by the GRUB password.
prevent an attacker from booting into a non-secure operat-ing system in a dual-boot environment. For this, a different part of the /boot/grub/grub.conf file must be edited.
Look for the title line of the non-secure operating system and add a line that says lock directly beneath it.
For a DOS system, the stanza should begin similar to the following:
To create a different password for a particular kernel or operating system, add a lock line to the stanza, followed by a password line.
Each stanza protected with a unique password should begin with lines similar to the following example:
title DOS lock password –md5
GRUB single user mode
To get into the single user mode follow the steps below :
1. At the GRUB boot prompt, select the image to be booted and press e.
2. Select the line containing kernel and press e.
3. At the end of the line specify the runlevel, for single user mode specify 1. So the line looks like,
kernel /vmlinuz-2.6.16.5 ro root=LABEL=/ rhgb quiet 1
4. Press Enter to save the line, and press b to boot the modified image.
5. You will be logged to the single usermode.
6. If you only needed a root shell, in step 3, you may specify
kernel /vmlinuz-2.6.16.5 ro root=LABEL=/ rhgb quiet init=/bin/bash