Sign In

    Enjoy FOSSwire's content? Have it delivered! Subscribe

    Reorder your Boot Menu Manually

    Last week, I covered how to use KGRUBEditor to re-order the boot menu you see at startup, so that dual boot users could move Windows to the top of the list if they would like.

    It is also relatively simple, however, to manually reorder this menu by editing the configuration file of GRUB (that's the boot loader).

    This tutorial will focus on Debian/Ubuntu, however these instructions should be able to be followed on any distribution (just ignore things about the automagic kernel list).

    First of all, a word of warning. Editing configuration files can be a potentially risky business. Make sure you know what you're doing. You should also make a copy of the file /boot/grub/menu.lst and store it somewhere safe (you can restore it with a Live CD later if the worst does happen). If anything does go wrong, see the end of this post.

    Right, let's get started. First of all, we need to open up the configuration file in an editor.

    Assuming you're running GNOME, press Alt-F2 to bring up the Run Application window. Type gksu gedit /boot/grub/menu.lst and click Run. Enter your password when prompted.

    Run Application window

    This will open up a text editor, with the GRUB configuration file ready to edit. So let's assume once again that you want Windows to be the default entry.

    Scroll towards the bottom of the file, you should see a section similar to this:

    # This entry automatically added by the Debian installer for a non-linux OS
    # on /dev/sda1
    title Microsoft Windows XP Home Edition
    root (hd0,0)
    savedefault
    makeactive
    chainloader +1

    Select this whole section and choose Edit > Cut.

    Scroll back up to find a line like this:

    #
    # Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

    Just after that line, but before BEGIN AUTOMAGIC KERNEL LIST, use Edit > Paste to put the Windows entry above all the Ubuntu entries.

    Save the file and quit the editor. Assuming you did the process correctly, when you reboot, Windows should be at the top of the list and the default boot option. To start Linux, simply press down once and then Enter!

    If you did run into problems, you can restore the functionality of Windows by booting the computer with the Windows XP CD in, choosing to go into the Recovery Console and typing fixmbr at the prompt. Linux can then be fixed by re-running the GRUB install from a Live CD.


    KDE Tip - Switching NumLock On at the KDE Login Screen

    Back last month I covered a quick KDE tip on how to set the Num Lock key on when you log in to KDE.

    While that generally works, it doesn't cover the KDE login screen (or KDM).

    You might wonder why this is an issue, but I have found that on my Kubuntu Hardy system, if you don't have Num Lock on at the KDM screen, the keyboard Num Lock light will stay off when you log in to KDE. KDE will then dutifully turn Num Lock on, but the light won't go on for some reason.

    This results in the confusing state of having the Num Lock light on the keyboard display the opposite to what the current Num Lock status is.

    To fix this, you can set Num Lock on at the login screen, which toggles the light correctly.

    Unfortunately, I can't find any way to change this setting graphically, so here's how to do it through configuration files. The file you need to edit is kdmrc.

    The exact location of that file might vary according to your distribution. Here on Kubuntu it's /etc/kde3/kdm/kdmrc, but it might be in a share directory somewhere.

    Try this to find it:

    $ locate kdmrc

    Open that file up in a text editor. You will probably need to have administrator privileges, so press Alt-F2 and type this:

    kdesu kwrite /etc/kde3/kdm/kdmrc

    In that file, find the first section that begins:

    [X-*-Greeter]

    Right after that line, add this:

    NumLock=On

    Save the file and quit. To see your changes, you might need to restart KDM. The easy, but slower, way to do this is to restart the computer, but you can also try pressing Ctrl-Alt-Backspace to restart the graphics server which should bring KDM back up again.

    Num Lock should now be on at the login screen. Shame it had to be so complicated.