[nmglug] grub2 ,Ubuntu 9.10 "workarounds" in part
a_kaluta
akaluta at taosnet.com
Sat Dec 26 03:28:29 PST 2009
Grub2 Ubuntu 9.10 collection some "interesting" work arounds.
Limited synopsis based on:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/403408
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/391044
also "Ubuntu 9.10 Grub2 "fix"." nmglug at nmglug.org archives 12/24/09
BEGINNING OF BUG/403408
MAleRN1973 wrote on 2009-07-24:
#1
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!
Felix Zielcke wrote on 2009-10-30:
Re: [Bug 403408] Re: Grub 2 problem,
error: no such device
#10
......
> 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.
jon wrote on 2009-11-01:
#14
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 wrote on 2009-11-01:
#15
>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.
Steve McGrath wrote on 2009-11-01:
#17
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.
Rhubarb wrote on 2009-11-11:
#33
...
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 :)
Dennis wrote on 2009-11-12:
#35
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
houstonbofh wrote on 2009-11-27:
#39
Hanno Böck wrote:
... 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
Jordan wrote on 2009-12-04:
#42
Since the upstream bug report mentions that this happens on BIOSs that
can only read the first portion of large drives, can someone having this
problem and willing to risk possibly making the situation worse ( i.e.
not bootable even without the search line ) try "sudo grub-install
--disk-module=ata /dev/sda" ( where /dev/sda is the drive you want to
install to ). This should either be run from the booted system or if you
are using a LiveCD then in a chroot as explained here:
http://grub.enbug.org/Grub2LiveCdInstallGuide
If it doesn't work you should be able to undo the change by just running
grub-install again without the "--disk-module=ata" parameter.
dpkred wrote on 2009-12-18:
#53
Hi guys, meant to post earlier, the issue was more basic, the Oct was
older
than I thought and was a 32bit machine, got it reconfigured to 64 and do
far
all seems to be working well. Thanks
Sent from my Magic
On 17 Dec 2009 00:36, "vdbergh" <email address hidden> wrote:
I have some useful info to contribute I think.
I just got myself a 340Gb IDE drive. ...
Reinstalling with a small root partition of 30Gb and allocating the rest
of the drive as a /home partition solved the problem.
....
end of bug/403408
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
BEGINNING of /bug/391044
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/391044
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.
Goh Lip wrote on 2009-06-25:
#5
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.
NoahY wrote on 2009-07-03:
#14
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}"
Duncan Lithgow wrote on 2009-07-15:
Re: grub2 update adds --no-floppy to
"search " lines
#21
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
Colin Watson wrote on 2009-07-15:
Re: [Bug 391044] Re: grub2 update
adds --no-floppy to "search " lines
#22
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 ...
Dan Kegel wrote on 2009-09-08:
#34
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.)
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
Felix Zielcke wrote on 2009-12-09:
Re: [Bug 391044] Re: grub2 update
adds --no-floppy to "search " lines
#38
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
>Did you saw the output of grub-install? I.e. the `Installation
finished.
[Apologies for any line wraps]
---
root at 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 at 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.
More information about the nmglug
mailing list