Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Weird problem on shutdown
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Epyon
l33t
l33t


Joined: 11 Sep 2003
Posts: 754
Location: NJ, USA

PostPosted: Fri Jul 02, 2004 11:31 pm    Post subject: Weird problem on shutdown Reply with quote

When I shut down my computer and it gets to mounting remaining filesystems read only, I get a prompt to enter my root password to enter maintenance mode or press ctrl-d to continue booting normally. When I boot my computer after that it says my filesystem was not cleanly umounted.

Anyone know what the problem could be?
Back to top
View user's profile Send private message
Epyon
l33t
l33t


Joined: 11 Sep 2003
Posts: 754
Location: NJ, USA

PostPosted: Fri Jul 02, 2004 11:51 pm    Post subject: Reply with quote

Ok this is getting strange. I emerged the old version of baselayout (1.9.4-r2) to see if that would fix it and it did. I wanted to make sure that was what fixed it so I emerged the newer version (1.10.1-r1) again and now I'm missing important commands such as reboot and shutdown.

Very odd...
Back to top
View user's profile Send private message
frustreren
n00b
n00b


Joined: 10 Sep 2003
Posts: 14

PostPosted: Sat Jul 03, 2004 1:49 am    Post subject: Reply with quote

I've got the same problem, but can't look into it at the moment (as I'm moving)... If you figure out what the issue is please post.
Back to top
View user's profile Send private message
Epyon
l33t
l33t


Joined: 11 Sep 2003
Posts: 754
Location: NJ, USA

PostPosted: Sat Jul 03, 2004 2:07 am    Post subject: Reply with quote

Ok, first issue is a bug with the new checkfs included in baselayout-1.10.1-r1. Using the one from the old version works fine.
Second issue I had was resolved by emerging sysvinit again.
Back to top
View user's profile Send private message
manny15
Guru
Guru


Joined: 01 Dec 2002
Posts: 473
Location: USA

PostPosted: Sun Jul 18, 2004 4:44 pm    Post subject: Reply with quote

I've been having the same problem. I would like to avoid downgrading baselayout though. That's one of those ebuilds I'm picky about. Any messup and down goes Gentoo. If you don't mind, can you post the checkfs that works. I'll would just replace it and wait for a new baselayout. Oh, I was wondering, why the hell does Gentoo have sysvinit? Isn't that for sysv-based systems, like practically every other distro except slackware? The only reason I've got it is because it was part of a world upgrade.
Back to top
View user's profile Send private message
Epyon
l33t
l33t


Joined: 11 Sep 2003
Posts: 754
Location: NJ, USA

PostPosted: Sun Jul 18, 2004 6:05 pm    Post subject: Reply with quote

Code:

#!/sbin/runscript
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /home/cvsroot/gentoo-src/rc-scripts/init.d/checkfs,v 1.34 2004/04/21 17:09:18 vapier Exp $

depend() {
        need checkroot modules
}

start() {
        local retval=0

        #
        # EVMS2 summport for /usr, /var ....
        #
        if [ -z "${CDBOOT}" -a -f /sbin/evms_activate ]
        then
                ebegin "Activating EVMS2"
                evms_activate
                retval=$?
                eend ${retval}
        fi

        # LVM support for /usr, /home, /opt ....
        # This should be done *before* checking local
        # volumes, or they never get checked.

        # NOTE: Add needed modules for LVM or RAID, etc
        #       to /etc/modules.autoload if needed

        if [ -z "${CDBOOT}" -a -x /sbin/vgscan ] && \
           [ -d /proc/lvm -o "$(grep device-mapper /proc/misc 2>/dev/null)" ]
        then
                ebegin "Setting up the Logical Volume Manager"
                #still echo stderr for debugging
                /sbin/vgscan >/dev/null
                if [ "$?" -eq 0 ] && [ -x /sbin/vgchange ] && \
                   [ -f /etc/lvmtab -o -d /etc/lvm ]
                then
                        /sbin/vgchange -a y >/dev/null
                fi
                eend $? "Failed to setup the LVM"
        fi

        # Start software raid.
        # You need a properly configured /etc/raidtab for raidtools usage or a
        # properly configured /etc/mdadm.conf for mdadm usage. Devices in
        # /etc/mdadm.conf are initialized first, so any duplicate devices in
        # /etc/raidtab will not get initialized.
        if [ -z "${CDBOOT}" -a -f /proc/mdstat ]
        then
                local mdadm_devices=
                local raidtools_devices=
                # If /etc/mdadm.conf exists, grab all the RAID devices from it
                if [ -f /etc/mdadm.conf ]
                then
                        mdadm_devices=$(awk '/^[[:space:]]*ARRAY/ { print $2 }' /etc/mdadm.conf)
                fi
                # If /etc/raidtab exists, grab all the RAID devices from it
                if [ -f /etc/raidtab ]
                then
                        raidtools_devices=$(awk '/^[[:space:]]*raiddev/ { print $2 }' /etc/raidtab)
                fi
                ebegin "Starting up RAID devices: "

                local rc=0
                local retval=0

                for i in ${mdadm_devices}
                do
                        local raiddev="${i##*/}"
                        local raidstat="$(egrep "^${raiddev} : active" /proc/mdstat)"

                        if [ -z "${raidstat}" ]
                        then
                                # First scan the /etc/fstab for the "noauto"-flag
                                # for this device. If found, skip the initialization
                                # for it to avoid dropping to a shell on errors.
                                # If not, try raidstart...if that fails then
                                # fall back to raidadd, raidrun.  If that
                                # also fails, then we drop to a shell
                                local retval=1
                                local noauto="$(egrep "^${i}" /etc/fstab | grep -c 'noauto')"

                                einfon "  Trying ${raiddev}..."

                                raiddev=""

                                if [ "${noauto}" -gt 0 ]
                                then
                                        retval=0
                                        raiddev=" (skipped)"
                                fi
                                if [ "${retval}" -gt 0 -a -x /sbin/mdadm ]
                                then
                                        /sbin/mdadm -As "${i}" &>/dev/null
                                        retval=$?
                                fi

                                echo "${raiddev}"

                                if [ "${retval}" -gt 0 ]
                                then
                                        rc=1
                                        eend ${retval}
                                else
                                        ewend ${retval}
                                fi
                        fi
                done

                for i in ${raidtools_devices}
                do
                        local raiddev="${i##*/}"
                        local raidstat="$(egrep "^${raiddev} : active" /proc/mdstat)"

                        if [ -z "${raidstat}" ]
                        then
                                # First scan the /etc/fstab for the "noauto"-flag
                                # for this device. If found, skip the initialization
                                # for it to avoid dropping to a shell on errors.
                                # If not, try raidstart...if that fails then
                                # fall back to raidadd, raidrun.  If that
                                # also fails, then we drop to a shell
                                local retval=1
                                local noauto="$(egrep "^${i}" /etc/fstab | grep -c 'noauto')"

                                einfon "  Trying ${raiddev}..."

                                raiddev=""

                                if [ "${noauto}" -gt 0 ]
                                then
                                        retval=0
                                        raiddev=" (skipped)"
                                fi
                                if [ "${retval}" -gt 0 -a -x /sbin/raidstart ]
                                then
                                        /sbin/raidstart "${i}"
                                        retval=$?
                                fi
                                if [ "${retval}" -gt 0 -a -x /sbin/raid0run ]
                                then
                                        /sbin/raid0run "${i}"
                                        retval=$?
                                fi
                                if [ "${retval}" -gt 0 -a -x /sbin/raidadd -a -x /sbin/raidrun ]
                                then
                                        /sbin/raidadd "${i}"
                                        /sbin/raidrun "${i}"
                                        retval=$?
                                fi

                                echo "${raiddev}"

                                if [ "${retval}" -gt 0 ]
                                then
                                        rc=1
                                        eend ${retval}
                                else
                                        ewend ${retval}
                                fi
                        fi
                done

                # A non-zero return means there were problems.
                if [ "${rc}" -gt 0 ]
                then
                        echo
                        eerror "An error occurred during the RAID startup"
                        eerror "Dropping you to a shell; the system will reboot"
                        eerror "when you leave the shell."
                        echo; echo
                        /sbin/sulogin ${CONSOLE}
                        einfo "Unmounting filesystems"
                        /bin/mount -a -o remount,ro &>/dev/null
                        einfo "Rebooting"
                        /sbin/reboot -f
                fi
        fi

        if [ -f /fastboot -o -n "${CDBOOT}" ]
        then
                rm -f /fastboot
        else
                ebegin "Checking all filesystems"
                if [ -f /forcefsck ]
                then
                        ewarn "A full fsck has been forced"
                        fsck -C -R -A -a -f
                        retval=$?
                        rm -f /forcefsck
                else
                        fsck -C -T -R -A -a
                        retval=$?
                fi
                if [ "${retval}" -eq 0 ]
                then
                        eend 0
                elif [ "${retval}" -ge 1 -a "${retval}" -le 3 ]
                then
                        ewend 1 "Filesystem errors corrected."
                        # Everything should be ok, so return a pass
                        return 0
                else
                        eend 2 "Fsck could not correct all errors, manual repair needed"
                        /sbin/sulogin ${CONSOLE}
                fi
        fi
}


# vim:ts=4

Thats the one I'm using.
Back to top
View user's profile Send private message
manny15
Guru
Guru


Joined: 01 Dec 2002
Posts: 473
Location: USA

PostPosted: Wed Jul 21, 2004 7:21 pm    Post subject: Reply with quote

Thanks, your checkfs seems to help bring my beast back closer to normal behavior!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum