Grub 2 problem, error: no such device

Bug #403408 reported by MAleRN1973 on 2009-07-23
358
This bug affects 71 people
Affects Status Importance Assigned to Milestone
grub
Unknown
Unknown
Nominated for Grub2 by Kristoffer Grundström
grub2 (Debian)
Fix Released
Unknown
grub2 (Ubuntu)
Undecided
Unassigned
Nominated for Karmic by Robbie Coleman

Bug Description

I did the latest upgrade from http://cdimage.ubuntu.com/daily-live/current/ for July 22nd. I used karmic alpha 2 i386 linux kernel 2.31.3-generic and the install went fine. However, when I rebooted I got a message that says "error: No such device" and a long number with dashes and then another lin stating "Failed to boot default entries;" I've reinstalled atleast a dozen times without l luck. I expected that I would have gotten a normal boot. I would love a solution to this. Another question I have is: Is the download from http://cdimage.ubuntu.com/daily-live/current/ on July 22 17:49hrs the latest Alpha 3 for karmic? Today is the 23rd here in the USA and I can't seem to find any labeled websites that have an active link to karmic alpha 3. If it turns out that I DID download the latest (being alpha 3), then I think the grub 2 issue still remains for me.
I'm running an SGI 550 dual xeon PC, with 1GB of ram, 250GB HDD.
Thanks for the help.

Adil Arif (adisari06) on 2009-07-24
affects: ubuntu → grub2 (Ubuntu)

I managed to solve this problem. I edited /usr/lib/grub/grub-mkconfig_lib file . On line 147 I took out ALL the info from inside the quotes. I had previously read that taking out the "--no-floppy" was sufficient, not in my case. Simply uncommenting the line will not work either.
So, line 147 should read: echo ""
After making those changes, "dpkg-reconfigure grub-pc" (without quotes) needs to be run in terminal as root (sudo)
i.e. $ sudo dpkg-reconfigure grub-pc
I hope this helps!

heinjan (heinjan) wrote :

Same here with karmic 2 aug 2009.

Just before the grub2 menu flashes by I can see the "error: no such device" flashing by. Strangely the grub2 menu still comes up. After selecting a kernel the boot process stops with the "error: no such device $UUID", where $UUID is the UUID of my root-partition. The UUID in grub2 is correct.

After removing the search line karmic boots correctly.

heinjan (heinjan) wrote :

Additional info: this is with a fresh install of karmic alpha3, HD completely wiped, no other OS on the harddisk.

Previously an older version of karmic (alpha1 I think) was on this harddisk.

Changed in grub2 (Debian):
status: Unknown → Confirmed

Hi there, I also would like to confirm the presence of this bug.

My hardware : IBM T40, 1.3Ghz, 40GB hardrive, 1.25GB RAM.

I did a fresh install of Karmic 9.10 RC on the entire disk. The install proceded without problem.

On booting a grub1.97 beta menu flashes, and I can see "error: no such device" as heinjan writes.

Then GNU Grub 1.97 beta then appears, where I can boot from the kernel, but then the exact same error as above appears "error: no such device #" with a long number.

I've tried reinstalling, and the disk has been checked for errors - there are none.

No sure if this is significant but this thinkpad has a secret partition on it.

I will try doing the above.

Duncan.

No Joy, removing that line doesn't work for me...
Looks like I need to reinstall 9.04.

Ian Partridge (ian-poncho) wrote :

Confirmed - I also see this on a Thinkpad T41p.

Jarmo Torvinen (jarmo-torvinen) wrote :

Also happens on my T40, karmic 9.10 release install. After removing search-line I can boot again.

John in SF (jsoulsby) wrote :

I also see this. My hardware : IBM x31, 1.7Ghz, 40GB hardrive, 1GB RAM.

Can someone provide explicit instruction on how to edit?

I see this comment below that was made previously but the problem I have is how to actually edit the file.

"I edited /usr/lib/grub/grub-mkconfig_lib file . On line 147 I took out ALL the info from inside the quotes. I had previously read that taking out the "--no-floppy" was sufficient, not in my case. Simply uncommenting the line will not work either.
So, line 147 should read: echo ""
After making those changes, "dpkg-reconfigure grub-pc" (without quotes) needs to be run in terminal as root (sudo)
i.e. $ sudo dpkg-reconfigure grub-pc"

If I can get into this directory and file, I can do what is suggested but a list of the commands I should perform would really help since I am good at repetition and following direction. :)

John in SF (jsoulsby) wrote :

Another approach but not full resolution:

I have been able to manually load the speciifc kernel following these steps:

Boot to a Specific Kernel Manually (https://help.ubuntu.com/community/Grub2)

However, when I re-start, I have to do the same thing again.

Am Freitag, den 30.10.2009, 18:59 +0000 schrieb John in SF:
> If I can get into this directory and file, I can do what is suggested
> but a list of the commands I should perform would really help since I
> am
> good at repetition and following direction. :)

sudo gedit /usr/lib/grub/grub-mkconfig_lib
You can also choose a different editor then gedit, but I think it's not
a bad choice in this case.

And then remove the following inside the function
`prepare_grub_to_access_device ()'

  if fs_uuid="`${grub_probe} --device ${device} --target=fs_uuid 2> /dev/null`" ; then
    echo "search --no-floppy --fs-uuid --set ${fs_uuid}"
  fi

Then just `sudo update-grub'
reconfiguring the whole grub-pc package isn't at all needed for this.

Note that this change gets lost when the grub-common package gets upgraded.

--
Felix Zielcke
Proud Debian Maintainer and GNU GRUB developer

John in SF (jsoulsby) wrote :

Felix:

You rock!

Everybody at Launchpad rocks!

This worked.

John

Managed to fix it on my T40 using the alternate installer and 'vi' editor.

see this post...

http://ubuntuforums.org/showthread.php?t=1301144

and 4listers helpful reply.

Problem is the problem recurs on updating...

All best,

Duncan.

ktp420 (ktp420) wrote :

This is serious...hope it gets fixed soon. It was not good surprise right after clean install you get can't find device!!!

Changed in grub2 (Ubuntu):
status: New → Confirmed
jon (jb-subs) wrote :

I have had a similar problem with a fresh ubuntu 9.10 install on a Thinkpad R40e.

On my system I was just getting "error: no such device" and "press any key to continue" immediately without even seeing the grub menu. Pressing a key just repeated the same message. Whats more, when booting from the CD there is no "Rescue a broken system" option.

I was able to comment out the three lines Felix mentioned in post #10 above, by booting the live CD, mounting my hard disk from there, and then editing the grub-mkconfig_lib file within. However I'm not sure of how to run the "update-grub" command without the rescue option, since presumably it needs to be run on the installed system itself.

Editing the grub-mkconfig_lib file alone has changed the behaviour slightly. Now I at least get the grub menu, but selecting one of the options returns me to the familiar "press any key to continue" message. So I still can't boot my system.

Can anyone advise how to run the update-grub command in my situation where the rescue option is missing?

Bowmore (bowmore) wrote :

From the grub bootmenu, press e to get to edit mode.
Erase the line starting with "search --nofloppy ..." and then press Ctrl+X to boot.
When up and running you should run the command sudo update-grub.

ktp420 (ktp420) wrote :

@jon, "Rescue a broken system" is available in the "Alternate install CD". If you have that ISO then you can boot using that also.

Steve McGrath (smcgrath23) wrote :

Just for the record, for people who get the repeated "no such device" message and no boot menu:

If you turn on your computer and hold down the shift key, you will get the Grub menu and can then use the instructions in comment #15 to boot your system.

Michael.S.G (ozfalcon) wrote :

I can confirm this bug on a Fresh 9.10 install.

THIS FIX IS NOT RECOMMENDED --> editing: /usr/lib/grub/grub-mkconfig_lib

Some notes about the install.
500gb ide hd
Bios reports 136gb hd on bios boot screens. (Older PC)

Install goes fine, Reboot fails on "error: no such device"
Hold [shift] on boot and editing/removing "search" line enables boot to continue.

However, If you somehow bork your system you may find single user unable to boot.
At which point it starts to become tedious to recover your system from something
as simple as a X config causing lockup before you can get into a text console. (Sigh).

The Alternate solution (Although not a fix as such) is to MANUALY create a
nominal size ext2 /boot partition at the start of your hard disk on install.

On boot, You still see the error flash up. But the boot continues. And there
is no need to edit the grub-mkconfig_lib file. The single user mode also works.
But memtest failed to run from the Grub2 menu.

sjogro (sjogro) wrote :

i've got this very problem as well, using 9.10
i have not much experience in (installing) linux
guess i'm unlucky

i understand all the above pretty good i guess, but how do i get a terminal / prompt after i get the error?
if i boot from the livecd all files are locked on the harddrive that contains the installation
i cannot edit any file on there

and where do i find my harddisk in a terminal ?
i'm not very familiar with the folder structure of this system

sjogro - what I did was to boot from the 'alternate cd' and that way I could run a command prompt on the broken system and fix it.

See this post here:

http://ubuntuforums.org/showthread.php?t=1301144

There are other ways to get round this depicted above - maybe try them first?

Duncan.

nilram (marlinwilson) wrote :

Ditto on this problem, using a Toshiba Tecra M2, and that removing the search line allows the system to boot. Thanks to everyone who gave details about this and how to execute it.

Contact me if there's a proposed fix you'd like tested, or if you want more details about the machine config.

The steps in comment 10 worked for me, though I have to comment that I was helping install Ubuntu on a friend's machine, and this bug came very close to turning him away from Ubuntu.

We've got to get this fixed, stat.

ihatelinux (srnolez) wrote :

it didnt work for me.. windows 7 loads and installs fine tho.. even boots

John in SF (jsoulsby) wrote :

Good for ihatelinux going to Win7! Best of luck and keep going. ;)

ihatelinux (srnolez) wrote :

thanks John in SF... i didnt even need to type a string as long as my arm to change resolutions or get a right mouse button to work... two clicks and i was there... wow .. im there dude... windows 7 is a great alternative.. ;)

Cvet (cvet) wrote :

I can confirm that I also get the error message however i have no problem booting. I have installed grub2 on a separate /boot partition on the beginning of my disk. No problem booting win7 with grub2, just linux. My partitions are ext3.

trimax (snakerider) wrote :

I also confirm that the error appears after a clean install, no OS on the disk. This is a awful experience for newcomers. I have three windows machines, and two macs, and was hoping (and excited) about using Ubuntu, specially 9.10 Karmic Koala. This bug/error is terribly frustrating and even though Google is my friend, none of the solutions that I found could resolve my "error: no such device" issue... karmic koala fail?

I'm new to Launchpad - does anyone how we can get this bug fixed, short of taking a year out to learn programming and doing it ourselves?

Are the relevant people informed, and have it prioritised? I think it is a critical bug as it renders your laptop completely useless!

I used the fix above and my laptop is running great, but I think most people will just give up.

All best,

Duncan.

Steve McGrath (smcgrath23) wrote :

This should really be bumped to High importance, at the very least. People are still running into this on fresh installs, and it's causing a lot of frustration for new users. People who want to try Ubuntu are being turned away.

Pedro I. Sanchez (pirivan) wrote :

It just happened to me. ACER Ferrari 3400 laptop, an old one running 8.04 before. I decided to install everything anew, just Ubuntu, no other OS on the hard drive. I ended up editing /usr/lib/grub/grub-mkconfig_lib as suggested in this thread to fix the problem.

This is a really annoying bug with karmic. And I agree, why not give this bug a high priority? In fact, I just noticed that it hasn't even been assigned to anyone yet!

Anyone have any ideas how to do that?

I worry for all the people who might otherwise be so happy with ubuntu!!!!

Duncan.

Steve McGrath (smcgrath23) wrote :

Is anything happening with this bug? I'm seeing more and more people on the forums lately who have just decided to try 9.10 and are unable to boot after installation due to this issue.

Rhubarb (cam-daw) wrote :

I encountered the same problem on a Dell laptop (I can't remember what model, I guess from around 2005).
I edited /usr/lib/grub/grub-mkconfig_lib and commented out 3 lines as follows:

Before:
  if fs_uuid="`${grub_probe} --device ${device} --target=fs_uuid 2> /dev/null`" ; then
    echo "search --no-floppy --fs-uuid --set ${fs_uuid}"
  fi

After:
  # if fs_uuid="`${grub_probe} --device ${device} --target=fs_uuid 2> /dev/null`" ; then
    # echo "search --no-floppy --fs-uuid --set ${fs_uuid}"
  # fi

Saved the file, then upon reboot it worked, but after that reboot it didn't work.
So, I made the change to /usr/lib/grub/grub-mkconfig_lib again,
Changed the permissions of the file to read only (chmod 444)
Then ran dpkg-reconfigure grub-pc (or sudo update-grub might do the trick too).

I can't be sure exactly why the error re-occured after my first attempt, but there's a chance changing the permissions on the file did the trick.

I actually found it quite fun learning more about grub2 :)

houstonbofh (leesharp) wrote :

This is my 4th clean install of Karmic, and I got bit. The bad part is that this one was at a client, with a time crunch. The workaround in the grub2 boot works, but I can't have a client do that. And I am afraid to use the fix in post #10, as an upgrade means a service call with "an emergency." I too vote to bump the priority, as it has been around a while. http://ubuntuforums.org/showthread.php?t=1301144

Dennis (dxmecca) wrote :

Wow, thank you so much for the info on fixing the boot problem no floppy etc.

I followed the instructions exactly EXCEPT, my lines were 173, 174 and 175. The edit of file grub-mkconfig_lib using the terminal command: sudo gedit /usr/lib/grub/grub-mkconfig_lib worked flawlessly. I found it easier to comment out the lines with "#" instead of just deleting them. Immediately after saving the file with the changes I used the next and final terminal command: sudo update-grub

I then did a little dance around the laptop on the floor, closed my eyes and rebooted. However I did save all my saved docs to a flash drive...just in case.

The result was a perfect boot right on through.

Thanks to everyone who contributed that information. Ubuntu is "The Key to Being Free" and thank you to the developers and everyone else that had anything to do with it. I've been looking for a way out of windows for as long as I can remember. Ubuntu's most recent release made it easy to do.

Thanks again,

Dennis

Nathaniel Wilson (dubrict) wrote :

I just tried to help somebody new to linux get through this bug. In the end, we couldn't get it working and he's switching back to windows.

I doubt he'll be back anytime soon.

It's clear to me that grub2 was NOT ready for prime time.

Nathaniel Wilson (dubrict) wrote :

Update, I installed xubuntu 9.10 on my ancient IBM thinkpad 600E and got the "no such device" error. Removing the search line solved the problem for this one

Hanno Böck (hanno-hboeck) wrote :

Ubuntu-devs, can you please put a HIGH priority on this one and NOT release any more kernel or grub updates till this is fixed?
I just got the problem on someones machine where I've worked around it recently. The new kernel update regeerated the grub config and the problem was back again.

houstonbofh (leesharp) wrote :

Hanno Böck wrote:
> Ubuntu-devs, can you please put a HIGH priority on this one and NOT release any more kernel or grub updates till this is fixed?
> I just got the problem on someones machine where I've worked around it recently. The new kernel update regeerated the grub config and the problem was back again.

Since many kernel updates are security fixes, I don't see that happening
any time soon. (Nor would I want it to.) However, if you do the fix in
post #10
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/403408/comments/10
it will survive kernel updates, just not grub updates. You can also pin
grub (or kernel) updates so they are not a problem for you.

richardygk (rjohnson332) wrote :

Tried what was recommended in post #15. Success. I sure hope this ubuntu was worth the time it took to sort this out.

Changed in grub2 (Debian):
status: Confirmed → Fix Released
Philip Muškovac (yofel) on 2010-01-17
Changed in grub2 (Ubuntu):
status: Confirmed → Fix Released
39 comments hidden view all 119 comments
JimUSA (jim-sylvania) wrote :

Thanks JedMeister, I'll be more careful to stay on topic.

Regarding Blocks vs Clusters? A user above mentioned that he expected his LBA, large block addressing, might overcome the drive size problem. It works by increasing the number of sectors that are grouped into one disk writing unit so that there are less units, few enough that the number does not exceed the maximum number that the bios is capable of counting. I'm a little confused because this group of sectors was called a cluster in the past, but LBA uses the term "block".

My bios has a large disk access choice of dos vs. other. Under "other" it advises that unix, novell and other operating systems may have a different way of handling large drives. It was set for dos, but ubuntu lists the xp partition as ntfs. I was tempted to change this as a fix but I am worried about affecting the xp reading ability. furthermore, how would it read the disk in order to boot? Does anyone know how this works?

If I place a boot partition at the beginning of the first partition on the drive, as mentioned above, what will happen to the pre-existing xp installation? Will it move the xp installation or will it overwrite it?

When I went to reinstall ubuntu, the partitioner screen showed a duplicate copy so I deleted and formatted but I still have 2 choices for ubuntu on the grub operating system choices. How did you all avoid this when you reinstalled? I have xp already on the disk, did any of you have a dual boot situation and encounter the same problem?

Thanks,
Jim

Jeremy Davis (jedmeister) wrote :

I have just experienced this issue again (among others) trying to set up XP/Ubuntu 9.10 dual boot on a desktop (DFI mobo with nForce4 chipset, skt939 AMD X2 4400+, 320GB sda, 500GB sdb).

After sorting out my other issues, I again came to this bug, however the behaviour is quite different to my laptop (which is the system I've been referring to in my other posts). On the laptop; XP booted fine, but Ubuntu had the "error: device not found...". This time Ubuntu boots fine from Grub but Windows has the "error: device not found...".

The same fix applies though: #1 above (https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/403408/comments/1) works fine (except as noted previously, the line that needs editing is 174 in the latest version of the Grub mkconfig file). As I stated above, this workaround/fix survived my most recent kernel update (on the laptop), lets hope its fixed in the next Grub update.

Jeremy Davis (jedmeister) wrote :
Download full text (4.5 KiB)

Sorry for the long post everyone! I pondered whether to write this all here or not - but decided it may be relevant to this bug for some Ubuntu beginners.

@JimUSA - I know it can be frustrating but that is the nature of the beast. All things considered (the breadth of different hardware, the limited support from hardware vendors, etc) I think it is a huge accomplishment that a free OS (mailed to your door free too!) manages to run as trouble free on as many different hardware platforms as it does. Having said that, I know its a pain when it doesn't work and I really hope a proper fix is released very soon (and new ISOs distributed).

To be honest, I don't know whether I'd even be installing Ubuntu on hardware of that vintage. I would imagine it would have limited RAM as well? Don't get me wrong, Ubuntu is a great OS from a user standpoint and I think it achieves a nice balance between cutting edge software/features and legacy hardware support, but for older systems I think an OS that is less resource intensive is better. I'd be inclined towards PuppyLinux or DamnSmallLinux. IMHO Ubuntu is too clunky and unresponsive on older hardware.

Back on topic! - in response to your questions Jim, assuming you may wish to push on with Ubuntu:
1) Not sure about blocks and clusters, but I don't think they're the same thing. Don't think not knowing will stop you from solving your issues here.

2) Have you tried changing the BIOS setting and see if XP still boots? If so how about Ubuntu now? Worst case scenario, change the BIOS setting back.

3) You could move the XP partition and put a boot partition at the start...But: !!!DO NOT DO IT!!! You will open up a whole new world of pain! When you try to boot into XP it will see the boot partition and call that "C:" so in effect Windows will now be installed on "D:" (assuming it was on "C:" initially). Obviously Windows will crash and burn because it won't find any of the files it's looking for on "C:". It can theoretically be repaired (think lots of manual registry editing) but its a much better idea not to put yourself in that position to start with.

4) Don't worry about entries in Grub too much at this point. Make sure WinXP is working properly first. First thing I'd do (if you haven't already) is get a portable hard drive, and back up anything even remotely important (including your Win CD Keyif you don't have the box handy anymore, the sticker has gone AWOL or its a laptop with an OEM factory install - use RockXP, MagicJellybean or similar).

Personally I would just use the fix in #1/#10 but if that doesn't work or you choose not to, try this: If you can fit a small / (root) partition (say 30GB - as suggested above #50) AFTER the XP partition but completely within the 136GB limit (followed by /home and swap in the remaining space) then that should prepare you for a trouble free install.

If it will not fit, then you'll need to break your XP partition into 2 (basically the same as what your doing with the Ubuntu Install). In the past I've used Paragon Partition Manager and found it good for moving/resizing NTFS partitions. I notice they have a free version (http://www.paragon-software.com/home/pm-express/d...

Read more...

Upgrading your Computer's BIOS most probably solves this problem as well:

I had the same problem with an HP compaq nc4400 notebook which had been upgraded to a 320 Gig HDD.
I was able to solve the problem by upgrading the BIOS.
This cured the BIOS' 128 GB HDD Bug and made the grub-Problem simply go away.
HP offers BIOS updates not only using a windows program, but also as a bootable FreeDOS Image.

The same is true for an old Dell 510 (also only recognizing 128 GB HDD). Since I upgraded the BIOS to ver A04 (that's the version without the 128GB HDD bug), in boots just fine.

hinkie (hinkie) wrote :

Matthias et al: I am sure you are correct that installing a BIOS that addresses the whole HDD is a solution - when those updated BIOS are available.

Frequently I cannot find a sufficiently revised BIOS, which leaves one looking for other solutions, that allow grub2 to cope with old BIOS.

If PC manufacturers were truly green in their orientation then they would reduce recycling of old PC's by ensuring their old BIOS were updated to the system limits - so that maximal RAM and HDD sizes can be utilised (as examples) - that would be the difference of junking or continuing to use existing PC stock, Perhaps they prefer the junking / new purchase model however computer owners might see it differently and prefer to get more mileage out of their existing investments. I know this is off topic, apologies for that, however it should be said somewhere.

csolomon (tanzbodeli) wrote :

This bug has just struck me.

I made an iso of Xubuntu today (latest), and tried installing it on an old computer (P2 850, 256 Ram, etc). Install went fine, but I got exactly the same messages as reported above (error: no such device). This was a complete install on a small hard drive, using the whole HD and erasing the previous OS (Win2K).

In possibly a related note, I tried installing Ubuntu 9.10 on my main desktop computer today (a P4 3.0 Ghz). It has Win XP installed. During the installation, I told it create a partition in the large unused portion of my secondary harddrive (not the hard drive that Windows boots from). When the install completed and the computer rebooted, I got the typical Grub menu, but when I selected to boot from grub, I got a blank screen with a blinking cursor in the upper left corner of the screen and it sounded like the HD was seeking over and over. Nothing ever happened. I had to do a hard reset after about 5 min.

I haven't tried any of the fixes suggested, because that's not really a fix and I'm not comfortable editing those file(s).

csolomon (tanzbodeli) wrote :

I should mention that Win XP still loads fine (thank God for that).

Steve brown (steve-brown-web) wrote :

Replaced the 60GB HD drive on an old gateway laptop, then installed 9.10 full disk. Got this error. By deleting the search line in the grub (as explained above) I was able to boot. I considered upgrading the BIOS, but since I don't have windows on this machine it seemed t0o complicated for my simple brain.
I booted on a "gparted" cd, shrunk the root to about 120GB, then created another partition to fill the unallocated area.
When I rebooted everything worked fine. I still have access to the whole drive, but the new partition has to be mounted to use. no big deal. My mom, who is getting this computer, will never fill the first partition anyway

mark (mark-voidzero) wrote :

I know that it's not good practice to post emotionally loaded responses. So I will refrain from doing that. BUT, in 14 years of using linux .... I have never ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever found an application that sucks so much as grub2!! Why? I'll tell you. Thank you.

1) System has three harddrives. One is IDE, the other two are SATA. There is an IDE cdrom drive, too.
2) I unplug the cd rom drive. No biggie right?
3) GRUB 2 gives me an "error disk not found" error and drops me to some stupid grub rescue console that has NO commands what-so-ever!!!

I needed that cdrom slot for another harddrive. So what do I do? Unplug the IDE harddrive? Nope, Linux's on that. Unplug the cdrom? Then how do I boot a rescue image?

I almost felt like Daffy Duck going crazy, bouncing on his head shouting "cuckoo! cuckoo!"

I installed ubuntu because I didn't want any more of the "omg you must configure everything yourself" kind of bullsh**, that's too damn 90s. I already have too much server management on my hands to be bothered with a simple workstation.

This has FAIL written all over it, so yeah, I was way better off using archlinux. More hassle, but seriously less flaws.

PaulO (pko02005) wrote :

1. From the grub bootmenu, press e to get to edit mode.
2. Erase the line starting with "search --nofloppy ..." and then press Ctrl+X to boot.
3. When up and running you should run the command sudo update-grub.

I was able to perform steps 1 and 2 and boot successfully once but then rebooting gvives me the same problem, iUnrstand because I wasnt able to complete the Step #3 of updating grub

Will someone please explain to me how to perform step 3, I type sudo update-grub in the box from #2 and try to boot but it says that id does not recognize the command sudo - I do not understand what this means by "when up and running", once I hit Cntrl X to boot , having deleted the line, there is no time to type anything before the system boots up. Where do I type
sudo update-grub?

Will someone please explain? Thanks.

Jeremy Davis (jedmeister) wrote :

You need to wait until Ubuntu has completely finished booting to the desktop, then open the Terminal (Applications>>Accessories>>Terminal)

I would update grub-common before you do anything else (because otherwise you'll have to do it twice - updating will break the repair). So in the terminal window type:

 sudo apt-get update
 sudo apt-get install grub-common

then once thats finished you can follow the instructions from post #10 above. For convenience I will recap it here: Edit the grub config file:

 sudo gedit /usr/lib/grub/grub-mkconfig_lib

(Feel free to use your favourite text editor instead)

Then comment out line 174 (ie add a '#' to the start of the line) and add a newline below 'echo ""'. Once finished, from line 173 the config file should look something like this:

 if fs_uuid="`${grub_probe} --device ${device} --target=fs_uuid 2> /dev/null`" ; then
 # echo "search --no-floppy --fs-uuid --set ${fs_uuid}"
  echo ""
 fi

save the file and run

 sudo update-grub

Then reboot and should all work fine now!

Note: As suggested above, this change gets lost when the grub-common package gets upgraded and you'll need to do it again.

PaulO (pko02005) wrote :

This worked! Thanks for the clear explanation.

Ksanger (makerofbeating) wrote :

Tried to install ubuntu 9.10 live cd today with existing Win XP SP3. Asus A7N8X Deluxe, AMD Athlon XP 2800, 2G Ram, 640 GB HD. Hard drives are two 320G drives striped together using Raid 0. Raid shows up as scsi drive on mobo. XP on the first 200 GB. NTFS on the second 200 GB. 200 GB free. Installed ubuntu to the free using all of the disk. On booting obtained Grub error 18.

Now what do I do? I've recovered XP using original CDs then overwrote boot sector. XP shows the remaining hard drive has two partitions, one almost 200 G and one about 5 G with the 5G last in line.

I'm not comfortable trying to reinstall or fix grub2, then having to keep doing so whenever Ubuntu or Windows updates. (I had run fedora core 4 for 10 years without updating, recently my bank stopped working with Firefox 1.0 and I had to update to fedora core 10 to get Firefox to run, but that 16 bit system is still running with no updates). I'ld really like to get away from XP's updates, as today trying to ignore SP3 upgrade killed Avast. I had to delete Avast, update to SP3 anyway, then reinstall Avast. Shouldn't need to update a pc to start it up and go online.

Anyway ubuntu looked good on the web. When will it be fixed so I can install it properly?

Jeremy Davis (jedmeister) wrote :

I'd suggest posting on the forums (http://ubuntuforums.org/). Especially as your problem may or may not be related to this bug.

Ksanger (makerofbeating) wrote :

OK

ralphie (ralphie) wrote :

I believe I've figured this out. The problem occurs when your computer doesn't recognize the total size of your hard drive. Look at the hard drive information in the BIOS settings. Whatever the computer recognizes is your limit. I replaced an 80 GB hard drive with a 180 GB hard drive. When I enter the BIOS, the computer reports that the size of my hard drive is 137 GB. This is most likely a limitation on the motherboard/hardware support settings and NOT a problem with GRUB 2. Your machine may not be booting properly because when you install Ubuntu, part of the system may be on hard drive space that is not accessible or recognized. The best thing would have been to research what the maximum size hard drive for your machine was and bought that size. BUT don't worry!

You can still use the one you bought even if it surpasses the maximum capacity limit. What you NEED to do is manually size the partitions on your hard drive during the installation process. It sounds hard but it's really not, and I know you'd like to use all of the space on your hard drive but you can't. Tough cookies.

When you get to the partition manager stage of your install make sure the combined amount of space between the root file system where Ubuntu will be installed, and the swap partition are less than or equal to the maximum size reported in the BIOS. Simply create a Primary partition for the file system and select " / " as the mount point on the drop down menu. Next, create a Logical swap partition that is double the size of your total RAM. That's it. Everything should install properly and reboot without issues.

So again, if your BIOS shows your hard drive to be 50 GB but it's really 80 GB and you have 1 GB of RAM you will have to do something like this: Primary partition = 49152 MB (48 GB), Swap partition = 2048MB (2 GB). Just to be safe, though, I would try to make my total go a little under the 50 GB limit. I've installed updates and rebooted several times with no issues. Sorry if I repeated anyone's answer. If you still have the same problem you probably have another issue. I'll check on this posting again within the next few days. Hope it helps.

ralphie (ralphie) wrote :

I would just like to make a correction to the second paragraph of my previous post. You CAN use all of the space on your hard drive (YAY!). However, you still must follow the guidelines set forth in the directions above to avoid the "error: no such device $UUID" problem.

Note: you can use the program ' gparted ' to follow these directions if you've already installed Ubuntu. Just search for it in Synaptic Package Manager or Ubuntu Software Center and install it. It'll show up under System>>Administration.

OK, to make use of the remaining free space on your hard drive just format the ' free space ' to ext4 and create a mount point like " /archive ". I believe you can name the mount point anything you'd like as long as it begins with " / " . Be careful and make sure you're formatting the "free space" and not the root file system that Ubuntu is on.

Last step: Open up a Terminal and type ' sudo chown -R username /mountpoint ' . i.e. If your user name is timothy and your mount point is /extra, you would type:

sudo chown -R timothy /extra

This should ensure you're able to access this disk space and are able to read and write to it. To make this disk space easy to get to, minimize all windows and click on your Desktop, now press ' Alt + Home ' . When ' Nautilus ' file browser opens click on File System and drag the ' archive ' folder to your sidebar under Documents, Music, Pictures etc. OR drag the ' archive ' folder on to your Desktop. Now it'll be more visible to you when you click on ' Places ' or when you just want to click and drag files to it on your Desktop. Hope this helps. I'll check back here in a few days just in case.

Steve McGrath (smcgrath23) wrote :

As far as I know, it is not necessary to relegate the remainder of the disk space past 137GB to an extra or "archive" position. You can simply create a separate partition for /boot, about 100MB or so should be fine, and ensure that it is the first partition on the drive, or at least within the first 137GB. You can then partition the rest of as you like. I use the following scheme:

(approximate sizes)
1-100MB: /boot
100MB-30GB: /
30GB-495GB: /home
495-500GB: swap

John Dong (jdong) wrote :

I don't see any of the information required for a SRU request as stated in the wiki page detailing the process. Unsubscribing the SRU team for now.

jhellen (jukka-hellen) wrote :

This problem went away with the latest beta of Lucid (10.04). At least
on my HP nx7400 :)

hinkie (hinkie) wrote :

Interesting thanks jhellen, I was hoping this might be the case, does the nx7400 BIOS recognize the correct size of HDD above ~ 137GB? I presume not however your confirmation would be appreciated.

ymoymo (yves-monsel) on 2010-04-01
Changed in grub2 (Ubuntu):
status: Fix Released → Fix Committed
status: Fix Committed → Fix Released

Same bug is affecting me also, here is the number sequence it gave me :eeaade90-1821-40e9-863a-8313c35b7031. How do i fix this, I'm not a computer expert..

Adaptive (syn12) wrote :

Thanks Jed and PaulO for posts #89 and #90.
I've got an IBM Thinkpad T23, had the same problem and your posts got me up and working on the first try.

I'm not a complete novice, but far from an expert.
Thanks for the concise and well-procedured responses.

Took me a little while to pick through the thread, but it was well worth it!

javs (javierous) wrote :

This bug reappeared to me today after a kernel upgrade (after some weeks of
no problems), right after boot grub2 drops me to its shell. Booting manually
and removing the search line from grub.cfg fixed it. Maybe there is a
regression in grub2 ?

Thanks.

On Thu, May 13, 2010 at 2:38 AM, Adaptive <email address hidden> wrote:

> Thanks Jed and PaulO for posts #89 and #90.
> I've got an IBM Thinkpad T23, had the same problem and your posts got me up
> and working on the first try.
>
> I'm not a complete novice, but far from an expert.
> Thanks for the concise and well-procedured responses.
>
> Took me a little while to pick through the thread, but it was well worth
> it!
>
> --
> Grub 2 problem, error: no such device
> https://bugs.launchpad.net/bugs/403408
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in GRand Unified Bootloader: Unknown
> Status in “grub2” package in Ubuntu: Fix Released
> Status in “grub2” package in Debian: Fix Released
>
> Bug description:
> I did the latest upgrade from
> http://cdimage.ubuntu.com/daily-live/current/ for July 22nd. I used karmic
> alpha 2 i386 linux kernel 2.31.3-generic and the install went fine. However,
> when I rebooted I got a message that says "error: No such device" and a long
> number with dashes and then another lin stating "Failed to boot default
> entries;" I've reinstalled atleast a dozen times without l luck. I expected
> that I would have gotten a normal boot. I would love a solution to this.
> Another question I have is: Is the download from
> http://cdimage.ubuntu.com/daily-live/current/ on July 22 17:49hrs the
> latest Alpha 3 for karmic? Today is the 23rd here in the USA and I can't
> seem to find any labeled websites that have an active link to karmic alpha
> 3. If it turns out that I DID download the latest (being alpha 3), then I
> think the grub 2 issue still remains for me.
> I'm running an SGI 550 dual xeon PC, with 1GB of ram, 250GB HDD.
> Thanks for the help.
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/grub/+bug/403408/+subscribe
>

karthik (kptc) wrote :

This is Not A problem At all.
If you have Installed Ubuntu Along With Windows,

Windows Xp:
boot with windows xp cd,

go to repair screen,

choose your Windows and then Type
fixmbr

and

fixboot

then Reboot

Windows 7 And Vista

boot with windows cd,

After The Language Selection ,Click Repair Your Computer.

Select Command Prompt and enter

bootrec /fixboot

bootrec /fixmbr

and restart..

now You can Use Ubuntu,Windows Etc

Jeremy Davis (jedmeister) wrote :

@karthik - 2 things: Firstly this problem does seem to have been fixed some time ago, so you are right in some sense. Secondly XP bootloader cannot boot Ubuntu! AFAIK Vista/7 bootloader can't either, so your steps will fix Win boot. But you'll still need to fix GRUB2 so you can boot Ubuntu.

blitzd (blitzd) wrote :

This bug occured for me today with a fresh install of 10.10 x64 on a Thinkpad W700.

I would just like to say that after about a year of having this head ache with installing Ubuntu, I found out that the hard drive I bought off the internet, which was supposed to be brand new, had the bios changed in it, making it look like a 250 GB hdd that I paid for instead of the 125 GB hdd that it actually was. I bought a new hard drive and am no longer having the problem. I wonder if any body else here is have boot problems because of getting ripped off on their hard drives.

Larry Tate (cathect) wrote :

I suddenly began experiencing this problem this morning, after applying an update to Ubuntu 10.10. I've reinstalled grub2 to no effect. I did a complete re-install of my / partition. Same result. Error: no such device.

2 comments hidden view all 119 comments
Ken Sharp (kennybobs) wrote :

Thanks to yet another complete failure in Ubuntu testing this has occurred when I tried to do a standard network upgrade from 10.10 to 11.04. Now I cannot load Ubuntu, Windows 7 OR the recovery partition. Laptop is essentially useless. Thanks!

4 comments hidden view all 119 comments

On 10/08/2011 06:48 PM, Kristoffer Grundström wrote:

Any way to block this guy who's account was hacked?

2 comments hidden view all 119 comments

The fix may be released, but it doesn't fix the problem, see https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/896391

Displaying first 40 and last 40 comments. View all 119 comments or add a comment.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.