[arch-general] chrooting / LiveCD
I've been reading several pieces of documentation about making a custom LiveCD, in particular the documentation for Archiso. Makefiles and bash are not my strong suit, so I may have misunderstood something. Among other things, we need to create a directory, say "prov", and populate it with an arch system. I tried this: mkdir -p prov/var/lib/pacman pacman -r prov -Sy pacman -r prov -S base This seems to work, although it had a complain about the directory "sys". My question is: to populate a directory with a base system plus some assorted stuff, can we do it with pacman -r? Or is it necessary to chroot into prov? (And if so, don't we need to use pacman -r to have a functional chroot dir to begin with?) I would understand the need for chroot if we were to compile software (I read LFS stuff...), to ensure correct library linking. But we're talking about binary packages... I'm just trying to get the big (and small) picture... TIA Jorge Almeida
2011/2/19 Jorge Almeida <jjalmeida@gmail.com>:
I've been reading several pieces of documentation about making a custom LiveCD, in particular the documentation for Archiso. Makefiles and bash are not my strong suit, so I may have misunderstood something. Among other things, we need to create a directory, say "prov", and populate it with an arch system. I tried this:
mkdir -p prov/var/lib/pacman pacman -r prov -Sy pacman -r prov -S base
This seems to work, although it had a complain about the directory "sys". My question is: to populate a directory with a base system plus some assorted stuff, can we do it with pacman -r? Or is it necessary to chroot into prov? (And if so, don't we need to use pacman -r to have a functional chroot dir to begin with?) I would understand the need for chroot if we were to compile software (I read LFS stuff...), to ensure correct library linking. But we're talking about binary packages...
I'm just trying to get the big (and small) picture...
TIA
Jorge Almeida
Well if I were you, I will use a clean chroot first, then l use that dir, plus I can add or test packages in the chroot itself -- Angel Velásquez angvp @ irc.freenode.net Arch Linux Developer / Trusted User Linux Counter: #359909 http://www.angvp.com
2011/2/19 Ángel Velásquez <angvp@archlinux.org>:
2011/2/19 Jorge Almeida <jjalmeida@gmail.com>:
I've been reading several pieces of documentation about making a custom LiveCD, in particular the documentation for Archiso. Makefiles and bash are not my strong suit, so I may have misunderstood something. Among other things, we need to create a directory, say "prov", and populate it with an arch system. I tried this:
mkdir -p prov/var/lib/pacman pacman -r prov -Sy pacman -r prov -S base
This seems to work, although it had a complain about the directory "sys". My question is: to populate a directory with a base system plus some assorted stuff, can we do it with pacman -r? Or is it necessary to chroot into prov? (And if so, don't we need to use pacman -r to have a functional chroot dir to begin with?) I would understand the need for chroot if we were to compile software (I read LFS stuff...), to ensure correct library linking. But we're talking about binary packages...
I'm just trying to get the big (and small) picture...
TIA
Jorge Almeida
Well if I were you, I will use a clean chroot first, then l use that dir, plus I can add or test packages in the chroot itself
OK, but how will you get a clean chroot to begin with? If not with pacman -r, how? Extracting some tarball? And is that different from using pacman -r? Thanks, anyway Jorge
[2011-02-19 14:36:51 +0000] Jorge Almeida:
OK, but how will you get a clean chroot to begin with? If not with pacman -r, how?
Via Google: https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroo... Explanation: For your chroot to work properly, you need virtual filesystems such as /proc to be mounted in it; the devtools script takes care of that. -- Gaetan
On Sat, Feb 19, 2011 at 2:51 PM, Gaetan Bisson <bisson@archlinux.org> wrote:
[2011-02-19 14:36:51 +0000] Jorge Almeida:
OK, but how will you get a clean chroot to begin with? If not with pacman -r, how?
Explanation: For your chroot to work properly, you need virtual filesystems such as /proc to be mounted in it; the devtools script takes care of that.
Absolutelly. That's how I installed Arch, BTW, I did it via ssh so burning a CD was not an option... I just didn't know there was a script for that. Anyway, I wanted some explanation about the rationale, as opposed to using a script blindly. As I said, I'm not good with Bash (I use Perl when I need to cook up some script for my own use) and reading the source gives me some idea but there are loose ends... Jorge
participants (3)
-
Gaetan Bisson
-
Jorge Almeida
-
Ángel Velásquez