Re: %post and mounting

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

 



Hi, all --

Here's a followup to clarify all of my meanderings in the hope that it
will make things easier for Those Who Come After.

...and then David @ BigFoot said...
% 
% ...and then David @ BigFoot said...
% ...
% % /etc/resolv.conf file, for instance) but cannot mount my central server
% % to copy a file from there.  I also do not see any debugging; I get the
...
% Once I created /mnt/cdrom I was able to mount the server by IP addr, so I
% can experiment from there.  I also found that the system is mounted at

I later learned that %post runs in a chrooted environment, which explains
why I didn't see the same things after the final reboot that I did during
the build.  The light bulb over my head was blindingly bright :-)

Mounting 

  server:/path/to/directory /mnt/cdrom

via IP address in the %post section mounted it where you'd expect --
that is, under /mnt/cdrom for the chrooted environment and really under
/mnt/sysimage/mnt/cdrom if you're free.

From there, I can copy files from /mnt/cdrom to /etc (say, resolv.conf)
just fine; just forget that there's anything outside the apparent system
and move on.

To turn on telnet and rsh, running

  chkconfig telnet on
  chkconfig rsh on

works just fine, though I hear that one could specify

  %post --nochroot
  ...
  chroot /mnt/sysimage chkconfig telnet on

to do the same thing if the chrooted environment caused problems.


Thanks to all for all of their help!

:-D
-- 
David T-G                       * It's easier to fight for one's principles
(play) davidtg@xxxxxxxxxxx      * than to live up to them. -- fortune cookie
(work) davidtgwork@xxxxxxxxxxx
http://www.bigfoot.com/~davidtg/        Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

Attachment: pgp8Al38zbQy8.pgp
Description: PGP signature


[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