openSUSE / linuxrc

Installation Setup
GNU General Public License v3.0
17 stars 33 forks source link

Better handling of local installation media during installation #288

Open wfeldt opened 2 years ago

wfeldt commented 2 years ago

Better handling of local installation media during installation

The issue

Analysis

In the case above the customer is trying to

(a) use an ISO in a subdirectory of some partition (e.g. /foo/sles.iso on /dev/sda1). You might also want to
(b) use an unpacked tree (/foo/sles on /dev/sda1) or to
(c) put the unpacked tree into the root dir of the partition (/ on /dev/sda1).

All three cases lead to different issues.

Here's what's happening with local media in the background.

  1. linuxrc leaves local media mounted at /var/adm/mount when starting yast; it sets install.inf::Sourcemounted: 1 to indicate this
  2. linuxrc keeps a reference to the medium to handle later extend requests
  3. yast unmounts (or at least tries to) the local medium
  4. yast/libzypp then re-mounts/unmounts the medium as needed during the repo initialization process in inst_complex_welcome.rb
  5. storage-ng does the initial probing in inst_system_analysis.rb
  6. yast/libzypp then re-mounts/unmounts the medium as needed during more repo accesses
  7. storage-ng runs the guided proposal/expert partitioner in inst_disk_proposal.rb
  8. yast runs extend (cracklib) and linuxrc will re-mount/unmount the medium as needed for that
  9. installation starts and storage-ng commits the disk setup
  10. yast/libzypp then re-mounts/unmounts the medium as needed for package installation

Notes

The problem(s)

Solution

Don't leave local media around mounted.

In the AutoYaST workflow this seems to be the case already. Another explicit Pkg.SourceReleaseAll seems not necessary. If needed, shortly before probe_storage looks like the place to go.

The manual workflow should be reviewed to ensure this or an explicit Pkg.SourceReleaseAll would have to be included shortly before the probing and before the proposal is run.

Implementation

The RAID issue

The original report uses a RAID to store the repo. You have to add autoassembly=1 to the boot options.

But linuxrc scans only 'physical' disks looking for installation media, not RAID volumes. But that's easily fixed by setting the list_md probing flag internally.

Pull requests

SLE15-SP3

SLE15-SP4

Tumbleweed