Re: kexec instead of rebooting at the end of the install?

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

 



Matthew Miller wrote:
On Sat, Aug 05, 2006 at 10:00:57AM -0700, David N. Lombard wrote:

I then used a little perl scripty-foo to glom the kernel, initrd, and command line from grub.conf, then built and executed the kexec setup command in the post section of the kickstart file. After that in post, I remounted all file systems RO and executed the kexec boot.

Anyway, can I see your script?

  %post

  perl -n -e 's/^\s*//; s/#.*$//; s/\s*$//; next unless $_;' \
        -e '$k ||= $_ if /^kernel\s/;' \
        -e '$i ||= $_ if /^initrd\s/;' \
        -e 'END{' \
        -e ' exit unless $k;' \
        -e ' (undef,$kf,$c)=split(/\s+/,$k,3);' \
        -e ' print "kexec -l /boot$kf";' \
        -e ' print " --append=\"$c\"" if $c;' \
        -e ' print " --initrd=/boot",(split(/\s+/,$i))[1] if $i;' \
        -e '}' \
        /boot/grub/grub.conf | bash
  sync
  mount -a -r
  kexec -e

--
David N. Lombard
Rossmoor, Orange County, CA
http://www.fourmilab.ch/cgi-bin/uncgi/Earth?imgsize=320&opt=-z&lat=33.8&ns=North&lon=118.08&ew=West&alt=7&img=learth.evif


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux