View previous topic :: View next topic |
Author |
Message |
avidseeker n00b
Joined: 28 May 2023 Posts: 24
|
Posted: Sun May 28, 2023 7:10 am Post subject: [Solved] No such program after mounting root |
|
|
I followed Gentoo Handbook manual using manual kernel configuration and EFISTUB for boot (finished stage3 and updated @world with kernel and everything).
After reboot, I ended up with blank screen. I double checked efibootmgr command. I suspected the problem to be with my kernel configuration, so I reboot again into live image to test with a kernel binary.
The problem is that after mounting the root partition, I can't issue any other command.
Code: |
livecd ~ # ls -a
. .. .bash_profile .bashrc
livecd ~ # mount /dev/sda3 /mnt
livecd ~ # ls
-bash: /bin/ls: No such file or directory
livecd ~ # umount /mnt
-bash: umount: command not found
|
What's happening here? I didn't even chroot into root.
Last edited by avidseeker on Sun May 28, 2023 11:17 pm; edited 1 time in total |
|
Back to top |
|
|
avidseeker n00b
Joined: 28 May 2023 Posts: 24
|
Posted: Sun May 28, 2023 7:58 am Post subject: |
|
|
I booted to liveGUI iso and it works. Seems like it is a problem with the minimal live image.
However, now after ing with --rbind all of /proc/, /sys/, /run/, /dev/, chrooting into root partition then installing a kernel binary, I get:
Code: |
!!! Section 'gentoo' in repos.conf has location attribute set to nonexistent directory: '/var/db/repos/gentoo'
!!! Invalid Repository Location (not a dir): '/var/db/repos/gentoo'
!!! /etc/portage/make.profile is not a symlink and will probably prevent most merges.
!!! It should point into a profile within /var/db/repos/gentoo/profiles/
!!! (You can safely ignore this message when syncing. It's harmless.)
!!! Your current profile is invalid. If you have just changed your profile
!!! configuration, you should revert back to the previous configuration.
!!! Allowed actions are limited to --help, --info, --search, --sync, and
!!! --version.
|
Why is /var/db/repos/gentoo non-existent? /var/ is not a separate partition. What's causing this error? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Sun May 28, 2023 8:31 am Post subject: |
|
|
avidseeker,
Welcome to Gentoo.
/var/db/repos/gentoo is populated by the gentoo snapshot that you download and unpack, or fetch with emerge-websync
It's quite possible that you did download and unpack the snapshot but put it in the wrong place too.
Running with an empty repo works but takes a long time. If you don't mind that, that's OK. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
avidseeker n00b
Joined: 28 May 2023 Posts: 24
|
Posted: Sun May 28, 2023 6:04 pm Post subject: |
|
|
I'm still confused about why programs are inaccessible after mounting root.
Quote: | but takes a long time |
While it's taking its time, I tried another flash drive with gentoo minimal live environment, on another machine with another hard disk type.
Same problem: before mounting all programs work. After mounting I can't even reboot because that command is inaccessible. Problem extends to tty.
I was thinking maybe my original gentoo live environment might be corrupt, but it looks like a problem with the latest update. |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 4236 Location: Bavaria
|
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 4236 Location: Bavaria
|
|
Back to top |
|
|
avidseeker n00b
Joined: 28 May 2023 Posts: 24
|
Posted: Sun May 28, 2023 7:16 pm Post subject: |
|
|
Oh, this indeed seems to be the problem. I used this subdir during installation, but forgot to use it during rescue.
Any idea why mounting in the parent dir causes all programs to be missing? It's a totally different partition (actually hard drive) than the live iso. How can it affect it simply by mounting? |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 21706
|
Posted: Sun May 28, 2023 7:55 pm Post subject: |
|
|
Perhaps the programs you need are in /mnt/something, so when you shadow the entire /mnt hierarchy, you lose access to them. Seeing the output of cat /proc/mounts immediately before you do the bad mount might help us answer. |
|
Back to top |
|
|
avidseeker n00b
Joined: 28 May 2023 Posts: 24
|
Posted: Sun May 28, 2023 8:50 pm Post subject: |
|
|
Hu wrote: | Perhaps the programs you need are in /mnt/something, so when you shadow the entire /mnt hierarchy, you lose access to them. Seeing the output of cat /proc/mounts immediately before you do the bad mount might help us answer. |
Right, I see. The live image has a loop0 device at /mnt/livecd. That's why the liveGUI isn't effected by this.
Thanks |
|
Back to top |
|
|
|