LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora > Fedora - Installation
User Name
Password
Fedora - Installation This forum is for the discussion of installation issues with Fedora.

Notices

Reply
 
Search this Thread
Old 07-29-2008, 11:02 PM   #1
scott.anderson
Member
 
Registered: Mar 2005
Location: Natick, MA
Distribution: Redhat EL 5.2, Fedora 8
Posts: 30

Rep: Reputation: 15
%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.

Thanks,

Scott
 
Old 07-30-2008, 03:58 PM   #2
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
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.

HTH

Forrest
 
Old 07-31-2008, 09:41 AM   #3
scott.anderson
Member
 
Registered: Mar 2005
Location: Natick, MA
Distribution: Redhat EL 5.2, Fedora 8
Posts: 30

Original Poster
Rep: Reputation: 15
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.

I also found the following:

http://www.redhat.com/docs/manuals/e...allconfig.html

That page doesn't describe the effect of chroot well, but does give some useful examples.

Thanks again,

Scott
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with kickstart post section Hairman Red Hat 2 05-14-2007 02:35 PM
FC6 kickstart doesn't post install pete@cosc. Fedora - Installation 2 01-15-2007 09:54 PM
Unable to run post-Installation kickstart scripts zoulo Linux - Enterprise 0 07-05-2005 04:26 AM
Using parted in the pre section of my kickstart install davidr Linux - Software 0 12-09-2004 07:53 PM
Kickstart Post-install tasks TheRealDeal Linux - General 0 09-03-2003 02:13 AM


All times are GMT -5. The time now is 05:11 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration