|
|
|
@ -1,16 +1,47 @@
|
|
|
|
|
From 633965934ac74eb73fbb1ac7cf9365777197db47 Mon Sep 17 00:00:00 2001
|
|
|
|
|
From 7dd752779308586b809b7afaa13e692c2edab5cb Mon Sep 17 00:00:00 2001
|
|
|
|
|
From: tigro <arkadiy.sheyn@softline.com>
|
|
|
|
|
Date: Sat, 29 Jul 2023 15:34:37 +0200
|
|
|
|
|
Subject: [PATCH 3/8] Translate live image bootloader to Russian
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
.../live/config_files/aarch64/grub2-efi.cfg | 13 +++++---
|
|
|
|
|
80-rhel/live/config_files/x86/grub2-efi.cfg | 11 +++++--
|
|
|
|
|
80-rhel/live/efi.tmpl | 6 ++++
|
|
|
|
|
80-rhel/live/x86.tmpl | 30 ++++++++++++++++++-
|
|
|
|
|
80-rhel/x86.tmpl | 2 +-
|
|
|
|
|
5 files changed, 53 insertions(+), 9 deletions(-)
|
|
|
|
|
80-rhel/live/aarch64.tmpl | 12 ++++++++++-
|
|
|
|
|
.../live/config_files/aarch64/grub2-efi.cfg | 13 ++++++++----
|
|
|
|
|
80-rhel/live/config_files/x86/grub2-bios.cfg | 21 +++++++++----------
|
|
|
|
|
80-rhel/live/config_files/x86/grub2-efi.cfg | 13 ++++++++----
|
|
|
|
|
80-rhel/live/efi.tmpl | 6 ++++++
|
|
|
|
|
80-rhel/live/x86.tmpl | 12 ++++++++++-
|
|
|
|
|
6 files changed, 56 insertions(+), 21 deletions(-)
|
|
|
|
|
|
|
|
|
|
diff --git a/80-rhel/live/aarch64.tmpl b/80-rhel/live/aarch64.tmpl
|
|
|
|
|
index d1a3f87..f8bb655 100644
|
|
|
|
|
--- a/80-rhel/live/aarch64.tmpl
|
|
|
|
|
+++ b/80-rhel/live/aarch64.tmpl
|
|
|
|
|
@@ -21,6 +21,16 @@ if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
|
|
|
|
|
isoargs = "-iso-level 3"
|
|
|
|
|
else:
|
|
|
|
|
isoargs = ""
|
|
|
|
|
+
|
|
|
|
|
+# define an MSVSphere-specific image flavor constant
|
|
|
|
|
+if product.variant in ("Minimal", "Server"):
|
|
|
|
|
+ FLAVOR=" Сервер"
|
|
|
|
|
+elif product.variant == "Certified":
|
|
|
|
|
+ FLAVOR=" Сертифицированная"
|
|
|
|
|
+elif product.variant == "BaseOS":
|
|
|
|
|
+ FLAVOR=" ОС"
|
|
|
|
|
+else:
|
|
|
|
|
+ FLAVOR=""
|
|
|
|
|
%>
|
|
|
|
|
|
|
|
|
|
mkdir ${LIVEDIR}
|
|
|
|
|
@@ -53,7 +63,7 @@ mkdir ${KERNELDIR}
|
|
|
|
|
%>
|
|
|
|
|
treeinfo images-${basearch} ${img|basename} ${img}
|
|
|
|
|
%endfor
|
|
|
|
|
- <%include file="efi.tmpl" args="configdir=configdir, KERNELDIR=KERNELDIR, efiarch32=efiarch32, efiarch64=efiarch64, isolabel=isolabel, extra_boot_args=extra_boot_args"/>
|
|
|
|
|
+ <%include file="efi.tmpl" args="configdir=configdir, KERNELDIR=KERNELDIR, efiarch32=efiarch32, efiarch64=efiarch64, isolabel=isolabel, extra_boot_args=extra_boot_args, FLAVOR=FLAVOR""/>
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# Create optional product.img and updates.img
|
|
|
|
|
diff --git a/80-rhel/live/config_files/aarch64/grub2-efi.cfg b/80-rhel/live/config_files/aarch64/grub2-efi.cfg
|
|
|
|
|
index c874547..c5db696 100644
|
|
|
|
|
--- a/80-rhel/live/config_files/aarch64/grub2-efi.cfg
|
|
|
|
@ -49,8 +80,54 @@ index c874547..c5db696 100644
|
|
|
|
|
linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image nomodeset quiet rhgb
|
|
|
|
|
initrd @INITRDPATH@
|
|
|
|
|
}
|
|
|
|
|
diff --git a/80-rhel/live/config_files/x86/grub2-bios.cfg b/80-rhel/live/config_files/x86/grub2-bios.cfg
|
|
|
|
|
index 73d0a56..0f805c8 100644
|
|
|
|
|
--- a/80-rhel/live/config_files/x86/grub2-bios.cfg
|
|
|
|
|
+++ b/80-rhel/live/config_files/x86/grub2-bios.cfg
|
|
|
|
|
@@ -5,7 +5,12 @@ function load_video {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
load_video
|
|
|
|
|
+insmod gfxterm
|
|
|
|
|
+set gfxmode=auto
|
|
|
|
|
set gfxpayload=keep
|
|
|
|
|
+set lang=ru_RU
|
|
|
|
|
+terminal_output gfxterm
|
|
|
|
|
+loadfont unicode
|
|
|
|
|
insmod gzio
|
|
|
|
|
insmod part_gpt
|
|
|
|
|
insmod ext2
|
|
|
|
|
@@ -17,23 +22,17 @@ set timeout=60
|
|
|
|
|
search --no-floppy --set=root -l '@ISOLABEL@'
|
|
|
|
|
|
|
|
|
|
### BEGIN /etc/grub.d/10_linux ###
|
|
|
|
|
-menuentry 'Start @PRODUCT@ @VERSION@' --class fedora --class gnu-linux --class gnu --class os {
|
|
|
|
|
+menuentry 'Запустить @PRODUCT@ @VERSION@@FLAVOR@' --class fedora --class gnu-linux --class gnu --class os {
|
|
|
|
|
linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image quiet rhgb
|
|
|
|
|
initrd @INITRDPATH@
|
|
|
|
|
}
|
|
|
|
|
-menuentry 'Test this media & start @PRODUCT@ @VERSION@' --class fedora --class gnu-linux --class gnu --class os {
|
|
|
|
|
+menuentry 'Проверить носитель и запустить @PRODUCT@ @VERSION@@FLAVOR@' --class fedora --class gnu-linux --class gnu --class os {
|
|
|
|
|
linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image rd.live.check quiet
|
|
|
|
|
initrd @INITRDPATH@
|
|
|
|
|
}
|
|
|
|
|
-submenu 'Troubleshooting -->' {
|
|
|
|
|
- menuentry 'Start @PRODUCT@ @VERSION@ in basic graphics mode' --class fedora --class gnu-linux --class gnu --class os {
|
|
|
|
|
- linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image nomodeset vga=791 quiet rhgb
|
|
|
|
|
+submenu 'Устранение неполадок -->' {
|
|
|
|
|
+ menuentry 'Запустить @PRODUCT@ @VERSION@@FLAVOR@ (базовый графический режим)' --class fedora --class gnu-linux --class gnu --class os {
|
|
|
|
|
+ linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image nomodeset quiet rhgb
|
|
|
|
|
initrd @INITRDPATH@
|
|
|
|
|
}
|
|
|
|
|
- menuentry 'Boot first drive' --class fedora --class gnu-linux --class gnu --class os {
|
|
|
|
|
- chainloader (hd0)+1
|
|
|
|
|
- }
|
|
|
|
|
- menuentry 'Boot second drive' --class fedora --class gnu-linux --class gnu --class os {
|
|
|
|
|
- chainloader (hd1)+1
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
|
|
|
diff --git a/80-rhel/live/config_files/x86/grub2-efi.cfg b/80-rhel/live/config_files/x86/grub2-efi.cfg
|
|
|
|
|
index 3906958..3ca2687 100644
|
|
|
|
|
index 3906958..05c846d 100644
|
|
|
|
|
--- a/80-rhel/live/config_files/x86/grub2-efi.cfg
|
|
|
|
|
+++ b/80-rhel/live/config_files/x86/grub2-efi.cfg
|
|
|
|
|
@@ -9,7 +9,12 @@ function load_video {
|
|
|
|
@ -66,7 +143,7 @@ index 3906958..3ca2687 100644
|
|
|
|
|
insmod gzio
|
|
|
|
|
insmod part_gpt
|
|
|
|
|
insmod ext2
|
|
|
|
|
@@ -20,7 +25,7 @@ set timeout=60
|
|
|
|
|
@@ -20,16 +25,16 @@ set timeout=60
|
|
|
|
|
search --no-floppy --set=root -l '@ISOLABEL@'
|
|
|
|
|
|
|
|
|
|
### BEGIN /etc/grub.d/10_linux ###
|
|
|
|
@ -75,13 +152,14 @@ index 3906958..3ca2687 100644
|
|
|
|
|
linuxefi @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image quiet rhgb
|
|
|
|
|
initrdefi @INITRDPATH@
|
|
|
|
|
}
|
|
|
|
|
@@ -28,8 +33,8 @@ menuentry 'Test this media & start @PRODUCT@ @VERSION@' --class fedora --class g
|
|
|
|
|
-menuentry 'Test this media & start @PRODUCT@ @VERSION@' --class fedora --class gnu-linux --class gnu --class os {
|
|
|
|
|
+menuentry 'Проверить носитель и запустить @PRODUCT@ @VERSION@@FLAVOR@' --class fedora --class gnu-linux --class gnu --class os {
|
|
|
|
|
linuxefi @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image rd.live.check quiet
|
|
|
|
|
initrdefi @INITRDPATH@
|
|
|
|
|
}
|
|
|
|
|
-submenu 'Troubleshooting -->' {
|
|
|
|
|
- menuentry 'Start @PRODUCT@ @VERSION@ in basic graphics mode' --class fedora --class gnu-linux --class gnu --class os {
|
|
|
|
|
+submenu 'Проверить носитель и запустить @PRODUCT@ @VERSION@@FLAVOR@ -->' {
|
|
|
|
|
+submenu 'Устранение неполадок -->' {
|
|
|
|
|
+ menuentry 'Запустить @PRODUCT@ @VERSION@@FLAVOR@ (базовый графический режим)' --class fedora --class gnu-linux --class gnu --class os {
|
|
|
|
|
linuxefi @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image nomodeset quiet rhgb
|
|
|
|
|
initrdefi @INITRDPATH@
|
|
|
|
@ -105,74 +183,35 @@ index 813f91e..50f95e6 100644
|
|
|
|
|
replace @KERNELNAME@ vmlinuz ${eficonf}
|
|
|
|
|
replace @KERNELPATH@ /${kdir}/vmlinuz ${eficonf}
|
|
|
|
|
diff --git a/80-rhel/live/x86.tmpl b/80-rhel/live/x86.tmpl
|
|
|
|
|
index cf4dad4..c88d657 100644
|
|
|
|
|
index cf4dad4..277391b 100644
|
|
|
|
|
--- a/80-rhel/live/x86.tmpl
|
|
|
|
|
+++ b/80-rhel/live/x86.tmpl
|
|
|
|
|
@@ -28,6 +28,7 @@ mkdir ${LIVEDIR}
|
|
|
|
|
install ${runtime_img} ${LIVEDIR}/squashfs.img
|
|
|
|
|
treeinfo stage2 mainimage ${LIVEDIR}/squashfs.img
|
|
|
|
|
|
|
|
|
|
@@ -22,6 +22,16 @@ if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
|
|
|
|
|
isoargs = "-iso-level 3"
|
|
|
|
|
else:
|
|
|
|
|
isoargs = ""
|
|
|
|
|
+
|
|
|
|
|
## install kernels
|
|
|
|
|
mkdir ${KERNELDIR}
|
|
|
|
|
%for kernel in kernels:
|
|
|
|
|
@@ -47,15 +48,42 @@ mkdir ${KERNELDIR}
|
|
|
|
|
+# define an MSVSphere-specific image flavor constant
|
|
|
|
|
+if product.variant in ("Minimal", "Server"):
|
|
|
|
|
+ FLAVOR=" Сервер"
|
|
|
|
|
+elif product.variant == "Certified":
|
|
|
|
|
+ FLAVOR=" Сертифицированная"
|
|
|
|
|
+elif product.variant == "BaseOS":
|
|
|
|
|
+ FLAVOR=" ОС"
|
|
|
|
|
+else:
|
|
|
|
|
+ FLAVOR=""
|
|
|
|
|
%>
|
|
|
|
|
|
|
|
|
|
## configure grub2 config file
|
|
|
|
|
mkdir ${GRUB2DIR}
|
|
|
|
|
+## add a console font with Russian (cp866) encoding support
|
|
|
|
|
+install ${configdir}/cp866-8x16.psf ${GRUB2DIR}
|
|
|
|
|
install ${configdir}/grub2-bios.cfg ${GRUB2DIR}/grub.cfg
|
|
|
|
|
replace @VERSION@ ${product.version} ${GRUB2DIR}/grub.cfg
|
|
|
|
|
-replace @PRODUCT@ '${product.name}' ${GRUB2DIR}/grub.cfg
|
|
|
|
|
+%if product.name == 'MSVSphere GNOME':
|
|
|
|
|
+replace @PRODUCT@ 'МСВСфера' ${GRUB2DIR}/isolinux.cfg ${GRUB2DIR}/*.msg
|
|
|
|
|
+replace @FLAVOR@ ' GNOME' ${GRUB2DIR}/isolinux.cfg ${GRUB2DIR}/*.msg
|
|
|
|
|
+%endif
|
|
|
|
|
+%if product.name == 'MSVSphere Cinnamon':
|
|
|
|
|
+replace @PRODUCT@ 'МСВСфера' ${GRUB2DIR}/isolinux.cfg ${GRUB2DIR}/*.msg
|
|
|
|
|
+replace @FLAVOR@ ' Cinnamon' ${GRUB2DIR}/isolinux.cfg ${GRUB2DIR}/*.msg
|
|
|
|
|
+%endif
|
|
|
|
|
+%if product.name == 'MSVSphere KDE':
|
|
|
|
|
+replace @PRODUCT@ 'МСВСфера' ${GRUB2DIR}/isolinux.cfg ${GRUB2DIR}/*.msg
|
|
|
|
|
+replace @FLAVOR@ ' KDE' ${GRUB2DIR}/isolinux.cfg ${GRUB2DIR}/*.msg
|
|
|
|
|
+%endif
|
|
|
|
|
+%if product.name == 'MSVSphere XFCE':
|
|
|
|
|
+replace @PRODUCT@ 'МСВСфера' ${GRUB2DIR}/isolinux.cfg ${GRUB2DIR}/*.msg
|
|
|
|
|
+replace @FLAVOR@ ' XFCE' ${GRUB2DIR}/isolinux.cfg ${GRUB2DIR}/*.msg
|
|
|
|
|
+%endif
|
|
|
|
|
+%if product.name == 'MSVSphere ARM':
|
|
|
|
|
+replace @PRODUCT@ 'МСВСфера' ${GRUB2DIR}/isolinux.cfg ${GRUB2DIR}/*.msg
|
|
|
|
|
+replace @FLAVOR@ ' АРМ' ${GRUB2DIR}/isolinux.cfg ${GRUB2DIR}/*.msg
|
|
|
|
|
+%else:
|
|
|
|
|
+replace @PRODUCT@ '${product.name}' ${BOOTDIR}/isolinux.cfg ${BOOTDIR}/*.msg
|
|
|
|
|
+replace @FLAVOR@ '' ${BOOTDIR}/isolinux.cfg ${BOOTDIR}/*.msg
|
|
|
|
|
+%endif
|
|
|
|
|
+replace @PRODUCT@ '${product.name}' ${GRUB2DIR}/grub.conf
|
|
|
|
|
replace @KERNELPATH@ /${KERNELDIR}/vmlinuz ${GRUB2DIR}/grub.cfg
|
|
|
|
|
replace @INITRDPATH@ /${KERNELDIR}/initrd.img ${GRUB2DIR}/grub.cfg
|
|
|
|
|
replace @ISOLABEL@ '${isolabel}' ${GRUB2DIR}/grub.cfg
|
|
|
|
|
replace @ROOT@ 'root=live:CDLABEL=${isolabel|udev}' ${GRUB2DIR}/grub.cfg
|
|
|
|
|
replace @EXTRA@ '${extra_boot_args}' ${GRUB2DIR}/grub.cfg
|
|
|
|
|
|
|
|
|
|
+## convert BIOS bootloader configs to cp866 encoding
|
|
|
|
|
+iconv 'cp866' ${GRUB2DIR}/isolinux.cfg ${GRUB2DIR}/*.msg
|
|
|
|
|
mkdir ${LIVEDIR}
|
|
|
|
|
@@ -66,7 +76,7 @@ replace @EXTRA@ '${extra_boot_args}' ${GRUB2DIR}/grub.cfg
|
|
|
|
|
<% efiarch64 = 'X64' %>
|
|
|
|
|
%endif
|
|
|
|
|
%if (efiarch32 or efiarch64):
|
|
|
|
|
- <%include file="efi.tmpl" args="configdir=configdir, KERNELDIR=KERNELDIR, efiarch32=efiarch32, efiarch64=efiarch64, isolabel=isolabel, extra_boot_args=extra_boot_args"/>
|
|
|
|
|
+ <%include file="efi.tmpl" args="configdir=configdir, KERNELDIR=KERNELDIR, efiarch32=efiarch32, efiarch64=efiarch64, isolabel=isolabel, extra_boot_args=extra_boot_args, FLAVOR=FLAVOR""/>
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
## WHeeeeeeee, EFI.
|
|
|
|
|
<% efiargs=""; efigraft=""; efiarch32=None; efiarch64=None %>
|
|
|
|
|
diff --git a/80-rhel/x86.tmpl b/80-rhel/x86.tmpl
|
|
|
|
|
index dcc1d20..608d8ed 100644
|
|
|
|
|
--- a/80-rhel/x86.tmpl
|
|
|
|
|
+++ b/80-rhel/x86.tmpl
|
|
|
|
|
@@ -57,7 +57,7 @@ mkdir ${KERNELDIR}
|
|
|
|
|
mkdir ${GRUB2DIR}
|
|
|
|
|
install ${configdir}/grub2-bios.cfg ${GRUB2DIR}/grub.cfg
|
|
|
|
|
replace @VERSION@ ${product.version} ${GRUB2DIR}/grub.cfg
|
|
|
|
|
-%if product.name == 'MSVSphere':
|
|
|
|
|
+%if product.name in ("MSVSphere", "MSVSphere Server"):
|
|
|
|
|
replace @PRODUCT@ 'МСВСфера' ${GRUB2DIR}/grub.cfg
|
|
|
|
|
%else:
|
|
|
|
|
replace @PRODUCT@ '${product.name}' ${GRUB2DIR}/grub.cfg
|
|
|
|
|
# Create optional product.img and updates.img
|
|
|
|
|
--
|
|
|
|
|
2.43.5
|
|
|
|
|
2.47.1
|
|
|
|
|
|
|
|
|
|