mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-19 05:57:04 +01:00
image: Add a post-MBR gap to the default image.
The generic 'efi-disk-image' needs to be bootable on systems without EFI. To do that, GRUB is installed in the post-MBR gap. Make sure that the first partition starts with an offset, to make this gap large enough for GRUB. * gnu/system/image.scm (root-offset, root-label): New variables, (esp-partition): use 'root-offset' as the partition offset, (root-partition): use 'root-label' as the partition label.
This commit is contained in:
parent
749381051d
commit
b7b45372e7
1 changed files with 9 additions and 1 deletions
|
@ -65,9 +65,17 @@ (define-module (gnu system image)
|
|||
;;; Images definitions.
|
||||
;;;
|
||||
|
||||
;; This is the offset before the first partition. GRUB will install itself in
|
||||
;; this post-MBR gap.
|
||||
(define root-offset (* 512 2048))
|
||||
|
||||
;; Generic root partition label.
|
||||
(define root-label "Guix_image")
|
||||
|
||||
(define esp-partition
|
||||
(partition
|
||||
(size (* 40 (expt 2 20)))
|
||||
(offset root-offset)
|
||||
(label "GNU-ESP") ;cosmetic only
|
||||
;; Use "vfat" here since this property is used when mounting. The actual
|
||||
;; FAT-ness is based on file system size (16 in this case).
|
||||
|
@ -78,7 +86,7 @@ (define esp-partition
|
|||
(define root-partition
|
||||
(partition
|
||||
(size 'guess)
|
||||
(label "Guix_image")
|
||||
(label root-label)
|
||||
(file-system "ext4")
|
||||
(flags '(boot))
|
||||
(initializer (gexp initialize-root-partition))))
|
||||
|
|
Loading…
Reference in a new issue