grub-install trashed grub-menu if run on current partition to make current partition to be a default boot up OS

Bug #898655 reported by aimwin
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Please see the note at the end for why I start this bug report.
-----------------------------------------------------------------------------------
The bugs apply to both grub versions, with full updated all packages to the most current date,
2 Dec 2011

tbuntu@tbuntu:~$ grub-install -v
grub-install (GRUB) 1.99~rc1-13ubuntu3
Ubuntu 11.04
and
tbuntu@tbuntu:~$ grub-install -v
grub-install (GRUB) 1.99-12ubuntu5
Lubuntu 11.10
-------------------------------------------------------------
grub-install will destroy "grub boot menu" and you will get "grub command prompt",
if you use the command grub-install in the following ways

you boot into "current partition", in my case sda4 contain ubuntu 11.04
(I also test with the same result in Lubuntu 11.10 in /dev/sda11)

sudo mount /dev/sda(current partition) /mnt
in my case sudo mount /dev/sda4 /mnt

sudo grub-install --boot-directory=/mnt/boot /dev/sda
in my case I want to reinstall grub to /dev/sda so when the computer boot up it will auto boot into sda4,
which is the ubuntu partition I am using,
"to execute" the grub-install command.

It will produce this message.

"Installation finished. No error reported."

But in fact the grub menu was "trashed" or "disabled", after you reboot, it will only be a grub> display.

My opinion the bugs are

1. The "report-Installation finished. No error reported." at the end is wrong information.
or / and
2. If usage of the above "grub-install" is prohibited,
then
grub-install should refuse to continue
and
there should be an error message telling you cannot "do grub-install" to your "current" partition.
============================================================================
----------------------------------------------
Notes:
1.)
I have commented in the
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/730225
since I thought the error I got
......Sector 50 is already in use by FlexNet; avoiding it...........
was the main cause for destroyed grub menu.
and that bug report is the same as mine.

But after experiment with clean hard disk that produce no "...sector 50...Flexnet....".
it resulted in the same "destroyed grub menu".

So I decide to report as bug.

2.)
the reasons I start to do grub-install the above way,
because the "startup-manager" fail to change grub menu as it did for my other previous Ubuntu versions,
for my Lubuntu 11.10 to be a default boot OS.
So I accidentally found that later that it is a bug?

aimwin (aim-mail)
summary: - grub-install trashed grub-menu if run on current partition to reinstall
- current partition to default boot up
+ grub-install trashed grub-menu if run on current partition to make
+ current partition to be a default boot up OS
Revision history for this message
aimwin (aim-mail) wrote :

I have SOLVED the above problems #1 by using
boot-repair
to do install grub2 so we can set the default boot OS to the "current" partition we are booting from.

Notes for Newbies =
You can install "boot-repair" as in https://help.ubuntu.com/community/Boot-Repair
and use that "boot-repair" instead of "sudo grub-install .........."
BUT YOU MUST,
1. READ the whole page thoroughly.
2. You must click on Advance Option and MAKE SURE you select the correct /dev/sd??
=====================

So I think we must execute more commands to make sure it can be done as "boot-repair" can do.

But if we execute just the above commands as #1 post,
 from other partitions or drives it worked successfully.

So I still consider it is a "Reports" Bugs still.

Dear Gurus, please help to comment and teach us how to do it properly, if the above is considered not a bug.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

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

Other bug subscribers

Remote bug watches

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