[PATCH 02/20] grub: replace PATH to kernel and grub.cfg to boot/

Anton Midyukov antohami at altlinux.org
Thu Jan 2 18:28:16 MSK 2020


grub not only for EFI.
---
 features.in/grub/cfg.in/20install2.cfg               | 6 +++---
 features.in/grub/cfg.in/25install-vnc-connect.cfg    | 4 ++--
 features.in/grub/cfg.in/25install-vnc-listen.cfg     | 4 ++--
 features.in/grub/cfg.in/30live.cfg                   | 4 ++--
 features.in/grub/cfg.in/32live_rw.cfg                | 4 ++--
 features.in/grub/cfg.in/80rescue.cfg                 | 4 ++--
 features.in/grub/cfg.in/82rescue_rw.cfg              | 4 ++--
 features.in/grub/cfg.in/83rescue_fm.cfg              | 4 ++--
 features.in/grub/cfg.in/85mediacheck.cfg             | 4 ++--
 features.in/grub/generate.mk                         | 2 +-
 features.in/grub/scripts.d/20-propagator-ramdisk     | 4 ++--
 features.in/grub/scripts.d/20-propagator-rescue-hash | 4 ++--
 features.in/grub/stage1/scripts.d/01-grub            | 4 ++--
 13 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/features.in/grub/cfg.in/20install2.cfg b/features.in/grub/cfg.in/20install2.cfg
index 1da6304eb5..fb6d0407b6 100644
--- a/features.in/grub/cfg.in/20install2.cfg
+++ b/features.in/grub/cfg.in/20install2.cfg
@@ -1,6 +1,6 @@
 
 default='linux'
-menuentry 'Install ALT @relname@' --hotkey 'i' --id 'linux' {
-  linux$linux_suffix /EFI/BOOT/vmlinuz changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ vga=@bootvga@ @bootargs@
-  initrd$linux_suffix /EFI/BOOT/full.cz
+menuentry 'Install @relname@' --hotkey 'i' --id 'linux' {
+  linux$linux_suffix /boot/vmlinuz changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ vga=@bootvga@ @bootargs@
+  initrd$linux_suffix /boot/full.cz
 }
diff --git a/features.in/grub/cfg.in/25install-vnc-connect.cfg b/features.in/grub/cfg.in/25install-vnc-connect.cfg
index 178e8fccd5..5041350e6f 100644
--- a/features.in/grub/cfg.in/25install-vnc-connect.cfg
+++ b/features.in/grub/cfg.in/25install-vnc-connect.cfg
@@ -1,5 +1,5 @@
 
 menuentry 'Install ALT @relname@ (headless with DHCP+VNC client) (edit to set server IP address)' --id 'vncconnect' {
-  linux$linux_suffix /EFI/BOOT/vmlinuz changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ showopts @bootargs@ headless no_alt_virt_keyboard vncconnect=IP
-  initrd$linux_suffix /EFI/BOOT/full.cz
+  linux$linux_suffix /boot/vmlinuz changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ showopts @bootargs@ headless no_alt_virt_keyboard vncconnect=IP
+  initrd$linux_suffix /boot/BOOT/full.cz
 }
diff --git a/features.in/grub/cfg.in/25install-vnc-listen.cfg b/features.in/grub/cfg.in/25install-vnc-listen.cfg
index 53b2b5119b..f6252ba262 100644
--- a/features.in/grub/cfg.in/25install-vnc-listen.cfg
+++ b/features.in/grub/cfg.in/25install-vnc-listen.cfg
@@ -1,6 +1,6 @@
 
 menuentry 'Install ALT @relname@ (headless with DHCP+VNC) (password VNCPWD)' --id 'vncpasswd' {
-  linux$linux_suffix /EFI/BOOT/vmlinuz changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ showopts @bootargs@ headless no_alt_virt_keyboard vncpassword=VNCPWD
-  initrd$linux_suffix /EFI/BOOT/full.cz
+  linux$linux_suffix /boot/vmlinuz changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ showopts @bootargs@ headless no_alt_virt_keyboard vncpassword=VNCPWD
+  initrd$linux_suffix /boot/full.cz
 }
 
diff --git a/features.in/grub/cfg.in/30live.cfg b/features.in/grub/cfg.in/30live.cfg
index d53a1e506a..079eaae8f5 100644
--- a/features.in/grub/cfg.in/30live.cfg
+++ b/features.in/grub/cfg.in/30live.cfg
@@ -1,6 +1,6 @@
 menuentry 'LiveCD (no hard disk needed)' --id 'live' {
-  linux$linux_suffix /EFI/BOOT/vmlinuz changedisk fastboot live automatic=method:cdrom ramdisk_size=@live_size@ stagename=live showopts lowmem vga=@bootvga@ @bootargs@
-  initrd$linux_suffix /EFI/BOOT/full.cz
+  linux$linux_suffix /boot/vmlinuz changedisk fastboot live automatic=method:cdrom ramdisk_size=@live_size@ stagename=live showopts lowmem vga=@bootvga@ @bootargs@
+  initrd$linux_suffix /boot/full.cz
 }
 
 
diff --git a/features.in/grub/cfg.in/32live_rw.cfg b/features.in/grub/cfg.in/32live_rw.cfg
index 55c4b977fe..406ff19486 100644
--- a/features.in/grub/cfg.in/32live_rw.cfg
+++ b/features.in/grub/cfg.in/32live_rw.cfg
@@ -1,4 +1,4 @@
 menuentry 'LiveCD with sessions support' --id 'session' {
-  linux$linux_suffix /EFI/BOOT/vmlinuz changedisk fastboot live automatic=method:cdrom ramdisk_size=@live_size@ stagename=live showopts live_rw vga=@bootvga@ @bootargs@
-  initrd$linux_suffix /EFI/BOOT/full.cz
+  linux$linux_suffix /boot/vmlinuz changedisk fastboot live automatic=method:cdrom ramdisk_size=@live_size@ stagename=live showopts live_rw vga=@bootvga@ @bootargs@
+  initrd$linux_suffix /boot/full.cz
 }
diff --git a/features.in/grub/cfg.in/80rescue.cfg b/features.in/grub/cfg.in/80rescue.cfg
index c6c0ae53c9..d863ef0c1e 100644
--- a/features.in/grub/cfg.in/80rescue.cfg
+++ b/features.in/grub/cfg.in/80rescue.cfg
@@ -1,4 +1,4 @@
 menuentry 'Rescue LiveCD' --id 'rescue' {
-  linux$linux_suffix /EFI/BOOT/vmlinuz changedisk fastboot live automatic=method:cdrom ramdisk_size=@rescue_size@ stagename=rescue splash=0 showopts @rescue_bootargs@
-  initrd$linux_suffix /EFI/BOOT/full.cz
+  linux$linux_suffix /boot/vmlinuz changedisk fastboot live automatic=method:cdrom ramdisk_size=@rescue_size@ stagename=rescue splash=0 showopts @rescue_bootargs@
+  initrd$linux_suffix /boot/full.cz
 }
diff --git a/features.in/grub/cfg.in/82rescue_rw.cfg b/features.in/grub/cfg.in/82rescue_rw.cfg
index ec18be28bb..c6365be080 100644
--- a/features.in/grub/cfg.in/82rescue_rw.cfg
+++ b/features.in/grub/cfg.in/82rescue_rw.cfg
@@ -1,4 +1,4 @@
 menuentry 'Rescue with sessions support' --id 'rescue_session' {
-  linux$linux_suffix /EFI/BOOT/vmlinuz changedisk fastboot live automatic=method:cdrom,label:ALT* ramdisk_size=@rescue_size@ stagename=rescue splash=0 showopts @rescue_bootargs@ live_rw
-  initrd$linux_suffix /EFI/BOOT/full.cz
+  linux$linux_suffix /boot/vmlinuz changedisk fastboot live automatic=method:cdrom,label:ALT* ramdisk_size=@rescue_size@ stagename=rescue splash=0 showopts @rescue_bootargs@ live_rw
+  initrd$linux_suffix /boot/full.cz
 }
diff --git a/features.in/grub/cfg.in/83rescue_fm.cfg b/features.in/grub/cfg.in/83rescue_fm.cfg
index 71bf21d3b7..fa8bf7adfb 100644
--- a/features.in/grub/cfg.in/83rescue_fm.cfg
+++ b/features.in/grub/cfg.in/83rescue_fm.cfg
@@ -1,4 +1,4 @@
 menuentry 'Forensic mode (leave disks alone)' --id 'rescue_forensic' {
-  linux$linux_suffix /EFI/BOOT/vmlinuz changedisk fastboot live automatic=method:cdrom ramdisk_size=@rescue_size@ splash=0 showopts stagename=rescue @rescue_bootargs@ max_loop=16 forensic hash=@rescue_hash@
-  initrd$linux_suffix /EFI/BOOT/full.cz
+  linux$linux_suffix /boot/vmlinuz changedisk fastboot live automatic=method:cdrom ramdisk_size=@rescue_size@ splash=0 showopts stagename=rescue @rescue_bootargs@ max_loop=16 forensic hash=@rescue_hash@
+  initrd$linux_suffix /boot/full.cz
 }
diff --git a/features.in/grub/cfg.in/85mediacheck.cfg b/features.in/grub/cfg.in/85mediacheck.cfg
index 6779dd00d3..3a2fbe4105 100644
--- a/features.in/grub/cfg.in/85mediacheck.cfg
+++ b/features.in/grub/cfg.in/85mediacheck.cfg
@@ -1,4 +1,4 @@
 menuentry 'Check this media for defects' --id 'mediachk' {
-  linux$linux_suffix /EFI/BOOT/vmlinuz changedisk live quiet lowmem automatic=method:cdrom mediacheck=1 stagename=mediacheck showopts @bootargs@
-  initrd$linux_suffix /EFI/BOOT/full.cz
+  linux$linux_suffix /boot/vmlinuz changedisk live quiet lowmem automatic=method:cdrom mediacheck=1 stagename=mediacheck showopts @bootargs@
+  initrd$linux_suffix /boot/full.cz
 }
diff --git a/features.in/grub/generate.mk b/features.in/grub/generate.mk
index a0b59221a2..f321ce798e 100644
--- a/features.in/grub/generate.mk
+++ b/features.in/grub/generate.mk
@@ -19,7 +19,7 @@ ifndef GRUB_DIRECT
 GRUB_CFG := $(GRUB_CFG) $(SUBPROFILE_DIRS) defaults
 endif
 
-DSTDIR  := $(BUILDDIR)/stage1/files/EFI/BOOT/.in
+DSTDIR  := $(BUILDDIR)/stage1/files/boot/grub/.in
 DSTCFGS := $(DSTDIR)/*.cfg
 
 # we can do GRUB_{CFG,MODULES,FILES}
diff --git a/features.in/grub/scripts.d/20-propagator-ramdisk b/features.in/grub/scripts.d/20-propagator-ramdisk
index c47302a769..a01b8f3127 100755
--- a/features.in/grub/scripts.d/20-propagator-ramdisk
+++ b/features.in/grub/scripts.d/20-propagator-ramdisk
@@ -5,9 +5,9 @@
 
 cd "$WORKDIR"
 
-cfgs="$(find EFI/BOOT -name '*.cfg')"
+cfgs="$(find boot/grub -name '*.cfg')"
 [ -n "$cfgs" ] || {
-	echo "${0##*/}: did not find any config under EFI/BOOT " >&2
+	echo "${0##*/}: did not find any config under boot/grub " >&2
 	exit 1
 }
 
diff --git a/features.in/grub/scripts.d/20-propagator-rescue-hash b/features.in/grub/scripts.d/20-propagator-rescue-hash
index fff0be0ce9..7a13499693 100755
--- a/features.in/grub/scripts.d/20-propagator-rescue-hash
+++ b/features.in/grub/scripts.d/20-propagator-rescue-hash
@@ -5,10 +5,10 @@
 
 cd "$WORKDIR"
 
-grep -qs "@rescue_hash@" EFI/BOOT/*.cfg || exit 0
+grep -qs "@rescue_hash@" boot/grub/*.cfg || exit 0
 
 find -maxdepth 1 -type f -name rescue \
 | while read image; do
 	rescue_hash="$(sha256sum -b "$image" | cut -f1 -d' ')"
-	sed -i "s, ÎÁ rescue_hash@,$rescue_hash," EFI/BOOT/*.cfg
+	sed -i "s, ÎÁ rescue_hash@,$rescue_hash," boot/grub/*.cfg
 done
diff --git a/features.in/grub/stage1/scripts.d/01-grub b/features.in/grub/stage1/scripts.d/01-grub
index 11890e5381..2c13a4b893 100755
--- a/features.in/grub/stage1/scripts.d/01-grub
+++ b/features.in/grub/stage1/scripts.d/01-grub
@@ -4,8 +4,8 @@
 
 CFG="grub.cfg"
 
-mkdir -p "$WORKDIR/EFI/BOOT"
-cd "$WORKDIR/EFI/BOOT"
+mkdir -p "$WORKDIR/boot/grub"
+cd "$WORKDIR/boot/grub"
 
 # validate just in case (see also stage1 Makefile)
 case "$GLOBAL_BOOTLOADER" in
-- 
2.24.1


--------------57A0C61BE7D9EDE338E3E6C8
Content-Type: text/x-patch;
 name="0003-grub-fix-typo.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="0003-grub-fix-typo.patch"



More information about the devel-distro mailing list