Open mmstick opened 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:
@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.
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.
New changes:
Requires distinst d1f3d9
. Automated builds will fail until it is merged.
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:
calc $(cat /sys/class/block/$partition/size) / 2 / 1024
returns a whole number, and not a decimal.ntfsresize -i -f -v $partition
).--no-action
argument is supplied to the resize command to simulate the resize.ntfsresize -f -f --size $bytes $partition
).ntfsresize
.ntfsresize
apparently shrinks the file system to be 7 sectors shorter than the specified size.msftdata
partition flag after recreating itAs 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.
Based on the refresh-option PR, with the alongside option re-enabled.
In a VM with Windows installed:
Resizing Windows: