Re: Accessing CD-ROM and Floppy from Kickstart POST section

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 8 Jun 2003, Jose J. Cintron wrote:

>I have a perl script that I put in the boot flopy that I would like to
>execute.  I've tried acessing the script with things like
>
>%post
>./myscript.pl
>
>%post --nochroot
>mkdir -p /mnt/myfloppy
># I also tried /mnt/floppy
>mount -o /tmp/fd0 /mnt/myfloppy
>if [ $? != 0 ]
>then
>   echo "ERROR: Could not mount Install CDROM!" >&2
>   exit 1
>fi
>/mnt/sysimage/usr/bin/perl /mnt/myfloppy/myscript.pl
>umount /mnt/myfloppy

In (chrooted) %post, you won't have /mnt/floppy until updfstab runs,
which is usually the first time kudzu runs on bootup. You could either
run it early:

/usr/sbin/updfstab
mount /mnt/floppy
perl /mnt/floppy/myscript.pl

or cheat and fetch the files with mtools:
mcopy a:myscript.pl /tmp
perl /tmp/myscript.pl



>I'm also having problems when I run the script on a machine with 2 CDs.
>  If I use te previous script with changes to mount the CD it will work
>as long as I only have one cd-rom, but if the machine has 2 cd-roms it
>won't work.  Ive tried
>
>mount -o ro /tmp/cdrom /mnt/mycd     <=this works with one cd
>mount -o ro /tmp/cdrom1 /mnt/mycd
>mount -o ro /tmp/scd0 /mnt/mycd
>mount -o ro /dev/cdrom1 /mnt/mycd
>mount -o ro /dev/scd0 /mnt/mycd

I don't know how multiple SCSI CD drives are labelled, but hopefully
you'll find that running updfstab creates suitable /etc/fstab and
/mnt entries to be able to run:

mount /mnt/cdrom1
perl /mnt/cdrom1/myscript.pl

or similar.


Hope this helps,
Phil




[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux