<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:#606420;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink="#606420">

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>The important thing to know about this is
that you can run TWO %post sections.  In the first, you can copy whatever you
want from /tmp/your_dir to the chrooted /tmp, then you can use your current
%post within a chrooted environment<o:p></o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
kickstart-list-bounces@redhat.com [mailto:kickstart-list-bounces@redhat.com] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Kent Baxley<br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, March 24, 2008 8:38
AM<br>
<b><span style='font-weight:bold'>To:</span></b> kickstart-list@redhat.com<br>
<b><span style='font-weight:bold'>Subject:</span></b> using /dev/ram devices in
RHEL5 kickstarts</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>I'm researching a kickstart problem that deals with some of the
differences between RHEL4 and RHEL5.  In RHEL 4, I could create a RAM
drive and copy files to this RAM drive in the %pre script portion of
kickstart.  I would then open the RAM drive in the %post section. 
This allowed me to pass information from the Pre to the Post processing
scripts.  Because the %pre scripts do not have a local drive to write to
at this time in the installation process the became the easiest way tell the
post process scripts what went on during the pre script installation choices.<br>
<br>
In the past, I was able to use the following code to create a ram drive during
the %pre process of kickstart.<br>
<br>
mkdir /tmp/ramdisk<br>
mke2fs /dev/ram<br>
mount /dev/ram /tmp/ramdisk<br>
<br>
This code is right out of my kickstart.<br>
<br>
Once in the %post process<br>
<br>
mkdir /tmp/ramdisk<br>
mount /dev/ram /tmp/ramdisk<br>
<br>
Then I copy files from the /tmp/ramdisk mount point.<br>
<br>
<br>
The /dev/ram devices seem to be missing during the installation process, so,
the above code snippents don't seem to work anymore on RHEL5. I've found I can
work around this by doing something like:<br>
<br>
mknod /dev/ram b 1 0<br>
  <br>
Then continue with the steps above, however, why is /dev/ram seemingly not
created by default anymore in RHEL5? Should I be using another method from here
on out?<br>
<br>
Another possibility for passing data between %pre and %post environments, I've
found, could be:<br>
<br>
%pre<br>
Create a tmpfs ram drive<br>
Copy files to tmpfs<br>
<br>
%post --nochroot<br>
copy files from tmpfs ram drive to /mnt/sysimage/path<br>
<br>
%post<br>
.<br>
.<br>
<br>
Notice that the first %post allows for a nochroot flag so I can copy data from
the tmpfs. The second and last %post is where I would run my bash scripts after
the data in tmpfs has been copied to the local hard drive.<br>
<br>
So, my question is, will either option (run mknod to create /dev/ram or use
tmpfs) work, and what should I be doing for RHEL5 installs and beyond? 
I'm also open to any other suggestions. <br>
<br>
Thanks!<o:p></o:p></span></font></p>

</div>

</body>

</html>