How to Edit Grub in Backtrack 4R2
BackTrack 4 R2, an Ubuntu-based Linux distribution containing security and computer forensics utilities, uses the Grub 0.97 boot loader. Grub presents a list of boot options when you start your computer. After installing BackTrack 4 R2 on your computer, you can edit Grub’s menu.lst file to control the default boot entry, the time Grub waits before booting it and the boot options shown on the menu. BackTrack 4 R2 doesn’t include a graphical utility that controls these options.
Instructions
-
-
1
Log in with your username and password at the BackTrack terminal. Open a terminal window by clicking the “BackTrack” menu at the lower left corner of your screen, pointing to “System” and clicking “Konsole” if you’re using BackTrack’s graphical desktop.
-
2
Type “sudo nano /boot/grub/menu.lst” into the terminal and press “Enter” to open Grub’s configuration file in the Nano text editor.
-
-
3
Type your password at the password prompt and press “Enter” to authenticate.
-
4
Set the default boot entry by changing the “0” in “default 0” at the top of the file. The “0” represents the first boot entry, a “1” represents the second boot entry and so on. For example, set the sixth menu item to boot by default using “default 5.”
-
5
Change the time Grub waits before booting the default entry by changing the number in the “timeout 30” line. The number controls the number of seconds Grub waits. Grub boots the default entry without displaying a menu if “timeout 0” appears in the file.
-
6
Use the arrow keys and the “Page Up” and “Page Down” keys on your keyboard to scroll through the file. Locate a boot entry you want to edit. Each boot entry contains several lines and is separated from other boot entries by a blank line.
-
7
Hide a boot entry by adding the “#” character to the start of each of the boot entry’s lines. The “#” symbol tells Grub that the line is a comment and should be ignored. Adding the “#” character before a line in a Linux configuration file is referred to as “commenting out” the line.
-
8
Modify a boot entry by editing the text on its “title,” “kernel” or “initrd” line. The title line specifies the boot entry’s title in the Grub menu, the kernel line specifies the kernel to boot and its boot options, and the initrd line specifies the initial RAM disk file to load.
-
9
Press the “Ctrl” and “O” keys at the same time when you’re done, then press “Enter” to save the file.
-
10
Press the “Ctrl” and “X” keys at the same time to close the Nano text editor.
-
1