Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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.
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"
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
# 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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.