Configuring GRUB Loader

All threads related to any flava of Linux or BSD.
Post Reply
sh_ithe_ad
Sargeant at Arms
Posts: 244
Joined: Thu Dec 11, 2003 4:28 pm

Configuring GRUB Loader

Post by sh_ithe_ad » Fri Aug 01, 2008 10:03 am

I installed XP on top of Ubuntu and it wiped out the MBR and booted XP automatically so I edited the GRUB loader from the Ubuntu live CD then it did the opposite and automatically booted Ubuntu without giving the option to boot Windows so I started playing around with the GRUB config file on Ubuntu and whatever way I set it it works better than ever now. Now when it boots up it gives me 3 seconds to click ESC then it automatically boots up XP but if I press escape it gives me the option of booting up Ubuntu.

This is exactly what I was looking for now people who don't know shit about computers will get sent to XP when they turn on my comp so they wont F*** up Ubuntu.

This is all I edited. It was automatically booting up Ubuntu and not letting me into XP so I added these lines

Code: Select all

 title		Windows XP
 root		(hd0,1)
 makeactive
 chainloader	+1
How does Ubuntu usually configure this file when you install it on top of XP? It definitely configures it differently because usually the menu comes up first then it starts counting down and if you don't select an OS it selects Ubuntu for you. The way I have it now is better but I'm just wondering what Ubuntu does different when you install it.

One other thing it gives me these 3 options for Ubuntu
Ubuntu 8.04.1, kernel 2.6.24-19-generic
Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode)
Ubuntu 8.04.1, memtest86+

Isn't there usually a 4th option? The first one works fine but I thought I remembered there being a regular Ubuntu 8 option.

User avatar
pozican
Oh lawd is dat sum chikinz
Posts: 1617
Joined: Tue May 18, 2004 1:29 pm
Location: #hackerthreads

Re: Configuring GRUB Loader

Post by pozican » Sun Aug 03, 2008 1:21 am

Normally the typical option just means that ubuntu is the default instead of xp.

You can actually change this in a menu in gnome.

-poz
Get some exercise -- Support bad porn
Life for President, Ramius for vice, GhostHawk for Secretary of Beer
i <3 2 sqrt(u)

User avatar
foldingstock
htd0rg lieutenant
Posts: 300
Joined: Sat Aug 16, 2008 10:38 pm

Re: Configuring GRUB Loader

Post by foldingstock » Sun Aug 17, 2008 7:48 am

From /boot/grub/menu.lst:
## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
hiddenmenu

timeout 2
Adding the above will make it hide the grub menu and boot the default in 2 seconds. Pressing escape within that 2 second time period will take you to the normal grub menu.
"If a man empties his purse into his head, no one can take it from him."
- Benjamin Franklin

User avatar
Thor
htd0rg lieutenant
Posts: 440
Joined: Tue Dec 18, 2007 9:39 am
Location: Location Location

Re: Configuring GRUB Loader

Post by Thor » Sun Aug 17, 2008 10:44 pm

sh_ithe_ad wrote:I installed XP on top of Ubuntu and it wiped out the MBR and booted XP automatically so I edited the GRUB loader from the Ubuntu live CD then it did the opposite and automatically booted Ubuntu without giving the option to boot Windows so I started playing around with the GRUB config file on Ubuntu and whatever way I set it it works better than ever now. Now when it boots up it gives me 3 seconds to click ESC then it automatically boots up XP but if I press escape it gives me the option of booting up Ubuntu.

This is exactly what I was looking for now people who don't know shit about computers will get sent to XP when they turn on my comp so they wont F*** up Ubuntu.

This is all I edited. It was automatically booting up Ubuntu and not letting me into XP so I added these lines

Code: Select all

 title		Windows XP
 root		(hd0,1)
 makeactive
 chainloader	+1
How does Ubuntu usually configure this file when you install it on top of XP? It definitely configures it differently because usually the menu comes up first then it starts counting down and if you don't select an OS it selects Ubuntu for you. The way I have it now is better but I'm just wondering what Ubuntu does different when you install it.

One other thing it gives me these 3 options for Ubuntu
Ubuntu 8.04.1, kernel 2.6.24-19-generic
Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode)
Ubuntu 8.04.1, memtest86+

Isn't there usually a 4th option? The first one works fine but I thought I remembered there being a regular Ubuntu 8 option.

Heres my GRUB config:

Code: Select all

default 0
timeout 30
splashimage=(hd0,0)/grub/splash.xpm.gz
title=Gentoo Linux (2.6.24-gentoo-r8)
root (hd0,0)
kernel /kernel-genkernel-x86-2.6.24-gentoo-r8 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sda3  doscsi
initrd /initramfs-genkernel-x86-2.6.24-gentoo-r8
title=Gentoo Linux
root (hd0,0)
video=uvesafb:1024x768-32@60,(mtrr:3,ywrap)
Notice the timeout option set to 30......that's 30 seconds yo..Change yo timeout variable or add it if it's not there then put like..sheeeyat 30 seconds yo. You can even put them fancy graphicals and stuff in thar.

Also: From experience and what you will always probably here, It is easier to install Windows first then Linux. especiallly with a distro like Ubuntu.

Possibly start over with it first. Not like your uber secret docs need to stay where they are right? Why does Ubuntu do what it does? Who knows, it does alot for you without knowing what's up. I used to dual boot but screw it. Get a cheap PC from craigslist for your windows needs. I don't see the need to mix the two unless you have a small workspace and can only have 1 PC. Especially with apps like Wine. Windows only good for honeypot...Or testing...

To top it off your problem of Windows booting autoly 1st is because of doing Nix on Windows. The setup of Ubuntu should have added windows to the boot options screen if it was a dual boot system with windows first.

EDIT: looks like you wanted that?

You can have a 4th option if you upgraded your kernel and did not remove the old kernel. It's good practice to keep it for a short while after doing so to make sure things work right.

Man, I have odd forms of PC's and Linux laying around. leme tell ya. Most people if allowed to touch (under careful supervision) don't even know wtf Linux is or how to navigate the more obscure Linux desktops. No need to worry..........Ever looked into hidden partitions instead?
Quidquid latine dictum sit, altum sonatur.
- Whatever is said in Latin sounds profound.

Omnis Vestri Substructio Es Servus Ad Nobis.
- All Your Base Are Belong To Us

Post Reply