>> You have the 256 chars limit depending on the kernel you're using.
> > I believe it is still 256 in 2.6.20.
>
> Yes, but starting from 2.6.21 the limit has been increased to 2048 and moved 
> to
> a dynamic buffer:
>
> http://kernelnewbies.org/Linux_2_6_21#head-f32da7658f8c25efeb70d4784b6780edefff7d2c
Good news.  However, I can get around it as the network settings do what I need.

>
> >>
> >> If this limit is too small you can define additional parameters via
> >> local.cfg:
> >> - create a /tmp/local.cfg (see for example doc/examples/local.cfg, or
> >>
> >> http://svn.systemimager.org/filedetails.php?repname=systemimager&path=%2Ftrunk%2Fdoc%2Fexamples%2Flocal.cfg&rev=0&sc=0)
> >>
> >>
> >> - use si_mkbootpackage to re-create your kernel+initrd.img with your
> >> local.cfg
> >>   included. It is even possible to use BOEL with si_mkbootpackage, for
> >> example:
> >>
> >> # mkdir /tmp/boot-package/
> >> # si_mkbootpackage --destination /tmp/boot-package \
> >> --kernel /usr/share/systemimager/boot/i386/standard/kernel \
> >> --filesystem cramfs --config /tmp/local.cfg --yes
> >
> > Can I run a script on the host and copy files to /tmp in the initrd so
> > that they will be persisted and be present for my post-install
> > scripts?  I tested this and the /tmp/local.cfg in the initrd was NOT
> > read....
>
> mmh... remember that post-install scripts run chroot-ed in your image. So yo
> can't find the files that you put in the /tmp of your initrd.img.

Yep, found that out.

> > 1)  copy default initrd and kernel to /boot
> > 2)  run script that "customizes" the initrd.img and fixes grub.conf to
> > point to kernel/initrd.img
> > 3)  reboot and let it re-install
> > 4)  have a post-install script that checks for a variable, if present
> > runs /sbin/busybox reboot
>
> Why do you need that? isn't it the same thing as post-install action (beep,
> reboot, shutdown, kexec)?
It allows me to do two types of installs, one automatic reinstall with
reboot into
my new image, one manual via PXE (e.g., for new boxes).

> >> > I will have to write a post-install script to get these from
> >> > variables.txt and setup networking on the new image (e.g.,
> >> > 98all.setup_networking).
> >> >
> >> >>>> If you want to access them as env variables in your post-install
> >> scripts
> >> >>>> source the file /tmp/variables.txt on the top of your scripts.
> >> >>> Can I add my own variables to this file?
> >> >> Yes.
> >> >
> >> > How can I add my own?  I see how the kernel*txt file contains my own
> >> > vars, but they don't make it to variables.txt (for example, I defined
> >> > USER1=X,Y,Z).
> >>
> >> You can variableize the kernel parameters parsing /proc/cmdline and
> >> add the vars
> >> to /tmp/variables.txt. For example:
> >>
> >> cat /proc/cmdline | tr ' ' '\n' | grep '=' >
> >> /tmp/kernel_append_parameter_variables.txt
> >>
> >> >
> >> > FEATURE REQUEST:  Maybe a couple user variables could be added to si
> >> > such as USER1=string, USER2=string, and these could be copied to
> >> > variables.txt.  Another feature might be to also copy the kernel
> >> > variables file to /tmp/post-install?
> >>
> >> OK, appending kernel parameters to variables.txt seems a good idea (in
> >> a way
> >> similar to the script above). In this case we could have all the
> >> installation
> >> parameters as env variables available for our post-install scripts.
> >
> > They are already in the kernel*txt file (but that does not get copied
> > to the new system).
> >
> >> > FEATURE REQUEST:  Could we add awk to the default busybox image (good
> >> > for pre-install scripts that could use awk)?
> >>
> >> NACK. I think it's better to have a light initrd.img: this is very very
> >> important in massive installation when you have hundreds or thousands
> >> of nodes
> >> (typically HPC clusters) and the transfer of the initrd.img via TFTP
> >> could be a
> >> critical bottleneck in these cases.
> >
> > How much does "awk" add to the size of the initrd (which is already
> > quite big)?  Can the initrd iimage be shrunk by using uclibc?  A quick
> > test of making busybox 1.6.1 w/ and w/o awk:
> >
> >                       size               gziped
> >    w/o awk       290258          172421
> >    w/ awk         310460          184179
> >
> > Compressed (not -9, just gzip) delta is only about 12K.
>
> uclibc has been removed, due to a lot of incompatibility issues/problems. But 
> if
> awk is present in busybox I don't see any problem to include it into the 
> initrd
> (as you've reported the overhead is minimum). So, ok we'll include it.
>
> Curious: what kind of pre-install script you need to run (using awk)?
I was planning on having my pre-install query the old software install first
hence using awk (getting net stuff, etc.), but by passing the net parms
on the kernel command line, I can pass the minimum that I need for now.

I run a Perl script to setup the grub.conf, and it can do pretty much what
I want to collect info from the currently running system.

Cheers,
--
Wade Hampton

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
sisuite-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sisuite-users

Reply via email to