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

Re: How to get Debian live running from flash with persistence

On Tue, 16 Apr 2013, Brian wrote:
> On Mon 15 Apr 2013 at 21:29:22 -0300, Henrique de Moraes Holschuh wrote:
> > On Mon, 15 Apr 2013, Brian wrote:
> > > That cannot happen. Updating the system might alter grub.cfg but GRUB
> > > itself is not installed or reinstalled to, for example, the MBR of any
> > > disk.
> > 
> > This is not entirely correct.  You need to put all grub* packages on hold to
> > make sure it won't ever update the boot loader itself.
> It is entirely correct. Although the OP may not have realised it, he was
> concerned whether
>    grub-install /dev/sdX
> was executed during an upgrade or dist-upgrade. He may have thought it
> could occur during installing new GRUB packages or a new kernel. If it
> does I've never experienced anything like this happening. Of course,
> there may be a script which does this and I have overlooked it.

It certainly won't happen because of the install of a new kernel.

However, it will be done if the postinst script of grub-pc has any reason to
update stage 1.  AFAIK, currently it only does that when upgrading from the
previous branch of grub, but in the future it may happen because of an
update that fixes a bug or limitation from stage 1, for example.

It may or may not do the right thing and update the right MBR.  If you need
to be sure it will never be done, place the apropriate packages on hold.
Alternatively, tell the grub-pc package's config script to install to a
persistent name for the pendrive (maybe one is available in /dev/disk/by-* ?
Otherwise, you need to tweak udev to create one), and it will update stage 1
in that place if it ever needs to do it.  dpkg-reconfigure grub-pc lets you
do that.

  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

Reply to: