[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: grub warning when updating



Guy Marcenac wrote:
> Gary Dale a écrit :
> >Guy Marcenac wrote:
> >>Setting up grub-pc (1.99-27+deb7u2) ...
> >>/usr/sbin/grub-setup: warn: Attempting to install GRUB to a
> >>partitionless disk or to a partition.  This is a BAD idea..

It would be nice if that warning message gave the name of the
partition it was trying to install into.  It doesn't.

So I must ask.  What is the target that you selected to install grub?

The above says it is either a "partitionless disk or to a partition".
Both are bad choices.  Select a different location.

> >>Since this update I did not dare rebooting my system...
> >>What happened?

Probably nothing happened.  As in there was no grub install due to the
warning / error message above.  It looks to me like it refused to do
anything in that case.  Probably a good thing.

> >>Do I have to change my grub install, or is it OK to keep it like this?
> >
> >It's generally OK but not as reliable. However, the question is
> >how are your disks partitioned?
> >
> >In general you should install grub to the MBR on a partitioned
> >drive. In your case you seem to be trying to install it either to
> >a partition or to an unpartitioned drive. Which is it?

Yes.  Which is it?

> My disk is partitionned using lvm2
> # df
> ...

That does not answer the question.  That shows us your LVM logical
volumes.  Those are mostly unrelated to the physical disks.

> How should I do to come back to a correct installation of grub?
> note: this is a remote server I manage through ssh

Hopefully you can get on the console to see console messages and to
take corrective console action?  Yes?  No?

To reconfigure the grub-pc package run dpkg-reconfigure:

  # dpkg-reconfigure grub-pc

It will ask you the configuration questions again.  It will default to
the previous answers to the questions.  Hitting Ok and Enter will
simply select the same thing that was selected before.  But you can
change the values.

Normally for me the "Linux command line:" is left empty.  Normally for
me the "Linux default command line:" is "quiet".  The next page is the
important page for you.  It documents the install drives.  It says:

  The grub-pc package is being upgraded. This menu allows you to
  select which devices you'd like grub-install to be automatically run
  for, if any.
                                                                               
  Running grub-install automatically is recommended in most
  situations, to prevent the installed GRUB core image from getting
  out of sync with GRUB modules or grub.cfg.
                                                                               
  If you're unsure which drive is designated as boot drive by your
  BIOS, it is often a good idea to install GRUB to all of them.
                                                                               
  Note: it is possible to install GRUB to partition boot records as
  well, and some appropriate partitions are offered here. However,
  this forces GRUB to use the blocklist mechanism, which makes it less
  reliable, and therefore is not recommended.

That is the case you are faced with now.  Your df command shows that
you have "/" on "/dev/sda1".  That is great.  In the next screen it
will display several options.  One of those options should be
"/dev/sda".  In a normal case I would install grub to there.  But I
think previously you followed the written advice above, and installed
grub to _all_ locations as they recommended.  But one of those was the
boot device and that is causing things to complain due to the need for
blocklists in that case.

Is there any reason you would not want to install grub to /dev/sda?

If that is the decision the select *only* that one location, unselect
any other locations, and proceed.

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: