You are not logged in.
Pages: 1
I just created a 32bit chroot which is working great but, I want an easy way to tell if I am using 64bit or 32bit root at the console.
I had the great idea of using .bashrc but then I realized I would need to script a way to differentiate between 32 and 64 bit. My first thought was uname -m but stupid me, didn't think about the fact that I am still using the same kernel so that won't work.
Any help is appreciated.
btw, first post as an Arch user, yay!
[Edit] - wait...just realized since it lists the user(root), that is probably enough for me to know the difference.
Looks like my first post is for not.
Last edited by dalingrin (2009-03-18 04:10:41)
Offline
Hi,
use this command when you enter to 32 bit chroot:
linux32 chroot /path/to/chroot
So all programs see that are in 32 bit env
Good Luck!
Offline
This is what I use for bash. Make a file inside the root of your 32-bit chroot called inside-choot.
Then you add the following to your .bashrc:
if [[ -f /inside-chroot ]]; then
PS1='\[\e[1;35m\]arch32 ch \u\[\e[m\] \[\e[1;36m\]\w\[\e[m\] \[\e[1;32m\]> \[\e[m\]\[\e[0;37m\]'
fi
Change the PS1 line to whatever you like, I think i found this from another thread in this forum. Anyway good luck:)
Offline
Hi,
use this command when you enter to 32 bit chroot:
linux32 chroot /path/to/chroot
So all programs see that are in 32 bit env
Good Luck!
Thanks, I was wondering why applications were reporting x86_64
This is what I use for bash. Make a file inside the root of your 32-bit chroot called inside-choot.
Then you add the following to your .bashrc:if [[ -f /inside-chroot ]]; then
PS1='\[\e[1;35m\]arch32 ch \u\[\e[m\] \[\e[1;36m\]\w\[\e[m\] \[\e[1;32m\]> \[\e[m\]\[\e[0;37m\]'
fiChange the PS1 line to whatever you like, I think i found this from another thread in this forum. Anyway good luck:)
That's perfect. Thank you!
Offline
This is what I use for bash. Make a file inside the root of your 32-bit chroot called inside-choot.
Then you add the following to your .bashrc:if [[ -f /inside-chroot ]]; then
PS1='\[\e[1;35m\]arch32 ch \u\[\e[m\] \[\e[1;36m\]\w\[\e[m\] \[\e[1;32m\]> \[\e[m\]\[\e[0;37m\]'
fiChange the PS1 line to whatever you like, I think i found this from another thread in this forum. Anyway good luck:)
! Very clever actually
Offline
Pages: 1