Installs OK, but doesn't boot

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

 



I am installing RH 7.2 on a tyan motherboard with DHCP.  It
installs OK and usually boots OK [if the install is configured
to use lilo] after the install is finished. But it seems that
if I reboot it again, it gets stuck in loading linux. 
Also, if change the kickstart file so that it uses grub, then
after the install, it never boots, but instead it gets stuck 
in Grub stage 2.

Attached is a copy of my kickstart file. As you can see,
I have tried to use the console over the serial port -
which worked for me in 7.0 and 7.2. But for now I have 
the section commented out of the post section to make sure
that is not the cause of the booting problem.

I'd appreciate any ideas or suggestions.

- Mark
# Kickstart file automatically generated by anaconda.

install --text
lang en_US
langsupport --default en_US en_US

nfs --server nac.redswitch.com --dir /vol/volB/linux/redhat72os

keyboard us
mouse generic3ps/2
#xconfig --hsync 31.5-48.5 --vsync 50-70 --resolution 1024x768 --depth 16
# network --device eth0 --bootproto static --ip 192.168.5.7 --netmask 255.255.255.0 --gateway 192.168.5.1 --nameserver 192.168.5.252 --hostname linuxtst.redswitch.com
network --bootproto dhcp
rootpw --iscrypted $1$fdGNÙyçJ$ZhwK5HhRHiN7sH3Hodmb81
firewall --disabled
auth --enablenis --nisdomain redswitch.com
timezone America/Tijuana
skipx yes
bootloader --useLilo --location mbr
# Use grub instead
#bootloader --location mbr
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
zerombr yes
clearpart --all --drives=hda
part /boot --size=50 --ondisk=hda
part /usr --fstype ext3 --size=2200 --grow --ondisk=hda
part swap --size=1000 --grow --maxsize=2000 --ondisk=hda
part /var --fstype ext3 --size=512
part /local --fstype ext3 --size=512 --grow
part / --size=1500 --ondisk=hda

#reboot

%packages
mgetty
mtools
rusers
kernel-source
transfig
xfig

@ Printing Support
@ Classic X Window System
@ GNOME
@ KDE
@ Sound and Multimedia Support
@ Network Support
#@ Dialup Support
@ Messaging and Web Tools
@ Server
balsa
kdenetwork
esound-devel
rsync
kdemultimedia
compat-libstdc++
arpwatch
mozilla-mail
VFlib2-devel
gaim
SDL_image
glade
libesmtp
gnome-games
ddd
magicdev
libgtop-devel
libpcap
gnome-pim-devel
libghttp-devel
gdk-pixbuf-devel
fam-devel
pan
SDL
ORBit-devel
libunicode-devel
freetype-devel
licq-kde
libogg-devel
gnome-core-devel
shapecfg
rp3
rhn_register-gnome
lesstif-devel
doxygen
redhat-config-network
kdebindings
#timidity++
libglade-devel
#xawtv
libvorbis-devel
kdeaddons-noatun
nmap-frontend
htmlview
oaf-devel
up2date-gnome
mozilla-psm
gsm-devel
#smpeg
GConf-devel
qt-designer
kdoc
ical
licq
libxml-devel
kdebindings-kmozilla
xisdnload
gnome-games-devel
bonobo-devel
qt-devel
kdesdk
kdenetwork-ppp
kdelibs-devel
autorun
SDL_net
licq-gnome
XFree86-devel
exmh
kdevelop
netscape-communicator
gnome-media
SDL_mixer
vnc-server
Xaw3d-devel
librep-devel
control-center-devel
openssh-askpass-gnome
libungif-devel
xmms-gnome
memprof
vnc
gcc-objc
glib-devel
kdelibs-sound-devel
pilot-link-devel
emacs-X11
kpppload
firewall-config
Mesa-devel
kdesdk-devel
netpbm-devel
xpdf
libao-devel
imlib-devel
xmms
kdbg
libmng-devel
openssh-askpass
gnome-libs-devel
audiofile-devel
usbview
netscape-common
#cdrecord-devel
galeon
gq
gtk+-devel

%post

echo "Entering post section" >> /tmp/install.log
         
echo "Locking interface to 100Mbps/Full Duplex" >> /tmp/install.log
cp -p /etc/modules.conf /etc/modules.conf-
grep "options=" /etc/modules.conf >> /tmp/install.log || ( \
sed -e 's/eepro100/eepro100 options=0x30/' /etc/modules.conf > /etc/temp ;\
mv /etc/temp /etc/modules.conf )

SPEED=9600
PORT=0
# echo "Setting up serial console" >> /tmp/install.log
# cp -p /etc/lilo.conf /etc/lilo.conf-
# sed -e '/serial=/d' \
# -e 's/^message=/# &/' \
# -e '/default=linux/i\
# serial='${PORT}','${SPEED}'n8' \
# -e '/append="console=/d' \
# -e '/root=/a\
# 	append="console=tty0 console=ttyS'${PORT}','${SPEED}'n81"' /etc/lilo.conf > /etc/tmp
# mv /etc/tmp /etc/lilo.conf
## Run the lilo command
# lilo

