On Mon, Jun 29, 2020 at 01:26:50PM +0200, Florian Zieboll wrote:
> On June 29, 2020 12:37:45 AM GMT+02:00, Hendrik Boom <hend...@topoi.pooq.com> 
> wrote:
> > Where is it configured which drives get updated when I update the kernel,
> > as part of a regular upgrade using aptitude.
> > 
> > Presumably it has to install the new kernel, build an initrd, find out 
> > what other bootable systems are available, write a new grub 
> > configuration, and possibly update the MBR and stage1 of Grub ...
> > 
> > Now somewhere there must be a configuration which hard drives' MBRs and 
> > stage1's have to be written
> 
> 
> AFAIKT AFK, grub2's configuration resides under /boot/grub/ (written by 
> update-grub). 
> 
> On the other hand, grub-install writes the bootloader itsself to the MBR 
> resp. some partition - including the information, where the aforementioned 
> configuration can be found. 
> 
> Thus, update-grub (as called by apt for e.g. a kernel upgrade) does not need 
> to know, where the bootloader binary is installed. Only when this binary is 
> installed the first time or needs to be updated, grub-install prompts for the 
> target location. 
> 
> You can have the bootloader installed on every disk's MBR and in 
> every partition simultaneously, as the BIOS  resp. the 'boot' flag 
> define, which one gets called.

Exactly.

What I want to know is:
   What determines which disks' MBRs get written to during a 
   normal kernel upgrade initiated by aptitude.

I have one disk drive that's failing in a few sectors just past the 
actual MBR sector and so rewriting these fails.  The rest of the disk 
seems to be fine.  Yes, I know I have to replace that drive soon and 
pull it out of the machine (but at the moment I can't find my 
screwdriver).

I presume it's booting using another MBR, but upgrades are failing 
becaues of this.

Does it determine which MBRs to update by looking at the BIOS 'boot' 
flags?

Or is there some configuration file somewhere?

-- hendrik

> 
> libre Grüße,
> Florian
> 
> -- 
> 
> [message sent otg]
> 
> _______________________________________________
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
_______________________________________________
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

Reply via email to