summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2018-10-27 15:30:22 +0100
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2018-10-27 21:09:13 +0100
commit293c6738289d1069f4dd0ad10cd7b1e2acd28913 (patch)
tree648be7d3ad6f5525a8df3bf319f492978dbb3a11
parent20b8f0d0976053e564b0505171dfeb8b85a84007 (diff)
downloaddraklive-install-293c6738289d1069f4dd0ad10cd7b1e2acd28913.tar
draklive-install-293c6738289d1069f4dd0ad10cd7b1e2acd28913.tar.gz
draklive-install-293c6738289d1069f4dd0ad10cd7b1e2acd28913.tar.bz2
draklive-install-293c6738289d1069f4dd0ad10cd7b1e2acd28913.tar.xz
draklive-install-293c6738289d1069f4dd0ad10cd7b1e2acd28913.zip
Locate Live medium from /run/mgalive/basedev.
Previously we did this by searching for a matching disk label, but that won't work if we are installed on a multi-boot USB stick.
-rw-r--r--NEWS1
-rwxr-xr-xdraklive-install7
2 files changed, 4 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index d3efc6b..2984f97 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,4 @@
+- locate live medium from /run/mgalive/basedev instead of from disk label
- only remove unused locales and drivers from installed system
- ensure partitioning wizard knows devices have been unmounted (mga#23063)
- disable screensaver/lock whilst installer is running
diff --git a/draklive-install b/draklive-install
index 10c2e43..a2ae851 100755
--- a/draklive-install
+++ b/draklive-install
@@ -60,10 +60,9 @@ sub install_live() {
my %settings = getVarsFromSh($system_file);
my $copy_source = $settings{SOURCE} || '/';
- my $live_media = 'Mageia*Live*'; # match disk label for all Mageia Live ISOS
display_start_message();
- init_hds($in, $all_hds, $fstab, $live_media);
+ init_hds($in, $all_hds, $fstab);
ask_partitions_loop($in, $all_hds, $fstab, $copy_source);
prepare_root($in);
copy_root($in, $copy_source);
@@ -133,7 +132,7 @@ sub umount_first_pass() {
}
sub init_hds {
- my ($in, $all_hds, $fstab, $live_media) = @_;
+ my ($in, $all_hds, $fstab) = @_;
my $wait = $in->wait_message('', N("Please wait"));
umount_first_pass();
eval { fs::any::get_hds($all_hds, $fstab, [], {}, 'skip_mtab', $in) };
@@ -141,7 +140,7 @@ sub init_hds {
#- fs::any::get_hds does not return mounts that are not in fstab
my @mounted = fs::read_fstab('', '/proc/mounts');
- my $live_device = basename(readlink(glob "/dev/disk/by-label/$live_media"));
+ my $live_device = cat_('/run/mgalive/basedev');
#- remove live device from the detected hds, so that bootloader is not installed on it:
#- bootloader installation uses first device from detect_devices::get, which tries to list devices
#- by booting order, and our live system is likely to be here in first position