-
Notifications
You must be signed in to change notification settings - Fork 574
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
PyParted and a large rewrite of the underlying partitioning #1604
Conversation
690e3d8
to
f025651
Compare
f025651
to
cfa4031
Compare
Alrighty, I finally managed to get the build flow working and also to execute archinstall which should make sure that it starts up without issues. @Torxed Do you think we could consider merging this so people could test it on master rather and start contributing towards it? As @codefiles rightfully mentioned, it gets more difficult keeping this massive monster as a shadow of master and for people to actually add changes |
@svartkanin Consider it done! Huge thank you to you and the work you've done with this so far! |
Thanks heaps for the patience on this, i know it was a massive change and as with all such changes I'm certain it's not perfect, so I'll keep improving it and making sure it doesn't cause any havoc :) |
I just tried this and got:
Disk config is: {
"config_type": "default_layout",
"device_modifications": [
{
"device": "/dev/nvme0n1",
"partitions": [
{
"btrfs": [],
"flags": [
"Boot"
],
"fs_type": "fat32",
"length": {
"sector_size": null,
"total_size": null,
"unit": "MiB",
"value": 512
},
"mount_options": [],
"mountpoint": "/boot",
"obj_id": "3b064b30-ec25-4814-948e-3edf6fd26ca4",
"start": {
"sector_size": null,
"total_size": null,
"unit": "MiB",
"value": 1
},
"status": "create",
"type": "primary"
},
{
"btrfs": [],
"flags": [],
"fs_type": "ext4",
"length": {
"sector_size": null,
"total_size": {
"sector_size": null,
"total_size": null,
"unit": "B",
"value": 500107862016
},
"unit": "Percent",
"value": 100
},
"mount_options": [],
"mountpoint": "/",
"obj_id": "56c07541-60d8-44c2-b77b-760f829f9340",
"start": {
"sector_size": null,
"total_size": null,
"unit": "MiB",
"value": 513
},
"status": "create",
"type": "primary"
}
],
"wipe": true
}
]
} I also got a partitioning related error prior to this change and decided to wait for this to be merged. I'm not sure if it was the same error though. # git describe
v2.5.4-19-g00b0ae7b Logs
|
Thanks for reporting this, I'll have a look. |
@Torxed send you a message on discord instead :) |
I tried to install again with #1754, unfortunately the error remains the same. lsblk -J -O{
"blockdevices": [
{
"alignment": 0,
"disc-aln": 0,
"dax": false,
"disc-gran": "4K",
"disc-max": "4G",
"disc-zero": false,
"fsavail": "0",
"fsroots": [
"/"
],
"fssize": "688M",
"fstype": "squashfs",
"fsused": "688M",
"fsuse%": "100%",
"fsver": "4.0",
"group": "disk",
"hctl": null,
"hotplug": false,
"kname": "loop0",
"label": null,
"log-sec": 512,
"maj:min": "7:0",
"min-io": 512,
"mode": "brw-rw----",
"model": null,
"name": "loop0",
"opt-io": 0,
"owner": "root",
"partflags": null,
"partlabel": null,
"parttype": null,
"parttypename": null,
"partuuid": null,
"path": "/dev/loop0",
"phy-sec": 512,
"pkname": null,
"pttype": null,
"ptuuid": null,
"ra": 128,
"rand": false,
"rev": null,
"rm": false,
"ro": true,
"rota": false,
"rq-size": 128,
"sched": "none",
"serial": null,
"size": "687.9M",
"start": null,
"state": null,
"subsystems": "block",
"mountpoint": "/run/archiso/airootfs",
"mountpoints": [
"/run/archiso/airootfs"
],
"tran": null,
"type": "loop",
"uuid": null,
"vendor": null,
"wsame": "0B",
"wwn": null,
"zoned": "none",
"zone-sz": "0B",
"zone-wgran": "0B",
"zone-app": "0B",
"zone-nr": 0,
"zone-omax": 0,
"zone-amax": 0
},{
"alignment": 0,
"disc-aln": 0,
"dax": false,
"disc-gran": "0B",
"disc-max": "0B",
"disc-zero": false,
"fsavail": null,
"fsroots": [
null
],
"fssize": null,
"fstype": "vfat",
"fsused": null,
"fsuse%": null,
"fsver": "FAT12",
"group": "disk",
"hctl": "0:0:0:0",
"hotplug": true,
"kname": "sda",
"label": "IPXE",
"log-sec": 512,
"maj:min": "8:0",
"min-io": 512,
"mode": "brw-rw----",
"model": "USB DISK",
"name": "sda",
"opt-io": 0,
"owner": "root",
"partflags": null,
"partlabel": null,
"parttype": null,
"parttypename": null,
"partuuid": null,
"path": "/dev/sda",
"phy-sec": 512,
"pkname": null,
"pttype": null,
"ptuuid": null,
"ra": 128,
"rand": true,
"rev": "1100",
"rm": true,
"ro": false,
"rota": true,
"rq-size": 2,
"sched": "mq-deadline",
"serial": "SMI_USB_DISK-0:0",
"size": "58.6G",
"start": null,
"state": "running",
"subsystems": "block:scsi:usb:pci",
"mountpoint": null,
"mountpoints": [
null
],
"tran": "usb",
"type": "disk",
"uuid": "0ED1-8431",
"vendor": "SMI ",
"wsame": "0B",
"wwn": null,
"zoned": "none",
"zone-sz": "0B",
"zone-wgran": "0B",
"zone-app": "0B",
"zone-nr": 0,
"zone-omax": 0,
"zone-amax": 0
},{
"alignment": 0,
"disc-aln": 0,
"dax": false,
"disc-gran": "512B",
"disc-max": "2T",
"disc-zero": false,
"fsavail": null,
"fsroots": [
null
],
"fssize": null,
"fstype": null,
"fsused": null,
"fsuse%": null,
"fsver": null,
"group": "disk",
"hctl": null,
"hotplug": false,
"kname": "nvme0n1",
"label": null,
"log-sec": 512,
"maj:min": "259:0",
"min-io": 512,
"mode": "brw-rw----",
"model": "Samsung SSD 970 EVO Plus 500GB",
"name": "nvme0n1",
"opt-io": 0,
"owner": "root",
"partflags": null,
"partlabel": null,
"parttype": null,
"parttypename": null,
"partuuid": null,
"path": "/dev/nvme0n1",
"phy-sec": 512,
"pkname": null,
"pttype": "gpt",
"ptuuid": "541461d0-77b1-4448-b998-bc71066b8d56",
"ra": 128,
"rand": false,
"rev": null,
"rm": false,
"ro": false,
"rota": false,
"rq-size": 1023,
"sched": "none",
"serial": "S4EVNM0R714202A",
"size": "465.8G",
"start": null,
"state": "live",
"subsystems": "block:nvme:pci",
"mountpoint": null,
"mountpoints": [
null
],
"tran": "nvme",
"type": "disk",
"uuid": null,
"vendor": null,
"wsame": "0B",
"wwn": "eui.0025385711908e09",
"zoned": "none",
"zone-sz": "0B",
"zone-wgran": "0B",
"zone-app": "0B",
"zone-nr": 0,
"zone-omax": 0,
"zone-amax": 0,
"children": [
{
"alignment": 0,
"disc-aln": 0,
"dax": false,
"disc-gran": "512B",
"disc-max": "2T",
"disc-zero": false,
"fsavail": null,
"fsroots": [
null
],
"fssize": null,
"fstype": null,
"fsused": null,
"fsuse%": null,
"fsver": null,
"group": "disk",
"hctl": null,
"hotplug": false,
"kname": "nvme0n1p2",
"label": null,
"log-sec": 512,
"maj:min": "259:1",
"min-io": 512,
"mode": "brw-rw----",
"model": null,
"name": "nvme0n1p2",
"opt-io": 0,
"owner": "root",
"partflags": null,
"partlabel": null,
"parttype": null,
"parttypename": null,
"partuuid": null,
"path": "/dev/nvme0n1p2",
"phy-sec": 512,
"pkname": "nvme0n1",
"pttype": "gpt",
"ptuuid": "541461d0-77b1-4448-b998-bc71066b8d56",
"ra": 128,
"rand": false,
"rev": null,
"rm": false,
"ro": false,
"rota": false,
"rq-size": 1023,
"sched": "none",
"serial": null,
"size": "465.3G",
"start": 1050624,
"state": null,
"subsystems": "block:nvme:pci",
"mountpoint": null,
"mountpoints": [
null
],
"tran": "nvme",
"type": "part",
"uuid": null,
"vendor": null,
"wsame": "0B",
"wwn": "eui.0025385711908e09",
"zoned": "none",
"zone-sz": "0B",
"zone-wgran": "0B",
"zone-app": "0B",
"zone-nr": 0,
"zone-omax": 0,
"zone-amax": 0
},{
"alignment": 0,
"disc-aln": 0,
"dax": false,
"disc-gran": "512B",
"disc-max": "2T",
"disc-zero": false,
"fsavail": null,
"fsroots": [
null
],
"fssize": null,
"fstype": null,
"fsused": null,
"fsuse%": null,
"fsver": null,
"group": "disk",
"hctl": null,
"hotplug": false,
"kname": "nvme0n1p1",
"label": null,
"log-sec": 512,
"maj:min": "259:8",
"min-io": 512,
"mode": "brw-rw----",
"model": null,
"name": "nvme0n1p1",
"opt-io": 0,
"owner": "root",
"partflags": null,
"partlabel": null,
"parttype": "c12a7328-f81f-11d2-ba4b-00a0c93ec93b",
"parttypename": "EFI System",
"partuuid": "9cffaac2-d1c5-4aa4-a705-40361cec8e6e",
"path": "/dev/nvme0n1p1",
"phy-sec": 512,
"pkname": "nvme0n1",
"pttype": "gpt",
"ptuuid": "541461d0-77b1-4448-b998-bc71066b8d56",
"ra": 128,
"rand": false,
"rev": null,
"rm": false,
"ro": false,
"rota": false,
"rq-size": 1023,
"sched": "none",
"serial": null,
"size": "512M",
"start": 2048,
"state": null,
"subsystems": "block:nvme:pci",
"mountpoint": null,
"mountpoints": [
null
],
"tran": "nvme",
"type": "part",
"uuid": null,
"vendor": null,
"wsame": "0B",
"wwn": "eui.0025385711908e09",
"zoned": "none",
"zone-sz": "0B",
"zone-wgran": "0B",
"zone-app": "0B",
"zone-nr": 0,
"zone-omax": 0,
"zone-amax": 0
}
]
},{
"alignment": 0,
"disc-aln": 0,
"dax": false,
"disc-gran": "512B",
"disc-max": "2T",
"disc-zero": false,
"fsavail": null,
"fsroots": [
null
],
"fssize": null,
"fstype": null,
"fsused": null,
"fsuse%": null,
"fsver": null,
"group": "disk",
"hctl": null,
"hotplug": false,
"kname": "nvme1n1",
"label": null,
"log-sec": 512,
"maj:min": "259:3",
"min-io": 16384,
"mode": "brw-rw----",
"model": "Samsung SSD 980 1TB",
"name": "nvme1n1",
"opt-io": 131072,
"owner": "root",
"partflags": null,
"partlabel": null,
"parttype": null,
"parttypename": null,
"partuuid": null,
"path": "/dev/nvme1n1",
"phy-sec": 512,
"pkname": null,
"pttype": "gpt",
"ptuuid": "7fd47f72-1fc5-11ec-83df-d8f883c9590e",
"ra": 256,
"rand": false,
"rev": null,
"rm": false,
"ro": false,
"rota": false,
"rq-size": 1023,
"sched": "none",
"serial": "S649NF0R714943L",
"size": "931.5G",
"start": null,
"state": "live",
"subsystems": "block:nvme:pci",
"mountpoint": null,
"mountpoints": [
null
],
"tran": "nvme",
"type": "disk",
"uuid": null,
"vendor": null,
"wsame": "0B",
"wwn": "eui.002538d711b09fe6",
"zoned": "none",
"zone-sz": "0B",
"zone-wgran": "0B",
"zone-app": "0B",
"zone-nr": 0,
"zone-omax": 0,
"zone-amax": 0,
"children": [
{
"alignment": 0,
"disc-aln": 0,
"dax": false,
"disc-gran": "512B",
"disc-max": "2T",
"disc-zero": false,
"fsavail": null,
"fsroots": [
null
],
"fssize": null,
"fstype": "ntfs",
"fsused": null,
"fsuse%": null,
"fsver": null,
"group": "disk",
"hctl": null,
"hotplug": false,
"kname": "nvme1n1p1",
"label": null,
"log-sec": 512,
"maj:min": "259:4",
"min-io": 16384,
"mode": "brw-rw----",
"model": null,
"name": "nvme1n1p1",
"opt-io": 131072,
"owner": "root",
"partflags": null,
"partlabel": null,
"parttype": "de94bba4-06d1-4d40-a16a-bfd50179d6ac",
"parttypename": "Windows recovery environment",
"partuuid": "7fd47f73-1fc5-11ec-83df-d8f883c9590e",
"path": "/dev/nvme1n1p1",
"phy-sec": 512,
"pkname": "nvme1n1",
"pttype": "gpt",
"ptuuid": "7fd47f72-1fc5-11ec-83df-d8f883c9590e",
"ra": 256,
"rand": false,
"rev": null,
"rm": false,
"ro": false,
"rota": false,
"rq-size": 1023,
"sched": "none",
"serial": null,
"size": "510.4M",
"start": 2048,
"state": null,
"subsystems": "block:nvme:pci",
"mountpoint": null,
"mountpoints": [
null
],
"tran": "nvme",
"type": "part",
"uuid": "B0A8D087A8D04D8A",
"vendor": null,
"wsame": "0B",
"wwn": "eui.002538d711b09fe6",
"zoned": "none",
"zone-sz": "0B",
"zone-wgran": "0B",
"zone-app": "0B",
"zone-nr": 0,
"zone-omax": 0,
"zone-amax": 0
},{
"alignment": 4096,
"disc-aln": 0,
"dax": false,
"disc-gran": "512B",
"disc-max": "2T",
"disc-zero": false,
"fsavail": null,
"fsroots": [
null
],
"fssize": null,
"fstype": "vfat",
"fsused": null,
"fsuse%": null,
"fsver": "FAT32",
"group": "disk",
"hctl": null,
"hotplug": false,
"kname": "nvme1n1p2",
"label": null,
"log-sec": 512,
"maj:min": "259:5",
"min-io": 16384,
"mode": "brw-rw----",
"model": null,
"name": "nvme1n1p2",
"opt-io": 131072,
"owner": "root",
"partflags": "0x8000000000000000",
"partlabel": "EFI system partition",
"parttype": "c12a7328-f81f-11d2-ba4b-00a0c93ec93b",
"parttypename": "EFI System",
"partuuid": "a231a28f-3d45-47a8-ae32-9390e3b5749e",
"path": "/dev/nvme1n1p2",
"phy-sec": 512,
"pkname": "nvme1n1",
"pttype": "gpt",
"ptuuid": "7fd47f72-1fc5-11ec-83df-d8f883c9590e",
"ra": 256,
"rand": false,
"rev": null,
"rm": false,
"ro": false,
"rota": false,
"rq-size": 1023,
"sched": "none",
"serial": null,
"size": "100M",
"start": 1047288,
"state": null,
"subsystems": "block:nvme:pci",
"mountpoint": null,
"mountpoints": [
null
],
"tran": "nvme",
"type": "part",
"uuid": "A61F-0464",
"vendor": null,
"wsame": "0B",
"wwn": "eui.002538d711b09fe6",
"zoned": "none",
"zone-sz": "0B",
"zone-wgran": "0B",
"zone-app": "0B",
"zone-nr": 0,
"zone-omax": 0,
"zone-amax": 0
},{
"alignment": 0,
"disc-aln": 0,
"dax": false,
"disc-gran": "512B",
"disc-max": "2T",
"disc-zero": false,
"fsavail": null,
"fsroots": [
null
],
"fssize": null,
"fstype": null,
"fsused": null,
"fsuse%": null,
"fsver": null,
"group": "disk",
"hctl": null,
"hotplug": false,
"kname": "nvme1n1p3",
"label": null,
"log-sec": 512,
"maj:min": "259:6",
"min-io": 16384,
"mode": "brw-rw----",
"model": null,
"name": "nvme1n1p3",
"opt-io": 131072,
"owner": "root",
"partflags": "0x8000000000000000",
"partlabel": "Microsoft reserved partition",
"parttype": "e3c9e316-0b5c-4db8-817d-f92df00215ae",
"parttypename": "Microsoft reserved",
"partuuid": "7fd47f75-1fc5-11ec-83df-d8f883c9590e",
"path": "/dev/nvme1n1p3",
"phy-sec": 512,
"pkname": "nvme1n1",
"pttype": "gpt",
"ptuuid": "7fd47f72-1fc5-11ec-83df-d8f883c9590e",
"ra": 256,
"rand": false,
"rev": null,
"rm": false,
"ro": false,
"rota": false,
"rq-size": 1023,
"sched": "none",
"serial": null,
"size": "16M",
"start": 1252096,
"state": null,
"subsystems": "block:nvme:pci",
"mountpoint": null,
"mountpoints": [
null
],
"tran": "nvme",
"type": "part",
"uuid": null,
"vendor": null,
"wsame": "0B",
"wwn": "eui.002538d711b09fe6",
"zoned": "none",
"zone-sz": "0B",
"zone-wgran": "0B",
"zone-app": "0B",
"zone-nr": 0,
"zone-omax": 0,
"zone-amax": 0
},{
"alignment": 12288,
"disc-aln": 0,
"dax": false,
"disc-gran": "512B",
"disc-max": "2T",
"disc-zero": false,
"fsavail": null,
"fsroots": [
null
],
"fssize": null,
"fstype": "ntfs",
"fsused": null,
"fsuse%": null,
"fsver": null,
"group": "disk",
"hctl": null,
"hotplug": false,
"kname": "nvme1n1p4",
"label": null,
"log-sec": 512,
"maj:min": "259:7",
"min-io": 16384,
"mode": "brw-rw----",
"model": null,
"name": "nvme1n1p4",
"opt-io": 131072,
"owner": "root",
"partflags": null,
"partlabel": "Basic data partition",
"parttype": "ebd0a0a2-b9e5-4433-87c0-68b6b72699c7",
"parttypename": "Microsoft basic data",
"partuuid": "7fd47f76-1fc5-11ec-83df-d8f883c9590e",
"path": "/dev/nvme1n1p4",
"phy-sec": 512,
"pkname": "nvme1n1",
"pttype": "gpt",
"ptuuid": "7fd47f72-1fc5-11ec-83df-d8f883c9590e",
"ra": 256,
"rand": false,
"rev": null,
"rm": false,
"ro": false,
"rota": false,
"rq-size": 1023,
"sched": "none",
"serial": null,
"size": "930.9G",
"start": 1284872,
"state": null,
"subsystems": "block:nvme:pci",
"mountpoint": null,
"mountpoints": [
null
],
"tran": "nvme",
"type": "part",
"uuid": "66622D4C622D21F3",
"vendor": null,
"wsame": "0B",
"wwn": "eui.002538d711b09fe6",
"zoned": "none",
"zone-sz": "0B",
"zone-wgran": "0B",
"zone-app": "0B",
"zone-nr": 0,
"zone-omax": 0,
"zone-amax": 0
}
]
}
]
} |
awesome! I'll be back infront of my computer after today :D |
Made a new issue #1759 as to not turn this comment section into an issue :) |
PyParted and large rewrite of the underlying partitioning
Unfortunately, I didn't get to wrap this up before the end of the year approached and will have to be completed in the next one.
PR prerequisites
There are a fair amount of other PRs open at the moment so I've pulled in my previous ones as I didn't want to sort out the massive amount of merge conflicts that happen otherwise:
New arhcinstall dependencies
As this PR uses external dependencies, they will have to be installed to be able to run
archinstall
:this will isntall the dependencies listed in
pyproject.toml
Significant changes
No more separate
disk_layout
filesThere used to be 3 possible configuration files
now, there are only two supported ones
This change allowed to remove the separate, sort of redundant,
harddrive(s)
menu entry completely and only rely on disk layout configuration.The disk layout configuration has been moved to a data class defined as
which will be saved into the
user_configuration.json
file asThis change is at this moment not backwards compatible, theoretically it can be made backwards compatible, but I'd really not do that as it may cause bad behavior as in the new configuration the mode of disk layout configuration (default, manual or pre-mounted) is stored in the config as well. Which means that parsing an old version, we have to guess what it was.
UI changes
No more harddrive selection
New sub-menu disk layout selection
New device selection menu
New manaul partitioning menu (similar to the user configuration menu)
Current state
What works at the moment
Install
Still missing
installation.py
file still has to be updated to work with all the new components