Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 29 Nov 2014, 02:34
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Anyone building in a chroot environment?
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [11 Posts]  
Author Message
2lss

Joined: 20 Sep 2009
Posts: 225

PostPosted: Fri 23 Jul 2010, 23:06    Post subject:  Anyone building in a chroot environment?  

I thought it would be neat to be able to build and develop stuff from a puppy environment on my ubuntu box so I did the following:

Unpacked the puppy 4.31 main sfs along with the devx into a directory and ran
Code:
sudo chmod -R 777 pupenv-431/


and then chrooted by
Code:
sudo chroot pupenv-431/ /bin/bash


It seems to be working ok, none of the gui stuff will work nor will it build anything (the configure scrips go crazy printing an endless loop of error messages ) but I guess its better than nothing.

I tried setting some variables, like PATH, LD_LIBRARY_PATH, PKG_CONFIG_PATH, LANG, and a few others but nothing made a difference.

So does anyone else use this method? It seems like it should be possible, there are lots of guides for gentoo but there are a few tools specific to that distro. I found a thread thats similar but I have yet to give it a try http://www.murga-linux.com/puppy/viewtopic.php?search_id=393444758&t=49512

Would be neat to get working.
Back to top
View user's profile Send private message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Sat 24 Jul 2010, 00:38    Post subject:  

2lss
Quote:
So does anyone else use this method?


I used that before and few much more complex chroots
what I use is my own scripts that make a new root not a chroot
that one took me quite awhile to figure out how to do

and there werent any how to's to follow so coding it all was the only way



this will get you much further

make it executable and call it quick-init click on it and see the difference Very Happy

Code:

#!/bin/sh
mount /proc
mount /sys
mount /dev/pts



you are already using X so you need a new display number for the GUI stuff

Code:
startx -- :1



a chroot wont be clean since files will be written to your chrooted environment but
for testing its fine to use

Joe

_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send private message 
2lss

Joined: 20 Sep 2009
Posts: 225

PostPosted: Sat 24 Jul 2010, 18:07    Post subject:  

Thanks big_bass,

Unfortunately a storm knocked out my power so it will be a while until I get to test this on my machine. Mad

Just out of curiosity, what is the difference between a new root and a chroot?

And do I run your script within the chroot'ed environment, or outside?

Edit: Also, do I need to be working in new vt?
Back to top
View user's profile Send private message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Sun 25 Jul 2010, 13:51    Post subject:  

a chroot is like booting into that folder
so files are generated the same as a frugal install

but a new root allows you to install and remove files without booting into the folder so no personalized configurations based on your hardware are generated

I had to write that code the formatting of pet packages
how they are registered in woof are very different so all my work on this is for pre woof versions of puppy ( I have no plans to modify the code for the new package format )

I also use package tools (slackwares package management)

Quote:

do I run your script within the chroot'ed environment, or outside

after you chrooted into the folder you run the script I posted above
and the new display for number for X puppy will let you use startx instead of xwin so you dont need to change that

Joe

_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send private message 
mmmrr


Joined: 03 Mar 2009
Posts: 142
Location: vancouver island, canada

PostPosted: Sun 03 Apr 2011, 17:38    Post subject:  

i've been pokiing around trying to find a way to run
puppy inside another linux, mintppc, running on a debian
base on a power pc. so the field of emulators/virtualisers
is drastically reduced. i had found chroot , which seemed
potentially useful.

yr reply to the poster gives me hope, big bass, because
i do not know the code to see if i could get puppy running
with chroot.

thanks, mm
Back to top
View user's profile Send private message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Sun 03 Apr 2011, 18:36    Post subject:  

mmmrr

this is a very advanced way of test building so it it mostly used for a development stage
to boot into a chroot
so you have to understand a quite few things before getting started

1.)if you are booting from another linux distros kernel
you will have different modules loaded before switching into the new root

in a nut shell this is for pre testing ideas before hand
doing this booting slackware with a slackware chroot is much easier
doing this booting puppy and then a puppy chroot is much easier
*I can say that with confidence because I tried it the hard way of having a different kernel and modules
it can be done but it gets much more complex quickly (slaxer pup came from much testing )
so if this sounds interesting to you do the easy way first
to get a feel for what is happening



2.)if you are booting from another distro you have to have squashfs compiled in if you want to mount
sfs but it is not needed if you first decompress the filing system into a folder


3.)since you are in a chroot the display number has to be increased from 0 to 1

this is in no way a complete how to because I always have to tweak many things to get the full
system running

anyway thanks for posting
I hope this clears up some questions
you will have to invest a lot of time


much easier to set up qemu but its slow

Joe

_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send private message 
mmmrr


Joined: 03 Mar 2009
Posts: 142
Location: vancouver island, canada

PostPosted: Sun 03 Apr 2011, 23:06    Post subject:  

thanks for yr reply joe,

i tried qemu, too slow to be useful.
i just wanted to see if i could get a puppy running on a powerpc
and because a port is going slowly for much more informed users
than myself i found a nice linux for powerpc, mintppc.

it's debian based. in the mintppc forum one of their moderators wondered
if anyone had tried running puppy in qemu. that was how i started.
then i found that very few emulators/virtualiser would encompass
a host ppc/linux guest pc/linux setup

i got so far as installing schroot which looked as though it might
make things easier. i have the time to invest and the target compu
is a 'spare' with internet. it's a g4, big old thing with built in handles,
runs in utter silence -disconnected the fans-

in fact i'm not sure that chroot on linux on a powerpc will run a
linux/pc distro like puppy? just thought of that.

cheers, mm
Back to top
View user's profile Send private message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Mon 04 Apr 2011, 01:16    Post subject:  

mmmrr

a suggestion would be to rebuild mintppc lighter
using packages this will save you tons of time
when you decide to upgrade and it will be much more organized
when you search for info using a debian base

you could then build packages on your already running system
as far as what is or what isnt puppy on a ppc
there is no attempt to standardize anything
to be linux compatible on one

the best way would be a small light mintppc full install
then pick only the best smallest apps you need

Joe

_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send private message 
mmmrr


Joined: 03 Mar 2009
Posts: 142
Location: vancouver island, canada

PostPosted: Mon 04 Apr 2011, 01:51    Post subject:  

thanks, joe

i'm not understanding some of yr post

i'm not trying to redo mintppc; it's already running
as the operating system on my powerpc, g4.

i didn't build it in the first place, i just installed it.
sure it's got some apps i don't use but i don't think
that changes things as far chrooting or new-rooting
puppy is concerned

''the best way would be a small light mintppc full install''

that really has me puzzled, full install where?

i'm happy with the present mintppc install. i want to
run puppy inside it.

i appreciate yr help, cheers, mm
Back to top
View user's profile Send private message 
Dougal


Joined: 19 Oct 2005
Posts: 2505
Location: Hell more grotesque than any medieval woodcut

PostPosted: Mon 04 Apr 2011, 15:49    Post subject: Re: Anyone building in a chroot environment?  

2lss wrote:
I tried setting some variables, like PATH, LD_LIBRARY_PATH, PKG_CONFIG_PATH, LANG, and a few others but nothing made a difference.

You should just source /etc/profile (assuming bash isn't doing it itself).
This way some, hmm, esoteric things like USER will be set.

Whenever I update my sfs I use chroot for running indexgen.sh and fixmenus and they work fine. For running any serious programs you'll want to do what Joe suggested, 'though what you really want is to run /etc/rc.d/rc.sysinit but without all the module loading... there's all kinds of stuff like setting the hostname etc.

_________________
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind
Back to top
View user's profile Send private message 
mmmrr


Joined: 03 Mar 2009
Posts: 142
Location: vancouver island, canada

PostPosted: Mon 04 Apr 2011, 16:41    Post subject:  

after i lay down it occurred to me where i wasn't understanding

joe, were you suggesting that i make a practice run in chroot by
building a mintppc inside the existing mintppc? the more i think
about it the more it makes sense. i do feel slow.

it makes sense but i was hoping to follow the lead of the original
poster, put pup431 plus devx, unpacked from sfs, into a directory,
chmod them, chroot them, following the op's coding

then use yr coding, given in yr first reply, and see where i got.

i'd expect to have to do a bunch of tweaking, as you say, but
i would be using my learning curve on my actual goal, puppy.

anyway, thanks, mm
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [11 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0772s ][ Queries: 11 (0.0056s) ][ GZIP on ]