LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 07-03-2011, 09:10 PM   #1
Francoo
LQ Newbie
 
Registered: Jun 2011
Posts: 6

Rep: Reputation: Disabled
Grub problem on dual-booting with Ubuntu 11.04 and Windows


Hello.

I`m trying to make Dual-Boot on my machine.
Firstly I installed Ubuntu, but, when I installed Windows, the Grub don`t shows anymore, and starts directly the Windows.
I searched on the internet and I find that I have to reinstall the Grub.

Here are the problems:
My OS is Ubuntu 11.04, that comes with Grub 2.0

On the Live-CD (Pen drive) firstly I mounted the HD partition:
Code:
sudo -i
mount /dev/sda1 (I checked with fdisk) /mnt
I checked and it's everything correct.

Now, on the terminal I open Grub console:
Code:
grub
find /boot/grub/stage1
root (hd0,0)
setup (hd0)
done
The "setup (hd0)" out is this:
Code:
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  17 sectors are embedded.
succeeded
 Running "install /boot/grub/stage1 (hd0) (hd0)1+17 p (hd0,0)/boot/grub/stage2 /boot/grub/menu.ls
t"... succeeded
Done.
Now I restart my PC and instead of showing the menu, it shows the grub console, as I had open in a terminal.

I restarted my PC again and entered the Ubuntu Live-CD.

This time I mounted the partition and typed in the terminal:
Code:
grub-install --root-directory=/mnt /dev/sda1
Output:

Code:
Installing GRUB to /dev/sda1 as (hd0,0)...
Installation finished. No error reported.
This is the contents of the device map /mnt/boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(fd0)	/dev/fd0
(hd0)	/dev/sda
(hd1)	/dev/sdb
Again, I restarted my PC but stills shows only the console.

Can anyone help me please?
 
Old 07-03-2011, 10:19 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,318

Rep: Reputation: 1033Reputation: 1033Reputation: 1033Reputation: 1033Reputation: 1033Reputation: 1033Reputation: 1033Reputation: 1033
Your second attempt is closer - but you may have made a mess of that partition too now. You should have used
Code:
grub-install --root-directory=/mnt /dev/sda
But why are you installing grub1 ?. From the liveUSB run these and post the output
Code:
lsb_release -a
grub-install -v
 
Old 07-03-2011, 10:31 PM   #3
iolpiolp8
LQ Newbie
 
Registered: Jul 2011
Location: Somewhere
Distribution: Ubuntu 11.04
Posts: 1

Rep: Reputation: Disabled
When I was dual booting (Thats over with now), I first had windows installed, then created the necessary partition within windows. Thats a personal pref though, I guess if you really only use windows for a small number of things, you may want Ubuntu. After I was done with the install though, It gave me the option right when I started up my computer.
 
Old 07-04-2011, 12:18 AM   #4
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 5,679

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
With Ubuntu if you have windows installed, already you can either free-up some space & use unallocated space for install, then Ubuntu wil install boot loader.

Nice machine.
I would like to add as an after thought, the motherboard you have has sata,if you're uncomfortable with dual-boot you can add an extra sata hdd & disable the other while you're installing Ubuntu, then enable the other drive, set ubuntu drive to have boot priority, reboot into Ubuntu open terminal issue command
Quote:
update-grub
It finds windows & you have dual-boot without touching mbr of wins drive.

Last edited by EDDY1; 07-04-2011 at 12:29 AM.
 
Old 07-04-2011, 12:47 PM   #5
Francoo
LQ Newbie
 
Registered: Jun 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
Your second attempt is closer - but you may have made a mess of that partition too now. You should have used
Code:
grub-install --root-directory=/mnt /dev/sda
But why are you installing grub1 ?. From the liveUSB run these and post the output
Code:
lsb_release -a
grub-install -v
Here is the output:

Code:
root@ubuntu:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 11.04
Release:	11.04
Codename:	natty
root@ubuntu:~# grub-install -v
grub-install (GRUB) 1.99~rc1-13ubuntu3
I will use the Windows Partition for games and some video editing stuff, so I really can't use only Ubuntu (I would love to).
 
Old 07-04-2011, 01:02 PM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047
Since this is a new setup I would recommend to do it from the beginning. But this time I would recommend to install Windows first into the first partition, after that install Ubuntu. Some Windows versions don't like to not be in the first primary partition, Windows 7 normally also creates a small boot partition which can be rather confusing.
 
1 members found this post helpful.
Old 07-04-2011, 01:20 PM   #7
Francoo
LQ Newbie
 
Registered: Jun 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TobiSGD View Post
Since this is a new setup I would recommend to do it from the beginning. But this time I would recommend to install Windows first into the first partition, after that install Ubuntu. Some Windows versions don't like to not be in the first primary partition, Windows 7 normally also creates a small boot partition which can be rather confusing.
If that is the only way... =/
Okay then...

Just to confirm, firstly I install Windows and then Ubuntu, right? Can I firstly create the partitions and then install or I have to create them on windows installer?
Also, do you recommend creating a separate partition for /home and /boot? There is any reason for doing that way?
Lastly, at least there will be 3 partition: Windows, Linux and Swap, do I need to create another for the Win? Or he itself will create the swap/any other?

Sorry for the large quantity of questions, I do not want to do wrong again.
 
Old 07-04-2011, 01:33 PM   #8
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 5,679

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
Quote:
Just to confirm, firstly I install Windows and then Ubuntu, right? Can I firstly create the partitions and then install or I have to create them on windows installer?
Also, do you recommend creating a separate partition for /home and /boot? There is any reason for doing that way?
Lastly, at least there will be 3 partition: Windows, Linux and Swap, do I need to create another for the Win? Or he itself will create the swap/any other?
Yes you install windows first, If you have windows installation disk there is an option to erase partitions, erase partitions and create a new 1,, but leave empty space for your Ubuntu installation.
When you install Ubuntu choose the free space & Ubuntu will create it's own partition.
 
Old 07-04-2011, 01:35 PM   #9
Arcane
Member
 
Registered: May 2006
Location: Latvia, Europe
Distribution: random
Posts: 287

Rep: Reputation: 164Reputation: 164
Quote:
Originally Posted by Francoo View Post
{...}Just to confirm, firstly I install Windows and then Ubuntu, right? Can I firstly create the partitions and then install or I have to create them on windows installer?{...}
Yes. First install Windows then Linux. Yes you can and need first create partitions if you haven't done it yet. Ubuntu Live CD mode should include GParted already for this task.
Quote:
{...}Also, do you recommend creating a separate partition for /home and /boot? There is any reason for doing that way?{...}
Just if you need it. It's basically setup where system is on one partition and personal files on other. Usefull when reinstalling OS or on system error.
Quote:
{...}Lastly, at least there will be 3 partition: Windows, Linux and Swap, do I need to create another for the Win? Or he itself will create the swap/any other?{...}
Windows needs one primary partition formatted as NTFS. Linux can use more and swap is extended memory for Linux OS. Think of it as extended memory or backup memory in case normal one runs low. If you have enough memory like 1-2 or more GB RAM you don't really need one as rule unless something specific may happen. In that case make swap same size as your normal RAM.
 
Old 07-04-2011, 01:53 PM   #10
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047
It is essential to know which version of Windows you install. XP and Vista will only need one partition, 7 will automatically create two. So do it like EDDY1 one wrote, delete all partitions and create a new one on a part of the disk, using the Windows installer. Let the Ubuntu installer create Ubuntu's partitions in the free space.
 
1 members found this post helpful.
Old 07-04-2011, 03:12 PM   #11
Francoo
LQ Newbie
 
Registered: Jun 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
Okay. Thanks for the help guys!
 
  


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
Dual-Booting With Ubuntu Using Grub 2 And A Truecrypt Windows Installation Cotun Linux - Software 8 07-06-2012 02:20 PM
[SOLVED] grub rescue: "error: unknown filesystem" when booting Windows XP / Ubuntu dual boot LittleRatRottenHut Linux - Laptop and Netbook 9 02-01-2011 08:32 PM
Problem with dual booting Ubuntu and windows xp ceon2002 Linux - General 8 06-12-2008 09:43 PM
Problem with grub dual booting windows xp and ubuntu 7.04 Frozen.past Linux - Newbie 36 01-31-2008 08:49 AM
Problem dual-booting into windows xp with Grub justintime32 Debian 4 03-26-2005 12:27 PM


All times are GMT -5. The time now is 12:08 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration