February 4, 2009 at 12:16 am #160978
Here are a few tips and tricks relating to GRUB, the boot loader which comes with most Linux distributions.
! This is dangerous, be very careful when attempting these changes. Triple check them to make sure you typed the right thing, as you can stop your computer from booting if you mess it up. With that said these changes are easy to make and problems can be corrected.
It is a very good idea to have either a live cd or a live memory stick running Linux, as this will allow you to recover from any problems.
It is best to make one change at a time then test it.Opening/Editing the Configuration File
You will need to be in Linux to make any of these changes.
Open up the terminal
If you are running Ubuntu run the following commands, the first line makes a backup of the configuration file the second opens it (those are lower case L’s not number ones):-Code:sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backupCode:sudo gedit /boot/grub/menu.lst
If you are running Fedora run the following commands:-Code:su –
Then enter the root passwordCode:cp /boot/grub/menu.lst /boot/grub/menu.lst_backupCode:gedit /boot/grub/menu.lst
Gedit should now be open with the configuration file for GRUB loaded.
Next you can choose to make some of the changes which I’ll go over in the sections below.
Once you have made the changes check they are correct, then save the file and reboot your computer to see the results.Number 1: The Time-out
In the configuration file there will be a line which reads (the number may vary):-Code:timeout=10
There are basically three settings you can have, these are:-
1. The usual 10 second time-out to load the default operating system, we can change this.
You can change the number which is in seconds to increase or decrease the delay before the default operating system is loaded. For example to set the time out to be 5 seconds you would modify it to be:-Code:timeout=5
2. No time-out, so the computer will sit there waiting for you to choose which operating system to boot.
If you want to disable the timeout you need to comment out the like with a hash as follows:-Code:#timeout=10
3. Instant time-out, so the computer doesn’t show the menu at all and boots the default OS immediately. This may seem foolish but it’s not, the boot loader will not flash up. However you can still get to it by holding down a button on the keyboard. This is nice if you very rarely boot into the other operating system and don’t want to wait at the selection screen.
! It seems that setting this on Ubuntu (maybe other distributions) will stop you from accessing the menu to select your OS, if you do try this make sure Ubuntu is set as your default OS so you can easily change it back again if necessarily.
To do this set the time out to be 0, as follows:-Code:timeout=0Number 2: Changing the default operating system
This will enable you to set Windows (or another opperating system) to be booted by default.
If you look down the configuration file you will see the following line (number may differ):-Code:default=0
The 0 refers to which entry gets booted by default, if you scroll down the configuration file you will see some lines starting with “title” for example the first one in mine reads:-
title Fedora (22.214.171.124-170.2.5.fc10.i686)
The top one is number 0, the second one down is number 1, etc…
If you wanted to boot the second entry you would change the line to read:-Code:default=1Number 3: Booting the recovery partition
DISCLAIMER: I’ve taken these instructions from a post by prtsmgr and have not tried it myself as I no longer have the recovery partition.
At the end of the configuration file add the following lines:-Code:title RecoveryCode:rootnoverify (hd0,0)Code:chainloader +1
The next time you reboot you should have an entry labelled “Recovery” which will allow you to boot from the hidden partition.Number 4: For Fedora 10 users, how to enable the nice animated loading sequence
instead of the boring bar
The first boot entry (the one closest to the top of the file) which will look something like the following:-Code:title Fedora (126.96.36.199-170.2.5.fc10.i686)Code:root (hd0,0)Code:kernel /vmlinuz-188.8.131.52-170.2.5.fc10.i686 ro root=/dev/VolGroup00/LogVol00 rhgb quietCode:initrd /initrd-184.108.40.206-170.2.5.fc10.i686.img
We are interested in the line in bold.
On the end of that line you need to add the following:-Code:vga=0x315
so that it reads as follows:-
!IMPORTANT The numbers/version will probably be different, do not copy the line below it is just an example.
Additionally there is a space between quiet and vga=0x315Code:kernel /vmlinuz-220.127.116.11-170.2.5.fc10.i686 ro root=/dev/VolGroup00/LogVol00 rhgb quiet vga=0x315
When you reboot you should now get the nice animated start-up screen.PS
If you notice that any of the instructions are wrong or you have some problems with this, let me know.
Updated: Added warnings for Ubuntu and an additional warning at the start.February 4, 2009 at 12:24 am #182415TCMuffinMember
Excellent post 🙂February 16, 2009 at 2:33 pm #182409
I followed these instructions (Ubuntu 8.10) and set timeout to 0, with default option to 6 (which I calculated as XP)
Now it always switches into Samsung Recovery when trying to boot, holding down keys does not seem to invoke boot menu.
Is there a specific key for this?
Please help before I have to do a full restore from back in November :o(
StevenFebruary 16, 2009 at 2:39 pm #182405
That’s interesting, I have mine set this way and any key brings up the menu. I will have to look into that, and modify the post. Just checking, I have to hold down the key as it boots or at-least just before the BIOS has finished, is that what you were doing?
How did you load Ubuntu 8.10?
If you used the live cd/memory stick, boot using that. Once you have booted from the live cd/memory stick you should be able to access the menu.lst file on your hard drive and reverse any changes you made.
I’m just about to go to a meeting, but I’ll be back in a few hours if you need any more help to sort this out, or more detailed instructions.February 16, 2009 at 2:49 pm #182410
Tried various key presses at various times.
Machine is dual boot with xp and Ubuntu 8.10
booting from HDDFebruary 16, 2009 at 2:53 pm #182406
Should have been clearer, I meant how you installed Ubuntu.
If you used an install disk, can you boot from that instead of the hard drive, as it should allow you to modify the menu.lst file located on your hard drive.February 16, 2009 at 2:56 pm #182411
used unetbootin on a memory stick which has long been deleted 🙁February 16, 2009 at 2:56 pm #182412
will lookt at creating a new boot disk on an SD card and try that…February 16, 2009 at 2:59 pm #182407
Ah that’s a shame.
Unfortunately an SD card will not work, as you can’t boot from it.
You may need to recreate the unetbootin memory stick, or download another smaller bootable Linux distribution.February 16, 2009 at 3:02 pm #182413
d’oh – will need to wait until I get into work tomorrow to get my 1GB memory stick as my 4GB one has an OS on it…February 16, 2009 at 3:42 pm #182404XyroxMember
Holding down Escape just before the BIOS screen disappears works for me. Running Arch with Grub.February 17, 2009 at 10:47 am #182414
Phew! Fixed it by recreating my Unetbootin USB stick with live iso – booted from that, mounted the HDD space with Ubuntu installation and edited the GRUB back to original settings 🙂
StevenFebruary 17, 2009 at 11:07 am #182408
Glad you managed to fix it, I’ll update the first post later with some extra warnings.
- You must be logged in to reply to this topic.