Linux - EnterpriseThis forum is for all items relating to using Linux in the Enterprise.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am trying to mount the cdrom in the post section of a kickstart install (on Red Hat 5), but I get the error message :
Block device required
I am doing this from the --nochroot section of the ks like so, but it refuses to mount the device. However, if I later login as root(post reboot), I am able to complete these steps correctly. So its definitely something to do with being in the post section of the kicstart, and not related to me pointing to the incorrect /dev/.. location.
Any ideas???
Oh and I have configured selinux to --permissive. (Does this affect the cdrom mounting? should I disable it?)
-----------ks snippet-------------------------
%post --nochroot
# mount the cdrom
# If no symlink for /dev/cdrom, find the cd-rom device and make one
(cddev="`dmesg | grep '^[sh]d.:' | grep -i cd | head -1 | cut -d: -f1`"
mkdir -p /mnt/cdrom
mount -t iso9660 -o ro /mnt/cdrom /dev/$cddev
# copy over the customized installer
echo "Copying $INSTALLER.gz from the CDROM."
cp /mnt/cdrom/$INSTALLER.gz /tmp
umount -f /mnt/cdrom
gunzip /tmp/$INSTALLER.gz
# run the installer
chmod 755 /tmp/$INSTALLER
echo "Running the $PRODUCTNAME installer."
/tmp/$INSTALLER -i silent
# unmount cdrom & remove the installer
rmdir /mnt/cdrom
rm -f /tmp/$INSTALLER) 2>&1 | tee /post-install.log | tee /dev/console
I'm having the EXACT same issue....and am trying to do the very same thing, copy the final build scripts, etc. off of cdrom. I've determined, as you have that in a --nochroot environment, the cdrom is NOT mounted:
Here is what we have mounted
Filesystem 1K-blocks Used Available Use% Mounted on
/dev 127812 0 127812 0% /dev
/tmp/loop0 83264 83264 0 100% /mnt/runtime
/dev/System/root 6094400 1288952 4490876 23% /mnt/sysimage
/dev/System/tmp 4062912 139396 3713804 4% /mnt/sysimage/tmp
/dev/System/csm 507748 18768 462766 4% /mnt/sysimage/csm
/tmp/sda1 124427 11727 106276 10% /mnt/sysimage/boot
/dev 127812 0 127812 0% /mnt/sysimage/dev
Not only that, but the shell environment seems limited. All this works of course when I execute the very same ks.cfg from a network build (difference of course is I specify network vice cdrom)
Are you trying to mount an ISO to a virtual cdrom device as well?
dakotak1d, it turns out the issue is with the anaconda code itself. It ejects the CD before it runs the post section of the ks file.
I followed the directions here and my customized cd is working like a charm. Go ahead and switch the order of the "methodcomplete" and "dopostaction" calls, recompile to get a new stage2.img, replace it in your distrib, and you should be fine.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.