|
|
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
|
|
|
|
|
|
---
|
|
|
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
|
|
|
+++ b/80-rhel/live/config_files/aarch64/grub2-efi.cfg
|
|
|
@@ -15,7 +15,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
|
|
|
@@ -26,16 +31,16 @@ set timeout=60
|
|
|
search --no-floppy --set=root -l '@ISOLABEL@'
|
|
|
|
|
|
### BEGIN /etc/grub.d/10_linux ###
|
|
|
-menuentry 'Start @PRODUCT@ @VERSION@' --class red --class gnu-linux --class gnu --class os {
|
|
|
+menuentry 'Запустить @PRODUCT@ @VERSION@@FLAVOR@' --class red --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 red --class gnu-linux --class gnu --class os {
|
|
|
+menuentry 'Проверить носитель и запустить @PRODUCT@ @VERSION@@FLAVOR@' --class red --class gnu-linux --class gnu --class os {
|
|
|
linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image rd.live.check quiet
|
|
|
initrd @INITRDPATH@
|
|
|
}
|
|
|
-submenu 'Troubleshooting -->' {
|
|
|
- menuentry 'Install @PRODUCT@ @VERSION@ in basic graphics mode' --class red --class gnu-linux --class gnu --class os {
|
|
|
+submenu 'Устранение неполадок -->' {
|
|
|
+ menuentry 'Запустить @PRODUCT@ @VERSION@@FLAVOR@ (базовый графический режим)' --class red --class gnu-linux --class gnu --class os {
|
|
|
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..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 {
|
|
|
}
|
|
|
|
|
|
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
|
|
|
@@ -20,16 +25,16 @@ 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 {
|
|
|
linuxefi @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image quiet rhgb
|
|
|
initrdefi @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 {
|
|
|
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 'Устранение неполадок -->' {
|
|
|
+ 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@
|
|
|
}
|
|
|
diff --git a/80-rhel/live/efi.tmpl b/80-rhel/live/efi.tmpl
|
|
|
index 813f91e..50f95e6 100644
|
|
|
--- a/80-rhel/live/efi.tmpl
|
|
|
+++ b/80-rhel/live/efi.tmpl
|
|
|
@@ -35,7 +35,13 @@ ${make_efiboot("images/efiboot.img")}
|
|
|
copy ${KERNELDIR}/initrd.img ${EFIBOOTDIR}
|
|
|
%endif
|
|
|
install ${configdir}/grub2-efi.cfg ${eficonf}
|
|
|
+ %if product.name == 'MSVSphere ARM':
|
|
|
+ replace @PRODUCT@ 'МСВСфера' ${eficonf}
|
|
|
+ replace @FLAVOR@ ' АРМ' ${eficonf}
|
|
|
+ %else:
|
|
|
replace @PRODUCT@ '${product.name}' ${eficonf}
|
|
|
+ replace @FLAVOR@ '' ${eficonf}
|
|
|
+ %endif
|
|
|
replace @VERSION@ ${product.version} ${eficonf}
|
|
|
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..277391b 100644
|
|
|
--- a/80-rhel/live/x86.tmpl
|
|
|
+++ b/80-rhel/live/x86.tmpl
|
|
|
@@ -22,6 +22,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}
|
|
|
@@ -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
|
|
|
|
|
|
# Create optional product.img and updates.img
|
|
|
--
|
|
|
2.47.1
|
|
|
|