I'm trying to move 3 PC classrooms from RHELws4 to fedora-8. The RHELws4 installation is heavily customised using scripts in %post.
Hardware Dell 755
Fedora unity re-spin8 20080501, which uses anaconda version 11.3.0.50.
Installing i386 version for compatability with other hardware
My ks.cfg is below.
For historical reasons %post runs --nochroot. This was necessary in RHEL4ws to get things working, although it is not essentail. However there are over 1000 lines of /bin/sh script and I'd prefer to keep as close to the RHEL version as possible.
All goes well until %post runs. The contents of the %post section are completetly ignored. It appears that the %post statement is overwritten by
a %pre statement with some daft parameters. The installed system boots OK, but without the %post changes. In the anaconda-ks.cfg file which is left in /root, the following appears after the end of the %packages section:
%pre --logfile False --erroronfail
..
the contents of my post section
..
%end
I've tried fiddling with the ks file:
place %end at the end of %packages section before %post:
fails as above
simlified %post section:
%post
echo "Hello World" >/root/gotcha
%end
fails as above
give it a null %pre script:
anaconda crashes before the install starts.
python back-trace on the console...
File "/usr/lib/anaconda/kickstart.py", line 90, in run
os.chmod("%s" "messages, 0600)
OSError: [Errno 2} No such file or directory: 'False'
install exited abnormally [1/1]
If anyone can point me at details about the use of %post which is relevant to the anaconda version (above),I'd be very grateful. Especially options on the %post statement and the environment in which the %post script runs: PATH, USER etc. I can find very little detail on this using google or from the RedHat site, but I can infer there's things I don't know, from browsing the fedora forum.
Any help appreciated.
#######################
# Classroom Dell 755 build script
#######################
#XWindows configuration information
xconfig --depth 24 --resolution 1280x1024 --defaultdesktop gnome --startxonboot
#System language
lang en_US.UTF-8
#System keyboard
keyboard uk
#System timezone
timezone --utc Europe/London
#SElinux extensions: enforcing breaks various things
selinux --permissive
#Root password
rootpw --iscrypted ....................
#Reboot after installation
#reboot
#Install Fedora Linux instead of upgrade
install
#Use NFS installation Media
nfs --server=1.2.3.4 --dir=/export/install/Fedora-8/iso
#System bootloader configuration
bootloader --location=mbr --append rhgb quiet --md5pass=........
#Clear the Master Boot Record
zerombr yes
#Partition clearing information
clearpart --all
#Disk partitioning information
part /boot --fstype ext3 --size 256
part /tmp --fstype ext3 --size 8192
part swap --size 4096
part / --fstype ext3 --size 1 --grow
#System authorization infomation
auth --useshadow --enablemd5
#Network information
network --bootproto=dhcp --device=eth0
#Firewall configuration
firewall --enabled --port=ssh:tcp
#Package install information
%packages
@ admin-tools
@ base
@ base-x
@ core
@ editors
@ gnome-desktop
@ system-tools
%end
%post
echo "Hello World" >/root/gotcha
%end