shirleyian / pentoo

Automatically exported from code.google.com/p/pentoo
1 stars 1 forks source link

Installation issues with latest RC - proc and dev not mounted in chroot env #246

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Running through the installation, I chose ext4+luks.

At the "Select Profile" option it errors out "unable to detect pentoo profile".

From the code:
    CUR_PROF="`chroot ${DESTDIR} eselect profile show | grep pentoo | awk '{match($1,"pentoo/.*",a)}END{print a[0]}'`"

    if [[ -n "`echo $CUR_PROF | grep hardened`" ]]; then
        CUR_PROF_TYPE="hardened"
    elif [[ -n "`echo $CUR_PROF | grep default`" ]]; then
        CUR_PROF_TYPE="default"
    else
        DIALOG --keep-tite --msgbox "Warning: unable to detect a current Pentoo profile in the $DESTDIR directory" 0 0
    fi

The chroot environment is broken:
pentoo ~ # chroot /mnt/gentoo/ /bin/bash
grep: /proc/cmdline: No such file or directory

^^^ Shows /proc is not mounted.

pentoo / # eselect profile show
Current /etc/portage/make.profile symlink:
/usr/share/eselect/libs/package-manager.bash: line 32: 18687 Aborted            
     /usr/bin/portageq "$@" 2> /dev/null
!!! Error: get_repos failed
exiting

Running portageq directly gives:
pentoo / # /usr/bin/portageq 
Fatal Python error: Failed to open /dev/urandom
Aborted

After mounting the two missing special filesystems:
pentoo ~ # mount -t proc none /mnt/gentoo/proc/
pentoo ~ # mount -o bind /dev /mnt/gentoo/dev
pentoo ~ # chroot /mnt/gentoo/ /bin/bash
pentoo / # eselect profile show
Current /etc/portage/make.profile symlink:
  pentoo:pentoo/default/linux/amd64

Thx.

Original issue reported on code.google.com by r...@infect.me on 23 Mar 2014 at 9:13

GoogleCodeExporter commented 9 years ago

Original comment by blshkv on 29 Mar 2014 at 5:41

GoogleCodeExporter commented 9 years ago
This has nothing to do with luks, I believe chaos put that menu in place but I 
don't really know what for ?

Original comment by grimm...@pentoo.ch on 29 Mar 2014 at 2:46

GoogleCodeExporter commented 9 years ago
My apologies if my bug report inferred that luks was the source of the bug.  I 
included the "filesystem type" of ext4+luks just in case the installation 
workflow was different in some way.

As "Select Profile" is a numbered option I assumed it mandatory.

Sounds like my bug may be caused by catching a new function before it's 
completed.

Original comment by r...@infect.me on 29 Mar 2014 at 3:02

GoogleCodeExporter commented 9 years ago
No worries, it's just that I want chaos's input before doing any changes.

Original comment by grimm...@pentoo.ch on 29 Mar 2014 at 3:04

GoogleCodeExporter commented 9 years ago
I added that function actually. And I want to add "mount default fs" as well so 
users will have an option to jump it over and mount everything as they like.

Original comment by blshkv on 29 Mar 2014 at 3:31

GoogleCodeExporter commented 9 years ago
we extensively use calls to chroot to setup things inside the system during 
install.  Feel free to add the mounts in the appropriate place, anyone.  If I 
find the time I will try to look as well.

Original comment by sidhayn on 30 Mar 2014 at 9:21

GoogleCodeExporter commented 9 years ago
I'm on it

Original comment by grimm...@pentoo.ch on 30 Mar 2014 at 9:23

GoogleCodeExporter commented 9 years ago
Should be fixed with latest revision, feel free to reopen if not.

Original comment by grimm...@pentoo.ch on 30 Mar 2014 at 10:14