Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Reboot posalje harddisk na spavanje - spindown

[es] :: Linux :: Reboot posalje harddisk na spavanje - spindown

[ Pregleda: 2234 | Odgovora: 4 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

Boe

Član broj: 40414
Poruke: 223
*.adsl.univie.ac.at.



Profil

icon Reboot posalje harddisk na spavanje - spindown18.07.2006. u 00:05 - pre 216 meseci
pozdrav,
koristim suse 10.1 i ubuntu 6.06 i kod oba sistema imam problem kad restartujem komp. jednostavno mi uradi spin down harddiska i podigne ga na bios post-u. kad npr restartujem win xp onda mi se ne gasi pa se ponovo dize hdd. molim vas za pomoc.
 
Odgovor na temu

warhead
Ivan Jurišić
System Administrator
Croatia, Split

Član broj: 57582
Poruke: 20
217.14.216.*

Sajt: www.debian-world.com


Profil

icon Re: Reboot posalje harddisk na spavanje - spindown18.07.2006. u 12:29 - pre 216 meseci
Koja matična ploča?

p.s. - Provjeri postavke u BIOS-u

 
Odgovor na temu

Boe

Član broj: 40414
Poruke: 223
*.adsl.univie.ac.at.



Profil

icon Re: Reboot posalje harddisk na spavanje - spindown18.07.2006. u 12:38 - pre 216 meseci
maticna ploca je Gigabyte GA-8I915P-MF, 915 northbridge, ICH6 southbridge. S-ATA hdd. sta trebam da provjerim u bios-u?
 
Odgovor na temu

mulaz
Ljubljana

Član broj: 47602
Poruke: 2239
*.dial-up.dsl.siol.net.

Jabber: mulaz@elitesecurity.org
Sajt: www.mulaz.org


+184 Profil

icon Re: Reboot posalje harddisk na spavanje - spindown18.07.2006. u 13:33 - pre 216 meseci
proveri rc.6 file u initu da nije tamo negde nesto za spindown (hdparm,...)
Bolje ispasti glup nego iz aviona
http://www.mulaz.org/
 
Odgovor na temu

Boe

Član broj: 40414
Poruke: 223
*.adsl.univie.ac.at.



Profil

icon Re: Reboot posalje harddisk na spavanje - spindown18.07.2006. u 16:14 - pre 216 meseci
pod suse se nalazi u rc.6 folderu S20reboot file
Code:
#! /bin/sh
# Copyright (c) 1996-2002 SuSE Linux AG, Nuernberg, Germany.
# All rights reserved.
#
# Author: Florian La Roche, 1996
#      Werner Fink <[email protected]>, 1996-2001
#
# Please send feedback to http://www.suse.de/feedback
#
# /etc/init.d/halt (and symlinked to reboot)
#

. /etc/rc.status
. /etc/sysconfig/clock
. /etc/sysconfig/shutdown

#
# Avoid being interrupted by child or keyboard
#
trap "echo" SIGINT SIGSEGV SIGQUIT SIGTERM
set +e

case "$0" in
    *halt)
        message="The system will be halted immediately."
        case `/bin/uname -m` in
                    i?86)
                        command="halt"
                        if test -e /proc/apm -o -e /proc/acpi -o -e /proc/sys/acpi ; then
                            command="halt -p"
                        else
                            read cmdline < /proc/cmdline
                            case "$cmdline" in
                                *apm=smp-power-off*|*apm=power-off*)  command="halt -p" ;;
                            esac
                        fi
                        ;;
                    *)
                        command="halt -p"
                        ;;
                esac
        ;;
    *reboot)
        message="Please stand by while rebooting the system..."
        command="reboot"
        ;;
    *)
        echo "$0: call me as \"halt\" or \"reboot\" please!"
        exit 1
        ;;
esac

#
# first do local stuff
#
rc_reset
test -e /etc/init.d/halt.local && {
    echo Running /etc/init.d/halt.local
    /bin/sh /etc/init.d/halt.local
    rc_status -v1 -r
}

# Write to wtmp file before unmounting /var
$command -w 

# Set a flag that we had success upto this point
> /success

# Stop blogd before umounting /var
test -x /sbin/blogd && killproc -QUIT /sbin/blogd

echo "Sending all processes the TERM signal..."
killall5 -15
echo -e "$rc_done_up"

sleep 1
test "$1" = "fast" -o -e /fastboot || sleep 4

echo "Sending all processes the KILL signal..."
killall5 -9
echo -e "$rc_done_up"

# Redirect our mesages to default console
test -n "$REDIRECT" && exec 0<> $REDIRECT 1>&0 2>&0

#
# call modules in boot.d via K* symlinks
# (reverse sequence)
#

if test -d /etc/init.d/boot.d/ ; then
    for i in /etc/init.d/boot.d/K*; do
        test -f $i || continue
        if test -x "$i" ; then
            # Active boot scripts, should have their own messages
            $i stop
        else
            # Old boot scripts, may not have any message
            echo Skipping $i, not executable
        fi
    done
fi

# kill splash animation
test "$SPLASH" = yes && /sbin/splash -q

umount -anvt proc

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

# show "the system is down" message
if test "$SPLASH" = yes ; then
    mount -nt proc proc /proc
    /sbin/splash -q -p 65535 -t "isdown"
    umount -n /proc
fi

# Make reboot noise and wait a few seconds to give harddisks the chance
# to really flush their buffers before power goes down.
if test -n "$REDIRECT" ; then
    sleep 1
    case "$HALT_SOUND" in
    "yes"|"quint")
    echo -en "\033[10;393]\a\033[10;262]"
    sleep 1
    ;;
    "octave")
    for tone in 524 491 440 393 349 328 295 ; do
        echo -en "\033[10;${tone}]\a"
        usleep 125000
    done
    echo -en "\033[10;262]"
    ;;
    "no")
    ;;
    *)
        echo -en "\033[10;440]\a"
    usleep 250000
    ;;
    esac
else
    test "$HALT_SOUND" = "no" || echo -en "\a"
    sleep 2
fi
echo $message
test "$HALT_SOUND" = "no" || echo -en "\a"

test -n "$HALT_POWERDOWN_INSERT" && $HALT_POWERDOWN_INSERT

# Set system console back to intial value
test -n "$REDIRECT" -a -n "$CONSOLE" && setconsole $REDIRECT < $CONSOLE

# Now talk to kernel
exec $command -d -f


kod ubuntu 6.06 mena rc.6 folder, ali u init.d ima dosta fajlova, pored toga i hdparm
Code:
#!/bin/sh

set -e

. /lib/lsb/init-functions
. /etc/default/rcS

#In certian cases you may wish to run this script twice.  Once at S07
#and once later in the boot process. If you do this call /etc/init.d/hdparm
#again from rcS.d with a name such as S27hdparm.second.
#
#See /usr/share/doc/hdparm/README.Debian for more details.

case "$0" in
  *hdparm)
    FIRST=yes
    ;;
  *)
    FIRST=no
    ;;
esac

MYNAME="$0"

report()
{
  echo "${MYNAME}: $*"
}

report_error()
{
  echo "${MYNAME}: Error: $*" >&2
}

report_error_and_exit()
{
  report_error "$*.  Exiting."
  exit 1
}

case $1 in
  start|restart|reload|force-reload)
    ;;
  stop) 
    exit 0
    ;;
  *)
    log_success_msg "Usage: $0 {stop|start|restart|reload|force-reload}"
    exit 1
    ;;
esac

if grep -w -q "nohdparm" /proc/cmdline ; then
  log_success_msg "Skipping setup of disc parameters as specified..."
  exit 0
fi

raidstat=OK
if [ -e /proc/mdstat ]; then
  if grep -iq resync /proc/mdstat; then
    raidstat=RESYNC
  fi
elif [ -e /proc/rd/status ]; then
  raidstat=`cat /proc/rd/status`
fi

if ! [ "$raidstat" = 'OK' ]; then
  log_warning_msg "RAID status not OK.  Exiting."
  exit 0
fi

log_begin_msg "Setting disc parameters..."

DISC=
DEFAULT=
OPTIONS=
DEF_QUIET=
OPT_QUIET=

#  set_option() adds $1 to the $OPTIONS list if in a disk stanza
#             and adds $1 to the $DEFAULT list if not in a disk stanza
#
#  the block beginning:
#        if test x${i%${i#??}} != x${1%${1#??}}; then
#  checks to see if $1 is already in the list and
#    if so removes the first instance

set_option() 
{
  if test -n "$DISC"; then
    NEW_OPT=
    for i in $OPTIONS; do
      if test x${i%${i#??}} != x${1%${1#??}}; then
        NEW_OPT="$NEW_OPT $i"
      else
        NEW_OPT=${NEW_OPT%-q}
      fi
    done
    OPTIONS="$NEW_OPT $OPT_QUIET $1"
  else
    NEW_DEF=
    for i in $DEFAULT; do
      if test x${i%${i#??}} != x${1%${1#??}}; then
        NEW_DEF="$NEW_DEF $i"
      else
        NEW_DEF=${NEW_DEF%-q}
      fi
    done
    DEFAULT="$NEW_DEF $DEF_QUIET $1"
  fi
}

eval_value() 
{
  case $1 in
    off|0) 
      set_option "$2"0
       ;;
    on|1) 
      set_option "$2"1
      ;;
    *) 
      return 1
      ;;
  esac
}

# Get blocks as far as the drive's write cache.
/bin/sync

# Set options for a group of disks in /etc/default/hdparm
[ -e /etc/default/hdparm ] && . /etc/default/hdparm

if [ -n "$harddisks" -a -n "$hdparm_opts" ]; then
  for drive in $harddisks; do 
    /sbin/hdparm -q -f $drive
    hdparm -q $hdparm_opts -q $drive
    [ "$VERBOSE" != no ] && log_success_msg "Found enabled disk: $drive"
  done
fi

egrep -v '^[[:space:]]*(#|$)' /etc/hdparm.conf | while read KEY SEP VALUE; do
 if [ "$NEXT_LINE" != 'go' ]; then
  case $SEP in
    '{')
       case $KEY in
         command_line)
           NEXT_LINE=go
           unset DISC
           unset OPTIONS
           unset OPT_QUIET
           ;;
         *)
           DISC=$KEY
           OPTIONS=$DEFAULT
           OPT_QUIET=$DEF_QUIET
           WAS_RUN=0
           ;;
       esac
       ;;
    =)
       case $KEY in
         read_ahead_sect) 
       set_option -a$VALUE
       ;;
     lookahead) 
       eval_value $VALUE -A
       ;;
     bus) 
       eval_value $VALUE -b
       ;;
     apm) 
       set_option -B$VALUE
       ;;
     io32_support) 
       set_option -c$VALUE
       ;;
     dma) 
       eval_value $VALUE -d
       ;;
     defect_mana) 
       eval_value $VALUE -D
       ;;
     cd_speed) 
       set_option -E$VALUE
       ;;
     mult_sect_io) 
       set_option -m$VALUE
       ;;
     prefetch_sect) 
       set_option -P$VALUE
       ;;
     read_only) 
       eval_value $VALUE -r
       ;;
     spindown_time) 
       set_option -S$VALUE
       ;;
     interrupt_unmask) 
       eval_value $VALUE -u
       ;;
     write_cache) 
       eval_value $VALUE -W
       ;;
     transfer_mode) 
       set_option -X$VALUE
       ;;
     acoustic_management)
       set_option -M$VALUE
       ;;
         keep_settings_over_reset)
           eval_value $VALUE -k
          ;;
         keep_features_over_reset)
           eval_value $VALUE -K
          ;;
         chipset_pio_mode)
           set_option -p$VALUE
          ;;
     *)
       log_failure_msg "Unknown option $KEY!"
       exit 1
       ;;
       esac
    ;;
    "")
       case $KEY in
         })
       if [ -z "$DISC" ]; then
             if [ "$WAS_RUN" != 1 ]; then
           log_failure_msg "No disk enabled. Exiting..."
           exit 1
             fi
       fi
       if [ -n "$OPTIONS" ]; then
         # Flush the drive's internal write cache to the disk.
         /sbin/hdparm -q -f $DISC

         /sbin/hdparm $OPTIONS $DISC
         [ "$VERBOSE" != no ] && log_success_msg "Found enabled disk: $DISC"
       fi       
           ;;
         quiet)
       if [ -n "$DISC" ]; then
         OPT_QUIET=-q
       else
         DEF_QUIET=-q
       fi
           ;;
         standby) 
           set_option -y
       ;;
         sleep) 
           set_option -Y
       ;;
         disable_seagate) 
           set_option -Z
       ;;
         *)
       log_failure_msg "Unknown option $KEY!"
       exit 1
       ;;
       esac
       ;;
   *)
     log_failure_msg "Unknown separator $SEP!"
     exit 1
     ;;
  esac
else
  $KEY $SEP $VALUE
  NEXT_LINE=no-go
  WAS_RUN=1
fi
done

log_end_msg 0


[Ovu poruku je menjao Boe dana 18.07.2006. u 17:33 GMT+1]
 
Odgovor na temu

[es] :: Linux :: Reboot posalje harddisk na spavanje - spindown

[ Pregleda: 2234 | Odgovora: 4 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.