pop-os / installer

Installer for Pop!_OS & other Linux-based OSes
https://system76.com/pop
GNU General Public License v3.0
26 stars 16 forks source link

Alongside OS & Refresh Install Options #157

Closed mmstick closed 5 years ago

mmstick commented 6 years ago

Requires https://github.com/pop-os/distinst/pull/132

Refresh Install

This takes Cassidy's work with the DecryptionDialog at https://github.com/elementary/installer/pull/333, and integrates it with distinst, as well as a new RefreshView to list detected refresh options and to make them happen. This will require a few changes in distinst to expose some previously-hidden APIs, and to fix some issues with installing (updating the recovery partition fails due to running out of space).

Screenshots

screenshot from 2018-11-08 11-30-22

screenshot from 2018-11-08 16-31-08

Testing

Perform a clean install with and without encryption, and then do the following:

For the UI, these can be tested:

Alongside OS Install

The work had already been done in distinst, so it was just a matter of exposing it in the UI. By sharing UI code with the Refresh install view, both views have the same option selection view, but the alongside choice will also feature a slider for determining how much a partition should be shrunk to make room for the new install.

Screenshots

screenshot from 2018-11-08 17-09-50

Sector Slider

Testing

mmstick commented 5 years ago

"Refresh" install failed from recovery partition

I suspect this is due to:

if let Some(ref recovery) = option.recovery_part.clone() {
    set_mount_by_identity(disks, recovery, "/recovery")?;
}

Recovery in this case being the active root mount. Fixing this now.

mmstick commented 5 years ago

The refresh install from within a recovery partition is working. Currently fixing a few issues with performing an alongside install from recovery.

brs17 commented 5 years ago

Although kinda confused in my comments, in 18.04 the Refresh logo is the same color as the mouse over hover and therefore not visible at times. When selected the logo is somewhat visible although not very.

brs17 commented 5 years ago

Doing a refresh install from the recovery partition still fails due to Device or resource busy message.

brs17 commented 5 years ago

After doing a fresh install of 18.04 and then rebooting into the live image to do an "Alongside" install, two "unused space on /dev/sda" appear. Once size is 18.4EB the other 120GB, /dev/sda is the live image media, so it should not be an option at all (let alone these incorrect sizes). The entire size of /dev/sda is 120GB so there isn't a partition that large either.

brs17 commented 5 years ago
> The minimum size of the new install was 14.3GB (0 bytes free)

Do you think 5GB of overhead for a new install would be enough?

Perhaps we want to do a similar 20GB free? Although now we're talking about a not-insignificant amount of disk space.

mmstick commented 5 years ago

Currently looking into the refresh on recovery issue.

mmstick commented 5 years ago

I believe the refresh option now works within recovery. I'm going to test it again.

mmstick commented 5 years ago

@brs17 Refresh is now working from recovery partitions when refreshing itself.

brs17 commented 5 years ago

Since 18.04 theme is going to be updated real soon, I am going to ignore theme issues for the time being. Testing this pr with the new theme in 18.04 will be part of testing/merging the new theme and issues will be brought up then.

brs17 commented 5 years ago

With "Install Alongside OS" it currently looks like there is some funkiness with resizing Windows, as well as an LVM partition and LUKS.

Per discussion, we think it makes sense to separate this pr into "Install alongside OS" and a separate PR for "Refresh install". "Refresh Install" is pretty close to being done and therefore can be introduced much sooner.