mirror of
https://abf.rosa.ru/djam/livecd-tools.git
synced 2025-02-24 08:02:58 +00:00
Merge pull request #6 from betcher_/livecd-tools:rosa2021.1
fix for memtest
This commit is contained in:
commit
0c2973665e
2 changed files with 25 additions and 21 deletions
|
@ -1,5 +1,5 @@
|
|||
diff --git a/imgcreate/live.py b/imgcreate/live.py
|
||||
index 9447640..f467901 100644
|
||||
index 9447640..961e65f 100644
|
||||
--- a/imgcreate/live.py
|
||||
+++ b/imgcreate/live.py
|
||||
@@ -234,8 +234,7 @@ class LiveImageCreatorBase(LoopImageCreator):
|
||||
|
@ -36,7 +36,7 @@ index 9447640..f467901 100644
|
|||
options += ["-rational-rock", "-joliet", "-volid", self.fslabel]
|
||||
return options
|
||||
|
||||
@@ -398,61 +394,96 @@ class x86LiveImageCreator(LiveImageCreatorBase):
|
||||
@@ -398,61 +394,94 @@ class x86LiveImageCreator(LiveImageCreatorBase):
|
||||
def _get_isolinux_stanzas(self, isodir):
|
||||
return ""
|
||||
|
||||
|
@ -90,6 +90,9 @@ index 9447640..f467901 100644
|
|||
-
|
||||
- return True
|
||||
-
|
||||
- def __copy_kernel_and_initramfs(self, isodir, version, index):
|
||||
- bootdir = self._instroot + "/boot"
|
||||
-
|
||||
+ def _generate_grub2_bootimg(self, isodir):
|
||||
+ """generate grub2 boot images"""
|
||||
+
|
||||
|
@ -175,16 +178,14 @@ index 9447640..f467901 100644
|
|||
+ print('Error. Can not format image')
|
||||
+
|
||||
+
|
||||
def __copy_kernel_and_initramfs(self, isodir, version, index):
|
||||
bootdir = self._instroot + "/boot"
|
||||
|
||||
+ def __copy_kernel_and_initramfs(self, isodir, version, index, bootdir):
|
||||
shutil.copyfile(bootdir + "/vmlinuz-" + version,
|
||||
- isodir + "/isolinux/vmlinuz" + index)
|
||||
+ isodir + "/vmlinuz" + index)
|
||||
|
||||
isDracut = False
|
||||
if os.path.exists(self._instroot + "/usr/bin/dracut"):
|
||||
@@ -461,17 +492,21 @@ class x86LiveImageCreator(LiveImageCreatorBase):
|
||||
@@ -461,17 +490,17 @@ class x86LiveImageCreator(LiveImageCreatorBase):
|
||||
# FIXME: Implement a better check for how the initramfs is named...
|
||||
if os.path.exists(bootdir + "/initramfs-" + version + ".img"):
|
||||
shutil.copyfile(bootdir + "/initramfs-" + version + ".img",
|
||||
|
@ -197,10 +198,6 @@ index 9447640..f467901 100644
|
|||
elif not self.base_on:
|
||||
logging.error("No initramfs or initrd found for %s" % (version,))
|
||||
|
||||
+ elif os.path.exists(bootdir + "/pcmemtest"):
|
||||
+ shutil.copyfile(bootdir + "/pcmemtest",
|
||||
+ isodir + "/pcmemtest")
|
||||
+
|
||||
is_xen = False
|
||||
if os.path.exists(bootdir + "/xen.gz-" + version[:-3]):
|
||||
shutil.copyfile(bootdir + "/xen.gz-" + version[:-3],
|
||||
|
@ -209,7 +206,7 @@ index 9447640..f467901 100644
|
|||
is_xen = True
|
||||
|
||||
return (is_xen, isDracut)
|
||||
@@ -488,209 +523,22 @@ class x86LiveImageCreator(LiveImageCreatorBase):
|
||||
@@ -488,209 +517,28 @@ class x86LiveImageCreator(LiveImageCreatorBase):
|
||||
|
||||
return False
|
||||
|
||||
|
@ -246,7 +243,7 @@ index 9447640..f467901 100644
|
|||
-menu tabmsg Press Tab for full configuration options on menu items.
|
||||
-menu separator
|
||||
-""" % args
|
||||
|
||||
-
|
||||
- def __get_image_stanza(self, is_xen, isDracut, **args):
|
||||
- if isDracut:
|
||||
- args["rootlabel"] = "live:CDLABEL=%(fslabel)s" % args
|
||||
|
@ -271,9 +268,10 @@ index 9447640..f467901 100644
|
|||
- endtext
|
||||
-"""
|
||||
- return template % args
|
||||
-
|
||||
|
||||
- def __get_image_stanzas(self, isodir):
|
||||
+ def __get_kernel_initrd(self, isodir):
|
||||
+ bootdir = self._instroot + "/boot"
|
||||
kernels = self._get_kernel_versions()
|
||||
kernel_options = self._get_kernel_options()
|
||||
checkisomd5 = self._has_checkisomd5()
|
||||
|
@ -286,7 +284,7 @@ index 9447640..f467901 100644
|
|||
- index = "0"
|
||||
+ index="0"
|
||||
for kernel, version in ((k,v) for k in kernels for v in kernels[k]):
|
||||
(is_xen, isDracut) = self.__copy_kernel_and_initramfs(isodir, version, index)
|
||||
- (is_xen, isDracut) = self.__copy_kernel_and_initramfs(isodir, version, index)
|
||||
- if index == "0":
|
||||
- self._isDracut = isDracut
|
||||
-
|
||||
|
@ -341,7 +339,13 @@ index 9447640..f467901 100644
|
|||
- else:
|
||||
- check.append(None)
|
||||
-
|
||||
+ (is_xen, isDracut) = self.__copy_kernel_and_initramfs(isodir, version, index, bootdir)
|
||||
index = str(int(index) + 1)
|
||||
+ if os.path.exists(bootdir + "/pcmemtest"):
|
||||
+ shutil.copyfile(bootdir + "/pcmemtest",
|
||||
+ isodir + "/pcmemtest")
|
||||
+ else:
|
||||
+ print('pcmemtest not found')
|
||||
|
||||
- return (linux, basic, check)
|
||||
-
|
||||
|
@ -472,8 +476,8 @@ index 9447640..f467901 100644
|
|||
+set OS=$"ROSA linux"
|
||||
+set start=$"Start"
|
||||
+set startInstall=$"Start & install"
|
||||
+set basicMode=$" in basic graphics mode"
|
||||
+set consoleMode=$" in console mode"
|
||||
+set basicMode=$"in basic graphics mode"
|
||||
+set consoleMode=$"in console mode"
|
||||
+set rebootToEfi=$"Reboot to EFI firmware setup"
|
||||
+set reboot=$"Reboot"
|
||||
+set testMedia=$"Test this media & start"
|
||||
|
@ -545,7 +549,7 @@ index 9447640..f467901 100644
|
|||
+ mo = '/usr/share/locale/' + lng + '/LC_MESSAGES/grub.mo'
|
||||
+ if os.path.exists(mo):
|
||||
+ subprocess.call( [ 'msgunfmt', mo, '-o', lng + '.po' ])
|
||||
+ if not subprocess.call( [ 'msgcat', lng + '.po',
|
||||
+ if subprocess.call( [ 'msgcat', lng + '.po',
|
||||
+ '/usr/share/livecd-tools/grub2/locales/' + po,
|
||||
+ '-o', isodir + "/EFI/BOOT/locale/" + po ] ):
|
||||
+ print(f"Msgcat for {po} & {lng}.po file - Failed")
|
||||
|
@ -632,14 +636,14 @@ index 9447640..f467901 100644
|
|||
+ linux /pcmemtest
|
||||
+}
|
||||
+"""
|
||||
|
||||
- cfg+= """}
|
||||
+
|
||||
+ cfg += """if test "$bootis" == 'UEFI:' ; then
|
||||
+menuentry "$rebootToEfi" {
|
||||
+ fwsetup
|
||||
+}
|
||||
+fi
|
||||
+
|
||||
|
||||
- cfg+= """}
|
||||
+menuentry "$backToMain" {
|
||||
+ configfile ${prefix}/grub.cfg
|
||||
+}
|
||||
|
|
2
ru_RU.po
2
ru_RU.po
|
@ -18,7 +18,7 @@ msgstr "Проверка ОЗУ"
|
|||
msgid "Start"
|
||||
msgstr "Запуск"
|
||||
|
||||
msgid " in basic graphics mode"
|
||||
msgid "in basic graphics mode"
|
||||
msgstr "в режиме упрощенной графики"
|
||||
|
||||
msgid "Reboot to EFI firmware setup"
|
||||
|
|
Loading…
Add table
Reference in a new issue