# Allow root login over serial port
grep "ttyS${PORT}" /etc/securetty || echo ttyS${PORT} >> /etc/securetty

# Set up inittab to run mgetty
cp -p /etc/inittab /etc/inittab-
sed -e '/ttyS/d' \
-e '/Run gett/a\
s1:12345:respawn:/sbin/mgetty -r ttyS'${PORT}' DT'${SPEED}' vt100' /etc/inittab > /etc/tmp
mv /etc/tmp /etc/inittab

# Set up mgetty.config file
cp -p /etc/mgetty+sendfax/mgetty.config /etc/mgetty+sendfax/mgetty.config-
sed -e '/ direct connection of a VT100/a\
port ttyS'${PORT}' \
  speed '${SPEED}' \
  direct y \
  data-only y \
  toggle-dtr no \
  need-dsr yes \
  port-owner root \
  port-mode 600 ' /etc/mgetty+sendfax/mgetty.config > /etc/mgetty+sendfax/tmp
mv /etc/mgetty+sendfax/tmp /etc/mgetty+sendfax/mgetty.config

# Fix /etc/sysconfig/init
cp -p /etc/sysconfig/init  /etc/sysconfig/init-
sed -e 's/BOOTUP=color/BOOTUP=serial/' \
-e 's/PROMPT=yes/PROMPT=no/' /etc/sysconfig/init > /etc/tmp
mv /etc/tmp /etc/sysconfig/init

# Fix /etc/sysconfig/kudzu
cp -p /etc/sysconfig/kudzu /etc/sysconfig/kudzu-
sed -e 's/SAFE=no/SAFE=yes/' /etc/sysconfig/kudzu > /etc/tmp
mv /etc/tmp /etc/sysconfig/init

echo "Turning on Magic sysrq" >> /tmp/install.log
cp -p /etc/sysctl.conf /etc/sysctl.conf-
sed -e 's/kernel.sysrq = 0/kernel.sysrq = 1/' -e 's/Disables the magic/Enables the magic/' /etc/sysctl.conf- > /etc/sysctl.conf


echo "Adding second nameserver" >> /tmp/install.log
# add another nameserver
echo "nameserver 192.168.3.252" >> /etc/resolv.conf


echo "Setting up ethernet" >> /tmp/install.log
ls -l /etc/sysconfig/network-scripts/ifcfg-eth0 >> /tmp/install.log
cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/bak.eth0
sed -e s/ONBOOT=\"no\"/ONBOOT=\"yes\"/ -e s/ONBOOT=no/ONBOOT=yes/ /etc/sysconfig/network-scripts/ifcfg-eth0 > /etc/sysconfig/network-scripts/temp
mv /etc/sysconfig/network-scripts/temp /etc/sysconfig/network-scripts/ifcfg-eth0

echo "Setting up nsswitch.conf" >> /tmp/install.log

cat > /etc/nsswitch.conf <<EOF
# /etc/nsswitch.conf 
# use dns for hosts, and nis for all else

# the following two lines obviate the "+" entry in /etc/passwd and /etc/group.
passwd:     files nis
group:      files nis

# consult /etc "files" only if nis is down.
hosts:      dns nis [NOTFOUND=return] files
networks:   nis [NOTFOUND=return] files
protocols:  nis [NOTFOUND=return] files
rpc:        nis [NOTFOUND=return] files
ethers:     nis [NOTFOUND=return] files
netmasks:   nis [NOTFOUND=return] files
bootparams: nis [NOTFOUND=return] files
publickey:  nis [NOTFOUND=return] files

netgroup:   nis

automount:  files nis
aliases:    files nis

# for efficient getservbyname() avoid nis
services:   files nis
sendmailvars:   files
EOF

# "Setting up links"
echo "Setting up links for perl and bash" >> /tmp/install.log
mkdir -p /usr/is/bin
ln -s /bin/bash /usr/is/bin/bash
ln -s /bin/tcsh /usr/is/bin/tcsh
ln -s /usr/bin/perl /usr/is/bin/perl

echo "Setting up rc links for ntpd" >> /tmp/install.log
# Start and stop ntpd appropriately
ln -s /etc/init.d/ntpd /etc/rc3.d/S55ntpd
ln -s /etc/init.d/ntpd /etc/rc0.d/K10ntpd
ln -s /etc/init.d/ntpd /etc/rc1.d/K10ntpd
ln -s /etc/init.d/ntpd /etc/rc2.d/K10ntpd
ln -s /etc/init.d/ntpd /etc/rc4.d/K10ntpd
ln -s /etc/init.d/ntpd /etc/rc5.d/K10ntpd
ln -s /etc/init.d/ntpd /etc/rc6.d/K10ntpd

echo "Disable unused services" >> /tmp/install.log
# Disable unused services
# apmd - only for laptops
for f in  `ls /etc/rc?.d/S*apmd` ;
do 
  mv  $f `echo $f | sed -e s/S/s/`
done
for f in  `ls /etc/rc?.d/S*rhnsd` ;
do 
  mv  $f `echo $f | sed -e s/S/s/`
done

# "Setting up syslog.conf"
echo "Setting up syslog.conf" >> /tmp/install.log
echo "# All messages, warning and higher to loghost" >> /etc/syslog.conf
echo "*.warning						@loghost" >> /etc/syslog.conf

## Allowing for remote login
echo "Allowing for remote login" >> /tmp/install.log
mv /etc/xinetd.d/rlogin /etc/xinetd.d/rlogin-
sed 's/yes/no/' /etc/xinetd.d/rlogin- > /etc/xinetd.d/rlogin

## Allowing for remote shell
echo "Allowing for remote shell" >> /tmp/install.log
mv /etc/xinetd.d/rsh /etc/xinetd.d/rsh-
sed 's/yes/no/' /etc/xinetd.d/rsh- > /etc/xinetd.d/rsh

## Allowing for telnet
echo "Allowing for telnet" >> /tmp/install.log
mv /etc/xinetd.d/telnet /etc/xinetd.d/telnet-
sed 's/yes/no/' /etc/xinetd.d/telnet- > /etc/xinetd.d/telnet

## "Allowing for login as root"
#echo "Allowing for login as root" >> /tmp/install.log
#mv /etc/securetty /etc/securetty-

date > /etc/installdate

# setting up ntp
echo setting up ntp >> /tmp/install.log
echo tardis > /etc/ntp/step-tickers

echo "Giving access to /local" >> /tmp/install.log
chmod 777 /local
ls -ld /local >> /tmp/install.log

echo "Setting up printcap.local file" >> /tmp/install.log

echo "#" > /etc/printcap.local
echo "# Copyright (c) 1983 Regents of the University of California." >> /etc/printcap.local
echo "# All rights reserved." >> /etc/printcap.local
echo "#" >> /etc/printcap.local
echo "# Redistribution and use in source and binary forms are permitted" >> /etc/printcap.local
echo "# provided that this notice is preserved and that due credit is given" >> /etc/printcap.local
echo "# to the University of California at Berkeley. The name of the University" >> /etc/printcap.local
echo "# may not be used to endorse or promote products derived from this" >> /etc/printcap.local
echo "# software without specific prior written permission. This software" >> /etc/printcap.local
echo "# is provided ``as is'' without express or implied warranty." >> /etc/printcap.local
echo "#" >> /etc/printcap.local
echo "#	@(#)etc.printcap	5.2 (Berkeley) 5/5/88" >> /etc/printcap.local
echo "#" >> /etc/printcap.local

cat >> /etc/printcap.local <<EOF
#
# Generic printer:
#lp:lp=/dev/lp0:sd=/var/spool/lpd/lp0:sh
#
# typical remote printer entry
#ucbvax|vax|vx|ucbvax line printer:\\
#	:lp=:rm=ucbvax:sd=/usr/spool/vaxlpd:lf=/usr/adm/lpd-errs:
# HP Laser jet plus
#lp|hpj:\\
#        :lp=/dev/lp1:\\
#        :sd=/usr/spool/lp1:\\
#        :mx#0:\\
#        :of=/usr/spool/lp1/hpjlp:
#        :lf=/usr/spool/lp1/hp-log:
#
#
ps1|remote printer on pserver:\\
        :sd=/var/spool/lpd/ps1:\\
        :rm=pserver:\\
        :rp=ps1:\\
        :bk:sh:mx#0:

ps2_duplex|remote printer on pserver:\\
        :sd=/var/spool/lpd/ps2_duplex:\\
        :rm=pserver:\\
        :rp=ps2_duplex:\\
        :bk:sh:mx#0:

ps4_duplex|remote printer on pserver:\\
        :sd=/var/spool/lpd/ps4_duplex:\\
        :rm=pserver:\\
        :rp=ps4_duplex:\\
        :bk:sh:mx#0:

ps3|remote printer on pserver:\\
        :sd=/var/spool/lpd/ps3:\\
        :rm=pserver:\\
        :rp=ps3:\\
        :bk:sh:mx#0:

ps2|remote printer on pserver:\\
        :sd=/var/spool/lpd/ps2:\\
        :rm=pserver:\\
        :rp=ps2:\\
        :bk:sh:mx#0:

ps4|remote printer on pserver:\\
        :sd=/var/spool/lpd/ps4:\\
        :rm=pserver:\\
        :rp=ps4:\\
        :bk:sh:mx#0:
EOF

# making a record of what speed the
# machine is running at
dmesg | grep -i mhz >> /tmp/install.log

cp /tmp/install.log /root/install.log


[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