LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 09-06-2002, 07:43 AM   #1
aditya
Member
 
Registered: Aug 2002
Distribution: RH 7.x
Posts: 71

Rep: Reputation: 15
Thumbs down boot disk hangs


Hi folks,
I've made 2 floppy boot disk for RH 7.3. The first one, i.e., the one with the kernel boots alright, and asks for the second one (with the root file system).
But when I insert the second and press ENTER, the message snaps:

'Compressed Image found at block 0'.

But after that, nothing happens. I think something must be wrong with inittab, rc.sysinit, or rc.
So, I'm pasting the 3 below:


rc:
--------


#!/bin/bash
/bin/mount -av
/bin/hostname Kangaroo
#
# rc This file is responsible for starting/stopping
# services when the runlevel changes. It is also
# responsible for the very first setup of basic
# things, such as setting the hostname.
#
# Original Author:
# Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
#

# Now find out what the current and what the previous runlevel are.
argv1="$1"
runlevel=$2
previous=$1
export runlevel previous

# Source function library.
. /etc/init.d/functions

# See if we want to be in user confirmation mode
if [ "$previous" = "N" ]; then
CONFIRM=
fi

export CONFIRM

# Get first argument. Set new runlevel to this argument.
[ -n "$argv1" ] && runlevel="$argv1"

# Is there an rc directory for this new runlevel?
if [ -d /etc/rc$runlevel.d ]; then
# First, run the KILL scripts.
for i in /etc/rc$runlevel.d/K*; do
# Check if the script is there.
[ ! -f $i ] && continue

# Don't run [KS]??foo.{rpmsave,rpmorig} scripts
[ "${i%.rpmsave}" != "${i}" ] && continue
[ "${i%.rpmorig}" != "${i}" ] && continue
[ "${i%.rpmnew}" != "${i}" ] && continue

# Check if the subsystem is already up.
subsys=${i#/etc/rc$runlevel.d/K??}
continue

# Bring the subsystem down.
if egrep -q "(killproc |action )" $i ; then
$i stop
else
action $"Stopping $subsys: " $i stop
fi
done

# Now run the START scripts.
for i in /etc/rc$runlevel.d/S*; do
# Check if the script is there.
[ ! -f $i ] && continue

# Don't run [KS]??foo.{rpmsave,rpmorig} scripts
[ "${i%.rpmsave}" != "${i}" ] && continue
[ "${i%.rpmorig}" != "${i}" ] && continue
[ "${i%.rpmnew}" != "${i}" ] && continue

# Check if the subsystem is already up.
subsys=${i#/etc/rc$runlevel.d/S??}
continue

# If we're in confirmation mode, get user confirmation
[ -n "$CONFIRM" ] &&
{
confirm $subsys
case $? in
0)
:
;;
2)
CONFIRM=
;;
*)
continue
;;
esac
}

# Bring the subsystem up.
if egrep -q "(daemon |action )" $i ; then
$i start
else
action $"Starting $subsys: " $i start
fi
done
fi






rc.sysinit
----------------

#!/bin/bash
/bin/mount -av
/bin/hostname Kangaroo
#
# /etc/rc.sysinit - run once at boot time
#
# Taken in part from Miquel van Smoorenburg's bcheckrc.
#

# Set the path
PATH=/bin:/sbin
export PATH

HOSTNAME=`/bin/hostname`

NETWORKING=no

if [ -z "$HOSTNAME" -o "$HOSTNAME" = "(none)" ]; then
HOSTNAME=localhost
fi

# Source functions
. /etc/init.d/functions

# Mount /proc (done here so volume labels can work with fsck)

action $"Mounting proc filesystem: " mount -n -t proc /proc /proc

# Set the system clock.
ARC=0
SRM=0
UTC=0


CLOCKDEF=""

case "$UTC" in
yes|true)
CLOCKDEF="$CLOCKDEF (utc)";
;;
no|false)
CLOCKDEF="$CLOCKDEF (localtime)";
;;
esac

case "$ARC" in
yes|true)
CLOCKDEF="$CLOCKDEF (arc)";
;;
esac
case "$SRM" in
yes|true)
CLOCKDEF="$CLOCKDEF (srm)";
;;
esac


action $"Setting clock $CLOCKDEF: `date`" date


# Set the hostname.
action $"Setting hostname ${HOSTNAME}: " hostname ${HOSTNAME}


# check for arguments passed from kernel

PNP=yes

# set up pnp

# Remount the root filesystem read-write.
state=`awk '/(^\/dev\/root| \/ )/ { print $4 }' /proc/mounts`
[ "$state" != "rw" ] && \
action $"Remounting root filesystem in read-write mode: " mount -n -o remount,rw /

# Enter root, /proc and (potentially) /proc/bus/usb and devfs into mtab.
mount -f /
mount -f /proc

USEMODULES=


# Clean out /etc.
rm -f /fastboot /fsckoptions /forcefsck /.autofsck /halt /poweroff

# Do we need (w|u)tmpx files? We don't set them up, but the sysadmin might...
_NEED_XFILES=
[ -f /var/run/utmpx ] && _NEED_XFILES=1

# Clean up /var
# I'd use find, but /usr may not be mounted.
for afile in /var/run/*; do
if [ -d "$afile" ]; then
[ "`basename $afile`" != "news" -a "`basename $afile`" != "sudo" -a "`basename $afile`" != "mon" ] && rm -f $afile/*
else
rm -f $afile
fi
done
rm -f /var/lib/rpm/__db*

{
# Clean up utmp/wtmp
>/var/run/utmp
touch /var/log/wtmp
chgrp utmp /var/run/utmp /var/log/wtmp
chmod 0664 /var/run/utmp /var/log/wtmp
if [ -n "$_NEED_XFILES" ]; then
>/var/run/utmpx
touch /var/log/wtmpx
chgrp utmp /var/run/utmpx /var/log/wtmpx
chmod 0664 /var/run/utmpx /var/log/wtmpx
fi

# Delete X locks
rm -f /tmp/.X*-lock

# Delete VNC & X locks
rm -rf /tmp/.X*-unix

# Delete Postgres sockets
rm -f /tmp/.s.PGSQL.*

# Turn on harddisk optimization
# There is only one file /etc/sysconfig/harddisks for all disks
# after installing the hdparm-RPM. If you need different hdparm parameters
# for each of your disks, copy /etc/sysconfig/harddisks to
# /etc/sysconfig/harddiskhda (hdb, hdc...) and modify it.
# Each disk which has no special parameters will use the defaults.
# Each non-disk which has no special parameters will be ignored.
#

disk[0]=s;
disk[1]=hda; disk[2]=hdb; disk[3]=hdc; disk[4]=hdd;
disk[5]=hde; disk[6]=hdf; disk[7]=hdg; disk[8]=hdh;
disk[9]=hdi; disk[10]=hdj; disk[11]=hdk; disk[12]=hdl;
disk[13]=hdm; disk[14]=hdn; disk[15]=hdo; disk[16]=hdp;
disk[17]=hdq; disk[18]=hdr; disk[19]=hds; disk[20]=hdt;


# Adjust symlinks as necessary in /boot to keep system services from
# spewing messages about mismatched System maps and so on.
if [ -L /boot/System.map -a -r /boot/System.map-`uname -r` -a \
! /boot/System.map -ef /boot/System.map-`uname -r` ] ; then
ln -s -f System.map-`uname -r` /boot/System.map
fi
if [ ! -e /boot/System.map -a -r /boot/System.map-`uname -r` ] ; then
ln -s -f System.map-`uname -r` /boot/System.map
fi

# The special Red Hat kernel library symlink must point to the right library
# We need to deal with cases where there is no library, and we need to
# deal with any version numbers that show up.
shopt -s nullglob
shopt -u nullglob

} &
wait





inittab
-----------
id:2:initdefault:

# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit

l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6

# Things to run in every runlevel.
ud:nce:/sbin/update

# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty 9600 tty1
2:2345:respawn:/sbin/mingetty 9600 tty2
3:2345:respawn:/sbin/mingetty 9600 tty3
4:2345:respawn:/sbin/mingetty 9600 tty4
5:2345:respawn:/sbin/mingetty 9600 tty5
6:2345:respawn:/sbin/mingetty 9600 tty6



Hope you're able to rectify the problem. If not with these, then what?
 
Old 09-06-2002, 08:36 AM   #2
hanzerik
Member
 
Registered: Jan 2002
Location: Cheyenne Wyoming
Distribution: Debian/Raspbian/Mint
Posts: 717

Rep: Reputation: 32
A little more info on the files you used to make the disks.

Did you use a custum kernel, ram disk supported, initrd.gz supported, etc..

And did you build the rootfs disk yourself? or from a RedHat .img file?
 
Old 09-06-2002, 08:39 AM   #3
hanzerik
Member
 
Registered: Jan 2002
Location: Cheyenne Wyoming
Distribution: Debian/Raspbian/Mint
Posts: 717

Rep: Reputation: 32
Or is this disk just used to boot your linux installed on your hard drive?
 
Old 09-09-2002, 12:02 AM   #4
aditya
Member
 
Registered: Aug 2002
Distribution: RH 7.x
Posts: 71

Original Poster
Rep: Reputation: 15
Actually, I'm just trying to do something I don't know myself. I've just consulted the sit 'www.tldp.org/HOWTO/Bootdisk-HOWTO', and I'm proceeding according to that. So, I don't know if the boot disk will boot the linux from my hard disk or do something else.
I've first compiled my own custom kernel, added the ram disk support, (BUT NOT THE INITRD SUPPORT, as I don't think I need it, though I'm not pretty sure).
Then I've made my own root file system instead of the RH 7.3 image file, (as I don't know how to make it from the .img either).
I trimmed the rc, rc.sysinit files, etc. according to myself only, as I couldn't find any giudance from the site. There might be some variable used in the file which haven't been defined, so my system hangs.
My first floppy that contains just the kernel looks perfect to me, as it does say that the compresses image of file system has been found on second floppy (that contains the file system). So, can it be that the kernel hasn't been bult well too?
 
Old 09-09-2002, 01:27 AM   #5
aditya
Member
 
Registered: Aug 2002
Distribution: RH 7.x
Posts: 71

Original Poster
Rep: Reputation: 15
I added 'initrd' support to my kernel in the hope that it would solve the problem. But on reading the root file system from second boot floppy, it gives the message :
RAMDISK: Compressed image found at block 0
and stalls. There are somethings I'd like to point out:
1. The website tldp.org explinains everything with vmlinux binary image, but as it's too big I'm using bzImage.
2. I'm doing 'rdev -r /mnt/bzImage 49152' instead of 'rdev -r /mnt/vmlinux 49152'. Also notice the small '-r' nad not '-R'.
Then I unmount the second floppy, and proceed to boot.
Where can the problem lie: in the fs or the kernel?
 
Old 09-09-2002, 12:00 PM   #6
hanzerik
Member
 
Registered: Jan 2002
Location: Cheyenne Wyoming
Distribution: Debian/Raspbian/Mint
Posts: 717

Rep: Reputation: 32
http://mywebpages.comcast.net/hanzfa...-18Aug2002.txt

Have a look at this kernel config file, this is what I use with my boot floppy. You'll notice that nothing is made as a module, so the kernel is large but still fits on a floppy. And if you look at the docs, and scripts in the tar.gz file, you see how I setup my kernel to boot the compressed initrd.gz root filesystem, also in the tar.gz file I tell you how to modify the rootfs, Basic Stuff like changing the root password ,and hostname before writing the fs to disk.


The config is from a 2.4.18 kernel

Last edited by hanzerik; 09-09-2002 at 12:02 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bootable disk that hangs system Akhran Linux - Newbie 2 09-03-2005 04:54 AM
Floppy Disk Writes hangs the kernel marcosm Linux - Hardware 3 04-13-2005 08:14 PM
booting bare.i disk hangs SENORCHENG Linux - Newbie 9 01-25-2004 07:27 PM
Installing Slack using Boot Disk (root disk stalls!) guardian653 Slackware 3 10-07-2003 04:03 PM
Hard Disk hangs if system left on for 2-3 hours jdsahota Linux - General 1 07-13-2003 07:29 AM


All times are GMT -5. The time now is 11:06 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration