LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 07-29-2008, 10:55 PM   #1
maiden2
Member
 
Registered: Dec 2007
Location: Italy
Distribution: Ubuntu 8.10
Posts: 106

Rep: Reputation: 15
grub problem with dual-boot


hallo experts,

since I had to reinstall Hardy, it became impossible for me to obtain the same old grub configuration with dual boot (win xp, ubuntu 8.04).

I have 2 HDD, in the first I've got a win xp O.S., in the 2 HDD I've just re-installed the Hardy Heron

Without any reason (but I could made some mistakes trying to work with the windows boot.ini...) the new ubuntu setup, did not found win xp while performing the setup process, and when I start the PC now it automatically start with ubuntu (no dual boot chose, and also no the other tipical ubuntu grub options like memtest+, safe mode start ecc, )

my actual "menu.lst" is this:

title Ubuntu 8.04.1, kernel 2.6.24-19-generic
root (hd1,1)
kernel /vmlinuz-2.6.24-19-generic root=UUID=2db85b1a-1025-4794-aa21-31f930ea5d17 ro quiet splash
initrd /initrd.img-2.6.24-19-generic
quiet

title Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode)
root (hd1,1)
kernel /vmlinuz-2.6.24-19-generic root=UUID=2db85b1a-1025-4794-aa21-31f930ea5d17 ro single
initrd /initrd.img-2.6.24-19-generic

title Ubuntu 8.04.1, memtest86+
root (hd1,1)
kernel /memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST



but with this grub configuration, when I start the PC, Ubuntu starts automatically, without any grub option list appearing to be chosen, so it is impossible for me to swith to windows instead of ubuntu...


to get the windows access, I had to modify this menu, adding the win entry like this:


title Microsoft Windows XP
root (hd0,0)
makeactive
chainloader +1

title Ubuntu 8.04.1, kernel 2.6.24-19-generic
root (hd1,1)
kernel /vmlinuz-2.6.24-19-generic root=UUID=2db85b1a-1025-4794-aa21-31f930ea5d17 ro quiet splash
initrd /initrd.img-2.6.24-19-generic
quiet

etc...

### END DEBIAN AUTOMAGIC KERNELS LIST



but in this second case when I start the pc, it automatically goes with windows, no dual boot chose, and no any grub menu selection list, it automatically start the windows like no other O.S. exist on the same machine.

please, is there anyone that could help me to rebuild the same old grub configuration, with my old tipical options? (ubuntu, safe mode ubuntu, memtest+ and windows)?

thank you in advance
 
Old 07-29-2008, 11:35 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,961

Rep: Reputation: 2595Reputation: 2595Reputation: 2595Reputation: 2595Reputation: 2595Reputation: 2595Reputation: 2595Reputation: 2595Reputation: 2595Reputation: 2595Reputation: 2595
If you are not getting the Grub menu on boot, you probably have the hiddenmenu option on. Boot Ubuntu, log in as root (sudo) and go to the menu.lst file and see if there is a line near the top which says "hiddenmenu" and put a hash mark (#) to the left of it. I'm assuming what you posted of your menu.lst was not all of it as the Ubuntu is considerable longer and has a lot of ## entries at the beginning.
 
Old 07-30-2008, 11:29 PM   #3
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
yancek

love your work

sweet maiden

your menu shows a linux structure of
kernel /vmlinuz blah blah
initrd /initrd blah blah

That suggests to me, that you have a separate /boot partition in grub speak (hd1,1) or the second partition.

normally if you create a separate /boot partition....good distros should advise to make it the first partition or (hd1,0)

but as it works I do not want you to change...but for future reference...you control the install and partition tools not the distro eh?

good luck

Last edited by aus9; 07-30-2008 at 11:30 PM.
 
Old 07-31-2008, 06:42 AM   #4
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
aus9 and yancek you missed his question, with the modified menu lst he still does not have an option of boot. Instead of having ubuntu boot automatically now windows does since the modification. There are only a couple of things that I could think of is either you switched hd boot order in bios or your timeout is set at a real low number. I would say it is the first option if you could post 'fdisk -l' command from terminal of ubuntu running as a live cd.

Last edited by Larry Webb; 07-31-2008 at 06:45 AM.
 
Old 07-31-2008, 08:30 AM   #5
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
fair enough...I followed yancek's thinking....that he posted a short version of the menu.

lets start again.

assuming you have no time ...and you are automatically taken to windows follow options B

Option A
assumes you are automatically taken into linux

with root powers...edit that pesky menu to add a countdown clock

right at the top add these lines please

default 0
timeout 5
color cyan/blue white/blue

-----
default grub counts from zero so if you want linux change that by counting down the number of titles to the relevant menu item...that are not commented by the # symbols

timeout 5 means countdown from 5 seconds and if nothing changes (by using pressing arrow down...or pressing c or e or enter key ) boot the highlighted entry.

the colours (US spelling) will give you a nice contrast so you know what your default is.

-----------------------------------

the menu items to be discussed later
------------------------------
OPTON B
You are here because you are booted automatically into windows

The easiest is to use a live cd. Do you have one?
Using the live cd run qtparted or gparted or any other good graphical partition tool to find what filesystem formats are on hd1,0 and hd1,1

Since you have not replied....but microsoft has a browser?
I will assume /boot is on hd1,1 = your second drive partition 2

but the live cd can look at your /etc/fstab.

once you know the format...ext3 is likely

you can mount the partition to read/write status to edit it.

eg

Code:
mkdir /a
mount -t ext3 /dev/sdb2 /a
change ext3 to your correct format
change sdb2 to sdb1 if you are sure I am wrong and /boot is on sdb1
change sd to hd if live cd is old and uses hd format.

Now if live cd has a good text editor....just edit by copy and paste

otherwise use vi

eg

vi /a/grub/menu.lst

(if /boot is a sub-folder...because I am wrong change that to)

vi /a/boot/grub/menu.lst

press I for insert and use arrow keys to navigate around ...or delete and add text....once finished do this

Press Escape key to get to vi command mode then type and press enter for next bit

:wq!

reboot and see if it works

------

If you are wondering why none of us have helped you with the memtest stuff...its because that is minor issue....lets fix your main issue first and that means at some point time you may like to reply to put me out of my misery.

good luck

Option C is to use your linux install cd in rescue mode but I do not like it.

Last edited by aus9; 07-31-2008 at 08:36 AM.
 
Old 08-02-2008, 06:04 AM   #6
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 293Reputation: 293Reputation: 293
Quote:
Originally Posted by maiden2 View Post
to get the windows access, I had to modify this menu, adding the win entry like this:


title Microsoft Windows XP
root (hd0,0)
makeactive
chainloader +1

title Ubuntu 8.04.1, kernel 2.6.24-19-generic
root (hd1,1)
kernel /vmlinuz-2.6.24-19-generic root=UUID=2db85b1a-1025-4794-aa21-31f930ea5d17 ro quiet splash
initrd /initrd.img-2.6.24-19-generic
quiet

etc...

### END DEBIAN AUTOMAGIC KERNELS LIST



but in this second case when I start the pc, it automatically goes with windows, no dual boot chose, and no any grub menu selection list, it automatically start the windows like no other O.S. exist on the same machine.
In addition to the suggestions posted by others, you should put the Windows entry outside of the "Debian Automagic Kernels List". If you want Windows to be the 1st option on the grub menu, put Windows before the Debian kernels list. If you want Ubuntu to be the 1st option, put Windows after the Debian kernels list. If all else fails you could try reinstalling grub with the Ubuntu live CD:
http://users.bigpond.net.au/hermanzo...b_with_Live_CD
Hermans site has an excellent grub tutorial:
http://users.bigpond.net.au/hermanzone/p15.htm
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
grub dual boot problem fakie_flip Linux - Software 1 01-10-2008 06:35 AM
Dual-boot problem 'cause of GRUB MichaelYoung Debian 14 05-24-2007 12:16 AM
GRUB dual boot problem: Boot "other" (windows) just restarts GRUB! stevod333 Linux - Software 13 04-06-2006 06:26 AM
Dual boot Grub problem russviolet Fedora - Installation 5 09-24-2005 10:10 PM
Grub Dual Boot Problem zutanoz Linux - Newbie 1 09-22-2003 07:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 10:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration