LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-20-2010, 10:18 AM   #1
N_A_B
LQ Newbie
 
Registered: Jul 2010
Location: Saratov, Russia
Distribution: UBUNTU 10.04 64
Posts: 9

Rep: Reputation: 0
Problem with dual boot UBUNTU 10.04-Windows 7:no such device no such partition


Hello all.

I have 2 drives, in one is Ubuntu, in other is Windows 7.
First i had only Win7 on 1th disk, then i installed Ubuntu( on hard drive 2) and it was so nice so i delete Win7.
But now i need to use something under Win7.

I had installed it on 1th drive, but then only windows can be used.
If i change my drives( physically- change data cables on motherboard)- then Ubuntu is loaded, but in GRUB menu then i try to load Win7 error appear:

NO such device XXXXXXXXXXX( as i understand- UUID)
No such partition

What should i do?

I assume 3 options:
a. Make Grub( i think in UBUNTU 10.04 it is Grub2) load Win7( i prefer this option)
b. Make Windows loader able to load Ubuntu
c. Install other loader( Lilo etc).

I am absolutely newbie.

Thanks

Last edited by N_A_B; 10-20-2010 at 11:31 AM.
 
Old 10-20-2010, 10:28 AM   #2
hairysocks
Member
 
Registered: May 2002
Location: Thorverton, Near Exeter, Devon, England
Distribution: Ubuntu 10.04 (used to be Red Hat 7.1, then Red Hat 9, then FC 2, FC 5, FC 6, FC 9 and Ubuntu 8.04)
Posts: 105

Rep: Reputation: 16
Option (a) is best. You should reinstall Ubuntu. It should ask you during the installation if you want to keep the existing Windows installation and you should be able to set up grub so it provides you with a boot menu with Ubuntu and Windows.
 
Old 10-20-2010, 10:29 AM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,485

Rep: Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485
Reinstalling windows 7 and switching drives probably created the problem. Since you can boot Ubuntu, do that. Open a terminal and run the command: sudo fdisk -l (Lower Case Letter L in command); you should be prompted for your user password, enter the password and hit the enter key. You should then get output which will be your partition information. Post that here and someone familiar with Grub2 should be able to tell you what to do.
 
Old 10-20-2010, 11:28 AM   #4
N_A_B
LQ Newbie
 
Registered: Jul 2010
Location: Saratov, Russia
Distribution: UBUNTU 10.04 64
Posts: 9

Original Poster
Rep: Reputation: 0
Here it is output of
sudo fdisk -l
It was in Russian, so i translated it. Mistakes is possible.

Quote:
WARNING: GPT (GUID Partition Table) detected on '/dev/sdf'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdf: 500.1 ГБ, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x262a16a0

Device load begin end blocks Id system
/dev/sdf1 1 60802 488386583+ ee GPT

disk /dev/sdg: 250.1 ГБ, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xfd25c696

Device load begin end blocks Id system
/dev/sdg1 1 6445 51768320 7 HPFS/NTFS
/dev/sdg2 * 6446 30401 192426570 7 HPFS/NTFS
I think- it is much more easer to reinstall GRUB2 then the whole system

Last edited by N_A_B; 10-20-2010 at 12:06 PM.
 
Old 10-20-2010, 12:14 PM   #5
zhaozhou
LQ Newbie
 
Registered: Oct 2009
Location: Sweden
Distribution: Gentoo
Posts: 23

Rep: Reputation: 1
No need to reinstall GRUB if you can boot into Ubuntu with Grub while your Windows disc is connected, then you can make grub boot Windows by changing your grub.conf.

First of all though, sdf and sdg? Where is your sda, b, c, d and e?
 
Old 10-20-2010, 01:04 PM   #6
N_A_B
LQ Newbie
 
Registered: Jul 2010
Location: Saratov, Russia
Distribution: UBUNTU 10.04 64
Posts: 9

Original Poster
Rep: Reputation: 0
Actually- i don't know.
But there are only 2 drives( there are 2 other- there are flash-drives)
 
Old 10-21-2010, 05:56 AM   #7
N_A_B
LQ Newbie
 
Registered: Jul 2010
Location: Saratov, Russia
Distribution: UBUNTU 10.04 64
Posts: 9

Original Poster
Rep: Reputation: 0
Here it is menu entry for Windows in grub.cfg :

Code:
menuentry "Windows 7 (loader) (on /dev/sdg2)" {
	insmod ntfs
	set root='(hd1,2)'
	search --no-floppy --fs-uuid --set ba0a985a0a98160b
	chainloader +1
 
Old 10-21-2010, 12:01 PM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,485

Rep: Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485
Quote:
WARNING: GPT (GUID Partition Table) detected on '/dev/sdf'! The util fdisk doesn't support GPT. Use GNU Parted.
Did you try this? If you can boot Ubuntu (or use its Live CD) open a terminal and find GParted to get accurate information. You should be able to access GParted from one of the tabs at the top of the Desktop (Applications, System). I don't use Ubuntu so I'm not sure where it is. You can then post the partition information.

Quote:
then you can make grub boot Windows by changing your grub.conf.
I don't think you will have a grub.conf file. If you are using an Ubuntu verson newer than 9.04, it uses Grub2 and the file would be /boot/grub/grub.cfg which you are not supposed to edit manually.

Are both drives internal drives?
If not, do you plan to keep both attached at all times? You probably have windows on the second drive and in that case, you will need to put map entries for it in the Grub file. Probably the easiest thing to do would be to set the windows drive as first, install Grub to its mbr to boot windows and Ubuntu if you plan on using Ubuntu more.
 
Old 10-21-2010, 05:33 PM   #9
zhaozhou
LQ Newbie
 
Registered: Oct 2009
Location: Sweden
Distribution: Gentoo
Posts: 23

Rep: Reputation: 1
Try this out.

Code:
title "Windows"
    rootnoverify (hd1,2)
    makeactive
    chainloader +1
 
Old 10-22-2010, 10:16 AM   #10
N_A_B
LQ Newbie
 
Registered: Jul 2010
Location: Saratov, Russia
Distribution: UBUNTU 10.04 64
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Try this out.

Code:

title "Windows"
rootnoverify (hd1,2)
makeactive
chainloader +1

Error appear:
unknown command rootnoverify
unknown command makeactive
may these commands are from GRUB, not from GRUB2?

Both drive is internal and will live in my PC

How can you print off output from GParted to past it here?

Next question- yes, i know how to add Grub in MBR, make drive with Windows first. But it will not help- Ubuntu will load, Windows not: error no such device will appear ( i tried this way)

About grub.cfg- i can edit it manually, but after update-grub everything will be canceled. It is not so important.
 
Old 10-22-2010, 11:15 AM   #11
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,485

Rep: Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485
Quote:
How can you print off output from GParted to past it here?
I don't have GParted so can't check. What are the drives named as in GParted? Do they show as sdf and sdg? Try running GParted with only the internal hard drives, remove any usb or Sd cards. If you can't copy/paste just note the drive names (sda, sdb??) and post. You have tried grub-update, did you try to re-install Grub?
 
Old 10-22-2010, 11:34 AM   #12
N_A_B
LQ Newbie
 
Registered: Jul 2010
Location: Saratov, Russia
Distribution: UBUNTU 10.04 64
Posts: 9

Original Poster
Rep: Reputation: 0
sdf and sdg

I tried to re-install GRUB. Nothing new.
 
Old 10-22-2010, 12:59 PM   #13
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,485

Rep: Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485Reputation: 2485
Questions:

You have windows 7 installed on one hard drive and cannot boot it?
If you set the windows 7 drive to first boot priority in BIOS, it boots?
You have Ubuntu installed on a separate hard drive and CAN boot it?
What command did you use to re-install Grub?
Did you do it from the installed Ubuntu?
or; did you do it from the CD?

Your drives showing as sdf and sdg is a bit unusual, particularly since you didn't have any usb or SD cards connected.

To find out how Grub sees your drives, with only the two hard drives attached, boot Ubuntu and open a terminal to get a grub prompt:

sudo grub (hit enter key and you should see this prompt: grub>)
At the grub prompt, enter: geometry (hd0) hit enter to see output.
Repeat this command and increase the number zero(0) to one. This should show output similar to the fdisk and tell you how Grub sees the drives. If you don't see any output from these two, repeat up to (hd7) which would be the equivalent of sdg.

In your first post you indicated the error when trying to boot windows was "No such device/partition" with a UUID. From a terminal as root (not the grub prompt) run the command blkid, see if you have a partition with the UUID in the error. If you haven't written the UUID down, you will need to try booting windows again to get it.
 
Old 10-22-2010, 02:57 PM   #14
N_A_B
LQ Newbie
 
Registered: Jul 2010
Location: Saratov, Russia
Distribution: UBUNTU 10.04 64
Posts: 9

Original Poster
Rep: Reputation: 0
Many thanks to all.

I solved it!

Solution is very simple:
add to /etc/default/grub

1 string:
Code:
GRUB_PRELOAD_MODULES="part_msdos"
and run:
update grub

this is all.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu 7.10 Dual Boot with XP, ubuntu partition deleted, grub 1.5 error 22 narchy Linux - Newbie 11 02-07-2011 03:54 AM
partioning problem with windows and ubuntu 10.10 dual boot noncomputergeek Linux - Newbie 1 10-16-2010 12:50 AM
Dual Boot: Ubuntu and Windows XP problem RM33 Linux - Software 1 05-08-2009 08:14 AM
Dual boot problem-windows xp nd ubuntu pankaj9999 Linux - Software 1 12-29-2008 12:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:17 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