You are not logged in.

#1 2008-07-08 11:04:24

AntonPetts
Member
Registered: 2008-06-29
Posts: 19

Some questions on 32-bit chroot

I made a 32bit chroot since I needed a couple of apps to run. I ran into a couple of problems however.

1) I don't get any sound, specifically from Enemy Territory - Quake Wars and Frostwire. Firefox works fine with the script from the wiki.

2) How do I install 32-bit packages from AUR? I've used 'makepkg --asroot' to build it (is there any other way to do that?). But when installing I get errors like:

warning: directory permissions differ on opt/
filesystem: 755  package: 2755
warning: directory permissions differ on usr/
filesystem: 755  package: 2755
warning: directory permissions differ on usr/share/
filesystem: 755  package: 2755
warning: directory permissions differ on usr/bin/
filesystem: 755  package: 2755

3) I only get the default iconset in 32-bit apps.

Thanks

Offline

#2 2008-07-08 17:36:07

ghostHack
Member
From: Bristol UK
Registered: 2008-02-29
Posts: 261

Re: Some questions on 32-bit chroot

for 2) you will most likely have to build them within the chroot, also, I have never come across a package that I have needed to use --asroot for., this could also be the source of the permissions differrences.

for 3) the apps in a chroot have no knowledge of your 64-bit system unless you specifically mount partitions there.  So you may want to copy you configuration files from your 64-bit user to the 32bit chroot user.

Offline

#3 2008-07-10 00:33:36

Leigh
Member
From: USA
Registered: 2004-06-25
Posts: 533

Re: Some questions on 32-bit chroot

Also your 32 bit chroot will share your 64bit home dir. What I did was, within the chroot, I built and installed yauort. Then in my 64 bit system I added a function to my ~/.bashrc...

You can easily modify it any way you like. Anyway,

Edit... Oops, this is the old version of this function, I'll update to the one i use now when I get home.

Edit2... Updated. There's really only two lines that do the updating. The rest is just messages and pause.

# System update using yaourt, initial 10sec delay.
# Updates Arch64 + AUR, Arch32 chroot + AUR
function syu()
{
echo -e '\e[0;36m------------------------------\033[0m'
echo -e '\e[0;36m完全系统升级 + AUR + chroot...\033[0m'
echo -e '\e[0;36m------------------------------\033[0m'
echo
echo -e '\e[0;36m---------------------------\033[0m'
echo -e '\e[1;36m==> \e[0;36m可以在10秒内中止功能...\033[0m'
echo -e '\e[0;36m---------------------------\033[0m'
echo
echo -e '\e[0;31m------------------------------------- \e[0;36m十\033[0m'
sleep 1
echo -e '\e[0;31m--------------------------------- \e[0;36m九\033[0m'
sleep 1
echo -e '\e[0;31m----------------------------- \e[0;36m八\033[0m'
sleep 1
echo -e '\e[0;31m------------------------- \e[0;36m七\033[0m'
sleep 1
echo -e '\e[0;31m--------------------- \e[0;36m六\033[0m'
sleep 1
echo -e '\e[0;31m----------------- \e[0;36m五\033[0m'
sleep 1
echo -e '\e[0;31m------------- \e[0;36m四\033[0m'
sleep 1
echo -e '\e[0;31m--------- \e[0;36m三\033[0m'
sleep 1
echo -e '\e[0;31m----- \e[0;36m二\033[0m'
sleep 1
echo -e '\e[0;31m- \e[0;36m一\033[0m'
sleep 1
echo
echo -e '\e[0;36m----------------------------'
date
echo -e '\e[0;36m----------------------------\033[0m'
echo
echo -e '\e[0;36m-------------------------------------\033[0m'
echo -e '\e[1;36m==> \e[0;36m现在开始 \e[1;36mArch64 \e[0;36m系统升级 \e[1;36m+ AUR\e[0;36m...\033[0m'
echo -e '\e[0;36m-------------------------------------\033[0m'
yaourt -Syu --aur
echo
echo -e '\e[0;36m--------------------------------------------\033[0m'
echo -e '\e[1;36m==> \e[0;36m现在开始 \e[1;36mArch32 chroot \e[0;36m系统升级 \e[1;36m+ AUR\e[0;36m...\033[0m'
echo -e '\e[0;36m--------------------------------------------\033[0m'
sudo chroot /opt/arch32 yaourt -Syu --aur
}

