%post section of Fedora8 kickstart install doesn't run
Fedora - InstallationThis forum is for the discussion of installation issues with Fedora.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
%post section of Fedora8 kickstart install doesn't run
I've used kickstart pretty well to do most of the installation of Fedora8, but I'd like to do a few things in the %POST section, but I can't seem to get it to work. Specifically, the commands in the %POST section don't get executed. I've edited the .cfg file with system-config-kickstart, so I don't think there's a syntax problem. The relevant section of the .cfg file is:
%post --nochroot
mkdir /students
mkdir /usr/network
mount -o nolock 149.130.136.19:/usr/network /usr/network
open -s -w -- /usr/network/scripts/fedora-client.script yes
%end
Even the first command, to make the /students directory, doesn't happen. That is, when I go to the machine after kickstart completes, the directory doesn't exist. I've looked in /root/install.log and /root/install.log.syslog, and I see no errors or other notations. I've looked in /root/anaconda-ks.cfg and the same %post section is there, so it seems to have "read" the commands.
Any ideas what I'm doing wrong or how to debug this? I'd be happy to post the entire kickstart file if necessary.
It's making the directories, it is just making them in the ramfs that the installer creates when it boots since you told it to NOT use a chrooted environment (the chrooted environment == your future system, non-chrooted environment == the installer's environment).
What you want is:
Code:
%post --nochroot
mkdir /mnt/sysimage/students
mkdir /mnt/sysimage/usr/network
mount -o nolock 149.130.136.19:/usr/network /mnt/sysimage/usr/network
open -s -w -- /mnt/sysimage/usr/network/scripts/fedora-client.script yes
%end
OR
Code:
%post
mkdir /students
mkdir /usr/network
mount -o nolock 149.130.136.19:/usr/network /usr/network
open -s -w -- /usr/network/scripts/fedora-client.script yes
%end
I'm guessing you want the second one since you probably want to have the script you are running to affect the new system and not the installer system.
Doh! Thank you, Forestt! I was mis-understanding what the nochroot was doing, probably because of reading a mailing list that is constantly referring to "chroot jails" and that seemed like what I didn't want. But I now see that "chroot" is exactly what I want.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.