RHEL5 - copy files from DVD during %post
John Oliver
joliver at john-oliver.net
Fri Feb 13 02:43:06 UTC 2009
On Tue, Feb 10, 2009 at 11:02:30PM -0600, Gerald Waugh wrote:
>
> John,
>
> I used unsquashfs for stage2, edited usr/lib/anaconda/dispatch.py
> changing the following lines.
> ("methodcomplete", doMethodComplete, ),
> ("dopostaction", doPostAction, ),
> changed to;
> ("dopostaction", doPostAction, ),
> ("methodcomplete", doMethodComplete, ),
> ran ksquashfs on the unsquashed stage2 and it worked fine! :)
>
> full description below... I was using BlueOnyx-5.2-20090107.iso
> ==================================================================
> # Do the following to fix the issue not running %post scripts:
> # Note that the *.img files use the squashfs file system.
> # if the tools are not on the system yum install them.
> yum -y install squashfs-tools mkisofs cdrecord
> # insert install-cd into cdrom
> mkdir /mnt/cdrom
> mount /dev/cdrom /mnt/cdrom
> mkdir /home/BlueOnyx
> mkdir /home/BlueOnyx/ISOs
> 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
> cp /mnt/cdrom/.discinfo .
> umount /mnt/cdrom
> # remove the install cd and insert a fresh CD
> cd /home/BlueOnyx/BlueOnyx-5.2-20090107/images
> unsquashfs stage2.img
> cd squashfs-root
> vi usr/lib/anaconda/dispatch.py
> # find these lines (need to reverse them)
> ("methodcomplete", doMethodComplete, ),
> ("dopostaction", doPostAction, ),
> #and change to
> ("dopostaction", doPostAction, ),
> ("methodcomplete", doMethodComplete, ),
> # note with vi you will have to use :w! to write the ro file
> # recreate the ram file system:
> cd ..
> mksquashfs squashfs-root ../../stage2.img
> cp ../../stage2.img stage2.img
Thanks, Gerald... this is the first time I've seen unsquashfs mentioned.
I am very hopeful, and will be testing on Tuesday!
--
***********************************************************************
* John Oliver http://www.john-oliver.net/ *
* *
***********************************************************************
More information about the Kickstart-list
mailing list