archinstall
archinstall copied to clipboard
AttributeError: 'DMCryptDev' object has no attribute 'partitions'
Attempting to run sudo archinstall from an FDE Arch Linux USB thumbdrive.
FDE thumbdrive setup/layout:
sdb 8:16 1 119.5G 0 disk
├─sdb1 8:17 1 190M 0 part /boot/EFI
└─sdb2 8:18 1 119.3G 0 part
└─lvm_crypt 254:0 0 119.3G 0 crypt
├─vgusb-root 254:1 0 32.3G 0 lvm /
├─vgusb-log 254:2 0 2G 0 lvm /var/log
└─vgusb-home 254:3 0 85G 0 lvm /home
Steps taken:
- ran
sudo archinstall - selected Select harddrives
- marked the LVM volumes I wanted to use
- pressed Enter to return to previous menu
- selected Select disk layout
- selected Select what to do with each individual drive (followed by partition usage)
Got the following python traceback:
Traceback (most recent call last):
File "/usr/bin/archinstall", line 8, in <module>
sys.exit(run_as_a_module())
File "/usr/lib/python3.10/site-packages/archinstall/__init__.py", line 275, in run_as_a_module
script.execute()
File "/usr/lib/python3.10/site-packages/archinstall/lib/profiles.py", line 195, in execute
self.spec.loader.exec_module(sys.modules[self.namespace])
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/lib/python3.10/site-packages/archinstall/examples/guided.py", line 292, in <module>
ask_user_questions()
File "/usr/lib/python3.10/site-packages/archinstall/examples/guided.py", line 101, in ask_user_questions
global_menu.run()
File "/usr/lib/python3.10/site-packages/archinstall/lib/menu/selection_menu.py", line 304, in run
if not self._process_selection(selection):
File "/usr/lib/python3.10/site-packages/archinstall/lib/menu/selection_menu.py", line 316, in _process_selection
return self.exec_option(config_name, selector)
File "/usr/lib/python3.10/site-packages/archinstall/lib/menu/selection_menu.py", line 336, in exec_option
result = selector.func(presel_val)
File "/usr/lib/python3.10/site-packages/archinstall/lib/menu/global_menu.py", line 66, in <lambda>
lambda x: select_disk_layout(
File "/usr/lib/python3.10/site-packages/archinstall/lib/user_interaction/disk_conf.py", line 50, in select_disk_layout
return select_individual_blockdevice_usage(block_devices)
File "/usr/lib/python3.10/site-packages/archinstall/lib/user_interaction/disk_conf.py", line 32, in select_individual_blockdevice_usage
layout = manage_new_and_existing_partitions(device)
File "/usr/lib/python3.10/site-packages/archinstall/lib/user_interaction/partitioning_conf.py", line 117, in manage_new_and_existing_partitions
block_device_struct = {"partitions": [partition.__dump__() for partition in block_device.partitions.values()]}
AttributeError: 'DMCryptDev' object has no attribute 'partitions'
$ cat /var/log/archinstall/install.log
Hardware model detected: LENOVO 80WK; UEFI mode: True
Processor model detected: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Memory statistics: 14101456 available out of 16256876 total installed
Could not detect virtual system: ['/usr/bin/systemd-detect-virt'] exited with abnormal exit code [256]: b'none\r\n'
System is not running in a VM: ['/usr/bin/systemd-detect-virt'] exited with abnormal exit code [256]: b'none\r\n'
Virtualization detected: None; is VM: None
Graphics devices detected: dict_keys(['Intel Corporation HD Graphics 630 (rev 04)', 'NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] (rev a1)'])
Disk states before installing: {'blockdevices': [{'name': 'sda', 'fstype': None, 'fsver': None, 'label': None, 'uuid': None, 'fsavail': None, 'fsuse%': None, 'mountpoints': [None], 'type': 'disk', 'size': '1.9T', 'children': [{'name': 'sda1', 'fstype': 'ntfs', 'fsver': None, 'label': 'Games', 'uuid': 'E0EAFEDEEAFEAFC0', 'fsavail': None, 'fsuse%': None, 'mountpoints': [None], 'type': 'part', 'size': '1.9T'}]}, {'name': 'sdb', 'fstype': None, 'fsver': None, 'label': None, 'uuid': None, 'fsavail': None, 'fsuse%': None, 'mountpoints': [None], 'type': 'disk', 'size': '119.5G', 'children': [{'name': 'sdb1', 'fstype': 'vfat', 'fsver': 'FAT16', 'label': None, 'uuid': 'CB0C-8051', 'fsavail': '189.5M', 'fsuse%': '0%', 'mountpoints': ['/boot/EFI'], 'type': 'part', 'size': '190M'}, {'name': 'sdb2', 'fstype': 'crypto_LUKS', 'fsver': '1', 'label': None, 'uuid': '313ccf51-7564-4151-810e-3788a47961f2', 'fsavail': None, 'fsuse%': None, 'mountpoints': [None], 'type': 'part', 'size': '119.3G', 'children': [{'name': 'lvm_crypt', 'fstype': 'LVM2_member', 'fsver': 'LVM2 001', 'label': None, 'uuid': 'Llsa3U-h6IZ-ktSW-hG7g-WynE-jjzo-GFcBVK', 'fsavail': None, 'fsuse%': None, 'mountpoints': [None], 'type': 'crypt', 'size': '119.3G', 'children': [{'name': 'vgusb-root', 'fstype': 'xfs', 'fsver': None, 'label': None, 'uuid': 'b7e911b4-8895-4cde-9569-876ca77719f1', 'fsavail': '5.6G', 'fsuse%': '83%', 'mountpoints': ['/'], 'type': 'lvm', 'size': '32.3G'}, {'name': 'vgusb-log', 'fstype': 'xfs', 'fsver': None, 'label': None, 'uuid': '27a3594b-f05f-4caa-a649-0e742272d440', 'fsavail': '1.7G', 'fsuse%': '13%', 'mountpoints': ['/var/log'], 'type': 'lvm', 'size': '2G'}, {'name': 'vgusb-home', 'fstype': 'xfs', 'fsver': None, 'label': None, 'uuid': 'c23c7db9-17a5-4e70-8e57-0e61891b10ff', 'fsavail': '22.5G', 'fsuse%': '74%', 'mountpoints': ['/home'], 'type': 'lvm', 'size': '85G'}]}]}]}, {'name': 'nvme0n1', 'fstype': None, 'fsver': None, 'label': None, 'uuid': None, 'fsavail': None, 'fsuse%': None, 'mountpoints': [None], 'type': 'disk', 'size': '465.8G', 'children': [{'name': 'nvme0n1p1', 'fstype': 'ntfs', 'fsver': None, 'label': 'Recovery', 'uuid': '0CD2C04CD2C03C28', 'fsavail': None, 'fsuse%': None, 'mountpoints': [None], 'type': 'part', 'size': '450M'}, {'name': 'nvme0n1p2', 'fstype': 'vfat', 'fsver': 'FAT32', 'label': None, 'uuid': '86C1-935D', 'fsavail': None, 'fsuse%': None, 'mountpoints': [None], 'type': 'part', 'size': '100M'}, {'name': 'nvme0n1p3', 'fstype': None, 'fsver': None, 'label': None, 'uuid': None, 'fsavail': None, 'fsuse%': None, 'mountpoints': [None], 'type': 'part', 'size': '16M'}, {'name': 'nvme0n1p4', 'fstype': 'ntfs', 'fsver': None, 'label': None, 'uuid': 'DAC2C39BC2C379F1', 'fsavail': None, 'fsuse%': None, 'mountpoints': [None], 'type': 'part', 'size': '237G'}, {'name': 'nvme0n1p5', 'fstype': 'ntfs', 'fsver': None, 'label': None, 'uuid': 'F286FB5386FB16B7', 'fsavail': None, 'fsuse%': None, 'mountpoints': [None], 'type': 'part', 'size': '943M'}, {'name': 'nvme0n1p6', 'fstype': 'LVM2_member', 'fsver': 'LVM2 001', 'label': None, 'uuid': 'nEZHLT-tuFQ-zYtj-sVlV-tg0J-dtpX-UobSvF', 'fsavail': None, 'fsuse%': None, 'mountpoints': [None], 'type': 'part', 'size': '227.3G', 'children': [{'name': 'vgnvme-root', 'fstype': 'xfs', 'fsver': None, 'label': None, 'uuid': 'dc488a38-a1ac-4ded-b4d4-b958ca53a7cd', 'fsavail': None, 'fsuse%': None, 'mountpoints': [None], 'type': 'lvm', 'size': '30G'}, {'name': 'vgnvme-home', 'fstype': 'xfs', 'fsver': None, 'label': None, 'uuid': 'e399782a-8a85-45a4-8971-fca21e987506', 'fsavail': None, 'fsuse%': None, 'mountpoints': [None], 'type': 'lvm', 'size': '30G'}, {'name': 'vgnvme-log', 'fstype': 'xfs', 'fsver': None, 'label': None, 'uuid': '238aa1ff-aa15-4f99-80de-12da2b9444d3', 'fsavail': None, 'fsuse%': None, 'mountpoints': [None], 'type': 'lvm', 'size': '2G'}]}]}]}
Testing connectivity to the Arch Linux mirrors ...
$ cat /var/log/archinstall/cmd_history.txt
/usr/bin/systemd-detect-virt
/usr/bin/systemd-detect-virt
/usr/bin/lspci
/usr/bin/lsblk -f -o+TYPE,SIZE -J
/usr/bin/pacman -Sy
/usr/bin/pacman -Q --info archlinux-keyring
/usr/bin/blkid -p -o export /dev/dm-1
/usr/bin/blkid -p -o export /dev/nvme0n1
/usr/bin/blkid -p -o export /dev/sdb2
/usr/bin/blkid -p -o export /dev/sdb
/usr/bin/blkid -p -o export /dev/nvme0n1p5
/usr/bin/blkid -p -o export /dev/dm-6
/usr/bin/blkid -p -o export /dev/nvme0n1p3
/usr/bin/blkid -p -o export /dev/dm-4
/usr/bin/blkid -p -o export /dev/nvme0n1p1
/usr/bin/blkid -p -o export /dev/dm-2
/usr/bin/blkid -p -o export /dev/dm-0
/usr/bin/blkid -p -o export /dev/sdb1
/usr/bin/blkid -p -o export /dev/sda1
/usr/bin/blkid -p -o export /dev/nvme0n1p6
/usr/bin/blkid -p -o export /dev/sda
/usr/bin/blkid -p -o export /dev/nvme0n1p4
/usr/bin/blkid -p -o export /dev/dm-5
/usr/bin/blkid -p -o export /dev/nvme0n1p2
/usr/bin/blkid -p -o export /dev/dm-3
/usr/bin/lsblk --json -b -o+SIZE /dev/nvme0n1
/usr/bin/parted -s --machine /dev/nvme0n1 print free
/usr/bin/lsblk --json -o+ROTA,TRAN /dev/nvme0n1
/usr/bin/lsblk --json -b -o+SIZE /dev/sdb
/usr/bin/parted -s --machine /dev/sdb print free
/usr/bin/lsblk --json -o+ROTA,TRAN /dev/sdb
/usr/bin/lsblk --json -b -o+SIZE /dev/sda
/usr/bin/parted -s --machine /dev/sda print free
/usr/bin/lsblk --json -o+ROTA,TRAN /dev/sda
USB drives as the install medium is still a bit in it's early days for archinstall. But we'll make sure to fix this.
Should also be noted that the requested installation target volumes do not make any use of dmcrypt. So the error is from scanning volumes that do not pertain to the requested installation and at best should have been info/warnings and not a traceback.
As mentioned in another issue, we've recently migrated from an older code base which directly worked with paths rather than a context of a device. In this particular case a DMCryptDev context is being iterated for it's partitions, something that would normally not happen when perfoming an installation from a vanilla ISO, as the installer would typically iterate the MapperDev instead.
in either case, we should deal with it but this is why anyway :)
@Torxed this should be fixed with the partition logic changres
Yea this should be fixed, the logic and workflow changed a bit. So we didn't solve this one directly but the issue shouldn't be happening anymore.
Hi @Torxed, unfortunately this issue still appears with the current ISO image 2022.12.01:
root@archiso ~ # cat /etc/os-release
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo
IMAGE_ID=archlinux
IMAGE_VERSION=2022.12.01
I booted directly from the ISO, without converting it to a bootable USB medium. After luksOpen on my crypto container and selecting the LVM volumes by their dm-* device nodes I still got this error:
Traceback (most recent call last):
File "/usr/bin/archinstall", line 8, in <module>
sys.exit(run_as_a_module())
File "/usr/lib/python3.10/site-packages/archinstall/__init__.py", line 311, in run_as_a_module
script.execute()
File "/usr/lib/python3.10/site-packages/archinstall/lib/profiles.py", line 195, in execute
self.spec.loader.exec_module(sys.modules[self.namespace])
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/lib/python3.10/site-packages/archinstall/examples/guided.py", line 301, in <module>
ask_user_questions()
File "/usr/lib/python3.10/site-packages/archinstall/examples/guided.py", line 107, in ask_user_questions
global_menu.run()
File "/usr/lib/python3.10/site-packages/archinstall/lib/menu/selection_menu.py", line 336, in run
if not self._process_selection(value):
File "/usr/lib/python3.10/site-packages/archinstall/lib/menu/selection_menu.py", line 353, in _process_selection
return self.exec_option(config_name, selector)
File "/usr/lib/python3.10/site-packages/archinstall/lib/menu/selection_menu.py", line 373, in exec_option
result = selector.func(presel_val)
File "/usr/lib/python3.10/site-packages/archinstall/lib/menu/global_menu.py", line 86, in <lambda>
lambda preset: select_disk_layout(
File "/usr/lib/python3.10/site-packages/archinstall/lib/user_interaction/disk_conf.py", line 59, in select_disk_layout
return select_individual_blockdevice_usage(block_devices)
File "/usr/lib/python3.10/site-packages/archinstall/lib/user_interaction/disk_conf.py", line 32, in select_individual_blockdevice_usage
layout = manage_new_and_existing_partitions(device)
File "/usr/lib/python3.10/site-packages/archinstall/lib/user_interaction/partitioning_conf.py", line 144, in manage_new_and_existing_partitions
block_device_struct = {"partitions": [partition.__dump__() for partition in block_device.partitions.values()]}
AttributeError: 'DMCryptDev' object has no attribute 'partitions'
archinstall --dry_run --mount-point /mnt 3.22s user 2.04s system 0% cpu 9:53.20 total
The version of archinstall is:
root@archiso ~ # archinstall -v
archinstall 2.5.1
Now the simple question is: does the mentioned ISO image already contain the fixed version of archinstall? Then the bug still exists - please re-open this issue.
Otherwise it would be nice to have a new ISO image to publish the fixed archinstall.