LinuxQuestions.org
Visit Jeremy's Blog.
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 12-30-2011, 06:08 AM   #1
Aagam
LQ Newbie
 
Registered: Dec 2011
Posts: 25

Rep: Reputation: Disabled
Problems with setiing up dual boot between UBUNTU AND WINDOWS


since a few days i ve trying to setup dual boot between UBUNTU 11.10 and WINDOWS 7. i ve tried many things one of which is as following from a live cd
Code:
root (hd0,0)
setup (hd0)
exit
in this when i execute second line in grub prompt i get
Code:
cannot setup mentioned partition
in another one i.e.
Code:
sudo mount /dev/sda1 /boot
sudo apt-get update && sudo apt-get install grub-pc
sudo grub-setup /dev/sda
sudo umount /boot
here in second line i get
Code:
grub-setup: error: cannot stat /boot/grub/
my windows partion is /dev/sda1 and ubuntu partion is /dev/sda8
i first installed ubuntu and then windows....
i ve not used dual boot before so i am new to it and so expect an answer in detail....
THNX...
 
Old 12-30-2011, 06:17 AM   #2
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Centos6.3/Debian
Posts: 2,195
Blog Entries: 1

Rep: Reputation: 327Reputation: 327Reputation: 327Reputation: 327
Hi

As you have just installed the OS,s it might make it easier to reinstall loading windows 1st then Ubuntu. That way grub sorts out the problem of loading both systems.
 
Old 12-30-2011, 06:48 AM   #3
Roken
Member
 
Registered: Oct 2011
Location: Bolton, UK
Distribution: Arch local, Debian on VPS
Posts: 258

Rep: Reputation: 41
Quote:
Originally Posted by Aagam View Post
in another one i.e.
Code:
sudo mount /dev/sda1 /boot
sudo apt-get update && sudo apt-get install grub-pc
sudo grub-setup /dev/sda
sudo umount /boot
here in second line i get
Code:
grub-setup: error: cannot stat /boot/grub/
Your mount is making everything wrong. You are mounting /dev/sda1 in boot, which places the full sda1 filesystem in /boot, and so grub can't find it. (you effectively have /boot/boot/grub when grub expects to find /boot/grub).

I assume that you are doing this all from a live CD and that Ubuntu is on /dev/sda1, so try:

Code:
sudo mount /dev/sda1 /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/sda

 
Old 12-30-2011, 07:02 AM   #4
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
Quote:
Originally Posted by Roken View Post
I assume that you are doing this all from a live CD and that Ubuntu is on /dev/sda1, so try:

Code:
sudo mount /dev/sda1 /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/sda

Yet, the OP states in the first post that windows is on sda1 and ubuntu is on sda8
Quote:
Originally Posted by Aagam View Post
my windows partion is /dev/sda1 and ubuntu partion is /dev/sda8
EDIT: just follow the ubuntu docs and you should bo OK.

https://help.ubuntu.com/community/Re...tallingWindows

Last edited by andrewthomas; 12-30-2011 at 07:09 AM.
 
Old 12-30-2011, 07:07 AM   #5
Roken
Member
 
Registered: Oct 2011
Location: Bolton, UK
Distribution: Arch local, Debian on VPS
Posts: 258

Rep: Reputation: 41
Ahh, I missed that. OK, small revision:
Code:
sudo mount /dev/sda8 /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/sda
 
1 members found this post helpful.
Old 12-30-2011, 12:52 PM   #6
Aagam
LQ Newbie
 
Registered: Dec 2011
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
As you have just installed the OS,s it might make it easier to reinstall loading windows 1st then Ubuntu. That way grub sorts out the problem of loading both systems.
i agree...but its not that. I have used ubuntu for much of the time earlier and have some imoportant things on it...however thnx


Quote:
sudo mount /dev/sda8 /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/sda
i did that.....but now only ubuntu boots....i want both...plz tell me how to get that.
 
Old 12-30-2011, 01:37 PM   #7
Roken
Member
 
Registered: Oct 2011
Location: Bolton, UK
Distribution: Arch local, Debian on VPS
Posts: 258

Rep: Reputation: 41
Boot Ubuntu as normal then run
Code:
sudo update-grub
It should find Windows and add it to the boot menu.
 
1 members found this post helpful.
Old 12-30-2011, 03:45 PM   #8
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Centos6.3/Debian
Posts: 2,195
Blog Entries: 1

Rep: Reputation: 327Reputation: 327Reputation: 327Reputation: 327
try
Code:
sudo update-grub
 
Old 12-31-2011, 03:54 AM   #9
Aagam
LQ Newbie
 
Registered: Dec 2011
Posts: 25

Original Poster
Rep: Reputation: Disabled
i used this
Code:
sudo update-grub
and i get the following
Code:
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-3.0.0-13-generic
Found kernel: /boot/vmlinuz-3.0.0-12-generic
Found GRUB 2: /boot/grub/core.img
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done
windows is not being listed here...

Last edited by Aagam; 12-31-2011 at 03:56 AM.
 
Old 12-31-2011, 04:11 AM   #10
blue_print
Member
 
Registered: May 2010
Location: In world
Distribution: RHEL, CentOS, Ubuntu
Posts: 275
Blog Entries: 3

Rep: Reputation: 50
OK.. Can you try adding the entries manually in GRUB Configuration file and see if you can booth the Windows?

Quote:
title Windows
rootnoverify (hd0,0)
chainloader +1
 
Old 12-31-2011, 09:16 AM   #11
Aagam
LQ Newbie
 
Registered: Dec 2011
Posts: 25

Original Poster
Rep: Reputation: Disabled
Code:
title Windows
rootnoverify (hd0,0)
chainloader +1
i tried that but then too ubuntu boots directly....BTW this is my menu.lst file...maybe, i can help..
Code:
### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=9ed5964e-61ff-4785-a755-bd2d60483b87 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=9ed5964e-61ff-4785-a755-bd2d60483b87

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
##      lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
##      indomU=true
##      indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

title Windows
rootnoverify (hd0,0)
chainloader +1
 
Old 12-31-2011, 09:25 AM   #12
Roken
Member
 
Registered: Oct 2011
Location: Bolton, UK
Distribution: Arch local, Debian on VPS
Posts: 258

Rep: Reputation: 41
Are you using grub legacy or grub 2? (grub 2 version is 1.99)
 
Old 12-31-2011, 10:25 AM   #13
Aagam
LQ Newbie
 
Registered: Dec 2011
Posts: 25

Original Poster
Rep: Reputation: Disabled
i think i was using grub
which uses "menu.lst"
but now i upgraded to grub2 and using grub.cfg i got dual boot
i did
Code:
sudo apt-get install grub2
sudo update-grub
and then it showed win7 in the menu
THNX EVERYBODY THERE....

Last edited by Aagam; 12-31-2011 at 11:35 AM.
 
  


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
I had a windows xp pro 64 & ubuntu 10.4 dual boot in which I had to reload windows. JEBUP2JE Ubuntu 2 09-24-2010 12:35 AM
Losing Windows boot on dual boot Windows/Ubuntu machine windows22 Linux - Newbie 32 08-30-2010 09:54 PM
Want to upgrade Windows Vista to Windows 7 on a Dual Boot machine Ubuntu/Winvista. hector3rd Linux - Desktop 6 08-07-2010 05:33 PM
Ubuntu/Windows dual boot Grub problems ryanxav Linux - Newbie 14 10-21-2007 01:00 PM


All times are GMT -5. The time now is 08:05 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration