Fresh karmic install does not boot due to grub2 adding --no-floppy to "search " lines

Bug #391044 reported by sojourner on 2009-06-23
134
This bug affects 19 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
High
Unassigned
Nominated for Karmic by Dan Kegel

Bug Description

Binary package hint: grub

the update of grub2 on june 22 2009 added --no-floppy to all "search" lines in grub.cfg causing an error on boot . manualy editing grub.cfg to remove all instances of --no-floppy allows system to boot.

plun (plun) on 2009-06-23
Changed in grub (Ubuntu):
status: New → Confirmed
Changed in grub (Ubuntu):
assignee: nobody → Lluis Satorre Gonzalez (lluisyast)
Steve Langasek (vorlon) on 2009-06-23
affects: grub (Ubuntu) → grub2 (Ubuntu)
Changed in grub2 (Ubuntu):
assignee: Lluis Satorre Gonzalez (lluisyast) → nobody

# apt-show-versions grub-common grub-pc
grub-common/karmic uptodate 1.96+20090611-1ubuntu1
grub-pc/karmic uptodate 1.96+20090611-1ubuntu1

grub-common: /usr/lib/grub/grub-mkconfig_lib
sets --no-floppy option grub-pc doesnt understand
line 147: echo "search --no-floppy --fs-uuid --set ${fs_uuid}"

from changelog,

2009-06-04 Robert Millan <email address hidden>

        Prevent GRUB from probing floppies during boot.

        * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
        * commands/search.c (options): Add --no-floppy.
        (search_fs, search_file, grub_cmd_search): Support --no-floppy.
        * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
        --no-floppy when searching for UUIDs.

so i take it /usr/lib/grub/grub-mkconfig_lib is right and its a missing grub-pc patch issue

Alfred Chen (alfredchen) wrote :

Confirmed this bug on my thinkpad T42 and X200.

Angel Guzman Maeso (shakaran) wrote :

I confirm this bug on my Toshiba Satellite M60. The last update broke grub2.

Goh Lip (gohlip) wrote :

Last update of grup-pc on 24th June still needs "--no-floppy" to be removed from grub.cfg. (see my bug 391028). Additionally, need to wait at least 15 secs before entering grub entry, (Set time out to at least 15 secs); otherwise it will go to shell mode.

updating to grub-pc/karmic uptodate 1.96+20090611-1ubuntu2 didnt solve the problem but reinstalling it to the mbr manually has done it for me.

Felix Zielcke (fzielcke) wrote :

We added now a debconf prompt to install grub2 into MBR of all disks in your device.map
If you choose not to do this then such things can happen. That the generated grub.cfg isn't compatible anymore with the grub2 in your MBR (or the embed core.img)

i think my problem was installing as chainload then using the upgrade from legacy command (if i saw the option to install to the various mbr's on install i would have unset them to avoid overwriting the old grub)
then seeing grub2 on boot everything looks ok but upgrade-grub shows it isnt.
but dpkg-reconfigure grub-pc and going through the debconf options to install to the various mbr's makes everything ok again. just a note for anyone else who finds themselves here.
on a side note, the option to install to mbr's is now missing on freshly installing grub-pc, only the chainloading option is there, i take it this is the default now and not a bug

Cleber Santz (clebersantz) wrote :

Same here with Karmic 2.6.30-10-generic, removing "--no-floppy" from grub.cfg works.

Colin Watson (cjwatson) wrote :

For people affected by this bug, until we merge a newer version from Debian that does a better job of prompting you about it, you don't need to edit grub.cfg - just use grub-install to upgrade the boot loader to be able to cope with your configuration file.

Felix, is there any plan for stabilising this? I'm really not all that comfortable with running grub-install on every upgrade; we never did that in the past and it seems likely to be risky if we get the device name wrong. (Like it or not, we have plenty of Ubuntu users who want to install GRUB in a partition and chain-load it, rather than install it in the MBR, and they file very upset bug reports when we accidentally overwrite the boot loader they wanted to have in their MBR.) Can't we arrange to run grub-install only when there's some kind of interface break so that it's strictly necessary, and then try to keep those interface breaks to a minimum?

Felix Zielcke (fzielcke) wrote :

I only know of one incompatible change that is planned but not yet commited. About the BSD partition numbering. Chainging the letters to numbers like for real partitions already done.
I don't think Robert likes the idea to maintain some ABI/API number and asking for grub-install run only if that is different then the one in /boot/grub, but maybe you could just file a wishlist report at this.

Dan Kegel (dank) wrote :

I am running Karmic alpha 2, applied the updates offered to me, chose the defaults
everywhere, and ended up with a nonbootable system. It took a while to
figure out to remove the --no-floppy argument.

I didn't chain-load, as far as I know.

The debconf prompt made no sense to me, it offered no useful
choices other than 'continue'. And evidently it did the wrong thing.

I agree that the debconf prompt and even the help popout offer very little understandable help, and I've been dual booting for many years now.

NoahY (noahy) wrote :

To fix, just edit the /usr/lib/grub/grub-mkconfig_lib file, take out the --no-floppy on line 147:

- line 147: echo "search --no-floppy --fs-uuid --set ${fs_uuid}"
+ line 147: echo "search --fs-uuid --set ${fs_uuid}"

as Dinxter pointed out in the forums.

Removing --no-floppy isnt really a fix, to fix it grub2 should be installed to the right mbr, dpkg-reconfigure grub-pc and choosing the correct device(s) to install to for instance

Is anyone able to raise the importance of this bug?

I am aware of this bug and there is no need to be concerned about its
importance field.

Changed in grub2 (Ubuntu):
importance: Undecided → High

If the debconf prompt doestn't show you any devices or the wrong ones then your /boot/grub/device.map needs to be fixed.
The list is directly taken there from.
Or if device.map is right then it seems there's a bug somewhere.

(hd0) /dev/sda
(hd1) /dev/sdb
(hd2) /dev/sdc
(hd3) /dev/sdd
(hd4) /dev/sde
/boot/grub/device.map (END)

which is fine. still dont get the install to device prompt either from synaptic or apt-get with grub-pc purged and grub installed then installing grub-pc again, though i do when dpkg-reconfigure grub-pc. oddly i very occasionally do get the prompt when doing exactly the same procedure. i'll try do work out exactly which sequence of events causes what next week if i can

Confirmed that dpkg-reconfigure grub-pc and choosing the correct
device(s) to install fix this bug.

The last kernel update re-created this bug, until I manually removed the --no-floppy part again. And running dpkg-reconfigure grub-pc and choosing the correct device(s) won't work for me as I don't want grub installed to any MBRs

On Wed, Jul 15, 2009 at 02:04:38PM -0000, Duncan Lithgow wrote:
> The last kernel update re-created this bug, until I manually removed the
> --no-floppy part again. And running dpkg-reconfigure grub-pc and
> choosing the correct device(s) won't work for me as I don't want grub
> installed to any MBRs

You have grub installed *somewhere*. Reinstall it there ...

But not to an MBR, and that's the only options I got from the original update. I have grub installed to sdb5 and GAG managed my multiple OS issues.

Goh Lip (gohlip) wrote :

Problem is resolved in update of 16 Jul. Thanks guys.
I'll go convert my Hardy and my dedicated grub partition now to grub2.

Felix Zielcke (fzielcke) wrote :

>But not to an MBR, and that's the only options I got from the original update. I have grub installed to sdb5 and GAG >managed my multiple OS issues.

Then just run grub-install --force /dev/sdb5

Goh Lip (gohlip) wrote :

Yes, it still has the "--no-floppy" in grub.cfg. But it is boots okay now even with this.
Sorry I didn't make this clearer. Also converted my '1st grub' partition and my Hardy from grub legacy to grub2.

All works fine. Interesting though, Hardy grub2 does not contain the "--no-floppy" lines, and the /etc/default/grub does not contain "GRUB_TERMINAL=console" line. Manually adding it does not make it hidden either.

Dan Kegel (dank) wrote :

Still happening for me. Goh Lip, is it really resolved, or did you apply one of the workarounds?

This has stopped happening for me now. Even after reinstalling jaunty.

On Sun, Aug 16, 2009 at 9:29 PM, Dan Kegel <email address hidden> wrote:

> Still happening for me. Goh Lip, is it really resolved, or did you
> apply one of the workarounds?
>
> --
> grub2 update adds --no-floppy to "search " lines
> https://bugs.launchpad.net/bugs/391044
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>
> Status in “grub2” package in Ubuntu: Confirmed
>
> Bug description:
> Binary package hint: grub
>
> the update of grub2 on june 22 2009 added --no-floppy to all "search" lines
> in grub.cfg causing an error on boot . manualy editing grub.cfg to remove
> all instances of --no-floppy allows system to boot.
>

I do not have any problem as per my post on 2009-07-16. The grub.cfg still has the "--no-floppy" lines but it boots okay. This works even if that (Karmic) boot/grub is not set to mbr as this was the case in mine. I had a dedicated 'first grub' (on grub2) which boots to the Karmic grub config. I would also think it wouldn't be a problem for others using Gag or other boot methods to boot into Karmic as well, but it would be best to confirm with them. Felix and Duncan mentioned they are using Gag.
As for me, I consider the problem resolved.

Thanks.

sojourner (itsmealso2) wrote :

installing karmic or any other version of grub to ALL mbrs is a stupid and unacceptable solution . my test box has 6 drives MANY partitions and at all times 4 to 6 different installs each with its own grub installed to the appropriate mbr and I select from bios which mbr boots first to control which install boots by default , installing grub2 from karmic to all mbrs would essentialy destroy my system . Even in my "non test " boxes I have more than one install/distro on each .

Right, let me try to be crystal clear.

You *do not* need to install GRUB to the MBR to avoid this bug. You *do*
need to install a newer version of GRUB to wherever you originally put
GRUB.

This bug occurs when people have an old GRUB image *somewhere* that
they're using to boot, but never update it, so it can't understand the
new syntax in grub.cfg. GRUB 2 is as yet not entirely stable in terms of
things like file formats and so this sort of thing is to be expected.

(Though do bear in mind that GRUB 2 is less reliable when it's installed
in a partition boot sector rather than in the MBR; this forces it to use
the "blocklist" mechanism to locate its own bits rather than the more
reliable methods it can use when installed in the MBR, and in particular
this makes it less guaranteed to find the appropriate boot image on
multi-disk systems. The new version of grub2 in Debian, not yet merged
into Ubuntu, has a warning about this in its debconf templates. I think
we can and should continue to support this kind of setup insofar as it's
possible, but it does deserve a warning.)

I have Intel Atom Processor and I have installed the Ubuntu Karmic Kaola Alpha 4 into a SD Card. I also see this error. If I remove the search line in grub menu command, it is working fine.
I am doing every time maunally. I dont know how to save this configuration .

aladi (sivasakthiveln) wrote :

For me , It looks BIOS issue . Now I dont need to remove the search line.

Changed in grub2 (Ubuntu):
status: Confirmed → Invalid
Dan Kegel (dank) wrote :

Doing
  sudo grub-install /dev/sda
made the problem go away for me. Since I don't really care where
grub is installed, I don't care that this presumably changes that,
I'm just glad my system boots now. (Now if only the keyboard
worked every time... but that's a different Karmic bug.)

#1 worked for me :)

thanks

My laptop failed the reboot after today's upgrade to grub-pc 1.92~beta4-1ubuntu4.1. I have run 'dpkg-reconfigure grub-pc' as well as 'grub-install /dev/sda' and the problem persists. The workaound is to comment out the 'search --no-floppy' line in grub.cfg. This is a dual-boot arrangement with winxp on /dev/sda1 and karmic on /dev/sda5. Although this machine has had several generations of ubuntu installed, this was a 'clean' install of karmic over jaunty (not an upgrade) and to the best of my knowledge grub has only ever been installed on /dev/sda.

Anything I can do to avoid hand-editing grub.cfg after every grub update?

Thanks,

Steve
--

gksudo gedit /usr/lib/grub/grub-mkconfig_lib

remove the single instance of --no-floppy from the file save the new file, close gedit then run:

sudo update-grub

it will be applied, you can test with:

cat /boot/grub/grub.cfg | grep floppy

If you get no output then you have succeeded.

This is also in post #14 which you would have seen if you'd read the entire thread

Am Mittwoch, den 09.12.2009, 19:30 +0000 schrieb Steven Farmer:
> Anything I can do to avoid hand-editing grub.cfg after every grub
> update?

As I already said in the report, we added a debconf prompt so
grub-install gets automatically run, if you choose a device in there.
Run sudo dpkg-reconfigure grub-pc to see it (again).
Doing anything else is just a workaround and doestn't fix the problem
for the next time when add again something to grub.cfg which isn't
compatible with older versions of GRUB.
--
Felix Zielcke
Proud Debian Maintainer and GNU GRUB developer

Felix, thank you for your repsonse. Previous comments, including yours, left me with the impression that running dpkg-reconfigure should correct the problem. As I mentioned, I've done that (and selected /dev/sda, the only choice), but the problem remains. Anything else I can look at?

Am Donnerstag, den 10.12.2009, 01:12 +0000 schrieb Steven Farmer:
> Felix, thank you for your repsonse. Previous comments, including
> yours,
> left me with the impression that running dpkg-reconfigure should
> correct
> the problem. As I mentioned, I've done that (and selected /dev/sda,
> the
> only choice), but the problem remains. Anything else I can look at?
>

Did you saw the output of grub-install? I.e. the `Installation finished.
No error reported.' and the output of device.map at end?
To be safe though you could just run it with sudo yourself.
And you are booting from /dev/sda and not some different disk?
--
Felix Zielcke
Proud Debian Maintainer and GNU GRUB developer

>Did you saw the output of grub-install? I.e. the `Installation finished.

[Apologies for any line wraps]

---
root@spooky:~# grub-install /dev/sda
Installation finished. No error reported.
This is the contents of the device map /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'.

(hd0) /dev/sda

root@spooky:~# fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x17381737

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 10504 84373348+ 7 HPFS/NTFS
/dev/sda2 10505 19457 71914972+ 5 Extended
/dev/sda5 10505 19271 70420896 83 Linux
/dev/sda6 19272 19457 1494013+ 82 Linux swap / Solaris

---

/dev/sda is the only disk. This parition layout has been used for
several generations of ubuntu. /dev/sda5 is an ext4 filesystem.

Thanks,

Steve
--

Tarek Loubani (tareko) wrote :

I'm not sure why this bug was marked as invalid. It is reported and confirmed by several people. It is also an issue that exists in the new grub2 that did not exist previously. I have installed many versions of ubuntu on many, many different computers, and had never previously seen a boot fail with a fresh install like this. Further, grub-install /dev/sda and dpkg-reconfigure do not work for everybody. Even if they did, this should not be expected for users to simply boot their systems (which will not boot anyway for the first time except in skilled hands).

tarek : )

Changed in grub2 (Ubuntu):
status: Invalid → Confirmed
summary: - grub2 update adds --no-floppy to "search " lines
+ Fresh karmic install does not boot due to grub2 adding --no-floppy to
+ "search " lines

It may help others besides me to look at bug #403408, which describes a
problem with the grub2 search command when part of the target of the
search lies beyond 137.44 GB (128 GiB). A Debian fix is reported to
have been released on 2009-12-14 and hopefully will trickle down to us
soon. I can confirm that reorganizing partitions to put Karmic wholly
below 128 GiB fixes the problem for me.

Shouldn't this be closed as Karmic is EOL as well as not being updated in nearly 3 years....?

Vibhav Pant (vibhavp) wrote :

Is this bug present in Ubuntu 11.10?

> Is this bug present in Ubuntu 11.10?

Sorry, I don't know about 11.10, but the bug is not present in 11.04
with grub 1.99-rc1-13ubuntu1 so I would expect 11.10 to be ok as well.

Steve
--

robert (stanoly30) wrote :

Not present in 11.10 ubuntu

On Thu, Mar 1, 2012 at 11:20 AM, Steven Farmer <email address hidden>wrote:

> > Is this bug present in Ubuntu 11.10?
>
> Sorry, I don't know about 11.10, but the bug is not present in 11.04
> with grub 1.99-rc1-13ubuntu1 so I would expect 11.10 to be ok as well.
>
> Steve
> --
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (399572).
> https://bugs.launchpad.net/bugs/391044
>
> Title:
> Fresh karmic install does not boot due to grub2 adding --no-floppy to
> "search " lines
>
> Status in “grub2” package in Ubuntu:
> Confirmed
>
> Bug description:
> Binary package hint: grub
>
> the update of grub2 on june 22 2009 added --no-floppy to all "search"
> lines in grub.cfg causing an error on boot . manualy editing grub.cfg
> to remove all instances of --no-floppy allows system to boot.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/391044/+subscriptions
>

--
Die Stimme des Intellekts ist leise, aber sie ruht nicht, ehe sie sich
Gehoer verschafft hat.
 Sigmund Freud

Vibhav Pant (vibhavp) wrote :

On the basis of above comments, I am marking bug as "Fix Released". Feel free to report any more bugs.

Changed in grub2 (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions