Help with a ks.cfg problem

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

 



Hey all,

I am kind of new to Linux, and I am attempting to fix a kernel panic with my
kickstart. I am trying to fix an apm problem on our laptops. We manually do
the fix now by running the grub editor when the system is loaded and add
apm=off to the second line. Once the system is loaded we add that to the
grub.conf. This fixes the kernel panic. What I am trying to do is add
something to the %post script section of my kickstart. The kickstart works
perfectly except for the %post scripts. I cannot figure out how to either

a. copy a new grub.conf from my cdrom to the /boot/grub/ directory

or

b. write to the current grub.conf file

I have tried it a couple of different ways, but none seem to work.
First I tried this:

#########################################################
#This will allow the computer to turn off the APM support
#########################################################
cp /boot/grub/grub.conf /boot/grub/grub.conf.orig
cp /mnt/cdrom/grub/grub.conf /boot/grub/grub.conf

It didn't work, then I tried this:

#######################################################
#fix the /boot/grub/grub.conf file - it defaults to a
#apm which causes a kernel panic
#######################################################
if ( ! -e /boot/grub/grub.conf.orig ) then
cp /boot/grub/grub.conf /boot/grub/grub.conf.orig
sed -e 's/ide-scsi/ide-scsi apm=off/' /boot/grub/grub.conf.orig >
/boot/grub/grub.conf
endif

It did not work, finally I am trying this:

#######################################################
#fix the /boot/grub/grub.conf file - it defaults to a
#apm which causes a kernel panic
#######################################################
if ( ! -e /boot/grub/grub.conf.orig ) then
cp /boot/grub/grub.conf /mnt/sysimage/boot/grub/grub.conf.orig
sed -e 's/ide-scsi/ide-scsi apm=off/' /mnt/sysimage/boot/grub/grub.conf.orig
> /mnt/sysimage/boot/grub/grub.conf
endif

The system is loading right now.

Thanks

Tony




-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux