LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-18-2005, 12:04 PM   #1
scr02bcg
LQ Newbie
 
Registered: Feb 2004
Posts: 26

Rep: Reputation: 15
Boot problem after loading modules into kernel


The situation is this. I have an it8212 RAID controller in my system, which has four ide disks connected to it and another controller that has a single ide disk connected. Eventually I managed to get the RAID controller to be recognised by way of a kernel upgrade (I can post instructions if needed). The /etc/fstab file looks like this

/dev/hda5 / ext3 acl,user_xattr 1 1
/dev/hda6 /usr/local ext3 acl,user_xattr 1 2
/dev/hda2 /var ext3 acl,user_xattr 1 2
/dev/hda1 swap swap pri=42 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
proc /proc proc defaults 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
sysfs /sys sysfs noauto 0 0
/dev/dvdram /media/dvdram subfs noauto,fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
/dev/fd0 /media/floppy subfs noauto,fs=floppyfss,procuid,nodev,nosuid,sync 0 0
/dev/hde2 /data ext3 defaults 1 2
/dev/hde1 /userhome ext3 defaults 1 2
/dev/hde3 /windows ext3 defaults 1 2

Unfortunately when I reboot i cannot log in again because the three hde devices are not detected. I realised this was probably because the contoller for the RAID was set-up as a module. As such I set about building both controllers for the harddrive into the kernel.

The error message I now get when I try to boot from this kernel is

Waiting for device /dev/hda5 to appear ...... not found -- exiting to /bin/sh
sh: can't access tty; job cotrol turned off.

Has anyone got a solution to this?

Many thanks

Ben
 
Old 07-18-2005, 12:12 PM   #2
scr02bcg
LQ Newbie
 
Registered: Feb 2004
Posts: 26

Original Poster
Rep: Reputation: 15
Perhaps I should just say that the hda is the 80GB drive on ide0 and hde is an 450GB drive on ide's 2 and 3 and is confgured as RAID 10 on the controller, hence only one drive.

Let me know if you want any further info.
 
Old 07-21-2005, 10:23 AM   #3
scr02bcg
LQ Newbie
 
Registered: Feb 2004
Posts: 26

Original Poster
Rep: Reputation: 15
For all those interested I have finally got everything working. Sorry to those interested but I have not tried with 2.6.12 but am happy to try and help anyone who wishes to use 2.6.11 with the ac patch. I did not build the modules into the kernel.

The way to get it to all be alright at boot (I'm sure there are other probably better ways) is to edit the file boot.localfs in /etc/init.d. This file is the important one since it loads up all the filesytems except for / which has already been done. The file looks like below and I'm sure you can all see the bit (mostly surplus) that I added in to get the it821x module to load.

Let me know if I can be of more help

Ben

#! /bin/sh
#
# Copyright (c) 2001-2002 SuSE Linux AG, Nuernberg, Germany.
# All rights reserved.
#
# /etc/init.d/boot.localfs
#
### BEGIN INIT INFO
# Provides: boot.localfs
# Required-Start: boot.rootfsck
# Should-Start: boot.ibmsis boot.md boot.lvm dasd_devfs_compat boot.scsidev
# Required-Stop:
# Default-Start: B
# Default-Stop:
# Description: check and mount local filesystems except /
### END INIT INFO

. /etc/rc.status

# to get max number of parallel fsck processes
. /etc/sysconfig/boot

if [ -f /etc/sysconfig/dump ]; then
. /etc/sysconfig/dump
fi

export FSCK_MAX_INST

# helper shell function
#
reverse ()
{
local _line
while read -r _line ; do
reverse
echo "$_line"
break
done
}

rc_reset

echo "This is the line bcg added into /etc/init.d/boot.localfs in order"
echo "to get it821x module to load at boot before filesystem check"
echo
echo "/sbin/modprobe it821x"

/sbin/modprobe it821x
echo
echo
echo "Horray. Amazing. Finally"
sleep 10

case "$1" in
start)
# rootfs is mounted rw, lvm et al should be up now
# updated blkid
if [ -x /sbin/blkid ] ; then
/sbin/blkid > /dev/null
fi
#
# If we use a serial console, don't use the fsck progress bar
#
FSCK_PROGRESSBAR="-V"
[ -x /sbin/showconsole ] && [ "`/sbin/showconsole`" = "/dev/tty1" ] && FSCK_PROGRESSBAR="-C"
#
# do fsck and start sulogin, if it fails.
#
FSCK_RETURN=0
if test ! -f /fastboot -a -z "$fastboot" ; then
FSCK_FORCE=""
test -f /forcefsck && FSCK_FORCE="-f"
echo "Checking file systems..."
fsck $FSCK_PROGRESSBAR -R -A -a $FSCK_FORCE
# A return code of 1 indicates that file system errors
# were corrected, but that the boot may proceed.
# A return code of 2 or larger indicates failure.
FSCK_RETURN=$?
test $FSCK_RETURN -lt 4
rc_status -v1 -r
if test $FSCK_RETURN -gt 1 -a $FSCK_RETURN -lt 4 ; then
# if appropriate, switch bootsplash to verbose
# mode to make text messages visible.
test -f /proc/splash && echo "verbose" > /proc/splash
echo
echo "fsck succeed, but reboot is required."
echo
sleep 1
sync
reboot -f
elif test $FSCK_RETURN -gt 3; then
# if appropriate, switch bootsplash to verbose
# mode to make text messages visible.
test -f /proc/splash && echo "verbose" > /proc/splash
# Stop blogd since we reboot after sulogin
test -x /sbin/blogd && killproc -QUIT /sbin/blogd
if test -x /etc/init.d/kbd ; then
/etc/init.d/kbd start
fi
echo
echo "fsck failed for at least one filesystem (not /)."
echo "Please repair manually and reboot."
echo "The root file system is is already mounted read-write."
echo
echo "Attention: Only CONTROL-D will reboot the system in this"
echo "maintanance mode. shutdown or reboot will not work."
echo
PS1="(repair filesystem) # "
export PS1
/sbin/sulogin /dev/console

# if the user has mounted something rw, this should be umounted
echo "Unmounting file systems (ignore error messages)"
umount -avn

# on umsdos fs this would lead to an error message.
# so direct errors to /dev/null
mount -no remount,ro / 2> /dev/null

sync
reboot -f
fi
if test $FSCK_RETURN -gt 0; then
sync
touch /fsck_corrected_errors
fi
fi

#
# clean up
#
rm -f /etc/mtab* /etc/nologin /nologin /fastboot /forcefsck /success

# update modules.dep if needed
echo -n "Setting up kernel module dependencies (if required)"
/sbin/update-modules.dep -r
rc_status -v -r

#
# Mount local filesystems in '/etc/fstab' (and create an entry
# for / and /proc).
#
echo "Mounting local file systems..."
mount -fv -t proc proc /proc
mount -fv -t sysfs sysfs /sys
mount -fv -t tmpfs tmpfs /dev/shm
rc_status
optpts="-o mode=0620,gid=5"
mount -fv -t devpts $optpts devpts /dev/pts
rc_status
mount -av -t nonfs,noproc,nodevpts,nosmbfs -O no_netdev
rc_status -v1 -r
;;
stop)
mounts=/etc/fstab
test -r /proc/mounts && mounts=/proc/mounts

# move to intermezzo package ?
# First umount intermezzo filesystems
test -x /usr/sbin/umountizo -a ! -z "`grep -i intermezzo <$mounts`" && /usr/sbin/umountizo >/dev/null 2>&1

reverse < $mounts | \
while read des fs type rest; do
case "$des" in
""|\#*) continue ;;
/dev/loop*)
umount $fs
losetup $des &> /dev/null
test $? -eq 0 && losetup -d $des ;;
esac
case "$fs" in
/proc) continue ;;
/dev/pts) continue ;;
/dev) continue ;;
/dev/shm) continue ;;
esac
case "$type" in
proc) umount -t proc $fs ;;
devpts) umount -t devpts $fs ;;
devfs) umount -t devfs $fs ;;
shm) umount -t shm $fs ;;
usbfs) umount -t usbfs $fs ;;
usbdevfs) umount -t usbdevfs $fs ;;
esac
done
UMOUNT_FAILED=false
echo "Unmounting file systems"
umount -avt noproc,nonfs,nosmbfs || {
rc_status
UMOUNT_FAILED=true
}
rc_status -v1 -r

if test "$UMOUNT_FAILED" = true ; then
echo "Oops: umount failed :-( -- trying to remount readonly..."
mounts=/etc/fstab
test -r /proc/mounts && mounts=/proc/mounts
# Use cat and a pipe because umount changes
# /proc/mounts during direct read call
cat $mounts | \
while read des fs type rest; do
case "$des" in ""|\#*) continue ;; esac
case "$type" in
swap) continue ;; # No umount on swap devices
proc) continue ;; # Required
nfs) continue ;; # Avoid hanging reboot/halt
smbfs) continue ;; # Avoid hanging reboot/halt
esac
mount -v -n -o remount,ro $fs
done

echo "extra sync..."
sync; sync
echo "... hope now it's ok to reboot."
fi
;;
restart)
rc_failed 3
rc_status -v
;;
status)
rc_failed 4
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status|restart}"
exit 1
;;
esac

rc_exi
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to configure loading of kernel modules at boot? eigenyeugen Debian 2 06-26-2005 03:35 PM
Loading kernel modules during boot. alexeyak Fedora 4 12-20-2004 09:04 AM
Problem with alsa modules (not loading into the kernel) fsateler Linux - Hardware 3 07-04-2004 10:53 PM
Problem with auto-loading modules on boot (2.6.0, but not specific) Emp202 Fedora 5 01-02-2004 10:26 AM
Loading kernel modules at boot burk Linux - General 7 06-10-2002 07:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:38 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration