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

Shabazian, Chip chip.shabazian at bankofamerica.com
Tue Feb 24 17:05:35 UTC 2009


Remember that you can run multiple %post sections, moving in and out of
chroot as much as you want too:

%post --nochroot
All my non chrooted tasks

%post
All my chrooted tasks


-----Original Message-----
From: kickstart-list-bounces at redhat.com
[mailto:kickstart-list-bounces at redhat.com] On Behalf Of John Oliver
Sent: Tuesday, February 24, 2009 7:53 AM
To: Discussion list about Kickstart
Subject: Re: chroot /path/to/start/in Multi-COMMAND

On Tue, Feb 24, 2009 at 01:21:49AM -0500, 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 )
> 
> except kickstart errors it out, complianing about the open paren.
> 
> 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.

I deal with this by copying over a script that does this stuff to /tmp,
then echo "/tmp/firstboot.sh" >> /etc/rc.d/rc.local  The last couple of
lines in firstboot.sh remove that line from rc.local and reboot the
machine.

It is a little messy, but it works, and I have the RPM db and such
available to me because the system is actually running from the
installed OS.

-- 
***********************************************************************
* John Oliver                             http://www.john-oliver.net/ *
*                                                                     *
***********************************************************************

_______________________________________________
Kickstart-list mailing list
Kickstart-list at redhat.com
https://www.redhat.com/mailman/listinfo/kickstart-list




More information about the Kickstart-list mailing list