You are not logged in.

#1 2024-09-29 12:18:31

Zero Contradictions
Member
Registered: 2024-09-29
Posts: 2
Website

[SOLVED] Commands aren't found after installing Arch in VirtualBox

I finished installing Arch Linux in VirtualBox for the first time, and I made sure that I typed every command correctly and properly configured everything to the best of my ability. After installing Arch, I ran the commands: useradd, pacman, whoami, journalctl, vim, emacs, and many other basic commands and things that I installed with the pacstrap command. However, the shell returned "not found" for nearly all the commands that I typed.

I checked my $PATH variable, and I think it was configured correctly. ChatGPT suggested that I run "export PATH=$PATH:/usr/bin:/bin:/usr/sbin" to ensure that the shell would recognize my commands, but it didn't help.

The Refind bootloader that I installed has been working correctly, so I tried to rebooting into the ISO installation medium to see if I could diagnose the problem. After mounting all the directories and chrooting into the system as I had done before, I noticed that I was able to run pacman, useradd, and all the other commands that I wasn't able to run when booting into the Root partition, including the ones that I installed when I ran pacstrap for the first time. I also ran "journalctl" since ChatGPT suggested it, but it said that there were no journal files found. I'll also note that I made sure to verify the signature for the Arch Linux .iso that I downloaded, before I ever tried installing anything. Since gpg returned "Good signature", I doubt that the .iso file that I downloaded is causing any problems.

Does anybody have any suggestions on what the problem(s) could be?

Last edited by Zero Contradictions (2024-09-30 00:03:28)

Offline

#2 2024-09-29 12:34:57

philo
Member
Registered: 2015-01-26
Posts: 265

Re: [SOLVED] Commands aren't found after installing Arch in VirtualBox

ChatGPT (and YouTube videos) are among the worst  places to ask for help. You should  be more successful here.

Offline

#3 2024-09-29 14:41:19

Head_on_a_Stick
Member
From: Belsize Park
Registered: 2014-02-20
Posts: 8,211
Website

Re: [SOLVED] Commands aren't found after installing Arch in VirtualBox

Zero Contradictions wrote:

I checked my $PATH variable, and I think it was configured correctly

If you share it here we could also check that. Please post the command used to check and the full output, thanks.

Zero Contradictions wrote:

ChatGPT suggested

If ChatGPT told you to put your hand in the fire what would you do? tongue

See also https://www.researchgate.net/publicatio … s_bullshit.


"It's impossible for a white person to believe in capitalism and not believe in racism. You can't have capitalism without racism."
— Malcolm X

Offline

#4 2024-09-29 15:09:17

Zero Contradictions
Member
Registered: 2024-09-29
Posts: 2
Website

Re: [SOLVED] Commands aren't found after installing Arch in VirtualBox

A friend walked me through the process step-by-step, which I will describe here:
1. We ran `pacman -Q | grep "vim\|emacs"` and `ls -l /bin /usr/bin /sbin /usr/sbin | grep "vim\|emacs"`. Vim and Emacs were installed.
2. `echo $PATH` printed `/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl`.
3. 'which emacs' revealed that `which` was not installed.
4. We ran `pacman -S which`. Then we ran `which emacs`, and it printed `/usr/bin/emacs`.
5. I booted into the system. Apparently, I must not've read the text carefully the first time, but I was booting into an emergency shell, which would explain why I couldn't use any of the commands that I installed.
6. My friend guessed that the bootloader was the problem, so I rebooted into the installation medium.
7. After chrooting into the system, I ran `rm -rf /boot/EFI/refind/` to uninstall rEFInd.
8. I ran the following commands to install GRUB:

pacman -S grub efibootmgr
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg

9. I rebooted into the system. This time, I was able to login as root, booted into the correct shell, and I was able to successfully run vim, emacs, and all the other commands.

Conclusion: The problem was rEFInd did not mount the system correctly for some reason. For further information, I ran `refind-install` immediately after I installed the `refind` on the first attempt.

Since the problem has been identified and I am satisfied with my new system, this thread is resolved.

Offline

#5 2024-09-29 15:27:08

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,959

Re: [SOLVED] Commands aren't found after installing Arch in VirtualBox

rEFInd doesn't mount anything. It passes the command line you give it to the kernel/initramfs, that's it.

Offline

Board footer

Powered by FluxBB