Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] No such program after mounting root
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
avidseeker
n00b
n00b


Joined: 28 May 2023
Posts: 24

PostPosted: Sun May 28, 2023 7:10 am    Post subject: [Solved] No such program after mounting root Reply with quote

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
View user's profile Send private message
avidseeker
n00b
n00b


Joined: 28 May 2023
Posts: 24

PostPosted: Sun May 28, 2023 7:58 am    Post subject: Reply with quote

I booted to liveGUI iso and it works. Seems like it is a problem with the minimal live image.

However, now after
Code:
mount
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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Sun May 28, 2023 8:31 am    Post subject: Reply with quote

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
Code:
emerge --sync
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
View user's profile Send private message
avidseeker
n00b
n00b


Joined: 28 May 2023
Posts: 24

PostPosted: Sun May 28, 2023 6:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4236
Location: Bavaria

PostPosted: Sun May 28, 2023 6:21 pm    Post subject: Reply with quote

avidseeker,

maybe your mount is wrong (dont use /mnt - instead you will need /mnt/gentoo). Please read my post here:
https://forums.gentoo.org/viewtopic-p-8790812.html#8790812
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4236
Location: Bavaria

PostPosted: Sun May 28, 2023 6:25 pm    Post subject: Re: No such program after mounting root Reply with quote

avidseeker wrote:
After reboot, I ended up with blank screen.

This could be a missing framebuffer module. Please read (and check):
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_Configuring_Kernel_Version_6.1#Part_3_-_Must_Haves
Back to top
View user's profile Send private message
avidseeker
n00b
n00b


Joined: 28 May 2023
Posts: 24

PostPosted: Sun May 28, 2023 7:16 pm    Post subject: Reply with quote

pietinger wrote:
avidseeker,

maybe your mount is wrong (dont use /mnt - instead you will need /mnt/gentoo). Please read my post here:
https://forums.gentoo.org/viewtopic-p-8790812.html#8790812


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
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21706

PostPosted: Sun May 28, 2023 7:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
avidseeker
n00b
n00b


Joined: 28 May 2023
Posts: 24

PostPosted: Sun May 28, 2023 8:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum