Skip to content

Commit

Permalink
Merge pull request #303 from SUSE/move_image_install_location
Browse files Browse the repository at this point in the history
Install migration live image to /migration-image
  • Loading branch information
schaefi authored Oct 31, 2024
2 parents f0d276f + 76e1102 commit 9836bb1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
3 changes: 2 additions & 1 deletion grub.d/99_migration
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ else
) ${CLASS}"
fi

migration_iso=$(echo /usr/share/migration-image/*-Migration.*.iso)
migration_iso=$(echo /migration-image/*-Migration.*.iso)

root_device=$(
lsblk -p -n -r -o NAME,MOUNTPOINT | grep -E "/$" | uniq | cut -f1 -d" "
Expand Down Expand Up @@ -74,6 +74,7 @@ if grub_file_is_not_garbage "${migration_iso}"; then
"/@/boot/grub2/x86_64-efi"
printf " insmod loopback\n"
fi
printf " insmod lvm\n"
printf " insmod %s\n" "${image_fs_type}"
printf " search --no-floppy --fs-uuid --set=root %s\n" "${image_fs_uuid}"
printf " set isofile='%s'\n" \
Expand Down
10 changes: 10 additions & 0 deletions image/package/suse-migration-rpm.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Wed Oct 30 13:21:08 UTC 2024 - Marcus Schäfer <marcus.schaefer@gmail.com>

- Install migration live image to /migration-image

This change helps to run migrations on systems which stores
/usr/share in a special way, e.g. as LVM volume or other
type that cannot be read via the loopback grub or kexec
method

-------------------------------------------------------------------
Thu Nov 14 10:11:04 UTC 2019 - Marcus Schaefer <ms@suse.com>

Expand Down
6 changes: 3 additions & 3 deletions image/package/suse-migration-rpm/image.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ This package contains the Migration Live System.
%build

%install
install -d -m 755 $RPM_BUILD_ROOT/usr/share/migration-image
install -d -m 755 $RPM_BUILD_ROOT/migration-image
install -d -m 755 $RPM_BUILD_ROOT/%{_sbindir}
cp %{SOURCE0} $RPM_BUILD_ROOT/usr/share/migration-image
cp %{SOURCE0} $RPM_BUILD_ROOT/migration-image
cp %{_sbindir}/run_migration $RPM_BUILD_ROOT/%{_sbindir}

%post
Expand All @@ -35,7 +35,7 @@ rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
/usr/share/migration-image
/migration-image
%{_sbindir}/run_migration

%changelog
2 changes: 1 addition & 1 deletion tools/run_migration
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function get_migration_image {
# """
# Search for migration ISO file
# """
echo /usr/share/migration-image/*-Migration.*.iso
echo /migration-image/*-Migration.*.iso
}

function get_system_root_device {
Expand Down

0 comments on commit 9836bb1

Please sign in to comment.