[elbe-devel] [PATCH v2 3/4] hdimg: change mountpoint of efi partition to /boot/efi

Torben Hohn torben.hohn at linutronix.de
Thu Mar 29 10:11:09 CEST 2018


On Wed, Mar 28, 2018 at 02:16:55PM +0200, Martin Kaistra wrote:
> Instead of installing EFI to /boot, use /boot/efi which is the
> default in Debian.
> 
> Signed-off-by: Martin Kaistra <martin.kaistra at linutronix.de>
Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>
> ---
>  elbepack/hdimg.py | 19 ++++++++++++++++++-
>  1 file changed, 18 insertions(+), 1 deletion(-)
> 
> diff --git a/elbepack/hdimg.py b/elbepack/hdimg.py
> index ddc3138c..2fc042d9 100644
> --- a/elbepack/hdimg.py
> +++ b/elbepack/hdimg.py
> @@ -190,12 +190,16 @@ class grubinstaller_base(object):
>          self.outf = outf
>          self.root = None
>          self.boot = None
> +        self.boot_efi = None
>          self.fw_type = fw_type
>  
>      def set_boot_entry(self, entry):
>          print("setting boot entry")
>          self.boot = entry
>  
> +    def set_boot_efi_entry(self, entry):
> +        self.boot_efi = entry
> +
>      def set_root_entry(self, entry):
>          self.root = entry
>  
> @@ -225,6 +229,12 @@ class grubinstaller202(grubinstaller_base):
>                      (self.boot.partnum, os.path.join(
>                          imagemnt, "boot")))
>  
> +            if self.boot_efi:
> +                self.outf.do(
> +                    'mount /dev/mapper/poop0p%d %s' %
> +                    (self.boot_efi.partnum, os.path.join(
> +                        imagemnt, "boot/efi")))
> +
>              self.outf.do(
>                  "mount --bind /dev %s" %
>                  os.path.join(
> @@ -253,7 +263,7 @@ class grubinstaller202(grubinstaller_base):
>              if self.fw_type == "efi":
>                  self.outf.do(
>                      "chroot %s grub-install --target=x86_64-efi --removable "
> -                    "--efi-directory=/boot --no-floppy /dev/poop0" %
> +                    "--no-floppy /dev/poop0" %
>                      (imagemnt))
>              else:
>                  self.outf.do(
> @@ -281,6 +291,11 @@ class grubinstaller202(grubinstaller_base):
>                      "sys"),
>                  allow_fail=True)
>  
> +            if self.boot_efi:
> +                self.outf.do(
> +                    'umount /dev/mapper/poop0p%d' %
> +                    self.boot_efi.partnum, allow_fail=True)
> +
>              if self.boot:
>                  self.outf.do(
>                      'umount /dev/mapper/poop0p%d' %
> @@ -437,6 +452,8 @@ def create_label(outf, disk, part, ppart, fslabel, target, grub):
>          grub.set_root_entry(entry)
>      elif entry.mountpoint == "/boot":
>          grub.set_boot_entry(entry)
> +    elif entry.mountpoint == "/boot/efi":
> +        grub.set_boot_efi_entry(entry)
>  
>      entry.losetup(outf, "loop0")
>      outf.do(
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel

-- 
Mit freundlichen Grüßen
Torben Hohn

Linutronix GmbH

Standort: Bremen

Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99

Firmensitz / Registered Office: D-88690 Uhldingen, Bahnhofstr. 3
Registergericht / Local District Court: Amtsgericht Freiburg i. Br.; HRB
Nr. / Trade register no.: 700 806

Geschäftsführer / Managing Directors: Heinz Egger, Thomas Gleixner

Eine Bitte von uns: Sollten Sie diese E-Mail irrtümlich erhalten haben,
benachrichtigen Sie uns in diesem Falle bitte sobald wie es Ihnen
möglich ist, durch Antwort-Mail. Vielen Dank!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.linutronix.de/pipermail/elbe-devel/attachments/20180329/266012f6/attachment.sig>


More information about the elbe-devel mailing list