chroot /path/to/start/in Multi-COMMAND

Kyle Powell kpowell at redhat.com
Tue Feb 24 15:36:29 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Joe_Wulf wrote:
> Hi everyone
> 
> I've got a script that works its magic on the local directory, since it could be
> anywhere (by design).
> In a %post --nochroot'd environment, I'd created the following command:
> 
> chroot /mnt/sysimage  ( cd /workingdir; myscript )

I'm not sure why you're running chroot in a %post --nochroot script. Seems like
it'd be easier to just run "myscript" in a regular %post script. But you could
give this a shot:

chroot /mnt/sysimage /mnt/sysimage/workingdir/myscript

This will run /mnt/sysimage/workingdir/myscript with /mnt/sysimage as /.

> I'd looked on the fedora anaconda/kickstart site for further guidance, but it
> doesn't even list
> chroot as an available command, much less document/explain it.

Because the chroot utility is not provided by anaconda. It's part of the
coreutils package.
- --
Kyle Powell | Red Hat | Senior Consultant, RHCE
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFJpBP97pTtanQdBU4RAgbeAJ0QSXHzpOr7MYJkOwdg0rEKVgYB8QCeJuyh
7qwrRIiNQfq7A1thlDTcRGI=
=1HTB
-----END PGP SIGNATURE-----




More information about the Kickstart-list mailing list