You are not logged in.

#1 2022-10-06 16:55:49

PeterDiesen
Member
Registered: 2021-06-15
Posts: 2

archinstall failed by creating partitions

Hello,

I tried to install Arch by using the archinstall-skript. I tried this on physikal Hardware and in a VM. On both cases I get the following errors right in the beginning partitioning the harddrive.

Drücken sie Enter um fortzufahren.
! Formatting [BlockDevice(/dev/vda, size=20.0GB, free_space=1031kB+20.9GB, bus_type=None)] in 5....4....3....2....1....
Creating a new partition label on /dev/vda
Adding partition to BlockDevice(/dev/vda, size=20.0GB, free_space=1031kB+20.9GB, bus_type=None), 1MiB->512MiB
Could not find the new PARTUUID after adding the partition.
Previous partitions: []
New partitions: {None}
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 315, in <module>
    perform_filesystem_operations()
  File "/usr/lib/python3.10/site-packages/archinstall/examples/guided.py", line 130, in perform_filesystem_operations
    with archinstall.Filesystem(drive, mode) as fs:
  File "/usr/lib/python3.10/site-packages/archinstall/lib/disk/filesystem.py", line 44, in __exit__
    raise args[1]
  File "/usr/lib/python3.10/site-packages/archinstall/examples/guided.py", line 131, in perform_filesystem_operations
    fs.load_layout(archinstall.arguments['disk_layouts'][drive.path])
  File "/usr/lib/python3.10/site-packages/archinstall/lib/disk/filesystem.py", line 89, in load_layout
    partition['device_instance'] = self.add_partition(partition.get('type', 'primary'),
  File "/usr/lib/python3.10/site-packages/archinstall/lib/disk/filesystem.py", line 285, in add_partition
    raise DiskError(f"Could not add partition using: {parted_string}")
archinstall.lib.exceptions.DiskError: Could not add partition using: /dev/vda mkpart primary fat32 1MiB 512MiB
archinstall  3.27s user 4.79s system 6% cpu 2:09.36 total
1 root@archiso ~ # 

It seems that the script on the Oktober ISO is broken.

Offline

#2 2022-10-06 19:45:56

Torxed
Member
Registered: 2013-01-10
Posts: 200

Re: archinstall failed by creating partitions

I've seen this the last 24h as well.
I'm working on a fix here: https://github.com/archlinux/archinstall/pull/1508

And by fix I mean, better debug output so we can figure this one out!
It appears to always be the boot partition causing the issue, and re-trying usually magically gets it working again.

Last edited by Torxed (2022-10-06 19:46:31)

Offline

#3 2022-10-07 17:59:55

GreenTuxer
Member
From: Lisboa, Portugal
Registered: 2013-06-06
Posts: 15
Website

Re: archinstall failed by creating partitions

I have the same issue.

Have you find a solution/workaround?


I get this error:

Warning: --debug mode will write certain credentials to /var/log/archinstall/install.log!
Testing connectivity to the Arch Linux mirrors ...
 ! Formatting [BlockDevice(/dev/nvme0n1, size=931.5GB, free_space=1031kB+999GB, bus_type=nvme)] in 5....4....3....2....1....
Creating a new partition label on /dev/nvme0n1
Adding partition to BlockDevice(/dev/nvme0n1, size=931.5GB, free_space=1031kB+999GB, bus_type=nvme), 1MiB->1024MiB
Could not find the new PARTUUID after adding the partition.
Previous partitions: []
New partitions: {None}
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 315, in <module>
    perform_filesystem_operations()
  File "/usr/lib/python3.10/site-packages/archinstall/examples/guided.py", line 130, in perform_filesystem_operations
    with archinstall.Filesystem(drive, mode) as fs:
  File "/usr/lib/python3.10/site-packages/archinstall/lib/disk/filesystem.py", line 44, in __exit__
    raise args[1]
  File "/usr/lib/python3.10/site-packages/archinstall/examples/guided.py", line 131, in perform_filesystem_operations
    fs.load_layout(archinstall.arguments['disk_layouts'][drive.path])
  File "/usr/lib/python3.10/site-packages/archinstall/lib/disk/filesystem.py", line 89, in load_layout
    partition['device_instance'] = self.add_partition(partition.get('type', 'primary'),
  File "/usr/lib/python3.10/site-packages/archinstall/lib/disk/filesystem.py", line 285, in add_partition
    raise DiskError(f"Could not add partition using: {parted_string}")
archinstall.lib.exceptions.DiskError: Could not add partition using: /dev/nvme0n1 mkpart primary fat32 1MiB 1024MiB

This is my configuration:

{
    "archinstall-language": "English",
    "audio": "pipewire",
    "bootloader": "grub-install",
    "config_version": "2.5.1",
    "debug": false,
    "desktop-environment": "gnome",
    "gfx_driver": "Intel (open-source)",
    "harddrives": [
        "/dev/nvme0n1"
    ],
    "hostname": "thinkarch",
    "kernels": [
        "linux-lts"
    ],
    "keyboard-layout": "pt-latin1",
    "mirror-region": {
        "Portugal": {
            "[url]http://ftp.rnl.tecnico.ulisboa.pt/pub/archlinux/$repo/os/$arch[/url]": true,
            "[url]http://glua.ua.pt/pub/archlinux/$repo/os/$arch[/url]": true,
            "[url]http://mirrors.up.pt/pub/archlinux/$repo/os/$arch[/url]": true,
            "[url]https://ftp.rnl.tecnico.ulisboa.pt/pub/archlinux/$repo/os/$arch[/url]": true,
            "[url]https://glua.ua.pt/pub/archlinux/$repo/os/$arch[/url]": true,
            "[url]https://mirrors.up.pt/pub/archlinux/$repo/os/$arch[/url]": true
        }
    },
    "nic": {
        "dhcp": true,
        "dns": null,
        "gateway": null,
        "iface": null,
        "ip": null,
        "type": "nm"
    },
    "no_pkg_lookups": false,
    "ntp": true,
    "offline": false,
    "profile": {
        "path": "/usr/lib/python3.10/site-packages/archinstall/profiles/desktop.py"
    },
    "script": "guided",
    "silent": false,
    "swap": true,
    "timezone": "Europe/Lisbon",
    "version": "2.5.1"
}

This is my disk layout:

{
    "/dev/nvme0n1": {
        "partitions": [
            {
                "boot": true,
                "encrypted": false,
                "filesystem": {
                    "format": "fat32"
                },
                "mountpoint": "/boot",
                "size": "1024MiB",
                "start": "1MiB",
                "type": "primary",
                "wipe": true
            },
            {
                "btrfs": {
                    "subvolumes": [
                        {
                            "compress": false,
                            "mountpoint": "/",
                            "name": "@",
                            "nodatacow": false
                        },
                        {
                            "compress": false,
                            "mountpoint": "/home",
                            "name": "@home",
                            "nodatacow": false
                        },
                        {
                            "compress": false,
                            "mountpoint": "/var/log",
                            "name": "@log",
                            "nodatacow": false
                        },
                        {
                            "compress": false,
                            "mountpoint": "/var/cache/pacman/pkg",
                            "name": "@pkg",
                            "nodatacow": false
                        },
                        {
                            "compress": false,
                            "mountpoint": "/.snapshots",
                            "name": "@.snapshots",
                            "nodatacow": false
                        }
                    ]
                },
                "encrypted": true,
                "filesystem": {
                    "format": "btrfs",
                    "mount_options": [
                        "compress=zstd"
                    ]
                },
                "mountpoint": null,
                "size": "100%",
                "start": "1025MiB",
                "type": "primary",
                "wipe": true
            }
        ],
        "wipe": true
    }
}

Thank you for your help.

Last edited by GreenTuxer (2022-10-07 18:01:47)

Offline

#4 2022-10-08 14:18:48

Torxed
Member
Registered: 2013-01-10
Posts: 200

Re: archinstall failed by creating partitions

The only 100% solid workaround currently is to:

1) Manually partition
2) Manually mount both `/mnt/archinstall` (root)  and `/mnt/archinstall/boot` (boot)
3) Run archinstall as usual
4) Go to disk selection and press Ctrl+C (This aborts disk operations)

After that, everything is as normal.

It's a huge inconvenience and I'm currently trying to install archinstall to a NVMe drive myself (those appear to be most heavily affected by this bug).
SSD's can trigger this occasionally, and spinning disks extremely rarely. It appears to be a speed issue for sure regardless of the disk options selected.



The bug:

archinstall.lib.exceptions.DiskError: Could not add partition using: /dev/nvme0n1 mkpart primary fat32 1MiB 1024MiB

Is a bit more odd, I think we can attribute this to the same issue.
But I'm running separate tests to locate why this particular one happens.

Edit: For what it's worth, I haven't been able to re-create the issue when re-using partitions.
It's only (in my statistics) when wiping the entire drive and/or creating new partitions.
When supplying `archinstall --disk-layout /disk.json` and the partitions to be used contain `PARTUUID` (to re-use), the bug doesn't pop up.. So something with creating partitions I'm afraid.

Last edited by Torxed (2022-10-08 20:58:31)

Offline

#5 2022-10-08 15:19:59

GreenTuxer
Member
From: Lisboa, Portugal
Registered: 2013-06-06
Posts: 15
Website

Re: archinstall failed by creating partitions

When you say manually partition, are you referring to the btrfs subvolumes as well? Thanks

Offline

#6 2022-10-08 19:55:08

Torxed
Member
Registered: 2013-01-10
Posts: 200

Re: archinstall failed by creating partitions

Yepp, for the workaround it would mean all aspects of disk operations.
archinstall will under no circumstances perform any disk operations (even subvolume creation) in the workaround.

Offline

#7 2022-10-10 21:12:48

Forge
Member
From: Bristol, VA, USA, Terra, Sol
Registered: 2014-12-16
Posts: 4

Re: archinstall failed by creating partitions

I'm having this issue. While rerunning the installer with the generated configs often gets past creating the ESP partition and formatting it (the errored first run seems to create the partition but it's set as FAT16?), it then always fails formatting root.

FWIW, I had a failed install on the October ISO. I then reflashed the September ISO, passed it the configs made by the Oct ISO, and that also failed. I then regenerated the configs in the Sept ISO and it's installing. I'll try the October ISO with the September JSONs next, to try and bisect the problems for you.

Offline

#8 2022-10-11 05:50:10

Torxed
Member
Registered: 2013-01-10
Posts: 200

Re: archinstall failed by creating partitions

I'm pretty sure the bug is related to the code in the October ISO.
And I think I've narrowed it down: https://github.com/archlinux/archinstal … 1272582474

It wasn't until yesterday morning that I managed to reproduce it.
I'm not sure how I did it tho but it happened after a second installation attempt.
So I ran a successful install, forgot to unmount and tried to reformat and reinstall. That caused the kernel to not update the partitions properly as they were in use and after that it was all chaos. That really shouldn't be the issue but that's when I started being able to reproduce this.

I'm pretty sure it's the PARTUUID logic, because it returns `None` for some reason even after 5 loops with delays..
And eventually they might also both (/boot and /) share the same PARTUUID. which obviously isn't possible but for some reason when archinstall error out it re-uses the first PARTUUID it finds and that is /boot.. I'm really sorry this happened and I'm working night and day to figure this one out..
But it's hard since I haven't been able to reproduce it or trigger it.

Last edited by Torxed (2022-10-11 05:55:55)

Offline

#9 2022-10-12 11:37:34

futurehost
Member
Registered: 2022-10-10
Posts: 1

Re: archinstall failed by creating partitions

10月1日的iso,我用这个archinstall 也发现问题。  主要解决办法就是 mount只能两个分区,超过两个分局, archinstall就出错终止,  后来我只挂载/boot和/分区,  其他分区等安装完系统chroot后手动挂载,就可以用archinstall安装了。

这个问题,搞了我一整天时间, 来回手动分区十几次甚至几十次,总以为是分区错误,最后才发现是archinstall的bug.

Offline

#10 2022-10-12 13:56:10

dakota
Member
Registered: 2016-05-20
Posts: 334

Re: archinstall failed by creating partitions

futurehost wrote:

10月1日的iso,我用这个archinstall 也发现问题。  主要解决办法就是 mount只能两个分区,超过两个分局, archinstall就出错终止,  后来我只挂载/boot和/分区,  其他分区等安装完系统chroot后手动挂载,就可以用archinstall安装了。

这个问题,搞了我一整天时间, 来回手动分区十几次甚至几十次,总以为是分区错误,最后才发现是archinstall的bug.

Google Translate wrote:

The iso on October 1st, I also found problems with this archinstall. The main solution is to mount only two partitions. If there are more than two branches, archinstall will terminate with an error. Later, I only mount the /boot and / partitions, and manually mount other partitions after installing the system chroot, and then you can install them with archinstall. .

This problem took me all day, manually partitioning back and forth dozens or even dozens of times, always thought it was a partition error, and finally found out that it was a bug of archinstall.


"Before Enlightenment chop wood, carry water. After Enlightenment chop wood, carry water." -- Zen proverb

Offline

#11 2022-10-12 18:53:48

Torxed
Member
Registered: 2013-01-10
Posts: 200

Re: archinstall failed by creating partitions

Hi!

So today I pushed a release to fix the issue.
Packaging will be a bit delayed as a package maintainer has to update the Arch package.

https://github.com/archlinux/archinstal … tag/v2.5.2

Offline

#12 2022-10-28 02:54:39

ZetaRevan
Member
Registered: 2022-10-25
Posts: 14

Re: archinstall failed by creating partitions

Thank you so much for all your work!  I had mentioned this on the Install board, but I also haven't delved far enough into the errors.  When I was trying the past couple of weeks, I would only get it to work once out of 20 tries. And it always failed on creating partitions.  At first, I was thinking it was just having issues with the disk being busy & might possibly have needed a wait line to give it time to process before moving on to the next operation.  But seeing the errors posted in this thread, it appears that the issue is deeper than that.  I will say that I have tried it on both nvme & physical disk drives (haven't tried a non-nvme ssd as I don't have one) and it's the same experience.  I will say that the error messages aren't always the same.  It fails at different steps on the disk operations.

I ended up just doing a manual install on these machines.  It's inconvenient, but it also makes me drill these things into my brain so it's still beneficial. smile

Last edited by ZetaRevan (2022-10-28 02:57:35)

Offline

#13 2024-02-03 14:15:14

Kiori
Member
Registered: 2024-02-03
Posts: 1

Re: archinstall failed by creating partitions

Hello,

I'm currently encountering a similar issue with the Arch Linux installation process when using a conventional SSD. The installation process halts at the partitioning step. As a troubleshooting step, I plan to switch to manual partitioning to see if that resolves the problem.

If anyone has insights or suggestions on how to address this issue, please feel free to share. Your assistance is greatly appreciated.

Last edited by Kiori (2024-02-03 14:15:56)

Offline

#14 2024-02-03 14:20:37

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,416
Website

Re: archinstall failed by creating partitions

You should probably post the log (assuming one exists), but please do so in your own topic, and refrain from necrobumping.

https://wiki.archlinux.org/title/Genera … bumping%22

Closing.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB