archlinux / archinstall

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

Archinstall fails with KeyError '_desktop_profile' #601

Closed gchamon closed 1 year ago

gchamon commented 3 years ago

Using VirtualBox, Arch ISO 2021.07.01 and archinstall 2.3.0-dev:

Error:

Press Enter to continue.Traceback (most recent call last):
  File "/usr/bin/archinstall", line 33, in <module>
    sys.exit(load_entry_point('archinstall==2.3.0.dev0', 'console_scripts', 'archinstall')())
  File "/usr/lib/python3.9/site-packages/archinstall/__init__.py", line 87, in run_as_a_module
    script.execute()
  File "/usr/lib/python3.9/site-packages/archinstall/lib/profiles.py", line 161, in execute
    self.spec.loader.exec_module(sys.modules[self.namespace])
  File "<frozen importlib._bootstrap_external>", line 855, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/usr/lib/python3.9/site-packages/archinstall/examples/guided.py", line 464, in <module>
    perform_installation_steps()
  File "/usr/lib/python3.9/site-packages/archinstall/examples/guided.py", line 323, in perform_installation_steps
    perform_installation(archinstall.storage.get('MOUNT_POINT', '/mnt'))
  File "/usr/lib/python3.9/site-packages/archinstall/examples/guided.py", line 424, in perform_installation
    pass
  File "/usr/lib/python3.9/site-packages/archinstall/lib/installer.py", line 89, in __exit__
    raise args[1]
  File "/usr/lib/python3.9/site-packages/archinstall/examples/guided.py", line 381, in perform_installation
    installation.install_profile(archinstall.arguments.get('profile', None))
  File "/usr/lib/python3.9/site-packages/archinstall/lib/installer.py", line 479, in install_profile
    return profile.install()
  File "/usr/lib/python3.9/site-packages/archinstall/lib/profiles.py", line 183, in install
    return self.execute()
  File "/usr/lib/python3.9/site-packages/archinstall/lib/profiles.py", line 161, in execute
    self.spec.loader.exec_module(sys.modules[self.namespace])
  File "<frozen importlib._bootstrap_external>", line 855, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/usr/lib/python3.9/site-packages/archinstall/profiles/desktop.py", line 82, in <module>
    archinstall.storage['installation_session'].install_profile(archinstall.storage['_desktop_profile'])
KeyError: '_desktop_profile'

Config:

{
    "!encryption-password": "******",
    "!root-password": "******",
    "audio": "pipewire",
    "bootloader": "grub-install",
    "filesystem": "btrfs",
    "harddrive": {
        "model": "VBOX_HARDDISK",
        "path": "/dev/sda",
        "size": "30G"
    },
    "hostname": "gchamon",
    "kernels": [
        "linux-lts"
    ],
    "keyboard-language": "us",
    "mirror-region": {
        "United States": {
            "https://america.mirror.pkgbuild.com/$repo/os/$arch": true,
            "https://arch.hu.fo/archlinux/$repo/os/$arch": true,
            "https://arch.mirror.constant.com/$repo/os/$arch": true,
            "https://arch.mirror.square-r00t.net/$repo/os/$arch": true,
            "https://archmirror1.octyl.net/$repo/os/$arch": true,
            "https://arlm.tyzoid.com/$repo/os/$arch": true,
            "https://dfw.mirror.rackspace.com/archlinux/$repo/os/$arch": true,
            "https://ftp.sudhip.com/archlinux/$repo/os/$arch": true,
            "https://iad.mirror.rackspace.com/archlinux/$repo/os/$arch": true,
            "https://iad.mirrors.misaka.one/archlinux/$repo/os/$arch": true,
            "https://mirror.arizona.edu/archlinux/$repo/os/$arch": true,
            "https://mirror.dal10.us.leaseweb.net/archlinux/$repo/os/$arch": true,
            "https://mirror.ette.biz/archlinux/$repo/os/$arch": true,
            "https://mirror.hackingand.coffee/arch/$repo/os/$arch": true,
            "https://mirror.lty.me/archlinux/$repo/os/$arch": true,
            "https://mirror.mia11.us.leaseweb.net/archlinux/$repo/os/$arch": true,
            "https://mirror.phx1.us.spryservers.net/archlinux/$repo/os/$arch": true,
            "https://mirror.pit.teraswitch.com/archlinux/$repo/os/$arch": true,
            "https://mirror.sfo12.us.leaseweb.net/archlinux/$repo/os/$arch": true,
            "https://mirror.stephen304.com/archlinux/$repo/os/$arch": true,
            "https://mirror.wdc1.us.leaseweb.net/archlinux/$repo/os/$arch": true,
            "https://mirrors.kernel.org/archlinux/$repo/os/$arch": true,
            "https://mirrors.lug.mtu.edu/archlinux/$repo/os/$arch": true,
            "https://mirrors.mit.edu/archlinux/$repo/os/$arch": true,
            "https://mirrors.ocf.berkeley.edu/archlinux/$repo/os/$arch": true,
            "https://mirrors.rit.edu/archlinux/$repo/os/$arch": true,
            "https://mirrors.sonic.net/archlinux/$repo/os/$arch": true,
            "https://mirrors.xtom.com/archlinux/$repo/os/$arch": true,
            "https://ord.mirror.rackspace.com/archlinux/$repo/os/$arch": true,
            "https://plug-mirror.rcac.purdue.edu/archlinux/$repo/os/$arch": true,
            "https://repo.ialab.dsu.edu/archlinux/$repo/os/$arch": true,
            "https://zxcvfdsa.com/arch/$repo/os/$arch": true
        }
    },
    "nic": {
        "NetworkManager": true,
        "nic": "Use NetworkManager to control and manage your internet connection"
    },
    "ntp": true,
    "packages": [],
    "profile": {
        "path": "/usr/lib/python3.9/site-packages/archinstall/profiles/desktop.py"
    },
    "script": "guided",
    "silent": false,
    "superusers": {
        "gchamon": {
            "!password": "******"
        }
    },
    "sys-encoding": "utf-8",
    "sys-language": "en_US",
    "timezone": "America/Sao_Paulo",
    "users": {}
}
l4zy0n3 commented 3 years ago
    "path": "/usr/lib/python3.9/site-packages/archinstall/profiles/desktop.py"

change desktop to a desktop env profile name here eg: gnome

gchamon commented 3 years ago

is that what is expected from the users to do, or is archinstall supposed to do that when we select the desktop environment? (in my case, I tried KDE, Deepin and minimal with the same errors)

l4zy0n3 commented 3 years ago

is that what is expected from the users to do, or is archinstall supposed to do that when we select the desktop environment? (in my case, I tried KDE, Deepin and minimal with the same errors)

no, this is not expected, we had a discussion a while back on this, I think I missed implementing it😅, my bad, will start on it now edit: saw that I did implement it, it should've worked, looking into this

gchamon commented 3 years ago

@l4zy0n3 what can I do to help?

l4zy0n3 commented 3 years ago

@l4zy0n3 what can I do to help?

can you list the exact steps you followed, it will be a great help

gchamon commented 3 years ago

Using virtualbox and latest archiso:

following these steps the generated JSON contains the path to desktop.py only: image

gchamon commented 3 years ago

image running it with the manually patched json. Will post other errors, if any.

gchamon commented 3 years ago

one detail, if I leave installation for whatever reason, I can't run it again until I close the btrfs filesystem with umount /mnt && cryptsetup close luksloop. Do you think this justifies opening a new issue?

gchamon commented 3 years ago

No errors with archinstall 2.3.0 after modifying the JSON. Tried it with the latest release 2.2.0 and I get an error informing lightdm missing, but it was apparently fixed in dev

l4zy0n3 commented 3 years ago

No errors with archinstall 2.3.0 after modifying the JSON. Tried it with the latest release 2.2.0 and I get an error informing lightdm missing, but it was apparently fixed in dev

try this, cd archinstall then run pip install --upgrade . then do python -m archinstall

l4zy0n3 commented 3 years ago

Apparently installing using setuptools does not copy the example/guided.py to the correct location

RustyRaptor commented 3 years ago

Is this the same issue happening in #606

svartkanin commented 1 year ago

@Torxed we can close this as it should be resolved with the new profile manger

gchamon commented 1 year ago

@svartkanin since https://github.com/archlinux/archinstall/pull/1604 has been merged, can this issue be closed? I know I am being a little lazy here, I could well just try to reproduce this issue and see what is what, but if you have this information easily available, it is faster to just ask. If not, I can try to reproduce this later, with the latest version of archinstall

svartkanin commented 1 year ago

@gchamon yes I think we can definitely close this. Unfortunately I don't have any super powers so we'll have to delegate to @Torxed :)