RHEL5 - copy files from DVD during %post
Greg Morgan
drkludge at cox.net
Sun Feb 8 17:27:01 UTC 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Gerald Waugh wrote:
| I tried to the cdrom eject issue using below,
| but I can't seem to edit the file in my stage2-image directory below
| as I get the error that it is a read only file.
| Note using an ISO BlueOnyx-5.2-20090107 from
| http://www.blueonyx.it/pub/BlueOnyx/ISO/
| I have used this procedure on an old mandrake system and had no
| problems.
|
| # insert install-cd into cdrom
| mkdir /mnt/cdrom
| mount /dev/cdrom /mnt/cdrom
| mkdir /home/BlueOnyx
| mkdir /home/BlueOnyx/BlueOnyx-5.2-20090107
| cd /mnt/cdrom
| # move the iso to a rw area
| tar -c * | tar -C /home/BlueOnyx/BlueOnyx-5.2-20090107 -xf-
| cd /home/BlueOnyx/BlueOnyx-5.2-20090107
| mkdir ../stage2-image
| mount -o loop -t squashfs images/stage2.img ../stage2-image
Treat squashfs just like the iso mount as squashfs is a readonly file
system just like the iso is. You have to copy the files to a read/write
area to edit them. The -w short for -o rw gives no joy to prove out
where you are having trouble. You will still get the readonly file
system message.
~ mount -o loop -t squashfs -w /mnt/iso/images/install.img /mnt/stage
| cd ../stage2-image
| vi usr/lib/anaconda/kickstart.py
|
| Tried to add
| * add this line into the setSteps function
| dispatch.skipStep("methodcomplete")
| * to recreate the ram file system:
|
| Get Error about file not writeable. I can't seem to chmod it as
| writeable.
[root at kaa ~]# cd /mnt/stage
[root at kaa stage]# mkdir -p /mnt/stage2
[root at kaa stage]# cp -rp * !$
cp -rp * /mnt/stage2
[root at kaa stage]# cd !$
cd /mnt/stage2
[root at kaa stage2]# ls
etc firmware lib modules proc usr var
[root at kaa stage2]# cd usr/lib/anaconda
[root at kaa anaconda]# ls -l kick*
- -r--r--r-- 1 root root 47267 2008-11-19 09:24 kickstart.py
lrwxrwxrwx 1 root root 9 2009-02-08 10:14 kickstart.pyc -> /dev/null
[root at kaa anaconda]# chmod u+w kickstart.py
[root at kaa anaconda]# ls -l !$
ls -l kickstart.py
- -rw-r--r-- 1 root root 47267 2008-11-19 09:24 kickstart.py
[root at kaa anaconda]# vim kickstart.py
[root at kaa anaconda]#
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iEYEARECAAYFAkmPFeUACgkQxyxe5L6mr7LQywCfauLRfCc+2YOE2wmmQdrxWep8
oNQAnjeE4datqLtgHSK4whOR/CmysXEZ
=NgeL
-----END PGP SIGNATURE-----
More information about the Kickstart-list
mailing list