Re: [DNG] Configuration of boot drives

2020-06-29 Thread Rick Moen via Dng
Quoting Tito via Dng (dng@lists.dyne.org):

> if you are brave you can erase grub from mbr of the disk:
> 
> Zero out MBR. (but not all of it!) You need to use 'dd' to erase the
> MBR. For my machine the command was:
> 
> dd if=/dev/zero of=/dev/YOUR_DRIVE bs=446 count=1

The need for bravery can be averted by making a backup copy of the
entire sector zero, and then storing that image file off-system:

dd if=/dev/YOUR_DRIVE of=/tmp/mbr.img bs=512 count=1

The point is, if necessary, this file can be copied back (using dd) to
sector zero using a live distro.

-- 
Rick Moen  "Use 'quirky' to describe potentially dangerous crazy 
r...@linuxmafia.compeople that you don't want to upset."   
McQ!  (4x80)  -- @FakeAPStylebook
   
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Configuration of boot drives

2020-06-29 Thread Tito via Dng


On 6/29/20 6:22 PM, Hendrik Boom wrote:
> On Mon, Jun 29, 2020 at 05:49:29PM +0200, Gonzalo Pérez de Olaguer Córdoba 
> wrote:
>> Hi, Hendrik.
>>
>> El Sun, 28 Jun 2020 18:37:45 -0400
>> Hendrik Boom  escribió:
>>
>>> Where is it configured which drives get updated when I update the kernel,
>>> as part of a regular upgrade using aptitude.
>>
>> debconf has a configuration option for that.
>>
>> try: dpkg-reconfigure grub-pc
> 
> That was what I was looking for.  It's what I remember seeing long long
> ago during installation or major upgrade.
> 
> So I told it not to use /dev/sdb's boot record.
> 
> And it decided to try to write to sector 51 on /dev/sdb anyway,
> Is it maybe trying to remove the boot stuff on that drive?
> 
> I think there's no help for it but to find my screwdriver and physically 
> remove the disk.

Hi,

if you are brave you can erase grub from mbr of the disk:

Zero out MBR. (but not all of it!) You need to use 'dd' to erase the MBR. For 
my machine the command was:

dd if=/dev/zero of=/dev/YOUR_DRIVE bs=446 count=1

Why the 'bs=446'? Because the rest of your MBR holds the partition table for 
the drive... which you do not want to destroy.

Use at your own risk

Ciao,
Tito

> That will take a while.
> 
> -- hendrik
> 
> 
>>
>> if you see nothing interesting, retry with the -plow option.
>>
>> -- 
>>Gonzalo Pérez de Olaguer Córdoba   s...@gpoc.es
>>   -=- buscando empleo desde 1988 -=-   www.gpoc.es 
>>
>> PGP: 3F87 CCE7 8B35 8C06 E637  2D57 5723 9984 718C A614
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Configuration of boot drives

2020-06-29 Thread Hendrik Boom
On Mon, Jun 29, 2020 at 11:44:40AM -0400, Hendrik Boom wrote:
> On Tue, Jun 30, 2020 at 12:36:58AM +1000, terryc wrote:
> > On Mon, 29 Jun 2020 08:18:24 -0400
> > Hendrik Boom  wrote:
> > 
> > 
> > > Does it determine which MBRs to update by looking at the BIOS 'boot' 
> > > flags?
> > 
> > As I understand it, the boxen looks at the UEFI(?) for the pointer to
> > which piece of HW carries the initial loader, which then loads "grub"
> > and its configuration files and the modules it needs to access the
> > basic system to build up the OS to the final system.
> 
> My hardware does not do UEFI.  It is a BIOS system.
> 
> Two of the drives are smallish, and have the old-style partitioning, 
> with four primary partitions, one of which is subdivided into secondary 
> partitions, One of these drives is the problem.
> 
> I have two large EFI-partitioned disks, starting of course with 

Correction.  They are GPT-patitioned disks.  EFI is a boot procedure 
which I don't use; GPT is a prartinioning scheme.  I confused the two 
acronyms.
 
> "protective MBR"s.  These are working properly.
> /boot is on these drives.  Well, actually in one partition on each of 
> them, these partitions paired off as a software RAID.
> 
> > 
> > The only file that I can find that points to any articular piece of
> > hardware is /boot/grub/grub.cfg, which shoud list the various boot
> > menu options. which points to hd0 with a device-id.
> 
> Looked through that.  It contains descriptions of all the operating 
> systems on my disk drives, identified by some kind of UUID.  It does not 
> seem to have anything describing where boot from initially to load grub 
> stage 1 or grub stage 1.5.  This is what I expected, because the 
> early stages of Grup already have to be loaded and running before it 
> can even understand the /boot file system.
> Grub stage 1.5 presumably looks through the menu and figures out what 
> partition contains the /boot it si supposed to look for.
> 
> > 
> > > Or is there some configuration file somewhere?
> > 
> > So when (for me) sudo apt-get dist-upgrade loads newer images and runs
> > grub-update/update-grub/?? is runs it probably checks what is in the
> > existing grub.cfg and just adjust the various boot menu options(add
> > newest, drops oldest). 
> > 
> > If you can get the machine to boot, there is a method to
> > copy the grub config to a floppy or I guess a usb stick
> > these days.
> 
> Machine boots fine.  Just won't upgrade.
> 
> > 
> > At one stage, writing a spare boot floppy and keeping it up todate was
> > recommended.
> 
> I used to do that, but no loger have a floppy drive.  I'd have to use a 
> USB stick, or perhaps even a Devuan installer used as a rescue disk.
> 
> -- hendrik
> 
> > 
> > Remember the reference to the hardware wll be 'primative' as t only has
> > a basic system at first.
> > ___
> > 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
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Configuration of boot drives

2020-06-29 Thread Hendrik Boom
On Mon, Jun 29, 2020 at 05:49:29PM +0200, Gonzalo Pérez de Olaguer Córdoba 
wrote:
> Hi, Hendrik.
> 
> El Sun, 28 Jun 2020 18:37:45 -0400
> Hendrik Boom  escribió:
> 
> > Where is it configured which drives get updated when I update the kernel,
> > as part of a regular upgrade using aptitude.
> 
> debconf has a configuration option for that.
> 
> try: dpkg-reconfigure grub-pc

That was what I was looking for.  It's what I remember seeing long long
ago during installation or major upgrade.

So I told it not to use /dev/sdb's boot record.

And it decided to try to write to sector 51 on /dev/sdb anyway,
Is it maybe trying to remove the boot stuff on that drive?

I think there's no help for it but to find my screwdriver and physically 
remove the disk.

That will take a while.

-- hendrik


> 
> if you see nothing interesting, retry with the -plow option.
> 
> -- 
>Gonzalo Pérez de Olaguer Córdoba   s...@gpoc.es
>   -=- buscando empleo desde 1988 -=-   www.gpoc.es 
> 
> PGP: 3F87 CCE7 8B35 8C06 E637  2D57 5723 9984 718C A614
> ___
> 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


Re: [DNG] Configuration of boot drives

2020-06-29 Thread d...@d404.nl
On 29-06-2020 17:53, Hendrik Boom wrote:
> On Mon, Jun 29, 2020 at 05:24:57PM +0200, d...@d404.nl wrote:
>> On 29-06-2020 17:13, Hendrik Boom wrote:
>>> On Mon, Jun 29, 2020 at 12:44:05PM +, dal wrote:
> From: Dng [mailto:dng-boun...@lists.dyne.org] On Behalf Of Hendrik Boom
> Sent: den 29 juni 2020 14:18
> What I want to know is:
>What determines which disks' MBRs get written to during a 
>normal kernel upgrade initiated by aptitude.
 A normal kernel upgrade does not, nor needs to  rewrite MBRs.
>>> Grub stage 1 resides within 446 bytes of the MBR.
>>> Grub stage 1.5 resides in the spae between the MBR and the first partition.
>>> Grub stage 2 resides in the /boot within a partition.
>>>
>>> It's entirely plausible that some of stage 1 and stage 1.5 may need changes.
>>>
>>> In any case, the last upgrade I did tried to write in the space between 
>>> the MBR and the first partition of on of my hard drives. 
>>>
>>> I'd like it to stop trying that, letting it write to my other drives and 
>>> never boot from this one again, which I plan to remove when I find my 
>>> screwdriver.
>>>
>>> -- hendrik
>>>
 /D

 ___
 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
>> According to grub documentation you can make grub-mkconfig skip a drive
>> with one of these options in /etc/default/grub
>>
>> 'GRUB_DISABLE_OS_PROBER'
>>  Normally, 'grub-mkconfig' will try to use the external 'os-prober'
>>  program, if installed, to discover other operating systems
>>  installed on the same system and generate appropriate menu entries
>>  for them.  Set this option to 'true' to disable this.
>>
>> 'GRUB_OS_PROBER_SKIP_LIST'
>>  List of space-separated FS UUIDs of filesystems to be ignored from
>>  os-prober output.  For efi chainloaders it's @
> That tells it to ignore particular partitions.  My partitions are fine,
> I have problems with the first few sectors of one hard drive containing 
> the first few stages of the boot process before it even looks at a 
> partition.   These sectors are not in a partition.  I want it to ignore 
> that entire *drive*, not a partition.
>
> -- hendrik
The first option disables the check of drives for the presence of
(other) filesystems. The second has indeed to do with partitions only
and you can ignore that one.



signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Configuration of boot drives

2020-06-29 Thread Hendrik Boom
On Mon, Jun 29, 2020 at 05:24:57PM +0200, d...@d404.nl wrote:
> On 29-06-2020 17:13, Hendrik Boom wrote:
> > On Mon, Jun 29, 2020 at 12:44:05PM +, dal wrote:
> >>> From: Dng [mailto:dng-boun...@lists.dyne.org] On Behalf Of Hendrik Boom
> >>> Sent: den 29 juni 2020 14:18
> >>> What I want to know is:
> >>>What determines which disks' MBRs get written to during a 
> >>>normal kernel upgrade initiated by aptitude.
> >> A normal kernel upgrade does not, nor needs to  rewrite MBRs.
> > Grub stage 1 resides within 446 bytes of the MBR.
> > Grub stage 1.5 resides in the spae between the MBR and the first partition.
> > Grub stage 2 resides in the /boot within a partition.
> >
> > It's entirely plausible that some of stage 1 and stage 1.5 may need changes.
> >
> > In any case, the last upgrade I did tried to write in the space between 
> > the MBR and the first partition of on of my hard drives. 
> >
> > I'd like it to stop trying that, letting it write to my other drives and 
> > never boot from this one again, which I plan to remove when I find my 
> > screwdriver.
> >
> > -- hendrik
> >
> >> /D
> >>
> >> ___
> >> 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
> 
> According to grub documentation you can make grub-mkconfig skip a drive
> with one of these options in /etc/default/grub
> 
> 'GRUB_DISABLE_OS_PROBER'
>  Normally, 'grub-mkconfig' will try to use the external 'os-prober'
>  program, if installed, to discover other operating systems
>  installed on the same system and generate appropriate menu entries
>  for them.  Set this option to 'true' to disable this.
> 
> 'GRUB_OS_PROBER_SKIP_LIST'
>  List of space-separated FS UUIDs of filesystems to be ignored from
>  os-prober output.  For efi chainloaders it's @

That tells it to ignore particular partitions.  My partitions are fine,
I have problems with the first few sectors of one hard drive containing 
the first few stages of the boot process before it even looks at a 
partition.   These sectors are not in a partition.  I want it to ignore 
that entire *drive*, not a partition.

-- hendrik
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Configuration of boot drives

2020-06-29 Thread Gonzalo Pérez de Olaguer Córdoba
Hi, Hendrik.

El Sun, 28 Jun 2020 18:37:45 -0400
Hendrik Boom  escribió:

> Where is it configured which drives get updated when I update the kernel,
> as part of a regular upgrade using aptitude.

debconf has a configuration option for that.

try: dpkg-reconfigure grub-pc

if you see nothing interesting, retry with the -plow option.

-- 
   Gonzalo Pérez de Olaguer Córdoba   s...@gpoc.es
  -=- buscando empleo desde 1988 -=-   www.gpoc.es 

PGP: 3F87 CCE7 8B35 8C06 E637  2D57 5723 9984 718C A614
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Configuration of boot drives

2020-06-29 Thread Hendrik Boom
On Tue, Jun 30, 2020 at 12:36:58AM +1000, terryc wrote:
> On Mon, 29 Jun 2020 08:18:24 -0400
> Hendrik Boom  wrote:
> 
> 
> > Does it determine which MBRs to update by looking at the BIOS 'boot' 
> > flags?
> 
> As I understand it, the boxen looks at the UEFI(?) for the pointer to
> which piece of HW carries the initial loader, which then loads "grub"
> and its configuration files and the modules it needs to access the
> basic system to build up the OS to the final system.

My hardware does not do UEFI.  It is a BIOS system.

Two of the drives are smallish, and have the old-style partitioning, 
with four primary partitions, one of which is subdivided into secondary 
partitions, One of these drives is the problem.

I have two large EFI-partitioned disks, starting of course with 
"protective MBR"s.  These are working properly.
/boot is on these drives.  Well, actually in one partition on each of 
them, these partitions paired off as a software RAID.

> 
> The only file that I can find that points to any articular piece of
> hardware is /boot/grub/grub.cfg, which shoud list the various boot
> menu options. which points to hd0 with a device-id.

Looked through that.  It contains descriptions of all the operating 
systems on my disk drives, identified by some kind of UUID.  It does not 
seem to have anything describing where boot from initially to load grub 
stage 1 or grub stage 1.5.  This is what I expected, because the 
early stages of Grup already have to be loaded and running before it 
can even understand the /boot file system.
Grub stage 1.5 presumably looks through the menu and figures out what 
partition contains the /boot it si supposed to look for.

> 
> > Or is there some configuration file somewhere?
> 
> So when (for me) sudo apt-get dist-upgrade loads newer images and runs
> grub-update/update-grub/?? is runs it probably checks what is in the
> existing grub.cfg and just adjust the various boot menu options(add
> newest, drops oldest). 
> 
> If you can get the machine to boot, there is a method to
> copy the grub config to a floppy or I guess a usb stick
> these days.

Machine boots fine.  Just won't upgrade.

> 
> At one stage, writing a spare boot floppy and keeping it up todate was
> recommended.

I used to do that, but no loger have a floppy drive.  I'd have to use a 
USB stick, or perhaps even a Devuan installer used as a rescue disk.

-- hendrik

> 
> Remember the reference to the hardware wll be 'primative' as t only has
> a basic system at first.
> ___
> 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


Re: [DNG] Configuration of boot drives

2020-06-29 Thread d...@d404.nl
On 29-06-2020 17:13, Hendrik Boom wrote:
> On Mon, Jun 29, 2020 at 12:44:05PM +, dal wrote:
>>> From: Dng [mailto:dng-boun...@lists.dyne.org] On Behalf Of Hendrik Boom
>>> Sent: den 29 juni 2020 14:18
>>> What I want to know is:
>>>What determines which disks' MBRs get written to during a 
>>>normal kernel upgrade initiated by aptitude.
>> A normal kernel upgrade does not, nor needs to  rewrite MBRs.
> Grub stage 1 resides within 446 bytes of the MBR.
> Grub stage 1.5 resides in the spae between the MBR and the first partition.
> Grub stage 2 resides in the /boot within a partition.
>
> It's entirely plausible that some of stage 1 and stage 1.5 may need changes.
>
> In any case, the last upgrade I did tried to write in the space between 
> the MBR and the first partition of on of my hard drives. 
>
> I'd like it to stop trying that, letting it write to my other drives and 
> never boot from this one again, which I plan to remove when I find my 
> screwdriver.
>
> -- hendrik
>
>> /D
>>
>> ___
>> 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

According to grub documentation you can make grub-mkconfig skip a drive
with one of these options in /etc/default/grub

'GRUB_DISABLE_OS_PROBER'
 Normally, 'grub-mkconfig' will try to use the external 'os-prober'
 program, if installed, to discover other operating systems
 installed on the same system and generate appropriate menu entries
 for them.  Set this option to 'true' to disable this.

'GRUB_OS_PROBER_SKIP_LIST'
 List of space-separated FS UUIDs of filesystems to be ignored from
 os-prober output.  For efi chainloaders it's @




signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Configuration of boot drives

2020-06-29 Thread Hendrik Boom
On Mon, Jun 29, 2020 at 12:44:05PM +, dal wrote:
> > From: Dng [mailto:dng-boun...@lists.dyne.org] On Behalf Of Hendrik Boom
> > Sent: den 29 juni 2020 14:18
> 
> > What I want to know is:
> >What determines which disks' MBRs get written to during a 
> >normal kernel upgrade initiated by aptitude.
> 
> A normal kernel upgrade does not, nor needs to  rewrite MBRs.

Grub stage 1 resides within 446 bytes of the MBR.
Grub stage 1.5 resides in the spae between the MBR and the first partition.
Grub stage 2 resides in the /boot within a partition.

It's entirely plausible that some of stage 1 and stage 1.5 may need changes.

In any case, the last upgrade I did tried to write in the space between 
the MBR and the first partition of on of my hard drives. 

I'd like it to stop trying that, letting it write to my other drives and 
never boot from this one again, which I plan to remove when I find my 
screwdriver.

-- hendrik

> 
> /D
> 
> ___
> 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


Re: [DNG] Configuration of boot drives

2020-06-29 Thread terryc
On Mon, 29 Jun 2020 08:18:24 -0400
Hendrik Boom  wrote:


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

As I understand it, the boxen looks at the UEFI(?) for the pointer to
which piece of HW carries the initial loader, which then loads "grub"
and its configuration files and the modules it needs to access the
basic system to build up the OS to the final system.

The only file that I can find that points to any articular piece of
hardware s is /boot/grub/grub.cfg, which shoud list the various boot
menu otins. which points to hd0 with a device-id.

> Or is there some configuration file somewhere?

So when (for me) sudo apt-get dist-upgrade loads newer images and runs
grub-update/update-grub/?? is runs it probably checks what is in the
existing grub.cfg and just adjust the various boot menu options(add
newest, drops oldest). 

If you can get the machine to boot, there is a method to
copy the grub config to a floppy or I guess a usb stick
these days.

At one stage, writing a spare boot floppy and keeping it up todate was
recommended.

Remember the reference to the hardware wll be 'primative' as t only has
a basic system at first.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Configuration of boot drives

2020-06-29 Thread dal
> From: Dng [mailto:dng-boun...@lists.dyne.org] On Behalf Of Hendrik Boom
> Sent: den 29 juni 2020 14:18

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

A normal kernel upgrade does not, nor needs to  rewrite MBRs.

/D

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Configuration of boot drives

2020-06-29 Thread Hendrik Boom
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  
> 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


Re: [DNG] Configuration of boot drives

2020-06-29 Thread Florian Zieboll
On June 29, 2020 12:37:45 AM GMT+02:00, Hendrik Boom  
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.

libre Grüße,
Florian

-- 

[message sent otg]

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Configuration of boot drives

2020-06-28 Thread mett
On 2020年6月29日 7:37:45 JST, Hendrik Boom  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.
>
>I think my machine is configured to write this to multiple drives.  (I 
>vaguely remember configuring this long ago during an installation or 
>maybe an upgrade from debian to Devuan)
>In any case it tries to write to /dev/sdb and has trouble doing so.  
>(hardware problem; I plan to remove this disk once I find a 
>screwdriver)
>/dev/sda, /dev/sdc, and /dev/sdd are also available.
>
>Where is this configuration located?
>How can I change this configuration?
>
>-- hendrik
>___
>Dng mailing list
>Dng@lists.dyne.org
>https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

Hi,

are you using md and mdam?

If YES,  then below command
might help you to find where you 
installed kernel and grub  

mdadm --details /dev/md0

#disclaimer:
 this is just an effect of mdadm 
 command output.

 There are better ways, I do not know,
  I think.

HTH___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] Configuration of boot drives

2020-06-28 Thread Hendrik Boom
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.

I think my machine is configured to write this to multiple drives.  (I 
vaguely remember configuring this long ago during an installation or 
maybe an upgrade from debian to Devuan)
In any case it tries to write to /dev/sdb and has trouble doing so.  
(hardware problem; I plan to remove this disk once I find a 
screwdriver)
/dev/sda, /dev/sdc, and /dev/sdd are also available.

Where is this configuration located?
How can I change this configuration?

-- hendrik
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng