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 Option #173

Open mmstick opened 5 years ago

mmstick commented 5 years ago

Based on the refresh-option PR, with the alongside option re-enabled.

In a VM with Windows installed:

screenshot from 2019-01-16 16-55-17

Resizing Windows:

screenshot from 2019-01-16 16-56-13

brs17 commented 5 years ago

While I have yet to look at this specific pr, the following are notes from having looked at https://github.com/pop-os/installer/pull/157 yesterday:

mmstick commented 5 years ago

@brs17 I've been thinking about how to handle this. The live disk can also be the recovery partition, which does want to be able to install to itself. I think it just needs a check for the recovery.conf file, and hiding it if not found.

brs17 commented 5 years ago

Another thing I noticed is the visibility of "Alongside OS" in the recovery partition. It doesn't seem to really make sense to have that as a visible option. So potentially you only need to look for recovery.conf to not show the functionality at all.

mmstick commented 5 years ago

New changes:

Requires distinst d1f3d9. Automated builds will fail until it is merged.

mmstick commented 5 years ago

Still looking into Windows 10 resizing issues. Resizing with GParted works, but resizing with distinst does not. I've been comparing what GParted and distinst are doing differently, and I am running out of ideas on the cause.

Things which distinst and gparted are doing the same:

As far as I can tell, distinst and gparted are doing the exact same actions, even in the way that the partition is recreated with an exact() Constraint.

Some notes:

I can verify that the boot sector (first sector of the NTFS partition) remains valid after the resize. The "Hidden Sectors" count is the same value before and after the resize, which is the first four bytes starting from 0x1C. This value identifies that start sector of the partition, and must be updated when the partition is moved.

ntfsresize also reports that the partition is fine, so there doesn't seem to be a partitioning problem. All of the files are accessible when mounting the partition in Linux or in the recovery mode. So, there must be some extra step in the gparted code that's not easily found by grepping for references to ntfs.