Basically it will start out with a note (in Chinese obviously... you can change it to whaterver), saying "Ten sec delay to abort"

Then it counts off for ten seconds (in Chinese) you can change it : P

Then it updates the normal system + aur. (you'll need yauort installed)

Then it updates the arch32 bit system + aur. ( need yauort installed inside the chroot) (also need sudo in the 64bit system.)

So to update my entire system all I have to do is type syu at a terminal.

I also set up some alias' for installing from aur to the arch 32bit chroot and normal 64bit system....

Probably a little elaborate for most people, but they help me. For example...

#simplify yaourt commands using lowercase.

alias y-syu='yaourt -Syu --aur' #sync refresh sys update + aur
alias y-sy='yaourt -Sy'         #sync refresh
alias y-s='yaourt -S'           #install
alias y-sb='yaourt -Sb'         #builds the targets from source
alias y-su='yaourt -Su --aur'   #upgrade all aur packages
alias y-r='yaourt -R'           #remove
alias y-rd='yaourt -Rd'         #remove omit dependencies
alias y-rs='yaourt -Rs'         #remove plus unused dependencies
alias y-sl='yaourt -Sl'         #list all packages in specified repository
alias y-si='yaourt -Si'         #view package / aur PKGBUILD info
alias y-u='yaourt -U'           #install local pkg
alias y-scc='yaourt -Scc'       #clean catch - all pkgs
alias y-sc='yaourt -Sc'         #clean catch - old pkgs only
alias y-ss='yaourt -Ss'         #query database
alias y-qs='yaourt -Qs'         #query installed only
alias y-qi='yaourt -Qi'         #pkg more info
alias y-qtd='yaourt -Qtd'       #look for installed orphans
alias y-ql='yaourt -Ql'         #find pkg file list
alias y-qo='yaourt -Qo'         #/path/to/file = find owner
alias y-sw='yaourt -Sw'         #download but don't install
alias y-sf='yaourt -Sf'         #reinstall - for dep problem "force"

#just incase I do need to type yaourt..
alias yoaurt='yaourt'
alias yuaort='yaourt'
alias youart='yaourt'
alias yauort='yaourt'
alias yuoart='yaourt'

#simplify pacman commands using lowercase.
#Need to install and configure sudo.

alias p-s='sudo pacman -S'      #install
alias p-sy='sudo pacman -Sy'    #sync refresh
alias p-syu='sudo pacman -Syu'  #sync refresh sys update
alias p-r='sudo pacman -R'      #remove
alias p-u='sudo pacman -U'      #install local pkg
alias p-rd='sudo pacman -Rd'    #remove omit dependencies
alias p-rs='sudo pacman -Rs'    #remove plus unused dependencies
alias p-scc='sudo pacman -Scc'  #clean catch - all pkgs
alias p-sc='sudo pacman -Sc'    #clean catch - old pkgs only
#alias p-ss='sudo pacman -Ss'   #query database
alias p-qs='sudo pacman -Qs'    #query installed only
alias p-si='sudo pacman -Si'    #pkg info
alias p-qi='sudo pacman -Qi'    #pkg more info
alias p-qtd='sudo pacman -Qtd'  #look for installed orphans
alias p-ql='sudo pacman -Ql'    #find pkg file list
alias p-qo='sudo pacman -Qo'    #/path/to/file = find owner
alias p-sw='sudo pacman -Sw'    #download but don't install
alias p-sf='sudo pacman -Sf'    #reinstall - for dep problem
alias abs='sudo abs'            #update abs database
alias p-op='sudo pacman-optimize'

#arch32 chroot - simplify yaourt commands using lowercase.
#Need to build and install yaourt inside chroot.

alias ay-syu='sudo chroot /opt/arch32 yaourt -Syu --aur'
alias ay-sy='sudo chroot /opt/arch32 yaourt -Sy'
alias ay-s='sudo chroot /opt/arch32 yaourt -S'
alias ay-sb='sudo chroot /opt/arch32 yaourt -Sb'
alias ay-su='sudo chroot /opt/arch32 yaourt -Su --aur'
alias ay-r='sudo chroot /opt/arch32 yaourt -R'
alias ay-rd='sudo chroot /opt/arch32 yaourt -Rd'
alias ay-rs='sudo chroot /opt/arch32 yaourt -Rs'
alias ay-sl='sudo chroot /opt/arch32 yaourt -Sl'
alias ay-si='sudo chroot /opt/arch32 yaourt -Si'
alias ay-u='sudo chroot /opt/arch32 yaourt -U'
alias ay-scc='sudo chroot /opt/arch32 yaourt -Scc'
alias ay-sc='sudo chroot /opt/arch32 yaourt -Sc'
alias ay-ss='sudo chroot /opt/arch32 yaourt -Ss'
alias ay-qs='sudo chroot /opt/arch32 yaourt -Qs'
alias ay-qi='sudo chroot /opt/arch32 yaourt -Qi'
alias ay-qtd='sudo chroot /opt/arch32 yaourt -Qtd'
alias ay-ql='sudo chroot /opt/arch32 yaourt -Ql'
alias ay-qo='sudo chroot /opt/arch32 yaourt -Qo'
alias ay-sw='sudo chroot /opt/arch32 yaourt -Sw'
alias ay-sf='sudo chroot /opt/arch32 yaourt -Sf'

#arch32 chroot - simplify pacman commands using lowercase.

alias ap-s='sudo chroot /opt/arch32 pacman -S'
alias ap-sy='sudo chroot /opt/arch32 pacman -Sy'
alias ap-syu='sudo chroot /opt/arch32 pacman -Syu'
alias ap-r='sudo chroot /opt/arch32 pacman -R'
alias ap-u='sudo chroot /opt/arch32 pacman -U'
alias ap-rd='sudo chroot /opt/arch32 pacman -Rd'
alias ap-rs='sudo chroot /opt/arch32 pacman -Rs'
alias ap-scc='sudo chroot /opt/arch32 pacman -Scc'
alias ap-sc='sudo chroot /opt/arch32 pacman -Sc'
alias ap-qs='sudo chroot /opt/arch32 pacman -Qs'
alias ap-ss='sudo chroot /opt/arch32 pacman -Ss'
alias ap-qs='sudo chroot /opt/arch32 pacman -Qs'
alias ap-si='sudo chroot /opt/arch32 pacman -Si'
alias ap-qi='sudo chroot /opt/arch32 pacman -Qi'
alias ap-qtd='sudo chroot /opt/arch32 pacman -Qtd'
alias ap-ql='sudo chroot /opt/arch32 pacman -Ql'
alias ap-qo='sudo chroot /opt/arch32 pacman -Qo'
alias ap-sw='sudo chroot /opt/arch32 pacman -Sw'
alias ap-sf='sudo chroot /opt/arch32 pacman -Sf'
alias ap-op='sudo chroot /opt/arch32 pacman-optimize'
alias aabs='sudo chroot /opt/arch32 abs'

Any way with the funtion and alias', I almost forget I even have a arch32 chroot. It's as easy to update and maintain as my normal system. Very seldom do I ever need to manually enter the chroot. Only when I want to build something without using yauort. When that happens, I do get a warning telling me to use the --asroot switch with pacman. That's because I have to be root to enter the chroot.

I'm not sure how easy it would be to enable entering the chroot as normal user, since it's set up to share the same user accout with the 64bit system. ?

Last edited by Leigh (2008-07-10 06:01:08)


-- archlinux 是一个极好的 linux

Offline

#4 2008-07-10 01:39:21

AntonPetts
Member
Registered: 2008-06-29
Posts: 19

Re: Some questions on 32-bit chroot

Ghosthack - Thanks that solves #2, but the configuration files are shared through the home directory if i'm not mistaken.

Leigh - That looks really nice. I guess I could just replace 'yaourt' with 'pacman' in the script, right?


I'd still like to have some sound in ETQW though sad.

Offline

#5 2008-07-10 02:09:32

Leigh
Member
From: USA
Registered: 2004-06-25
Posts: 533

Re: Some questions on 32-bit chroot

AntonPetts wrote:

Leigh - That looks really nice. I guess I could just replace 'yaourt' with 'pacman' in the script, right?

Yes, and the --aur is specific to youart so you'd have to remove that too. You'd still need sudo for updating.

Simplified this is all you'd need.

function syu()
{
echo -e '\e[0;36m-------------------------------------\033[0m'
echo -e '\e[1;36m==> \e[0;36m现在开始 \e[1;36mArch64 \e[0;36m系统升级 \e[0;36m...\033[0m'
echo -e '\e[0;36m-------------------------------------\033[0m'
sudo pacman -Syu
echo -e '\e[0;36m--------------------------------------------\033[0m'
echo -e '\e[1;36m==> \e[0;36m现在开始 \e[1;36mArch32 chroot \e[0;36m系统升级 \e[0;36m...\033[0m'
echo -e '\e[0;36m--------------------------------------------\033[0m'
sudo chroot /opt/arch32 pacman -Syu
}

The lines with Chinese characters / (echo lines) are just notes and can be changed to whatever you want, or be removed.

I'll still update the script to the one I use now when I get home. adding a small delay before it actaully runs is helpfull, at least for me.

Last edited by Leigh (2008-07-10 03:44:59)


-- archlinux 是一个极好的 linux

Offline

#6 2008-07-10 14:57:40

AntonPetts
Member
Registered: 2008-06-29
Posts: 19

Re: Some questions on 32-bit chroot

Customized it a bit, thought it would be nice to have it clean up the cache as well.

function uppdatera()
{
echo -e '\e[0;36m-------------------------------------\033[0m'
echo -e '\e[0;36m Systemuppdatering \033[0m'
echo -e '\e[0;36m-------------------------------------\033[0m'
sleep 2
echo -e '\e[0;36m==> Rensar cache \033[0m'
sudo pacman -Scc && sudo chroot /opt/arch32 pacman -Scc
echo -e '\e[1;36m==> \e[0;36m 64-bit program uppdateras... \033[0m'
sudo pacman -Syu
echo -e '\e[1;36m==> \e[0;36m 32-bit program uppdateras... \033[0m'
sudo chroot /opt/arch32 pacman -Syu
echo -e '\e[0;36m-------------------------------------\033[0m'
echo -e '\e[0;36m Systemuppdatering Klar \033[0m'
echo -e '\e[0;36m-------------------------------------\033[0m'
}

And yeah, that's swedish tongue

Last edited by AntonPetts (2008-07-10 15:10:15)

Offline

#7 2008-07-10 20:30:57

Leigh
Member
From: USA
Registered: 2004-06-25
Posts: 533

Re: Some questions on 32-bit chroot

yea, custom functions in bashrc can make things a lot easier. : )

You might run into a inconvience when cleaning the catch at every system update. Every so often there is a buggy package, or there is a problem with a package, and the simplest temporary sollution is to down grade the package from the last version stored in catch. Doesn't happen often, but does happen.


-- archlinux 是一个极好的 linux

Offline

#8 2008-07-11 00:19:20

AntonPetts
Member
Registered: 2008-06-29
Posts: 19

Re: Some questions on 32-bit chroot

Leigh wrote:

yea, custom functions in bashrc can make things a lot easier. : )

You might run into a inconvience when cleaning the catch at every system update. Every so often there is a buggy package, or there is a problem with a package, and the simplest temporary sollution is to down grade the package from the last version stored in catch. Doesn't happen often, but does happen.

I'll take my chances smile. My bashrc has gotten quite large just today, I didn't even know it existed before so thanks wink.

Icons are working now as well,
but still no luck with the sound issues...

Offline

Board footer

Powered by FluxBB