You are not logged in.

#1 2008-06-15 21:32:04

pogeymanz
Member
Registered: 2008-03-11
Posts: 1,020

[solved]Just made a 32-bit chroot, but have some issues

I can't run anything from it as a normal user.  It says the user does not exist. Was I supposed to create a new user in chroot-land?

How can I change my PS1 in .bashrc to tell me when I'm working in the chroot?

Last edited by pogeymanz (2008-06-16 22:39:09)

Offline

#2 2008-06-15 21:36:51

Ramses de Norre
Member
From: Leuven - Belgium
Registered: 2007-03-27
Posts: 1,289

Re: [solved]Just made a 32-bit chroot, but have some issues

The chroot has its own /etc/passwd and /etc/shadow, so yes, you need to recreate the user there. It would be kind of silly if the chroot used the same config files as the real /, wouldn't it smile
And if you recreate that user, you'll probably want to copy over your real .bashrc and make a slight modification to the PS1 line.

Offline

#3 2008-06-16 02:00:27

shazeal
Member
From: New Zealand
Registered: 2007-06-05
Posts: 341

Re: [solved]Just made a 32-bit chroot, but have some issues

Just follow this guide http://wiki.archlinux.org/index.php/Arc … bit_system

Leave out the mount --bind of your home dir if you want a seperate homedir under the chroot, then create the /home/<username> dir as root and give it your user permissions.

Offline

#4 2008-06-16 13:55:20

pogeymanz
Member
Registered: 2008-03-11
Posts: 1,020

Re: [solved]Just made a 32-bit chroot, but have some issues

I have all the 'bind' lines, and so my home directory is the same in both the chroot and the 64bit environment. My only concern with that is my .bashrc. Is there some kind of if-statement I can write in there to change the PS1 when I chroot?

Offline

#5 2008-06-16 14:07:16

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: [solved]Just made a 32-bit chroot, but have some issues

touch chroot/inside-chroot and add

if [[ -f /inside-chroot ]]; then
    PS1=""
fi

Last edited by Spider.007 (2008-06-16 14:07:32)

Offline

#6 2008-06-17 01:27:02

pogeymanz
Member
Registered: 2008-03-11
Posts: 1,020

Re: [solved]Just made a 32-bit chroot, but have some issues

actually, I'm changing my mind...

Is there any clean way to "unbind" the 32 bit home directory from my regular one? I just realized I have a few gigs of multimedia in there and I don't want it duplicated for no good reason.

Offline

#7 2008-06-17 04:12:43

shazeal
Member
From: New Zealand
Registered: 2007-06-05
Posts: 341

Re: [solved]Just made a 32-bit chroot, but have some issues

Umm --bind is basically like a symlink afaik except it works when you chroot.

Offline

#8 2008-06-17 07:17:01

Anders
Member
From: Sweden
Registered: 2006-05-19
Posts: 48
Website

Re: [solved]Just made a 32-bit chroot, but have some issues

shazeal wrote:

Umm --bind is basically like a symlink afaik except it works when you chroot.

It's not chroot-specific. But yeah, you're right about symlinks.


Running: Arch Linux i686, x86_64, ppc

Offline

#9 2008-06-17 17:56:23

pogeymanz
Member
Registered: 2008-03-11
Posts: 1,020

Re: [solved]Just made a 32-bit chroot, but have some issues

[EDIT]: Sorry that I'm such a noob. I only just understood what you guys were talking about after I replied...

Last edited by pogeymanz (2008-06-17 19:20:45)

Offline

Board footer

Powered by FluxBB