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

Error: "The flag 'boot' is not available for loop disk labels" #2363

Open
Compizfox opened this issue Feb 7, 2024 · 4 comments
Open

Error: "The flag 'boot' is not available for loop disk labels" #2363

Compizfox opened this issue Feb 7, 2024 · 4 comments

Comments

@Compizfox
Copy link

When trying to install, I get the following error when the install script is partitioning my NVMe SSD:

Creating partitions: /dev/nvme0n1
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/archinstall/__init__.py", line 329, in run_as_a_module
    main()
  File "/usr/lib/python3.11/site-packages/archinstall/__init__.py", line 324, in main
    importlib.import_module(mod_name)
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/python3.11/site-packages/archinstall/scripts/guided.py", line 254, in <module>
    fs_handler.perform_filesystem_operations()
  File "/usr/lib/python3.11/site-packages/archinstall/lib/disk/filesystem.py", line 54, in perform_filesystem_operations
    device_handler.partition(mod, partition_table=partition_table)
  File "/usr/lib/python3.11/site-packages/archinstall/lib/disk/device_handler.py", line 538, in partition
    self._perform_partitioning(part_mod, modification.device, disk, requires_delete=requires_delete)
  File "/usr/lib/python3.11/site-packages/archinstall/lib/disk/device_handler.py", line 373, in _perform_partitioning
    partition.setFlag(flag.value)
  File "/usr/lib/python3.11/site-packages/parted/decorators.py", line 28, in new
    ret = fn(*args, **kwds)
          ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/parted/partition.py", line 214, in setFlag
    return self.__partition.set_flag(flag, 1)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ped.PartitionException: The flag 'boot' is not available for loop disk labels.

Complete log:

Hardware model detected: ASRock B650 PG Lightning; UEFI mode: True
Processor model detected: AMD Ryzen 7 7800X3D 8-Core Processor
Memory statistics: 13809900 available out of 15464456 total installed
Could not detect virtual system: ['/usr/bin/systemd-detect-virt'] exited with abnormal exit code [1]: none

System is not running in a VM: ['/usr/bin/systemd-detect-virt'] exited with abnormal exit code [1]: none

Virtualization detected: None; is VM: False
Graphics devices detected: dict_keys(['Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] (rev c1)', 'Advanced Micro Devices, Inc. [AMD/ATI] Raphael (rev cb)'])
Disk states before installing: [
    {
        "children": [],
        "fsavail": 0,
        "fsroots": [
            "."
        ],
        "fstype": "squashfs",
        "fsuse_percentage": "100%",
        "fsver": "4.0",
        "log_sec": 512,
        "mountpoint": "/run/archiso/airootfs",
        "mountpoints": [
            "/run/archiso/airootfs"
        ],
        "name": "loop0",
        "partn": null,
        "parttype": null,
        "partuuid": null,
        "path": "/dev/loop0",
        "pkname": null,
        "pttype": null,
        "ptuuid": null,
        "rota": false,
        "size": "766 MiB",
        "tran": null,
        "type": "loop",
        "uuid": null
    },
    {
        "children": [
            {
                "children": [],
                "fsavail": null,
                "fsroots": [],
                "fstype": "vfat",
                "fsuse_percentage": null,
                "fsver": "FAT32",
                "log_sec": 512,
                "mountpoint": null,
                "mountpoints": [],
                "name": "sda1",
                "partn": 1,
                "parttype": "c12a7328-f81f-11d2-ba4b-00a0c93ec93b",
                "partuuid": "e6a1d852-6a0b-426d-a4ae-6698b8d7089d",
                "path": "/dev/sda1",
                "pkname": "sda",
                "pttype": "gpt",
                "ptuuid": "e3dd3490-a179-4708-a031-cda21ff8ca27",
                "rota": false,
                "size": "511 MiB",
                "tran": null,
                "type": "part",
                "uuid": "FD4E-4BA7"
            },
            {
                "children": [],
                "fsavail": null,
                "fsroots": [],
                "fstype": "ext4",
                "fsuse_percentage": null,
                "fsver": "1.0",
                "log_sec": 512,
                "mountpoint": null,
                "mountpoints": [],
                "name": "sda2",
                "partn": 2,
                "parttype": "0fc63daf-8483-4772-8e79-3d69d8477de4",
                "partuuid": "86656b54-2e88-40d9-826c-3d0b2c467c7a",
                "path": "/dev/sda2",
                "pkname": "sda",
                "pttype": "gpt",
                "ptuuid": "e3dd3490-a179-4708-a031-cda21ff8ca27",
                "rota": false,
                "size": "476427 MiB",
                "tran": null,
                "type": "part",
                "uuid": "158e92c9-af8e-4973-b1b6-6a270987a331"
            }
        ],
        "fsavail": null,
        "fsroots": [],
        "fstype": null,
        "fsuse_percentage": null,
        "fsver": null,
        "log_sec": 512,
        "mountpoint": null,
        "mountpoints": [],
        "name": "sda",
        "partn": null,
        "parttype": null,
        "partuuid": null,
        "path": "/dev/sda",
        "pkname": null,
        "pttype": "gpt",
        "ptuuid": "e3dd3490-a179-4708-a031-cda21ff8ca27",
        "rota": false,
        "size": "476940 MiB",
        "tran": "sata",
        "type": "disk",
        "uuid": null
    },
    {
        "children": [
            {
                "children": [],
                "fsavail": null,
                "fsroots": [],
                "fstype": "iso9660",
                "fsuse_percentage": null,
                "fsver": "Joliet Extension",
                "log_sec": 512,
                "mountpoint": null,
                "mountpoints": [],
                "name": "sdb1",
                "partn": 1,
                "parttype": "0x0",
                "partuuid": "962fa445-01",
                "path": "/dev/sdb1",
                "pkname": "sdb",
                "pttype": "dos",
                "ptuuid": "962fa445",
                "rota": true,
                "size": "916 MiB",
                "tran": null,
                "type": "part",
                "uuid": "2024-02-01-12-07-52-00"
            },
            {
                "children": [],
                "fsavail": null,
                "fsroots": [],
                "fstype": "vfat",
                "fsuse_percentage": null,
                "fsver": "FAT16",
                "log_sec": 512,
                "mountpoint": null,
                "mountpoints": [],
                "name": "sdb2",
                "partn": 2,
                "parttype": "0xef",
                "partuuid": "962fa445-02",
                "path": "/dev/sdb2",
                "pkname": "sdb",
                "pttype": "dos",
                "ptuuid": "962fa445",
                "rota": true,
                "size": "15 MiB",
                "tran": null,
                "type": "part",
                "uuid": "9C7A-9A67"
            }
        ],
        "fsavail": null,
        "fsroots": [],
        "fstype": "iso9660",
        "fsuse_percentage": null,
        "fsver": "Joliet Extension",
        "log_sec": 512,
        "mountpoint": null,
        "mountpoints": [],
        "name": "sdb",
        "partn": null,
        "parttype": null,
        "partuuid": null,
        "path": "/dev/sdb",
        "pkname": null,
        "pttype": "dos",
        "ptuuid": "962fa445",
        "rota": true,
        "size": "1912 MiB",
        "tran": "usb",
        "type": "disk",
        "uuid": "2024-02-01-12-07-52-00"
    },
    {
        "children": [],
        "fsavail": null,
        "fsroots": [],
        "fstype": "xfs",
        "fsuse_percentage": null,
        "fsver": null,
        "log_sec": 512,
        "mountpoint": null,
        "mountpoints": [],
        "name": "nvme0n1",
        "partn": null,
        "parttype": null,
        "partuuid": null,
        "path": "/dev/nvme0n1",
        "pkname": null,
        "pttype": null,
        "ptuuid": null,
        "rota": false,
        "size": "953869 MiB",
        "tran": "nvme",
        "type": "disk",
        "uuid": "e3d5bc6e-0db6-457b-bfbe-a3d7b2e6909c"
    }
]
Checking version...
Failed determine pacman version: ['/usr/bin/pacman', '-Qu', 'archinstall'] exited with abnormal exit code [1]: �[?25l�[?25h
Password strength: very weak
Password strength: very weak
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/__init__.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/custom.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/desktop.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/minimal.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/server.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/tailored.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/xorg.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/applications/__init__.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/applications/pipewire.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/desktops/__init__.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/desktops/awesome.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/desktops/bspwm.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/desktops/budgie.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/desktops/cinnamon.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/desktops/cutefish.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/desktops/deepin.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/desktops/enlightenment.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/desktops/gnome.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/desktops/hyprland.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/desktops/i3.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/desktops/kde.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/desktops/lxqt.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/desktops/mate.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/desktops/qtile.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/desktops/sway.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/desktops/xfce4.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/servers/__init__.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/servers/cockpit.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/servers/docker.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/servers/httpd.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/servers/lighttpd.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/servers/mariadb.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/servers/nginx.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/servers/postgresql.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/servers/sshd.py
Importing profile: /usr/lib/python3.11/site-packages/archinstall/default_profiles/servers/tomcat.py
 -- Chosen configuration --
{
    "__separator__": null,
    "additional-repositories": [],
    "archinstall-language": "English",
    "audio_config": null,
    "bootloader": "Systemd-boot",
    "config_version": "2.7.1",
    "debug": false,
    "disk_config": {
        "config_type": "manual_partitioning",
        "device_modifications": [
            {
                "device": "/dev/nvme0n1",
                "partitions": [
                    {
                        "btrfs": [],
                        "dev_path": null,
                        "flags": [
                            "Boot",
                            "ESP"
                        ],
                        "fs_type": "fat32",
                        "mount_options": [],
                        "mountpoint": "/boot",
                        "obj_id": "a376e7ef-eea4-4319-bf77-1ccd919ad26d",
                        "size": {
                            "sector_size": {
                                "unit": "B",
                                "value": 512
                            },
                            "unit": "MiB",
                            "value": 512
                        },
                        "start": {
                            "sector_size": {
                                "unit": "B",
                                "value": 512
                            },
                            "unit": "MiB",
                            "value": 1
                        },
                        "status": "create",
                        "type": "primary"
                    },
                    {
                        "btrfs": [],
                        "dev_path": null,
                        "flags": [],
                        "fs_type": "xfs",
                        "mount_options": [],
                        "mountpoint": "/",
                        "obj_id": "b076d7eb-0d13-4ef7-8a8b-a6f9b94aa937",
                        "size": {
                            "sector_size": {
                                "unit": "B",
                                "value": 512
                            },
                            "unit": "B",
                            "value": 999665917952
                        },
                        "start": {
                            "sector_size": {
                                "unit": "B",
                                "value": 512
                            },
                            "unit": "B",
                            "value": 537919488
                        },
                        "status": "create",
                        "type": "primary"
                    }
                ],
                "wipe": false
            }
        ]
    },
    "disk_encryption": null,
    "hostname": "vigil",
    "kernels": [
        "linux",
        "linux-lts",
        "linux-zen"
    ],
    "locale_config": {
        "kb_layout": "colemak",
        "sys_enc": "UTF-8",
        "sys_lang": "en_US"
    },
    "mirror_config": {
        "custom_mirrors": [],
        "mirror_regions": {
            "Netherlands": [
                "https://mirrors.xtom.nl/archlinux/$repo/os/$arch",
                "https://mirror.serverion.com/archlinux/$repo/os/$arch",
                "https://mirror.mijn.host/archlinux/$repo/os/$arch",
                "https://mirror.lyrahosting.com/archlinux/$repo/os/$arch",
                "https://mirror.koddos.net/archlinux/$repo/os/$arch",
                "https://mirror.cj2.nl/archlinux/$repo/os/$arch",
                "https://mirror.bouwhuis.network/archlinux/$repo/os/$arch",
                "https://mirror.ams1.nl.leaseweb.net/archlinux/$repo/os/$arch",
                "https://archlinux.mirror.wearetriple.com/$repo/os/$arch",
                "https://archlinux.mirror.liteserver.nl/$repo/os/$arch",
                "https://arch.mirrors.lavatech.top/$repo/os/$arch",
                "http://mirrors.xtom.nl/archlinux/$repo/os/$arch",
                "http://mirror.serverion.com/archlinux/$repo/os/$arch",
                "http://mirror.mijn.host/archlinux/$repo/os/$arch",
                "http://mirror.lyrahosting.com/archlinux/$repo/os/$arch",
                "http://mirror.koddos.net/archlinux/$repo/os/$arch",
                "http://mirror.cj2.nl/archlinux/$repo/os/$arch",
                "http://mirror.bouwhuis.network/archlinux/$repo/os/$arch",
                "http://mirror.ams1.nl.leaseweb.net/archlinux/$repo/os/$arch",
                "http://ftp.snt.utwente.nl/pub/os/linux/archlinux/$repo/os/$arch",
                "http://ftp.nluug.nl/os/Linux/distr/archlinux/$repo/os/$arch",
                "http://archlinux.mirror.wearetriple.com/$repo/os/$arch",
                "http://archlinux.mirror.liteserver.nl/$repo/os/$arch",
                "http://arch.mirrors.lavatech.top/$repo/os/$arch"
            ]
        }
    },
    "network_config": {
        "nics": [
            {
                "dhcp": true,
                "dns": [],
                "gateway": null,
                "iface": "enp15s0",
                "ip": null
            }
        ],
        "type": "manual"
    },
    "no_pkg_lookups": false,
    "ntp": true,
    "offline": false,
    "packages": [],
    "parallel downloads": 0,
    "profile_config": {
        "gfx_driver": "AMD / ATI (open-source)",
        "greeter": "sddm",
        "profile": {
            "custom_settings": {
                "Kde": {}
            },
            "details": [
                "Kde"
            ],
            "main": "Desktop"
        }
    },
    "save_config": null,
    "script": "guided",
    "silent": false,
    "skip_ntp": false,
    "skip_version_check": false,
    "swap": true,
    "timezone": "Europe/Amsterdam",
    "uki": false,
    "version": "2.7.1"
}
Unmounting all existing partitions: /dev/nvme0n1
Unmounting: /dev/nvme0n1
Use existing device: /dev/nvme0n1
Creating partitions: /dev/nvme0n1
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/archinstall/__init__.py", line 329, in run_as_a_module
    main()
  File "/usr/lib/python3.11/site-packages/archinstall/__init__.py", line 324, in main
    importlib.import_module(mod_name)
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/python3.11/site-packages/archinstall/scripts/guided.py", line 254, in <module>
    fs_handler.perform_filesystem_operations()
  File "/usr/lib/python3.11/site-packages/archinstall/lib/disk/filesystem.py", line 54, in perform_filesystem_operations
    device_handler.partition(mod, partition_table=partition_table)
  File "/usr/lib/python3.11/site-packages/archinstall/lib/disk/device_handler.py", line 538, in partition
    self._perform_partitioning(part_mod, modification.device, disk, requires_delete=requires_delete)
  File "/usr/lib/python3.11/site-packages/archinstall/lib/disk/device_handler.py", line 373, in _perform_partitioning
    partition.setFlag(flag.value)
  File "/usr/lib/python3.11/site-packages/parted/decorators.py", line 28, in new
    ret = fn(*args, **kwds)
          ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/parted/partition.py", line 214, in setFlag
    return self.__partition.set_flag(flag, 1)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ped.PartitionException: The flag 'boot' is not available for loop disk labels.

Archinstall experienced the above error. If you think this is a bug, please report it to
https://github.com/archlinux/archinstall and include the log file "/var/log/archinstall/install.log".

Hint: To extract the log from a live ISO 
curl -F'file=@/var/log/archinstall/install.log' https://0x0.st
@Compizfox Compizfox changed the title The flag 'boot' is not available for loop disk labels. Error: "The flag 'boot' is not available for loop disk labels" Feb 8, 2024
@tychobrouwer
Copy link

I fixed this by creating a new GPT table with fdisk

@codefiles
Copy link
Contributor

The Chosen configuration section of the log shows the manual partitioning option is being used to install to the device /dev/nvme0n1 adding a root and boot partition.

 -- Chosen configuration --
{
    ...
    "disk_config": {
        "config_type": "manual_partitioning",
        "device_modifications": [
            {
                "device": "/dev/nvme0n1",
                "partitions": [
                    {
                        ...
                        "flags": [
                            "Boot",
                            "ESP"
                        ],
                        "fs_type": "fat32",
                        "mount_options": [],
                        "mountpoint": "/boot",
                        ...
                    },
                    {
                        ...
                        "flags": [],
                        "fs_type": "xfs",
                        "mount_options": [],
                        "mountpoint": "/",
                        ...
                    }
                ],
                "wipe": false
            }
        ]
    },
    ...
}

Examining the Disk states before installing section of the log, the device you are installing to is set up as a partitionless disk.

Disk states before installing: [
    ...
    {
        ...
        "fstype": "xfs",
        ...
        "path": "/dev/nvme0n1",
        ...
        "pttype": null,
        ...
        "type": "disk",
        ...
    }
]

It is not possible to add partitions without there being a partition table.

What happens is a parted.Partition is created for the boot partition and partition.setFlag() is called to add the boot flag to that partition. This raises the exception since the disk.type has a value of loop in this scenario rather than a partition table value like gpt or msdos.

@Compizfox
Copy link
Author

IIRC I tried to create an empty GPT table at some point. Or maybe not; I'm not a 100% sure since this was some weeks ago (in the end I just installed Arch manually). I did try some stuff, but all without getting Archinstall to run successfully.

In any case, shouldn't Archinstall just create a GPT table when partitioning a disk in the case one does not already exist on a disk?

@codefiles
Copy link
Contributor

IIRC I tried to create an empty GPT table at some point. Or maybe not; I'm not a 100% sure since this was some weeks ago (in the end I just installed Arch manually). I did try some stuff, but all without getting Archinstall to run successfully.

My conclusion is based on the log. In the Disk states before installing section of the log the fstype of the device would have been null and the pttype would have been gpt if you had created a GUID Partition Table. Instead the log shows the fstype is xfs and the pttype is null.

I have also verified my conclusion in reproducing the issue.

In any case, shouldn't Archinstall just create a GPT table when partitioning a disk in the case one does not already exist on a disk?

I think this scenario should be handled while warning the user that a file system signature was detected and it will be removed.

@svartkanin, would you mind reopening the issue? Thank you.

@svartkanin svartkanin reopened this Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants