Re: [PATCH] grub-install: Use `GRUB_DISTRIBUTOR` value as EFI boot option title

2024-02-08 Thread Daniel Kiper
On Thu, Feb 01, 2024 at 10:09:04AM +, Mate Kukri wrote: > We are going to be shipping something like this in Ubuntu as we would > like our boot entries to be called "Ubuntu" instead of "ubuntu". > > I wonder if other users of GRUB would find this naming approach > better, I could gate this behi

Re: [PATCH] grub-install: Use `GRUB_DISTRIBUTOR` value as EFI boot option title

2024-02-01 Thread Mate Kukri
We are going to be shipping something like this in Ubuntu as we would like our boot entries to be called "Ubuntu" instead of "ubuntu". I wonder if other users of GRUB would find this naming approach better, I could gate this behind a command line option if the patch is easier to accept that way.

[PATCH] grub-install: Use `GRUB_DISTRIBUTOR` value as EFI boot option title

2024-02-01 Thread Mate Kukri
- Allow entries to be called things like "Debian" and "Ubuntu". - If there is no `GRUB_DISTRIBUTOR` assume it is "GRUB". - When deleting previous boot options, allow matching against both the old "efi_distributor" value and the new "efi_title" one. Signed-off-by: Mate Kukri --- grub-core/osdep

Re: [PATCH] grub-install: Move platdir path canonicalization after files were copied to grubdir

2023-12-11 Thread Daniel Kiper
On Fri, Dec 08, 2023 at 04:57:55PM +, Mate Kukri wrote: > The previous grub-install patch delaying the copying of files caused a > regression when installing without an existing directory structure. > > This patch ensures that the platform directory actually exists by the > time

[PATCH] grub-install: Move platdir path canonicalization after files were copied to grubdir

2023-12-08 Thread Mate Kukri
The previous grub-install patch delaying the copying of files caused a regression when installing without an existing directory structure. This patch ensures that the platform directory actually exists by the time the code tries to canonicalize its filename. Signed-off-by: Mate Kukri --- util

Re: [PATCH v4] grub-install: Delay copying files to {grubdir, platdir} after install_device was validated.

2023-11-29 Thread Daniel Kiper
On Fri, Nov 24, 2023 at 08:32:57AM +, Mate Kukri wrote: > Previously grub-install copied modules to grubdir before doing any validation > on > the install_device. > > When grub-install was called with an invalid install_device, modules > were already copied to /boot befor

[PATCH v4] grub-install: Delay copying files to {grubdir, platdir} after install_device was validated.

2023-11-24 Thread Mate Kukri
Previously grub-install copied modules to grubdir before doing any validation on the install_device. When grub-install was called with an invalid install_device, modules were already copied to /boot before it found out and was forced to rely on atexit rollback. This patch delays copying the

Re: [PATCH v3] grub-install: Delay copying files to {grubdir, platdir} after install_device was validated.

2023-11-23 Thread Mate Kukri
Kiper wrote: > > On Wed, Nov 22, 2023 at 11:53:13AM +, Mate Kukri wrote: > > Previously grub-install copied modules to grubdir before doing any > > validation on > > the install_device. > > > > When grub-install was called with an invalid install_device,

Re: [PATCH v3] grub-install: Delay copying files to {grubdir, platdir} after install_device was validated.

2023-11-23 Thread Daniel Kiper
On Wed, Nov 22, 2023 at 11:53:13AM +, Mate Kukri wrote: > Previously grub-install copied modules to grubdir before doing any validation > on > the install_device. > > When grub-install was called with an invalid install_device, modules > were already copied to /boot befor

[PATCH v3] grub-install: Delay copying files to {grubdir, platdir} after install_device was validated.

2023-11-22 Thread Mate Kukri
Previously grub-install copied modules to grubdir before doing any validation on the install_device. When grub-install was called with an invalid install_device, modules were already copied to /boot before it found out and was forced to rely on atexit rollback. This patch delays copying the

Re: [PATCH v2] grub-install: Delay copying files to grubdir after install_device was validated.

2023-11-22 Thread Julian Andres Klode
On Wed, Nov 22, 2023 at 10:06:27AM +, Mate Kukri wrote: > Previously grub-install copied modules to grubdir before doing any validation > on > the install_device. > > When grub-install was called with an invalid install_device, modules > were already copied to /boot befor

[PATCH v2] grub-install: Delay copying files to grubdir after install_device was validated.

2023-11-22 Thread Mate Kukri
Previously grub-install copied modules to grubdir before doing any validation on the install_device. When grub-install was called with an invalid install_device, modules were already copied to /boot before it found out and was forced to rely on atexit rollback. This patch delays copying the

[PATCH] grub-install: Delay copying files to grubdir after install_device was validated.

2023-11-21 Thread Mate Kukri
Previously grub-install copied modules to grubdir before doing any validation on the install_device. When grub-install was called with an invalid install_device, modules were already copied to /boot before it found out and was forced to rely on atexit rollback. This patch delays copying the

Re: [PATCH v2 0/2] util/grub-install-common: Print usable grub-mkimage command

2023-09-26 Thread Daniel Kiper
On Fri, Sep 22, 2023 at 02:34:16PM -0500, Glenn Washburn wrote: > This fixes an issue where grub-install does not print a grub-mkimage > command, when running in verbose more, that can be run by grub-mkimage. > Specifically, --dtb and --sbat will not take empty strings as arguments. &g

[PATCH v2 2/2] util/grub-install-common: Print usable grub-mkimage command

2023-09-22 Thread Glenn Washburn
When grub-install is run with the verbose option, it will print a log message indicating the grub-mkimage command and arguments used. GRUB no longer calls the grub-mkimage binary internally, however the command logged is a command that if run should effectively be what grub-install used. However

[PATCH v2 0/2] util/grub-install-common: Print usable grub-mkimage command

2023-09-22 Thread Glenn Washburn
This fixes an issue where grub-install does not print a grub-mkimage command, when running in verbose more, that can be run by grub-mkimage. Specifically, --dtb and --sbat will not take empty strings as arguments. changes from v1: - Split into two patches to make changes more clear, no other

[PATCH v2 1/2] util/grub-install-common: Minor improvements to printing of grub-mkimage command

2023-09-22 Thread Glenn Washburn
if block. Signed-off-by: Glenn Washburn --- util/grub-install-common.c | 32 +++- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/util/grub-install-common.c b/util/grub-install-common.c index 52a29d1cb8e0..f9b9201c894e 100644 --- a/util/grub-install

Re: [PATCH] util/grub-install-common: Print usable grub-mkimage command

2023-09-02 Thread Daniel Kiper
On Fri, Sep 01, 2023 at 11:33:03PM -0500, Glenn Washburn wrote: > When grub-install is run with the verbose option, it will print a log > message indicating the grub-mkimage command and arguments used. > GRUB no longer calls the grub-mkimage binary internally, however the > command

[PATCH] util/grub-install-common: Print usable grub-mkimage command

2023-09-01 Thread Glenn Washburn
When grub-install is run with the verbose option, it will print a log message indicating the grub-mkimage command and arguments used. GRUB no longer calls the grub-mkimage binary internally, however the command logged is a command that if run should effectively be what grub-install used. However

Re: [PATCH] grub-install-common: Fix the key of the --core-compress option

2023-05-09 Thread Daniel Kiper
On Fri, May 05, 2023 at 02:04:28PM +0200, Ákos Nagy wrote: > Commit f23bc6510 ("Transform -C option to grub-mkstandalone to > --core-compress available in all grub-install flavours.") declared a new > long option for specifying the compression method to use for the core > i

[PATCH] grub-install-common: Fix the key of the --core-compress option

2023-05-05 Thread Ákos Nagy
Commit f23bc6510 ("Transform -C option to grub-mkstandalone to --core-compress available in all grub-install flavours.") declared a new long option for specifying the compression method to use for the core image. However, the option key has not been replaced in the parser function

Re: [programmer11...@programist.ru: Bug#1021846: grub-install is broken since 2.06-3: error: unknown filesystem]

2022-12-11 Thread Steve McIntyre
On Sat, Dec 10, 2022 at 07:40:47AM +0300, программист некто wrote: >Hello. Sorry for long wait. > >>программист некто: could you please try these changes and report back? > >I tried the first patch with grub 2.06-7. Result: grub-install works without >error. Cool,

[programmer11...@programist.ru: Bug#1021846: grub-install is broken since 2.06-3: error: unknown filesystem]

2022-12-09 Thread программист некто
Hello. Sorry for long wait. >программист некто: could you please try these changes and report back? I tried the first patch with grub 2.06-7. Result: grub-install works without error. ___ Grub-devel mailing list Grub-devel@gnu.org ht

Re: [programmer11...@programist.ru: Bug#1021846: grub-install is broken since 2.06-3: error: unknown filesystem]

2022-12-08 Thread Christian Hesse
Daniel Axtens on Sat, 2022/12/03 01:41: > Please try the following: > > diff --git a/grub-core/fs/f2fs.c b/grub-core/fs/f2fs.c > index df6beb544cbd..855e24618c2b 100644 > --- a/grub-core/fs/f2fs.c > +++ b/grub-core/fs/f2fs.c > @@ -650,7 +650,7 @@ get_blkaddr_from_nat_journal (struct grub_f2fs_dat

Re: [programmer11...@programist.ru: Bug#1021846: grub-install is broken since 2.06-3: error: unknown filesystem]

2022-12-04 Thread программист некто
Certainly, I will try these changes. 03.12.2022, 20:44, "Steve McIntyre" : программист некто: could you please try these changes and report back? --Steve McIntyre, Cambridge, UK. st...@einval.com  Armed with "Valor": "Centurion" represents quality of Discipline,  Honor, Integrity and Loyalty. Now y

Re: [programmer11...@programist.ru: Bug#1021846: grub-install is broken since 2.06-3: error: unknown filesystem]

2022-12-03 Thread Steve McIntyre
Hi Daniel! On Sat, Dec 03, 2022 at 01:41:51AM +1100, Daniel Axtens wrote: >Steve McIntyre writes: >> >> программист некто (in CC) reported this bug a few weeks back in >> Debian. Since I applied the bundle of filesystem bounds-checking fixes >> a few months back, he c

Re: [programmer11...@programist.ru: Bug#1021846: grub-install is broken since 2.06-3: error: unknown filesystem]

2022-12-02 Thread Daniel Axtens
Steve McIntyre writes: > Hi all! > > программист некто (in CC) reported this bug a few weeks back in > Debian. Since I applied the bundle of filesystem bounds-checking fixes > a few months back, he can't run grub-install. He's done the work to > determine that the

Re: [programmer11...@programist.ru: Bug#1021846: grub-install is broken since 2.06-3: error: unknown filesystem]

2022-11-28 Thread Robbie Harwood
Steve McIntyre writes: > Hi all! > > программист некто (in CC) reported this bug a few weeks back in > Debian. Since I applied the bundle of filesystem bounds-checking fixes > a few months back, he can't run grub-install. He's done the work to > determine that the

Re: [programmer11...@programist.ru: Bug#1021846: grub-install is broken since 2.06-3: error: unknown filesystem]

2022-11-25 Thread Steve McIntyre
Hi Sudhakar! On Fri, Nov 25, 2022 at 10:52:39AM +0530, sudhakar wrote: >Hi Steve, > >It seems invalid Commit id which you reported. It should be >4bd9877f62166b7e369773ab92fe24a39f6515f8 >did you applied below patch and tested? Could you please confirm that. > >fs/f2fs: Do not read past the end of

Re: [programmer11...@programist.ru: Bug#1021846: grub-install is broken since 2.06-3: error: unknown filesystem]

2022-11-24 Thread sudhakar
the bundle of filesystem bounds-checking fixes a few months back, he can't run grub-install. He's done the work to determine that the patch that breaks things for him is 2d014248d540c7e087934a94b6e7a2aa7fc2c704 fs/f2fs: Do not read past the end of nat journal entries The full thr

Re: [programmer11...@programist.ru: Bug#1021846: grub-install is broken since 2.06-3: error: unknown filesystem]

2022-11-24 Thread Daniel Kiper
Adding Daniel Axtens... On Tue, Nov 15, 2022 at 06:31:45PM +, Steve McIntyre wrote: > Hi all! > > программист некто (in CC) reported this bug a few weeks back in > Debian. Since I applied the bundle of filesystem bounds-checking fixes > a few months back, he can't run gru

[programmer11...@programist.ru: Bug#1021846: grub-install is broken since 2.06-3: error: unknown filesystem]

2022-11-15 Thread Steve McIntyre
Hi all! программист некто (in CC) reported this bug a few weeks back in Debian. Since I applied the bundle of filesystem bounds-checking fixes a few months back, he can't run grub-install. He's done the work to determine that the patch that breaks things

Re: [PATCH] grub-install: set point of no return for powerpc-ieee1275 install

2022-10-06 Thread Daniel Kiper
On Thu, Aug 25, 2022 at 02:05:01PM +0800, Michael Chang via Grub-devel wrote: > The point of no return is used to define a point where no change should > be reverted in a wake of fatal error that consequently aborts the > process. The powerpc-ieee1275 install apparently missed this point of no > re

[PATCH v3 2/2] grub-install: Add point of no return for IEEE1275 on powerpc

2022-09-05 Thread Ismael Luceno
Signed-off-by: Ismael Luceno --- util/grub-install.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/grub-install.c b/util/grub-install.c index da50bd58b73b..45f549c25867 100644 --- a/util/grub-install.c +++ b/util/grub-install.c @@ -1859,6 +1859,7 @@ main (int argc, char *argv[])

[PATCH v3 1/2] grub-install: Ensure a functional /dev/nvram

2022-09-05 Thread Ismael Luceno
This enables an early failure; for i386-ieee1275 and powerpc-ieee1275 on Linux, without /dev/nvram the system may be left in an unbootable state. Signed-off-by: Ismael Luceno --- util/grub-install.c | 24 1 file changed, 24 insertions(+) diff --git a/util/grub-install.c

Re: [PATCH v2 2/2] grub-install: Ensure a functional /dev/nvram

2022-09-05 Thread Michael Chang via Grub-devel
On Mon, Aug 29, 2022 at 04:36:25PM +0200, Ismael Luceno wrote: > This enables an early failure; for i386-ieee1275 and powerpc-ieee1275 on > Linux, without /dev/nvram the system may be left in an unbootable state. > > Signed-off-by: Ismael Luceno > --- > util/grub-install.c | 23 +

Re: [PATCH v2 1/2] grub-install: Add missing points of no return for IEEE1275 on i386/powerpc

2022-09-05 Thread Michael Chang via Grub-devel
On Mon, Aug 29, 2022 at 04:36:24PM +0200, Ismael Luceno wrote: > Signed-off-by: Ismael Luceno > --- > util/grub-install.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/util/grub-install.c b/util/grub-install.c > index 7b04bd3c534b..527b85e27aa7 100644 > --- a/util/grub-install.c > +

[PATCH v2 2/2] grub-install: Ensure a functional /dev/nvram

2022-08-29 Thread Ismael Luceno
This enables an early failure; for i386-ieee1275 and powerpc-ieee1275 on Linux, without /dev/nvram the system may be left in an unbootable state. Signed-off-by: Ismael Luceno --- util/grub-install.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/util/grub-install.c

[PATCH v2 1/2] grub-install: Add missing points of no return for IEEE1275 on i386/powerpc

2022-08-29 Thread Ismael Luceno
Signed-off-by: Ismael Luceno --- util/grub-install.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util/grub-install.c b/util/grub-install.c index 7b04bd3c534b..527b85e27aa7 100644 --- a/util/grub-install.c +++ b/util/grub-install.c @@ -1835,6 +1835,7 @@ main (int argc, char *argv[])

[PATCH] grub-install: set point of no return for powerpc-ieee1275 install

2022-08-24 Thread Michael Chang via Grub-devel
The point of no return is used to define a point where no change should be reverted in a wake of fatal error that consequently aborts the process. The powerpc-ieee1275 install apparently missed this point of no return defintion that newly installed modules could be inadvertently reverted after succ

Re: [PATCH] grub-install: Allow to install to non-EFI ESP when --force

2022-04-27 Thread Daniel Kiper
if > U-Boot is built with ext4 support. In some situations a GRUB > installation on such a non-FAT ESP could be useful (e.g. a NTFS-based > USB disk that can dual boot a Windows installation media and a Linux > LiveCD). > > As this is advanced and implementation-dependent behavio

[PATCH] grub-install: Allow to install to non-EFI ESP when --force

2022-04-24 Thread Icenowy Zheng
such a non-FAT ESP could be useful (e.g. a NTFS-based USB disk that can dual boot a Windows installation media and a Linux LiveCD). As this is advanced and implementation-dependent behavior, let grub-install allow this kind of installation, but only when --force is specified. Signed-off-by: Ic

[PATCH v3 13/19] grub-install: support embedding x509 certificates

2022-04-21 Thread Daniel Axtens
keys. Signed-off-by: Alastair D'Silva Signed-off-by: Daniel Axtens Reviewed-by: Stefan Berger --- grub-core/commands/pgp.c| 2 +- include/grub/kernel.h | 3 ++- include/grub/util/install.h | 7 +-- util/grub-install-common.c | 22 +++- util/grub-mkimage.c

[PATCH 1/6] grub-install-common: Fix memory leak in copy_all()

2021-10-26 Thread Darren Kenny
The copy_all() function skips a section of code using continue, but fails to free the memory in srcf first, leaking it. Fixes: CID 314026 Signed-off-by: Darren Kenny --- util/grub-install-common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/util/grub-install-common.c

Re: [PATCH v2 16/22] grub-install: support embedding x509 certificates

2021-07-12 Thread Stefan Berger
grub core image in the same way as PGP keys. Signed-off-by: Alastair D'Silva Signed-off-by: Daniel Axtens Reviewed-by: Stefan Berger --- grub-core/commands/pgp.c| 2 +- include/grub/kernel.h | 3 ++- include/grub/util/install.h | 7 +-- util/grub-install-comm

[PATCH v2 16/22] grub-install: support embedding x509 certificates

2021-06-30 Thread Daniel Axtens
keys. Signed-off-by: Alastair D'Silva Signed-off-by: Daniel Axtens --- grub-core/commands/pgp.c| 2 +- include/grub/kernel.h | 3 ++- include/grub/util/install.h | 7 +-- util/grub-install-common.c | 22 +++- util/grub-mkimage.c | 15 -- util

Re: [PATCH v6] grub-install: Add backup and restore

2021-06-01 Thread Daniel Kiper
ke parent atexit hooks from forks, which can mess up the > backup. > > This allows safer upgrades of MBR & modules, such that > modules/images/fonts/translations are consistent with MBR in case of > errors. For example accidental grub-install /dev/non-existent-disk > curren

[PATCH v6] grub-install: Add backup and restore

2021-06-01 Thread Dimitri John Ledkov
es/fonts/translations are consistent with MBR in case of errors. For example accidental grub-install /dev/non-existent-disk currently clobbers and upgrades modules in /boot/grub, despite not actually updating any MBR. This patch only handles backup and restore of files copied to /boot/grub. This patch

Re: [PATCHv5] grub-install: Add backup and restore

2021-05-28 Thread Daniel Kiper
s/images/fonts/translations are consistent with MBR in case of > errors. For example accidental grub-install /dev/non-existent-disk > currently clobbers and upgrades modules in /boot/grub, despite not > actually updating any MBR. > > This patch only handles backup and restore of fi

Re: [PATCHv5] grub-install: Add backup and restore

2021-05-25 Thread Daniel Kiper
Some older grub codebases > can invoke parent atexit hooks from forks, which can mess up the > backup. > > This allows safer upgrades of MBR & modules, such that > modules/images/fonts/translations are consistent with MBR in case of > errors. For example accidental grub-install

[PATCHv5] grub-install: Add backup and restore

2021-05-24 Thread Dimitri John Ledkov
uch that modules/images/fonts/translations are consistent with MBR in case of errors. For example accidental grub-install /dev/non-existent-disk currently clobbers and upgrades modules in /boot/grub, despite not actually updating any MBR. This patch only handles backup and restore of files copied

Re: [PATCH v4] grub-install: Add backup and restore

2021-05-18 Thread Daniel Kiper
ke parent atexit hooks from forks, which can mess up the > backup. > > This allows safer upgrades of MBR & modules, such that > modules/images/fonts/translations are consistent with MBR in case of > errors. For example accidental grub-install /dev/non-existent-disk > curren

[PATCH v4] grub-install: Add backup and restore

2021-05-12 Thread Dimitri John Ledkov
es/fonts/translations are consistent with MBR in case of errors. For example accidental grub-install /dev/non-existent-disk currently clobbers and upgrades modules in /boot/grub, despite not actually updating any MBR. This patch only handles backup and restore of files copied to /boot/grub. This patch

Re: [PATCH] grub-install: Add backup and restore

2021-05-12 Thread Dimitri John Ledkov
afer upgrades of MBR & modules, such that > > modules/images/fonts/translations are consistent with MBR in case of > > errors. For example accidental grub-install /dev/non-existent-disk > > currently clobbers and upgrades modules in /boot/grub, despite not > > actuall

Re: [PATCH] grub-install: Add backup and restore

2021-05-04 Thread Daniel Kiper
Some older grub codebases > can invoke parent atexit hooks from forks, which can mess up the > backup. > > This allows safer upgrades of MBR & modules, such that > modules/images/fonts/translations are consistent with MBR in case of > errors. For example accidental grub-install

Re: [PATCH] grub-install: Add backup and restore

2021-05-04 Thread Dimitri John Ledkov
nly invoked by the > > parent process and not any children forks. Some older grub codebases > > can invoke parent atexit hooks from forks, which can mess up the > > backup. > > > > This allows safer upgrades of MBR & modules, such that > > modules/images/fonts

Re: [PATCH] grub-install: Add backup and restore

2021-05-02 Thread Michael Chang via Grub-devel
> backup. > > This allows safer upgrades of MBR & modules, such that > modules/images/fonts/translations are consistent with MBR in case of > errors. For example accidental grub-install /dev/non-existent-disk > currently clobbers and upgrades modules in /boot/grub, despite not &

[PATCH] grub-install: Add backup and restore

2021-04-29 Thread Dimitri John Ledkov
es/fonts/translations are consistent with MBR in case of errors. For example accidental grub-install /dev/non-existent-disk currently clobbers and upgrades modules in /boot/grub, despite not actually updating any MBR. This increases peak disk-usage slightly, by requiring temporarily twice the disk

Re: [PATCHv2] grub-install: Add backup and restore

2021-04-21 Thread Daniel Kiper
/translations are consistent with MBR in case of > errors. For example accidental grub-install /dev/non-existent-disk > currently clobbers and upgrades modules in /boot/grub, despite not > actually updating any MBR. This increases peak disk-usage slightly, by > requiring temporarily twice

[PATCH 13/19] grub-install: support embedding x509 certificates

2021-03-30 Thread Daniel Axtens
keys. Signed-off-by: Alastair D'Silva Signed-off-by: Daniel Axtens --- grub-core/commands/pgp.c| 2 +- include/grub/kernel.h | 3 ++- include/grub/util/install.h | 7 +-- util/grub-install-common.c | 22 +++- util/grub-mkimage.c | 15 -- util

[SECURITY PATCH 110/117] grub-install-common: Add --sbat option

2021-03-02 Thread Daniel Kiper
From: Dimitri John Ledkov Signed-off-by: Dimitri John Ledkov Reviewed-by: Daniel Kiper --- include/grub/util/install.h | 5 - util/grub-install-common.c | 12 ++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/include/grub/util/install.h b/include/grub/util

[SECURITY PATCH 057/117] util/grub-install: Fix NULL pointer dereferences

2021-03-02 Thread Daniel Kiper
Two grub_device_open() calls does not have associated NULL checks for returned values. Fix that and appease the Coverity. Fixes: CID 314583 Signed-off-by: Daniel Kiper Reviewed-by: Javier Martinez Canillas --- util/grub-install.c | 4 1 file changed, 4 insertions(+) diff --git a/util/gru

Re: [PATCHv2] grub-install: Add backup and restore

2020-12-09 Thread Dimitri John Ledkov
everything was successful. If on_exit is not > > > > available, the backup remains on disk for manual recovery. > > > > > > > > This allows safer upgrades of MBR & modules, such that > > > > modules/images/fonts/translations are consistent with MB

Re: [PATCHv2] grub-install: Add backup and restore

2020-12-08 Thread Michael Chang via Grub-devel
r manual recovery. > > > > > > This allows safer upgrades of MBR & modules, such that > > > modules/images/fonts/translations are consistent with MBR in case of > > > errors. For example accidental grub-install /dev/non-existent-disk > > > currentl

Re: [PATCHv2] grub-install: Add backup and restore

2020-12-07 Thread Dimitri John Ledkov
dules/images/fonts/translations are consistent with MBR in case of > > errors. For example accidental grub-install /dev/non-existent-disk > > currently clobbers and upgrades modules in /boot/grub, despite not > > actually updating any MBR. This increases peak disk-usage slightly, b

Re: [PATCHv2] grub-install: Add backup and restore

2020-12-07 Thread Michael Chang via Grub-devel
; remove the backup if everything was successful. If on_exit is not > available, the backup remains on disk for manual recovery. > > This allows safer upgrades of MBR & modules, such that > modules/images/fonts/translations are consistent with MBR in case of > errors. For example a

Re: [PATCHv2] grub-install: Add backup and restore

2020-12-07 Thread Colin Watson
On Mon, Dec 07, 2020 at 12:37:28PM +, Dimitri John Ledkov wrote: > Refactor clean_grub_dir to create a backup of all the files, instead > of just irrevocably removing them as the first action. If available, > register on_exit handle to restore the backup if any errors occur, or > remove the bac

[PATCHv2] grub-install: Add backup and restore

2020-12-07 Thread Dimitri John Ledkov
remains on disk for manual recovery. This allows safer upgrades of MBR & modules, such that modules/images/fonts/translations are consistent with MBR in case of errors. For example accidental grub-install /dev/non-existent-disk currently clobbers and upgrades modules in /boot/grub, despite

Re: [PATCH v2 01/18] docs/grub: grub-install is no longer a shell script

2020-11-18 Thread Daniel Kiper
On Wed, Oct 28, 2020 at 12:57:18PM +1100, Daniel Axtens wrote: > Since commit cd46aa6cefab in 2013, grub-install hasn't been a shell > script. The para doesn't really add that much, especially since it's > the user manual, so just drop it. > > Signed-off-by: Danie

[PATCH v2 13/18] grub-install: support embedding x509 certificates

2020-10-27 Thread Daniel Axtens
keys. Signed-off-by: Alastair D'Silva Signed-off-by: Daniel Axtens --- grub-core/commands/pgp.c| 2 +- include/grub/kernel.h | 3 ++- include/grub/util/install.h | 7 +-- util/grub-install-common.c | 23 - util/grub-mkimage.c | 15 -- util

[PATCH v2 01/18] docs/grub: grub-install is no longer a shell script

2020-10-27 Thread Daniel Axtens
Since commit cd46aa6cefab in 2013, grub-install hasn't been a shell script. The para doesn't really add that much, especially since it's the user manual, so just drop it. Signed-off-by: Daniel Axtens --- docs/grub.texi | 7 --- 1 file changed, 7 deletions(-) diff --git a/d

Re: [PATCH 13/18] grub-install: support embedding x509 certificates

2020-10-11 Thread Daniel Axtens
> +case 'x': > + arguments->x509keys = xrealloc (arguments->x509keys, > + sizeof (arguments->x509keys[0]) > + * (arguments->nx509keys + 1)); > + arguments->pubkeys[arguments->nx509keys++] = xstrdup (arg); This shoul

[PATCH 13/18] grub-install: support embedding x509 certificates

2020-10-01 Thread Daniel Axtens
keys. Signed-off-by: Alastair D'Silva Signed-off-by: Daniel Axtens --- grub-core/commands/pgp.c| 2 +- include/grub/kernel.h | 3 ++- include/grub/util/install.h | 7 +-- util/grub-install-common.c | 23 - util/grub-mkimage.c | 15 -- util

[PATCH 01/18] docs/grub: grub-install is no longer a shell script

2020-10-01 Thread Daniel Axtens
Since commit cd46aa6cefab in 2013, grub-install hasn't been a shell script. The para doesn't really add that much, especially since it's the user manual, so just drop it. Signed-off-by: Daniel Axtens --- docs/grub.texi | 7 --- 1 file changed, 7 deletions(-) diff --git a/d

[PATCH] grub-install: Add backup and restore

2020-08-25 Thread Dimitri John Ledkov
remains on disk for manual recovery. This allows safer upgrades of MBR & modules, such that modules/images/fonts/translations are consistent with MBR in case of errors. For example accidental grub-install /dev/non-existent-disk currently clobbers and upgrades modules in /boot/grub, despite

grub-install fails with nbd device

2020-06-20 Thread listsb via Grub-devel
File system Name Flags 1 1049kB 105MB 104MB fat32esp boot, esp 2 105MB 1073MB 968MB pv1 lvm >cat >/opt/build/operating_systems/alpine/work/imagetest-c5676f32-412a-4ef4-b617-962b932b8ef2/boot/grub/device.map (hd0) /de

Re: [PATCH 1/6] grub-install: Fix inverted test for NLS enabled when copying locales

2020-05-27 Thread Javier Martinez Canillas
On 5/25/20 9:02 PM, Daniel Kiper wrote: > From: Martin Whitaker > > Commit 3d8439da8 (grub-install: Locale depends on nls) attempted to avoid > copying locale files to the target directory when NLS was disabled. > However the test is inverted, and it does the opposite. > >

[PATCH 1/6] grub-install: Fix inverted test for NLS enabled when copying locales

2020-05-25 Thread Daniel Kiper
From: Martin Whitaker Commit 3d8439da8 (grub-install: Locale depends on nls) attempted to avoid copying locale files to the target directory when NLS was disabled. However the test is inverted, and it does the opposite. Signed-off-by: Martin Whitaker Signed-off-by: Daniel Kiper --- util/grub

[PATCH v2 4/7] grub-install: hook up --emu-512b to sector size autodetection in biosdisk

2020-05-24 Thread Mihai Moldovan
Chances are that if you need the native-sector-addressing-with-512-bytes-lengths feature, you will also need grub to autodetect the native sector size later on. --- util/grub-install.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/util/grub-install.c b/util/grub-i

[PATCH 4/7] grub-install: hook up --emu-512b to sector size autodetection in biosdisk

2020-05-24 Thread Mihai Moldovan
Chances are that if you need the native-sector-addressing-with-512-bytes-lengths feature, you will also need grub to autodetect the native sector size later on. --- util/grub-install.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/util/grub-install.c b/util/grub-i

[PATCH] grub-install: force journal draining to ensure data integrity

2020-04-29 Thread Michael Chang
In XFS, the system would end up in unbootable state if an abrupt power off after grub-install is occuring. It can be easily reproduced with. grub-install /dev/vda; reboot -f The grub error would show many different kinds of corruption in filesystem and the problem boils down to incompleted

Granularity of grub-install (was Re: Reproducibility of grub-install)

2019-10-28 Thread Miguel Arruga Vivas
erstood the creation in grub-install.c as a hidden requirement for it, but I'd just had to read the manual. That global state already is explicit enough. I think now that its creation should be optional, even though it's created by default as grub-mkconfig makes use of it. Should I sen

Re: Reproducible grub-install

2019-10-23 Thread Daniel Kiper
tten images must be replaced > on each installation. This is one task performed by grub-install. Yep. > - /boot/grub/*: The contents of these folders should be reproducible, > such as the modules or the localization binaries, as currently > grub.cfg is. This is the ot

Reproducible grub-install

2019-10-21 Thread Miguel Arruga Vivas
d.cfg: The written images must be replaced on each installation. This is one task performed by grub-install. - /boot/grub/*: The contents of these folders should be reproducible, such as the modules or the localization binaries, as currently grub.cfg is. This is the other task perform

Re: [PATCH] grub-install: Define default platform for RISC-V

2019-09-19 Thread Alexander Graf
I guess that one must have slipped through the cracks :) Reviewed-by: Alexander Graf Alex On 19.09.19 12:06, Daniel Kiper wrote: Adding Alex... In general "Reviewed-by: Daniel Kiper " but I would to hear Alex's opinion here too... Daniel On Thu, Aug 15, 2019 at 04:55:13PM +0200, Andreas S

Re: [PATCH] grub-install: Define default platform for RISC-V

2019-09-19 Thread Daniel Kiper
Adding Alex... In general "Reviewed-by: Daniel Kiper " but I would to hear Alex's opinion here too... Daniel On Thu, Aug 15, 2019 at 04:55:13PM +0200, Andreas Schwab wrote: > Signed-off-by: Andreas Schwab > --- > util/grub-install.c | 8 > 1 file changed, 8 insertions(+) > > diff --gi

[PATCH] grub-install: Define default platform for RISC-V

2019-08-15 Thread Andreas Schwab
Signed-off-by: Andreas Schwab --- util/grub-install.c | 8 1 file changed, 8 insertions(+) diff --git a/util/grub-install.c b/util/grub-install.c index 8a55ad4b8..8970b73aa 100644 --- a/util/grub-install.c +++ b/util/grub-install.c @@ -324,6 +324,14 @@ get_default_platform (void) re

Re: [PATCH] grub2: setup root in grub-setup and grub-install

2019-05-28 Thread Daniel Kiper
On Mon, May 27, 2019 at 10:07:15AM +0200, Michael Grzeschik wrote: > With this feature it is now possible to set the root > device in userspace preperation like grub-mkimage. Why this patch is needed? I would like to see an explanation here. > Signed-off-by: Michael Grzeschik > --- > include/gr

[PATCH] grub2: setup root in grub-setup and grub-install

2019-05-27 Thread Michael Grzeschik
With this feature it is now possible to set the root device in userspace preperation like grub-mkimage. Signed-off-by: Michael Grzeschik --- include/grub/util/install.h | 4 ++-- util/grub-install.c | 4 ++-- util/grub-setup.c | 12 +++- util/setup.c|

Re: [PATCH] grub-install: check for arm-efi as a default target

2019-02-26 Thread Steve McIntyre
On Tue, Feb 26, 2019 at 03:55:47PM +0100, Daniel Kiper wrote: >On Tue, Feb 26, 2019 at 01:27:21PM +, Leif Lindholm wrote: >> >> As pointed out by Colin on IRC - it appears you have pushed Steves >> original submission rather than the revised one which I gave my R-b >> for. >> >> Could you addre

Re: [PATCH] grub-install: check for arm-efi as a default target

2019-02-26 Thread Daniel Kiper
On Tue, Feb 26, 2019 at 01:27:21PM +, Leif Lindholm wrote: > On Thu, Feb 21, 2019 at 04:31:32PM +0100, Daniel Kiper wrote: > > On Thu, Feb 21, 2019 at 03:04:26PM +, Leif Lindholm wrote: > > > On Thu, Feb 21, 2019 at 02:46:11PM +, Steve McIntyre wrote: > > > > Much like on x86, we can wo

Re: [PATCH] grub-install: check for arm-efi as a default target

2019-02-26 Thread Leif Lindholm
On Thu, Feb 21, 2019 at 04:31:32PM +0100, Daniel Kiper wrote: > On Thu, Feb 21, 2019 at 03:04:26PM +, Leif Lindholm wrote: > > On Thu, Feb 21, 2019 at 02:46:11PM +, Steve McIntyre wrote: > > > Much like on x86, we can work out if the system is running on top of > > > EFI firmware. If so,

Re: [PATCH] grub-install: check for arm-efi as a default target

2019-02-21 Thread Daniel Kiper
On Thu, Feb 21, 2019 at 03:04:26PM +, Leif Lindholm wrote: > On Thu, Feb 21, 2019 at 02:46:11PM +, Steve McIntyre wrote: > > Much like on x86, we can work out if the system is running on top of > > EFI firmware. If so, return "arm-efi". If not, fall back to > > "arm-uboot" as previously. >

Re: [PATCH] grub-install: check for arm-efi as a default target

2019-02-21 Thread dann frazier
On Thu, Feb 21, 2019 at 3:54 PM Steve McIntyre <93...@debian.org> wrote: > > On Thu, Feb 21, 2019 at 03:23:55PM +0100, dann frazier wrote: > >On Thu, Feb 21, 2019 at 12:42 PM Leif Lindholm > >wrote: > >> > >> Hi Steve, > >> > >> On Mon, Feb 11, 2019 at 02:42:34AM +, Steve McIntyre wrote: > >>

Re: [PATCH] grub-install: check for arm-efi as a default target

2019-02-21 Thread Steve McIntyre
On Thu, Feb 21, 2019 at 03:23:55PM +0100, dann frazier wrote: >On Thu, Feb 21, 2019 at 12:42 PM Leif Lindholm >wrote: >> >> Hi Steve, >> >> On Mon, Feb 11, 2019 at 02:42:34AM +, Steve McIntyre wrote: >> > Much like on x86, we can work out if the system is running on top of >> > EFI firmware.

Re: [PATCH] grub-install: check for arm-efi as a default target

2019-02-21 Thread Leif Lindholm
On Thu, Feb 21, 2019 at 02:46:11PM +, Steve McIntyre wrote: > Much like on x86, we can work out if the system is running on top of > EFI firmware. If so, return "arm-efi". If not, fall back to > "arm-uboot" as previously. > > Split out the code to (maybe) load the efivar module and check for >

Re: [PATCH] grub-install: check for arm-efi as a default target

2019-02-21 Thread Leif Lindholm
On Thu, Feb 21, 2019 at 02:53:48PM +, Steve McIntyre wrote: > >> Right, this clearly needs a fix. > >> > >> > Heavily inspired by the existing code for x86. > >> > >> Mmm. I would much prefer if we could break out the efi test in a > >> separate helper function. And clean it up while we're at i

[PATCH] grub-install: check for arm-efi as a default target

2019-02-21 Thread Steve McIntyre
Much like on x86, we can work out if the system is running on top of EFI firmware. If so, return "arm-efi". If not, fall back to "arm-uboot" as previously. Split out the code to (maybe) load the efivar module and check for /sys/firmware/efi into a common helper routine is_efi_system() Signed-off-

Re: [PATCH] grub-install: check for arm-efi as a default target

2019-02-21 Thread Steve McIntyre
Hey Leif, On Thu, Feb 21, 2019 at 11:41:10AM +, Leif Lindholm wrote: >On Mon, Feb 11, 2019 at 02:42:34AM +, Steve McIntyre wrote: >> Much like on x86, we can work out if the system is running on top of >> EFI firmware. If so, return "arm-efi". If not, fall back to >> "arm-uboot" as previou

Re: [PATCH] grub-install: check for arm-efi as a default target

2019-02-21 Thread dann frazier
On Thu, Feb 21, 2019 at 12:42 PM Leif Lindholm wrote: > > Hi Steve, > > On Mon, Feb 11, 2019 at 02:42:34AM +, Steve McIntyre wrote: > > Much like on x86, we can work out if the system is running on top of > > EFI firmware. If so, return "arm-efi". If not, fall back to > > "arm-uboot" as previo

  1   2   3   4   5   >