archlinux / archinstall

Arch Linux installer - guided, templates etc.
GNU General Public License v3.0
5.82k stars 508 forks source link

Errors while partitioning disk #742

Closed 144 closed 2 years ago

144 commented 2 years ago

image I'm using v2.3.0.RC2 version with Disk Encryption. I was getting the same thing while using master branch version before.

Torxed commented 2 years ago

This looks like an overlap of partitions. Did you use the manual partitioning function or wipe the entire disk?

144 commented 2 years ago

This looks like an overlap of partitions. Did you use the manual partitioning function or wipe the entire disk?

I selected "Wipe entire disk".

Torxed commented 2 years ago

Could you supply me the /var/log/archinstall/install.log and user_disk_layout.json in the same folder?

144 commented 2 years ago

Could you supply me the /var/log/archinstall/install.log and user_disk_layout.json in the same folder?

there you go

install.log

Hardware model detected: innotek GmbH VirtualBox; UEFI mode: True
Processor model detected: Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz
Memory statistics: 3451964 available out of 4006236 total installed
Virtualization detected: oracle; is VM: True
Graphics devices detected: dict_keys(['VMware SVGA II Adapter'])
Disk states before installing: {'blockdevices': [{'name': 'loop0', 'fstype': 'squashfs', 'fsver': '4.0', 'label': None, 'uuid': None, 'fsavail': '0', 'fsuse%': '100%', 'mountpoints': ['/run/archiso/airootfs'], 'type': 'loop', 'size': '700.2M'}, {'name': 'sda', 'fstype': None, 'fsver': None, 'label': None, 'uuid': None, 'fsavail': None, 'fsuse%': None, 'mountpoints': [None], 'type': 'disk', 'size': '52G', 'children': [{'name': 'sda1', 'fstype': 'vfat', 'fsver': 'FAT32', 'label': None, 'uuid': '8DCE-7ECF', 'fsavail': None, 'fsuse%': None, 'mountpoints': [None], 'type': 'part', 'size': '508M'}, {'name': 'sda2', 'fstype': 'crypto_LUKS', 'fsver': '2', 'label': None, 'uuid': '0a11a8b9-65ce-42ba-84de-217cd6f9f366', 'fsavail': None, 'fsuse%': None, 'mountpoints': [None], 'type': 'part', 'size': '19.5G'}]}, {'name': 'sr0', 'fstype': 'iso9660', 'fsver': 'Joliet Extension', 'label': 'ARCH_202111', 'uuid': '2021-11-18-21-19-27-00', 'fsavail': '0', 'fsuse%': '100%', 'mountpoints': ['/run/archiso/bootmnt'], 'type': 'rom', 'size': '879.3M'}]}
Testing connectivity to the Arch Linux mirrors ...
Unknown blockdevice type for /dev/sr0: rom
Unknown blockdevice type for /dev/sr0: rom
Verifying that additional packages exist (this might take a few seconds)
Specified timezone Eu/London does not exist.
Specified timezone Eu/Vienna does not exist.
Specified timezone Eu/Berlin does not exist.
Hardware time and other post-configuration steps might be required in order for NTP to work. For more information, please check the Arch wiki.
-- Guided template chosen (with below config) --
{
    "audio": null,
    "bootloader": "grub-install",
    "desktop-environment": "kde",
    "dry-run": false,
    "gfx_driver": "VMware / VirtualBox (open-source)",
    "harddrives": [
        "/dev/sda"
    ],
    "hostname": "arch",
    "kernels": [
        "linux"
    ],
    "keyboard-layout": "us",
    "mirror-region": {
        "Poland": {
            "http://arch.midov.pl/arch/$repo/os/$arch": true,
            "http://arch.nixlab.pl/$repo/os/$arch": true,
            "http://ftp.icm.edu.pl/pub/Linux/dist/archlinux/$repo/os/$arch": true,
            "http://ftp.psnc.pl/linux/archlinux/$repo/os/$arch": true,
            "http://ftp.vectranet.pl/archlinux/$repo/os/$arch": true,
            "http://mirror.juniorjpdj.pl/archlinux/$repo/os/$arch": true,
            "http://mirror.onet.pl/pub/mirrors/archlinux/$repo/os/$arch": true,
            "http://mirror.sfinae.tech/pub/mirrors/archlinux/$repo/os/$arch": true,
            "http://repo.skni.umcs.pl/archlinux/$repo/os/$arch": true,
            "https://arch.midov.pl/arch/$repo/os/$arch": true,
            "https://arch.nixlab.pl/$repo/os/$arch": true,
            "https://ftp.icm.edu.pl/pub/Linux/dist/archlinux/$repo/os/$arch": true,
            "https://ftp.psnc.pl/linux/archlinux/$repo/os/$arch": true,
            "https://mirror.juniorjpdj.pl/archlinux/$repo/os/$arch": true,
            "https://mirror.sfinae.tech/pub/mirrors/archlinux/$repo/os/$arch": true,
            "https://repo.skni.umcs.pl/archlinux/$repo/os/$arch": true
        }
    },
    "nic": {
        "NetworkManager": true,
        "nic": "Use NetworkManager (necessary to configure internet graphically in GNOME and KDE)"
    },
    "ntp": true,
    "packages": [
        "firefox"
    ],
    "profile": {
        "path": "/usr/lib/python3.9/site-packages/archinstall-2.3.0.dev0-py3.9.egg/archinstall/profiles/desktop.py"
    },
    "script": "guided",
    "swap": true,
    "sys-encoding": "utf-8",
    "sys-language": "en_US",
    "timezone": "UTC"
}
{
    "/dev/sda": {
        "partitions": [
            {
                "boot": true,
                "encrypted": false,
                "filesystem": {
                    "format": "fat32"
                },
                "format": true,
                "mountpoint": "/boot",
                "size": "513MiB",
                "start": "5MiB",
                "type": "primary"
            },
            {
                "encrypted": true,
                "filesystem": {
                    "format": "ext4"
                },
                "format": true,
                "mountpoint": "/",
                "size": "20480MiB",
                "start": "518MiB",
                "type": "primary"
            },
            {
                "encrypted": false,
                "filesystem": {
                    "format": "ext4"
                },
                "format": true,
                "mountpoint": "/home",
                "size": "100%",
                "start": "10649.6MiB",
                "type": "primary"
            }
        ],
        "wipe": true
    }
}
Creating a new partition labling on /dev/sda
Adding partition to BlockDevice(/dev/sda, size=52.0GB, free_space=55.8GB, bus_type=sata), 5MiB->513MiB
Getting mount information for device path /dev/sda1
Formatting /dev/sda1 -fat32
Marking partition Partition(path=/dev/sda1, size=508M, PARTUUID=23eb7bee-eebe-4ece-91ca-55abe9b2f9c1, fs=fat32) as bootable.
Setting boot on on (parted) partition index 1
Adding partition to BlockDevice(/dev/sda, size=52.0GB, free_space=5225kB+55.3GB, bus_type=sata), 518MiB->20480MiB
Getting mount information for device path /dev/sda2
Encrypting Partition(path=/dev/sda2, size=19.5G, PARTUUID=f8b16630-42f7-4075-ac47-f497108d7eef, parent=/dev/sda, fs=crypto_LUKS) (This might take a while)
Getting mount information for device path /dev/mapper/ainstloop
Formatting /dev/mapper/ainstloop -ext4
Adding partition to BlockDevice(/dev/sda, size=52.0GB, free_space=5225kB+5243kB+34.4GB, bus_type=sata), 10649.6MiB->100%
Parted ended with a bad exit code: Error: You requested a partition from 11.2GB to 55.8GB (sectors 21810380..109051903).
The closest location we can manage is 21.5GB to 55.8GB (sectors 41943040..109051870).

and user_disk_layout.json

{
    "/dev/sda": {
        "partitions": [
            {
                "boot": true,
                "encrypted": false,
                "filesystem": {
                    "format": "fat32"
                },
                "format": true,
                "mountpoint": "/boot",
                "size": "513MiB",
                "start": "5MiB",
                "type": "primary"
            },
            {
                "encrypted": true,
                "filesystem": {
                    "format": "ext4"
                },
                "format": true,
                "mountpoint": "/",
                "size": "20480MiB",
                "start": "518MiB",
                "type": "primary"
            },
            {
                "encrypted": false,
                "filesystem": {
                    "format": "ext4"
                },
                "format": true,
                "mountpoint": "/home",
                "size": "100%",
                "start": "10649.6MiB",
                "type": "primary"
            }
        ],
        "wipe": true
    }
}
Torxed commented 2 years ago

Something in the calculations surely have gone wrong. I'll investigate. Thank you for supplying the logs, they will help a lot!

Torxed commented 2 years ago

I've tracked the source of the issue. It's partially from bad assumptions but also an improvement we made. We swapped lsblk to lsblk -b and do a conversion during BlockDevice().size to always return GB instead of GiB, which meant a math operation we did to do a conversion became bad.

I think PR #752 addresses this. I'm testing right now.

Torxed commented 2 years ago

This should now be fixed. I've verified with one installation, but do let me know if this is still an issue.

144 commented 2 years ago

This should now be fixed. I've verified with one installation, but do let me know if this is still an issue.

Yes, partitioning works properly now. Thank you.