Hello community,
here is the log from the commit of package linuxrc for openSUSE:Factory checked in at 2015-06-04 08:51:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/linuxrc (Old)
and /work/SRC/openSUSE:Factory/.linuxrc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "linuxrc"
Changes:
--------
--- /work/SRC/openSUSE:Factory/linuxrc/linuxrc.changes 2015-06-01 09:30:51.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.linuxrc.new/linuxrc.changes 2015-06-04 08:51:16.000000000 +0200
@@ -1,0 +2,10 @@
+Wed Jun 3 11:05:57 CEST 2015 - snwint@suse.com
+
+- some minor corrections
+- added comments & prototypes
+- don't use --real-mode kexec option when booted via uefi
+- reimplement 'boot installed system' option (bsc#906990)
+- menu is directly reachable via systemboot=1 boot option
+- 5.0.44
+
+-------------------------------------------------------------------
Old:
----
linuxrc-5.0.43.tar.xz
New:
----
linuxrc-5.0.44.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ linuxrc.spec ++++++
--- /var/tmp/diff_new_pack.z4eEz8/_old 2015-06-04 08:51:17.000000000 +0200
+++ /var/tmp/diff_new_pack.z4eEz8/_new 2015-06-04 08:51:17.000000000 +0200
@@ -25,7 +25,7 @@
Summary: SUSE Installation Program
License: GPL-3.0+
Group: System/Boot
-Version: 5.0.43
+Version: 5.0.44
Release: 0
Source: %{name}-%{version}.tar.xz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ linuxrc-5.0.43.tar.xz -> linuxrc-5.0.44.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.43/VERSION new/linuxrc-5.0.44/VERSION
--- old/linuxrc-5.0.43/VERSION 2015-05-28 09:11:50.000000000 +0200
+++ new/linuxrc-5.0.44/VERSION 2015-06-03 11:01:55.000000000 +0200
@@ -1 +1 @@
-5.0.43
+5.0.44
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.43/auto2.c new/linuxrc-5.0.44/auto2.c
--- old/linuxrc-5.0.43/auto2.c 2015-05-28 09:11:50.000000000 +0200
+++ new/linuxrc-5.0.44/auto2.c 2015-06-03 11:01:55.000000000 +0200
@@ -24,7 +24,6 @@
#include "window.h"
#include "net.h"
#include "display.h"
-#include "rootimage.h"
#include "module.h"
#include "keyboard.h"
#include "file.h"
@@ -84,6 +83,13 @@
while(!inst_update_cd());
}
+ if(config.systemboot) {
+ if(!config.win) util_disp_init();
+ util_boot_system();
+ config.manual = 1;
+ return 1;
+ }
+
if(config.win && !win_old) util_disp_done();
ok = auto2_find_repo();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.43/changelog new/linuxrc-5.0.44/changelog
--- old/linuxrc-5.0.43/changelog 2015-05-28 09:11:50.000000000 +0200
+++ new/linuxrc-5.0.44/changelog 2015-06-03 11:01:55.000000000 +0200
@@ -1,3 +1,10 @@
+2015-06-03: 5.0.44
+ - some minor corrections
+ - added comments & prototypes
+ - don't use --real-mode kexec option when booted via uefi
+ - reimplement 'boot installed system' option (bsc #906990)
+ - menu is directly reachable via systemboot=1 boot option
+
2015-05-27: 5.0.43
- Update README.md
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.43/file.c new/linuxrc-5.0.44/file.c
--- old/linuxrc-5.0.43/file.c 2015-05-28 09:11:50.000000000 +0200
+++ new/linuxrc-5.0.44/file.c 2015-06-03 11:01:55.000000000 +0200
@@ -31,7 +31,6 @@
#include "net.h"
#include "settings.h"
#include "auto2.h"
-#include "rootimage.h"
#include "display.h"
#include "keyboard.h"
#include "url.h"
@@ -306,6 +305,7 @@
{ key_defaultinstall, "DefaultRepo", kf_cfg + kf_cmd },
{ key_nanny, "nanny", kf_cfg + kf_cmd_early },
{ key_vlanid, "VLanID", kf_cfg + kf_cmd },
+ { key_systemboot, "SystemBoot", kf_cfg + kf_cmd },
};
static struct {
@@ -1711,6 +1711,10 @@
}
break;
+ case key_systemboot:
+ if(f->is.numeric) config.systemboot = f->nvalue;
+ break;
+
default:
break;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.43/file.h new/linuxrc-5.0.44/file.h
--- old/linuxrc-5.0.43/file.h 2015-05-28 09:11:50.000000000 +0200
+++ new/linuxrc-5.0.44/file.h 2015-06-03 11:01:55.000000000 +0200
@@ -54,7 +54,7 @@
key_namescheme, key_ptoptions, key_is_ptoption, key_withfcoe, key_digests,
key_plymouth, key_sslcerts, key_restart, key_restarted, key_autoyast2,
key_withipoib, key_upgrade, key_ifcfg, key_defaultinstall, key_nanny, key_vlanid,
- key_sshkey
+ key_sshkey, key_systemboot
} file_key_t;
typedef enum {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.43/global.h new/linuxrc-5.0.44/global.h
--- old/linuxrc-5.0.43/global.h 2015-05-28 09:11:50.000000000 +0200
+++ new/linuxrc-5.0.44/global.h 2015-06-03 11:01:55.000000000 +0200
@@ -400,6 +400,7 @@
unsigned nanny:1; /* use wickedd-nanny */
unsigned nanny_set:1; /* nanny setting was changed */
unsigned upgrade:1; /* upgrade or fresh install */
+ unsigned systemboot:1; /* boot installed system */
struct {
unsigned check:1; /* check for braille displays and start brld if found */
char *dev; /* braille device */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.43/install.c new/linuxrc-5.0.44/install.c
--- old/linuxrc-5.0.43/install.c 2015-05-28 09:11:50.000000000 +0200
+++ new/linuxrc-5.0.44/install.c 2015-06-03 11:01:55.000000000 +0200
@@ -37,7 +37,6 @@
#include "window.h"
#include "net.h"
#include "display.h"
-#include "rootimage.h"
#include "module.h"
#include "keyboard.h"
#include "file.h"
@@ -76,6 +75,8 @@
static dia_item_t di_inst_choose_display_last = di_none;
#endif
+static int ask_for_swap(int64_t size, char *msg);
+
/*
* Menu: install, system start, rescue
@@ -141,7 +142,8 @@
break;
case di_inst_system:
- err = root_boot_system();
+ util_boot_system();
+ err = 1;
break;
case di_inst_net_config:
@@ -1413,3 +1415,47 @@
}
+/*
+ * Check if we still have enough free memory for 'size'. If not, ask user
+ * for more swap.
+ *
+ * size: in kbytes!
+ *
+ * return: 0 ok, -1 error
+ */
+int ask_for_swap(int64_t size, char *msg)
+{
+ int i, j, did_init = 0;
+ char *partition = NULL;
+ char *argv[] = { NULL, NULL };
+
+ if(size >= 0 && config.memoryXXX.current >= config.memoryXXX.min_free + size) return 0;
+
+ if(!config.win) {
+ util_disp_init();
+ did_init = 1;
+ }
+
+ do {
+ j = inst_choose_partition(&partition, 1, "To continue, activate some swap space.", "Enter the swap partition (e.g., /dev/sda2)");
+
+ if(j == 0 && partition) {
+ argv[1] = long_dev(partition);
+ fprintf(stderr, "swapon %s\n", argv[1]);
+ i = util_swapon_main(2, argv);
+ if(i) {
+ dia_message("Error activating swap space.", MSGTYPE_ERROR);
+ j = 1;
+ }
+ }
+ util_free_mem();
+ }
+ while(j > 0);
+
+ str_copy(&partition, NULL);
+
+ if(did_init) util_disp_done();
+
+ return j;
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.43/module.c new/linuxrc-5.0.44/module.c
--- old/linuxrc-5.0.43/module.c 2015-05-28 09:11:50.000000000 +0200
+++ new/linuxrc-5.0.44/module.c 2015-06-03 11:01:55.000000000 +0200
@@ -26,7 +26,6 @@
#include "dialog.h"
#include "display.h"
#include "window.h"
-#include "rootimage.h"
#include "net.h"
#include "info.h"
#include "keyboard.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.43/rootimage.c new/linuxrc-5.0.44/rootimage.c
--- old/linuxrc-5.0.43/rootimage.c 2015-05-28 09:11:50.000000000 +0200
+++ new/linuxrc-5.0.44/rootimage.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,135 +0,0 @@
-/*
- *
- * rootimage.c Loading of rootimage
- *
- * Copyright (c) 1996-2002 Hubert Mantel, SuSE Linux AG (mantel@suse.de)
- *
- */
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "global.h"
-#include "util.h"
-#include "dialog.h"
-#include "window.h"
-#include "display.h"
-#include "rootimage.h"
-#include "module.h"
-#include "linuxrc.h"
-#include "install.h"
-
-#include "linux_fs.h"
-
-static int root_check_root (char *root_string_tv);
-
-/*
- * Check if we still have enough free memory for 'size'. If not, ask user
- * for more swap.
- *
- * size: in kbytes!
- *
- * return: 0 ok, -1 error
- */
-int ask_for_swap(int64_t size, char *msg)
-{
- int i, j, did_init = 0;
- char *partition = NULL;
- char *argv[] = { NULL, NULL };
-
- if(size >= 0 && config.memoryXXX.current >= config.memoryXXX.min_free + size) return 0;
-
- if(!config.win) {
- util_disp_init();
- did_init = 1;
- }
-
- do {
- j = inst_choose_partition(&partition, 1, "To continue, activate some swap space.", "Enter the swap partition (e.g., /dev/sda2)");
-
- if(j == 0 && partition) {
- argv[1] = long_dev(partition);
- fprintf(stderr, "swapon %s\n", argv[1]);
- i = util_swapon_main(2, argv);
- if(i) {
- dia_message("Error activating swap space.", MSGTYPE_ERROR);
- j = 1;
- }
- }
- util_free_mem();
- }
- while(j > 0);
-
- str_copy(&partition, NULL);
-
- if(did_init) util_disp_done();
-
- return j;
-}
-
-
-int root_check_root(char *root_string_tv)
-{
- char buf[256];
- int rc;
-
- if(strstr(root_string_tv, "/dev/") == root_string_tv) {
- root_string_tv += sizeof "/dev/" - 1;
- }
-
- sprintf(buf, "/dev/%s", root_string_tv);
-
- if(util_mount_ro(buf, config.mountpoint.instdata, NULL)) return -1;
-
- sprintf(buf, "%s/etc/passwd", config.mountpoint.instdata);
- rc = util_check_exist(buf);
-
- umount(config.mountpoint.instdata);
-
- return rc == 'r' ? 0 : -1;
-}
-
-
-int root_boot_system()
-{
- int rc;
- char *module, *type;
- char buf[256], root[256];
-
- do {
- rc = inst_choose_partition(&config.device, 0, "Choose the root partition.", "Enter your root partition (e.g., /dev/sda3)");
- if(rc || !config.device) return -1;
- sprintf(root, "/dev/%s", config.device);
-
- if((type = util_fstype(root, &module))) {
- if(module && config.module.dir) {
- sprintf(buf, "%s/%s" MODULE_SUFFIX, config.module.dir, module);
- mod_modprobe(module, NULL);
- }
- }
-
- if((rc = root_check_root(root))) {
- dia_message("Invalid root device.", MSGTYPE_ERROR);
- }
- }
- while(rc);
-
- str_copy(&config.new_root, root);
-
- return 0;
-}
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.43/rootimage.h new/linuxrc-5.0.44/rootimage.h
--- old/linuxrc-5.0.43/rootimage.h 2015-05-28 09:11:50.000000000 +0200
+++ new/linuxrc-5.0.44/rootimage.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-/*
- *
- * rootimage.h Header file for rootimage.c
- *
- * Copyright (c) 1996-2002 Hubert Mantel, SuSE Linux AG (mantel@suse.de)
- *
- */
-
-extern int root_boot_system (void);
-int ask_for_swap(int64_t size, char *msg);
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.43/util.c new/linuxrc-5.0.44/util.c
--- old/linuxrc-5.0.43/util.c 2015-05-28 09:11:50.000000000 +0200
+++ new/linuxrc-5.0.44/util.c 2015-06-03 11:01:55.000000000 +0200
@@ -115,6 +115,10 @@
static void util_extend_usr1(int signum);
static int util_extend(char *extension, char task, int verbose);
+static int cmp_alpha(slist_t *sl0, slist_t *sl1);
+static int cmp_alpha_s(const void *p0, const void *p1);
+static slist_t *get_kernel_list(char *dev);
+
void util_redirect_kmsg()
{
@@ -4877,3 +4881,349 @@
return compr;
}
+
+/*
+ * Helper function: sort alphanumerically.
+ */
+int cmp_alpha(slist_t *sl0, slist_t *sl1)
+{
+ return strcmp(sl0->key, sl1->key);
+}
+
+
+/*
+ * Wrapper around cmp_alpha() for qsort.
+ */
+int cmp_alpha_s(const void *p0, const void *p1)
+{
+ slist_t **sl0, **sl1;
+
+ sl0 = (slist_t **) p0;
+ sl1 = (slist_t **) p1;
+
+ return cmp_alpha(*sl0, *sl1);
+}
+
+
+/*
+ * Scan parition mounted at /mnt for kernel & initrd.
+ */
+slist_t *get_kernel_list(char *dev)
+{
+#if defined(__s390__) || defined(__s390x__)
+ char *kernel_pattern = "image-*";
+#elif defined(__x86_64__) || defined(__i386__)
+ char *kernel_pattern = "vmlinuz-*";
+#else
+ char *kernel_pattern = "vmlinux-*";
+#endif
+ char *dirs[] = { "/mnt", "/mnt/boot", "/mnt/efi/boot", "/mnt/efi/SuSE" };
+
+ int i;
+ DIR *d;
+ struct dirent *de;
+ char *buf = NULL;
+ slist_t *sl, *kernel_list = NULL;
+
+ for(i = 0; i < sizeof dirs/sizeof *dirs; i++) {
+ char link_name[2];
+
+ // skip boot -> . symlink and absolute symlinks
+ if(
+ readlink(dirs[i], link_name, sizeof link_name) == 1 &&
+ (*link_name == '.' || *link_name == '/')
+ ) continue;
+
+ if((d = opendir(dirs[i]))) {
+ while((de = readdir(d))) {
+ if(!fnmatch(kernel_pattern, de->d_name, FNM_PATHNAME)) {
+ char *t = strchr(de->d_name, '-');
+ if(t) {
+ strprintf(&buf, "%s/initrd%s", dirs[i], t);
+ fprintf(stderr, "%s matched, initrd? %s\n", de->d_name, buf);
+ if(util_check_exist(buf) == 'r') {
+ char *t2 = dirs[i] + sizeof "/mnt" - 1;
+ sl = slist_append(&kernel_list, slist_new());
+ strprintf(&sl->key, "%s:%s/%s", dev, t2, de->d_name);
+ strprintf(&sl->value, "%s:%s/initrd%s", dev, t2, t);
+ fprintf(stderr, "kernel: %s / %s\n", sl->key, sl->value);
+ }
+ str_copy(&buf, NULL);
+ }
+
+ }
+ }
+ closedir(d);
+ }
+ }
+
+ return kernel_list;
+}
+
+
+/*
+ * Boot installed system.
+ *
+ * 1. analyze disks: mount every partition and
+ * - look for /etc/{os,SuSE}-release; every such partition is considered
+ * to be a root file system
+ * - look for <kernel>-XXX and matching initrd-XXX files; every such pair
+ * is considered a bootable kernel/initrd combination; <kernel> may be
+ * vmlinux, vmlinuz, or image depending on the architecture
+ *
+ * 2. present 4 (resp. 5) dialogs to user:
+ * - select root partition
+ * - select kernel/initrd
+ * - optionally select alternative (persistent) root partition name
+ * - optionally add further kernel parameters
+ * - if in debug mode: optionally edit kexec options
+ */
+void util_boot_system()
+{
+ window_t win;
+ char *buf = NULL;
+ slist_t *sl;
+ slist_t *root_list = NULL, *root = NULL;
+ slist_t *kernel_list = NULL, *kernel = NULL;
+ char *kernel_options = NULL;
+ int i, items;
+ char **item_list;
+
+ strprintf(&buf, "Analysing disks...");
+ fprintf(stderr, "%s\n", buf);
+ if(config.win) {
+ dia_info(&win, buf, MSGTYPE_INFO);
+ }
+ else {
+ printf("%s\n", buf);
+ fflush(stdout);
+ }
+ str_copy(&buf, NULL);
+
+ util_update_disk_list(NULL, 1);
+
+ for(sl = config.partitions; sl; sl = sl->next) {
+ char *type = util_fstype(long_dev(sl->key), NULL);
+ char *blk_id = blk_ident(long_dev(sl->key));
+ if(type && strcmp(type, "swap")) {
+ if(!util_mount_ro(long_dev(sl->key), "/mnt", NULL)) {
+ char *os_name = NULL;
+
+ if(util_check_exist("/mnt/etc/os-release")) {
+ char *s = util_get_attr("/mnt/etc/os-release");
+ char *t = strstr(s, "PRETTY_NAME=\"");
+ if(t) {
+ t += sizeof "PRETTY_NAME=\"" - 1;
+ char *t2 = strchr(t, '"');
+ if(t2) {
+ *t2 = 0;
+ os_name = t;
+ }
+ }
+ }
+ else if(util_check_exist("/mnt/etc/SuSE-release")) {
+ char *s = util_get_attr("/mnt/etc/SuSE-release");
+ char *t = strchr(s, '\n');
+ if(t) *t = 0;
+ if(*s) os_name = s;
+ }
+
+ strprintf(&buf, "%s (%s) -- %s", sl->key, blk_id, os_name ?: "");
+ fprintf(stderr, "%s\n", buf);
+ if(os_name) {
+ slist_t *sl2 = slist_append_str(&root_list, long_dev(sl->key));
+ str_copy(&sl2->value, buf);
+ }
+ str_copy(&buf, NULL);
+
+ slist_append(&kernel_list, get_kernel_list(sl->key));
+
+ util_umount("/mnt");
+ }
+ }
+ }
+
+ if(config.win) win_close(&win);
+
+ if(!root_list || !kernel_list) {
+ dia_message("No bootable system found.", MSGTYPE_ERROR);
+ return;
+ }
+
+ root_list = slist_sort(root_list, cmp_alpha_s);
+ kernel_list = slist_sort(kernel_list, cmp_alpha_s);
+
+ for(items = 0, sl = root_list; sl; sl = sl->next) items++;
+
+ item_list = calloc(items + 1, sizeof *item_list);
+
+ for(i = 0, sl = root_list; sl; sl = sl->next, i++) {
+ item_list[i] = sl->value;
+ }
+
+ i = dia_list("Select a system to boot", 72, NULL, item_list, 0, align_left);
+
+ free(item_list);
+ item_list = NULL;
+
+ if(i <= 0) {
+ slist_free(root_list);
+
+ return;
+ }
+
+ // get the i-th (1-based) entry from list
+ for(root = root_list; root && i > 1; root = root->next, i--);
+
+ // root = system partition
+
+ for(items = 0, sl = kernel_list; sl; sl = sl->next) items++;
+
+ item_list = calloc(items + 1, sizeof *item_list);
+
+ for(i = 0, sl = kernel_list; sl; sl = sl->next, i++) {
+ item_list[i] = sl->key;
+ }
+
+ strprintf(&buf, "Select a kernel to boot\n%s", root->value);
+ i = dia_list(buf, 72, NULL, item_list, 0, align_left);
+ str_copy(&buf, NULL);
+
+ free(item_list);
+ item_list = NULL;
+
+ if(i <= 0) {
+ slist_free(root_list);
+ slist_free(kernel_list);
+
+ return;
+ }
+
+ // get the i-th (1-based) entry from list
+ for(kernel = kernel_list; kernel && i > 1; kernel = kernel->next, i--);
+
+ // kernel = kernel/initrd pair
+
+ // maybe user wants a persistent device name for 'root' option...
+
+ hd_data_t *hd_data = calloc(1, sizeof *hd_data);
+
+ hd_data->flags.list_md = 1;
+ hd_t *hd = hd_list(hd_data, hw_partition, 1, NULL);
+
+ for(; hd; hd = hd->next) {
+ if(hd->unix_dev_name && !strcmp(hd->unix_dev_name, root->key)) {
+ str_list_t *hsl;
+
+ for(items = 0, hsl = hd->unix_dev_names; hsl; hsl = hsl->next) items++;
+
+ if(items) {
+ item_list = calloc(items + 1, sizeof *item_list);
+
+ for(i = 0, hsl = hd->unix_dev_names; hsl; hsl = hsl->next, i++) {
+ item_list[i] = hsl->str;
+ }
+
+ i = dia_list("You may select an alternative device name for the system partition", 72, NULL, item_list, 0, align_left);
+
+ if(i > 0) {
+ str_copy(&root->key, item_list[i - 1]);
+ }
+
+ free(item_list);
+ item_list = NULL;
+ }
+
+ break;
+ }
+ }
+
+ hd_free_hd_data(hd_data);
+ free(hd_data);
+
+ strprintf(&kernel_options, "root=%s", root->key);
+
+ if(dia_input2("Edit kernel options", &kernel_options, 57, 0)) {
+ str_copy(&kernel_options, NULL);
+ slist_free(root_list);
+ slist_free(kernel_list);
+
+ return;
+ }
+
+ // show what we are doing
+ fprintf(stderr, "going to boot %s, append=\"%s\"\n", kernel->key, kernel_options);
+
+ // ok, now mount partition again, and load kernel & initrd
+
+ char *kernel_name = strchr(kernel->key, ':');
+ char *initrd_name = strchr(kernel->value, ':');
+
+ // can't happen, but anyway...
+ if(!kernel_name || !initrd_name) return;
+
+ *kernel_name++ = 0;
+ *initrd_name++ = 0;
+
+ if(util_mount_ro(long_dev(kernel->key), "/mnt", NULL)) {
+ fprintf(stderr, "oops, mounting partition failed\n");
+ slist_free(root_list);
+ slist_free(kernel_list);
+
+ return;
+ }
+
+ strprintf(&buf,
+ "kexec -l '/mnt/%s' --initrd='/mnt/%s' --append='%s'",
+ kernel_name, initrd_name, kernel_options
+ );
+
+ char *buf1 = NULL;
+
+ // on x86, non-uefi use real-mode interface;
+ // this seems to work better
+ if(strstr(kernel_name, "vmlinuz-") && !config.efi_vars) {
+ str_copy(&buf1, "--real-mode");
+ }
+
+ if(config.debug) {
+ if(dia_input2("Enter additional kexec options", &buf1, 57, 0)) {
+ util_umount("/mnt");
+
+ str_copy(&buf1, NULL);
+ str_copy(&kernel_options, NULL);
+ slist_free(root_list);
+ slist_free(kernel_list);
+
+ return;
+ }
+ if(buf1) strprintf(&buf, "%s %s", buf, buf1);
+ }
+
+ str_copy(&buf1, NULL);
+
+ fprintf(stderr, "%s\n", buf);
+
+ if(!config.test) {
+ strprintf(&buf, "%s >&2", buf);
+ int err = system(buf);
+ util_umount("/mnt");
+ if(!err) {
+ util_umount_all();
+ sync();
+ // dia_message("Now!", MSGTYPE_INFO);
+ LXRC_WAIT
+ system("kexec --exec >&2");
+ }
+ }
+
+ str_copy(&buf, NULL);
+ str_copy(&kernel_options, NULL);
+ slist_free(root_list);
+ slist_free(kernel_list);
+
+ // oops, we failed
+
+ dia_message("Sorry, system didn't boot.", MSGTYPE_ERROR);
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.43/util.h new/linuxrc-5.0.44/util.h
--- old/linuxrc-5.0.43/util.h 2015-05-28 09:11:50.000000000 +0200
+++ new/linuxrc-5.0.44/util.h 2015-06-03 11:01:55.000000000 +0200
@@ -157,3 +157,5 @@
char *compressed_file(char *name);
char *compressed_archive(char *name, char **archive);
+void util_boot_system(void);
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.43/window.c new/linuxrc-5.0.44/window.c
--- old/linuxrc-5.0.43/window.c 2015-05-28 09:11:50.000000000 +0200
+++ new/linuxrc-5.0.44/window.c 2015-06-03 11:01:55.000000000 +0200
@@ -21,7 +21,7 @@
#include "utf8.h"
-#define MAX_FIELD 40
+#define MAX_FIELD 80
static int is_printable(int key);