Re: RH7.1 Post Install Kernel

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

 



Forgot to tell... Of course the /etc/rc.sysconfig file is edited in the
%post section of the ks.cfg file... Like this:

%post

grep -v '^/sbin/hwclock' /etc/rc.sysconfig > /etc/rc.sysconfig.new
rm -f /etc/rc.sysconfig
mv /etc/rc.sysconfig.new /etc/rc.sysconfig

And yes, there's more than one way to do this...

- Wouter.

---------------------------------------------------------------
Wouter Liefting
Curriculum Owner Linux
IBM Learning Services
Tel. +31 (0)20 513 5057 (IBM)
Tel. +31 (0)252 625 202 (Home office)
Fax. +31 (0)20 513 2322
Internet: liefting@xxxxxxxxxx


"Wouter Liefting" <liefting@xxxxxxxxxx> on 10-06-2001 21:00:05

Please respond to kickstart-list@xxxxxxxxxx

To:   kickstart-list@xxxxxxxxxx
cc:
Subject:  Re: RH7.1 Post Install Kernel




Obviously, if your rtc's don't have batteries, it makes no sense trying to
read them anyway. Why not modify the /etc/rc.sysconfig file so that it
never tries to read the clock? Just use perl inline editing, or a grep -v,
or something that suits you, to disable the line /sbin/hwclock $CLOCKFLAGS.
You can then set the clock manually, for instance by adding the line
ntpdate <some server> as the last line of rc.local. (Need to install
ntpd-*.rpm, and need to have a time server running, but alas)

- Wouter.

---------------------------------------------------------------
Wouter Liefting
Curriculum Owner Linux
IBM Learning Services
Tel. +31 (0)20 513 5057 (IBM)
Tel. +31 (0)252 625 202 (Home office)
Fax. +31 (0)20 513 2322
Internet: liefting@xxxxxxxxxx


Dan Peterson <pete@xxxxxxx> on 08-06-2001 23:50:00

Please respond to kickstart-list@xxxxxxxxxx

To:   kickstart-list@xxxxxxxxxx
cc:
Subject:  RH7.1 Post Install Kernel




How/when is the post-install kernel generated?  Or, is there a generic
pre-compiled kernel somewhere on the installation that's used for all
platforms?

If it's a generic kernel used for all platforms, is there a .config
file somewhere that was used to generate this kernel?

I have a special box with limited devices and low memory:

  Cyrix CPU (pentium 166)
  32MB memory (some models only 16MB or 8MB)
  3-5GB disk
  ethernet card with boot ROM
  VGA
  no CD
  no floppy
  no mouse
  no battery for clock

I've converted the RH7.1 bootnet image into a bootp image and I'm able to
start the installation process using bootp.  My ks.cfg file does a clean
install using nfs and everything works fine.

The problem comes when I reboot the box for the first time (at the end of
the install) and boot the kernel.  It get's to the point where
/etc/rc.d/rc.sysinit is running, just after mounting /proc then hangs.
I've tracked it down to where it's running /sbin/hwclock.

Rebooting with "linux init=/bin/bash" let me get in and manually run
/sbin/hwclock with --debug and it appears the RTC never responds.

I've discovered that if I rebuild the kernel with just the right settings
(and I haven't tracked down all the right settings yet), I can get it to
boot just fine.

When I started to compare stuff between my custom kernel and the
post-install kernel, I noticed the RTC driver is missing in my custom
kernel.  Running /sbin/hwclock ... --debug shows:

  hwclock 2.4c/util-linux-2.10s
  hwclock: Open of /dev/rtc failed, errno=19: No such device.
  Using direct I/O instructions to ISA clock.
  Assuming hardware clock is kept in UTC time.
  Waiting for clock tick...
  ... got clock tick
  <and continues fine and does it's job>

Doing "cat /proc/driver/rtc" fails with:

  cat: /proc/driver/rtc: No such file or directory

Which makes sense since the driver is not available.

Running /sbin/hwclock ... --debug on the post-install kernel shows:

  hwclock 2.4c/util-linux-2.10s
  Using /dev/rtc interface to clock.
  Assuming hardware clock is kept in UTC time.
  Waiting for clock tick...

At this point it just hangs.

Doing "cat /proc/driver/rtc" shows:

  rtc_time      : 00:03:09
  rtc_date      : 1988-01-01
  rtc_epoch     : 1900
  alarm         : 00:00:00
  DST_enable    : yes
  BCD           : yes
  24hr          : yes
  square_wave   : no
  alarm_IRQ     : no
  update_IRQ    : no
  periodic_IRQ  : no
  periodic_freq : 1024
  batt_status   : dead

All this is a bit beside the point, which is, how can I generate a custom
kernel which is used the first time the box is booted after the install??

And, is there a .config file associated with the post-install kernel?



_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/kickstart-list





_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/kickstart-list







[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