Grub cant setup files

Asked by sooren_ir

i install windows after ubunto installs
now i want to setup grub and type this commands but i get this error:

grub> root (hd0,5)

grub> setup (hd0)
 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)"... failed (this is not fatal)
 Running "embed /boot/grub/e2fs_stage1_5 (hd0,5)"... failed (this is not fatal)
 Running "install /boot/grub/stage1 (hd0) /boot/grub/stage2 p /boot/grub/menu.l
st "... failed

Error 12: Invalid device requested

please help me!

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu grub Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Tom (tom6) said :
#1

Ok, try closing that by typing

quit

unless it's already closed. Then on a command-line try typing

sudo grub

I would guess that you missed off typing "sudo" last time?

Revision history for this message
sooren_ir (fardad-dv) said :
#2

tanx for your attention Tom
i did that, but still not working.
another problem is when i try to install ubuntu again, it not detect my partitions and windows operating system, it wants create new partition to install.

Revision history for this message
Tom (tom6) said :
#3

Ok, during install, when you get to the "Partitioning Section" try the "Manual" partitioning option. It should be the bottom of the 3 options there. I think the other 2 options each show a line diagram of how the partitions will look but the manual one doesn't have that kind of line. Most people don't notice the "Manual" option at the bottom there because it's easily missed ;)

When you choose "Manual Partitioning" it will have to rescan the partitions before giving you a new screen to work from - so there's a slightly scary moment there.

Going off on a tangent for a moment, are you giving Ubuntu at least 10Gb or more? I was wondering if maybe there isn't enough space left on the partition to add a few files?!

Good luck and regards from
Tom :)

Revision history for this message
sooren_ir (fardad-dv) said :
#4

in "partitioning section" is only 2 options and a message:

This computer has no operating systems on it.
Where do you want to put ubuntu 9.04?
1.use the entire disk

2.specify partitions manually(advanced)

i choose 2 and it scanning disk but it not find any partition
it show in its table only:
/dev/sda

Revision history for this message
Tom (tom6) said :
#5

Hmmm, it looks like your Windows partition has been deleted. If you had data on the drive that you want to recover then this guide might help
https://help.ubuntu.com/community/DataRecovery

If you want to start afresh and install a dual-boot system then this guide might help
https://help.ubuntu.com/community/WindowsDualBoot

But i would be tempted to just install Ubuntu on it's own, perhaps with a separate /home partition. Then i would think about installing Windows some other day or maybe not bother with Windows at all. Most of us do have a dual-boot somewhere but sometimes that's just in case it's needed for some game or something - Windows is such a pain to install it's better to keep the existing one just on the off-chance of maybe needing it for something maybe one day lol. I try to avoid installing Windows unless i'm being paid to do it.

Good luck either way
Regards from
Tom :)

Revision history for this message
sooren_ir (fardad-dv) said :
#6

but i can use windows and its have not any problem.
also i can see my other partition in windows xp. It works correctly.
i have problem only with ubuntu installing!

Revision history for this message
Nandan Vaidya (gotunandan) said :
#7

If during partitioning in the Ubuntu install you can only see /dev/sda, but your windows system is working, then maybe the Windows installation wiped out the Ubuntu install ?

In windows My Computer -> Manage -> Disk Management
Do you see more than one partition ?

Revision history for this message
Tom (tom6) said :
#8

Weird. Perhaps Xp is on a 2nd physical drive? Anyway, i'm glad to hear you haven't lost data. Can you boot up from the Ubuntu Cd? You should get to a menu that has the option "Try Ubuntu without changing anything on this machine" (something like that), if you don't get to that option this guide might help
https://help.ubuntu.com/community/BootFromCD
Choosing the "Try Ubuntu ..." option should get you to a working desktop which we call a "LiveCd session", if it woks. Firefox on the top taskbar should let you surf right back into here.

Also on the top taskbar please go to

Applications - Accessories - Terminal

into the terminal/command window/console type

sudo fdisk -l

note that to check what commands do you can type " -h" or " --help" after them, so for example try

sudo -h

fdisk -h

to get quick help guides on how to use those commands.
Please let us know the results so we can see what's going on
Good luck and regards from
Tom :)

Revision history for this message
Nandan Vaidya (gotunandan) said :
#9

maybe this guide will help once your initial problem is sorted out !

https://wiki.kubuntu.org/DualBootMigration

Revision history for this message
sooren_ir (fardad-dv) said :
#10

i use "Ext2IFS_1_11a.exe" to see the ext3 partition contents in XP .It works and show the linux partition in windows but i cant saw the content of this drive. I use the disk managment to unpartition the ext3 and use it again with ubuntu. it deleted this partiton and that space is free but ubunto cant detect the partitions yet :-(
now i use live cd.
the result of that command is:

ubuntu@ubuntu:~$ sudo fdisk -l
omitting empty partition (5)

Disk /dev/sda: 160.0 GB, 160041885696 bytes
153 heads, 5 sectors/track, 408603 cylinders
Units = cylinders of 765 * 512 = 391680 bytes
Disk identifier: 0x15f715f6

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 37480 14336097+ c W95 FAT32 (LBA)
/dev/sda2 37481 321267 108548527+ f W95 Ext'd (LBA)
/dev/sda3 80326 160639 30720102+ b W95 FAT32
/dev/sda5 160640 240953 30720102+ b W95 FAT32
/dev/sda6 240954 321267 30720102+ b W95 FAT32
/dev/sda7 321268 408603 33406017+ b W95 FAT32

now what can i do?

Revision history for this message
sooren_ir (fardad-dv) said :
#11

yes i see all of my partition in disk management

tanx for your suggestion Nanadan but i think my problem isn't in it :(

Revision history for this message
Tom (tom6) said :
#12

Ok, it looks like you have a lot of Windows partitions but it's unclear how much space there is for Ubuntu. In the ubuntu LiveCd please go up to the top taskbar and click on

System - Administration - Partition Editor

and copy into here all the info that's in the bottom half of the GPartEd window.

Also it would be good to know what all the different drives are for in Windows, perhaps there might be some way of reducing the number of drives that Windows needs?

Good luck and regards from
Tom :)

Revision history for this message
sooren_ir (fardad-dv) said :
#13

it show all of my hard disk is unallocated
and show 1:

partition File System Size Used Unused Flags
unallocated unallocated 149.05 GiB --- ---

that given size is my Hard disk size , My HDD is 160G
I think it cant see my HDD partition table, but Why?

Revision history for this message
Tom (tom6) said :
#14

If you can get hold of an external drive to copy any files that you definitely don't want to lose onto the external drive just in case anything goes horribly wrong. Of course you might be able to copy those precious files onto dvd/cd instead.

Yes, that's not looking right at all. I don't know why but i also notice that fdisk showed some very muddled up numbers for where partitions started and ended. Is it possible to reduce the number of "drives" you have in Windows? Perhaps copy data off a couple of them onto the remaining ones and then delete the empty partitions? Also inside Windows can you find "Add.Remove Programs" and see how many times Ubuntu is installed? I think it might be a good idea to uninstall all of them. Also it might be good to defrag your partitions from inside Windows and also run "Check disk" on each of them.

Revision history for this message
sooren_ir (fardad-dv) said :
#15

I'll try that

Tanx and best regards to you :)

Revision history for this message
Tom (tom6) said :
#16

Ok, i'm beginning to make sense of the numbers shown in fdisk

sda1 is a normal primary partition

sda2 is an Extended partition so it is like a bucket containing a space and 3 partitions
. first thing inside sda2 is a reasonably big space
. then sda3 is a 'logical' partition
. then sda5 is a 'logical' partition
. then sda6 is a 'logical' partition
Ok, that's the end of the bucket, the end of sda2

sda7 is a normal Primary partition

Hmmm, so if we could find a way to fix that partition table onto the drive properly then we could work with it as it is. Perhaps making a change to the table will be enough to save it properly. Perhaps even just creating a new partition to fill that empty space inside the beginning of sda2. That would also give us an advantage of knowing how big that space is :)

Good luck with all this!
Regards from
Tom :)

Ps i am assuming you have a lot of data on this disk that you don't want to lose - otherwise it would be easier to wipe the disk and start again.

Can you help with this problem?

Provide an answer of your own, or ask sooren_ir for more information if necessary.

To post a message you must log in.