Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 1971 - manual partitioning #2031

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

svartkanin
Copy link
Collaborator

This fixes:

This should also fix #1992 and no longer delete existing partitions if nothing changed.

Investigation work was done by @codefiles #1971 (comment)

In addition, this also fixes another minor bug that happens when doing manual partitioning as in the main problem, saving the configuration and then loading the configuration. The reason is that saving the config will not save the dev_path of existing/modified partitions which is essential to create the objects. So when loading the config objects can't be crated because the dev_path is missing.

With this PR all existing partitions will be excluded from any validation and also any formatting actions.

@Kitsunejasutin
Copy link

I tested your changes but it outputs another error which is related to error you're trying to fix

Unmounting all existing partitions: /dev/nvme0n1
Unmounting: /dev/nvme0n1p1
Unmounting: /dev/nvme0n1p2
Unmounting: /dev/nvme0n1p3
Unmounting: /dev/nvme0n1p5
Unmounting: /dev/nvme0n1p6
Unmounting: /dev/nvme0n1p4
Use existing device: /dev/nvme0n1
Creating partitions: /dev/nvme0n1
Delete existing partition: /dev/nvme0n1p5
	Type: primary
	Filesystem: fat32
	Geometry: 915257344 start sector, 499712 length
Calling partprobe: partprobe /dev/nvme0n1p5
partuuid found: {'name': 'nvme0n1p5', 'path': '/dev/nvme0n1p5', 'pkname': 'nvme0n1', 'size': '244 MiB', 'log_sec': 512, 'pttype': 'gpt', 'ptuuid': 'd08f9676-b8de-4da8-9708-7cea43acd129', 'rota': False, 'tran': 'nvme', 'partuuid': 'a147182f-73f4-4831-af4f-a56ab5bc03ef', 'parttype': 'c12a7328-f81f-11d2-ba4b-00a0c93ec93b', 'uuid': '0F08-D37F', 'fstype': 'vfat', 'fsver': 'FAT32', 'fsavail': None, 'fsuse_percentage': None, 'type': 'part', 'mountpoint': None, 'mountpoints': [], 'fsroots': [], 'children': []}
Delete existing partition: /dev/nvme0n1p6
	Type: primary
	Filesystem: ext4
	Geometry: 915757056 start sector, 83386368 length
Calling partprobe: partprobe /dev/nvme0n1p6
partuuid found: {'name': 'nvme0n1p6', 'path': '/dev/nvme0n1p6', 'pkname': 'nvme0n1', 'size': '40716 MiB', 'log_sec': 512, 'pttype': 'gpt', 'ptuuid': 'd08f9676-b8de-4da8-9708-7cea43acd129', 'rota': False, 'tran': 'nvme', 'partuuid': '2a4a67d4-e264-405d-a470-e3aa529dc029', 'parttype': '0fc63daf-8483-4772-8e79-3d69d8477de4', 'uuid': '6efc5759-48e3-4401-b648-6b2e6534b1a4', 'fstype': 'ext4', 'fsver': '1.0', 'fsavail': None, 'fsuse_percentage': None, 'type': 'part', 'mountpoint': None, 'mountpoints': [], 'fsroots': [], 'children': []}
Calling partprobe: partprobe /dev/nvme0n1
Unmounting all existing partitions: /dev/nvme0n1
Unmounting: /dev/nvme0n1p1
Unmounting: /dev/nvme0n1p2
Unmounting: /dev/nvme0n1p3
Unmounting: /dev/nvme0n1p5
Unmounting: /dev/nvme0n1p6
Unmounting: /dev/nvme0n1p4
Formatting filesystem: /usr/bin/mkfs.fat -F32 /dev/nvme0n1p5
Formatting filesystem: /usr/bin/mkfs.ext4 -F /dev/nvme0n1p6
Starting installation
Mounting partitions in order
Mounting /dev/nvme0n1p6: command
Mounting /dev/nvme0n1p5: command
Waiting for time sync (systemd-timesyncd.service) to complete.
Waiting for automatic mirror selection (reflector) to complete.
Waiting for Arch Linux keyring sync (archlinux-keyring-wkd-sync) to complete.
A new package mirror-list has been created: /etc/pacman.d/mirrorlist
System is not running in a VM: ['/usr/bin/systemd-detect-virt'] exited with abnormal exit code [1]: none

The multilib flag is set. This system will be installed with the multilib repository enabled.
The testing flag is not set. This system will be installed without testing repositories enabled.
Installing packages: ['base', 'base-devel', 'linux-firmware', 'linux', 'intel-ucode']
Enabling periodic TRIM
Enabling service fstrim.timer
A new package mirror-list has been created: /mnt/archinstall/etc/pacman.d/mirrorlist
Adding bootloader Systemd-boot to /dev/nvme0n1p5
Installing packages: ['efibootmgr']
['/usr/bin/arch-chroot', '/mnt/archinstall', 'bootctl', '--no-variables', '--esp-path=None', '--boot-path=/boot', 'install'] exited with abnormal exit code [1]: 

@svartkanin
Copy link
Collaborator Author

@Kitsunejasutin would you mind sharing the actual error? The Log you posted doesn't contain it

@Kitsunejasutin
Copy link

@Kitsunejasutin would you mind sharing the actual error? The Log you posted doesn't contain it

I don't see the actual error on any logs, but I have a screenshot of it
PXL_20230904_085002492

@svartkanin
Copy link
Collaborator Author

@Kitsunejasutin that's the one I was looking for. It's not related to this PR, I think as the error is different. Not to get off track for this PR, would you mind opening a new issue with the above error and also uploading the file /var/log/archinstall/install.log please

@Kitsunejasutin
Copy link

@Kitsunejasutin that's the one I was looking for. It's not related to this PR, I think as the error is different. Not to get off track for this PR, would you mind opening a new issue with the above error and also uploading the file /var/log/archinstall/install.log please

Oh is that so, I saw the "file system type of "/None" and I thought this was related to this. Will open an issue for it. Thanks!

@svartkanin
Copy link
Collaborator Author

svartkanin commented Sep 4, 2023

@Kitsunejasutin ohh hang on I missed that in the logs, then it might actually be from this one. I will take a look at it, thanks for testing

@Kitsunejasutin
Copy link

Okay! Let me know if you need install.log

@svartkanin
Copy link
Collaborator Author

@Kitsunejasutin If you could provide the install.log that'd be great and safe time debugging

@Kitsunejasutin
Copy link

@Kitsunejasutin If you could provide the install.log that'd be great and safe time debugging

Here you go, https://nekobin.com/yacakivusi

@svartkanin
Copy link
Collaborator Author

@Kitsunejasutin okay I had a look at the log and it seems that you have 2 boot partitions is that correct?

The existing one is at /dev/nvme0n1p1 which is an existing partition that is not being modified.

The second one, which is being modified, is at /dev/nvme0n1p5 and you created a boot partition from that one. At line https://github.com/svartkanin/archinstall/blob/81ef09c336c1fc4dfbe5a324349d95a6bb30ce6d/archinstall/lib/disk/device_model.py#L792-L792 we're trying to determine what the boot partition is, which in this case will filter 2 partitions, the nvme0n1p1 AND nvme0n1p5, will only use the first received result.

Now, nvme0n1p1 has its mountpoint set to None which is the value we use for the efi bootloader https://github.com/svartkanin/archinstall/blob/81ef09c336c1fc4dfbe5a324349d95a6bb30ce6d/archinstall/lib/installer.py#L735-L735.

Is it intended to have 2 boot partitions? If so, I'm not entirely sure how to prevent this from happening at the moment, a workaround is to not use efi bootloader for the moment.

In any regard, it isn't related to this PR per se, but does warrant a new issue :)

@Kitsunejasutin
Copy link

I got your idea, yes I do have 2 boot partition to separate my windows and linux install. As for now I am using grub for compatability, I remember that systemd-boot has quite a lot of steps to do a dual boot with windows and show up on the menu. I guess systemd-boot is really out for an option for now. Thanks for the insight!

@1995parham 1995parham mentioned this pull request Sep 9, 2023
@svartkanin svartkanin merged commit 5656722 into archlinux:master Sep 14, 2023
5 of 6 checks passed
@svartkanin svartkanin deleted the fix-1971-manual-install branch September 14, 2023 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants