Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 20/02/2009, à 11:48

TuxDav

Touches magiques HS

Le clone de ce post en espérant avoir plus de chance dans cette rubrique car c'est aussi un pb matériel (clavier?).

Pour résumer je n'ai pas accès aux appels direct noyau ce qui doit me permettre de rebooter même quand tout est figé.

Merci.


Ubuntu 12.10

Hors ligne

#2 Le 20/02/2009, à 11:54

Peck

Re : Touches magiques HS

Il est possible que ce soit désactivé dans le noyau.

Tu es sensé voir qqch dans la console (ctrl-alt-f1) quand tu fai alt-sysrq-espace

Si ce n'est pas le cas, elles sont désactivées. Pour vérifier qu'elles sont compilées dans le noyau :

zcat /proc/config.gz | grep CONFIG_MAGIC_SYSRQ

Hors ligne

#3 Le 20/02/2009, à 12:02

TuxDav

Re : Touches magiques HS

Effectivement en mode console avec alt syst espace ça me renvoit la liste des combinaisons possibles (désolé je sais pas copier coller en console) par ex sysrq help  reBoot Sync etc.

Par contre ceci m'inquiète

david@pc:~$ zcat /proc/config.gz | grep CONFIG_MAGIC_SYSRQ
gzip: /proc/config.gz: No such file or directory

Info supplémentaire trouvée ici

david@pc:~$ cat /boot/config-$(uname -r) | grep -i ikconfig
# CONFIG_IKCONFIG is not set

Dernière modification par TuxDav (Le 20/02/2009, à 12:17)


Ubuntu 12.10

Hors ligne

#4 Le 20/02/2009, à 12:25

Peck

Re : Touches magiques HS

Il n'y a pas a s'inquiéter, le config.gz n'est pas toujours compilé dans le noyau.

Par contre tu peux faire le grep de CONFIG_MAGIC_SYSRQ
sur /boot/config-$(uname -r) en supposant qu'il n'y ait pas eu de recompilation manuelle entre temps.

Hors ligne

#5 Le 20/02/2009, à 12:34

TuxDav

Re : Touches magiques HS

Ok, voici. Ca a l'air bon (y=yes?)
Je confirme qu'il n'y a pas eu de recompil manuelle.

david@pc:~$ cat /boot/config-$(uname -r) | grep -i CONFIG_MAGIC_SYSRQ
CONFIG_MAGIC_SYSRQ=y

J'ai été voir "à la main" dans /boot j'ai 2 config"nom du noyau" :
config-2.6.27.7-generic  => CONFIG_MAGIC_SYSRQ=y
config-2.6.27.11-generic => CONFIG_MAGIC_SYSRQ=y

En bleu correction 26 devient 27 erreur de lecture
la preuve :

david@pc:/boot$ ls
abi-2.6.27-11-generic         memtest86+.bin
abi-2.6.27-7-generic          System.map-2.6.27-11-generic
config-2.6.27-11-generic      System.map-2.6.27-7-generic
config-2.6.27-7-generic       vmcoreinfo-2.6.27-11-generic
grub                          vmcoreinfo-2.6.27-7-generic
initrd.img-2.6.27-11-generic  vmlinuz-2.6.27-11-generic
initrd.img-2.6.27-7-generic   vmlinuz-2.6.27-7-generic

Dernière modification par TuxDav (Le 20/02/2009, à 15:01)


Ubuntu 12.10

Hors ligne

#6 Le 20/02/2009, à 12:56

Peck

Re : Touches magiques HS

Et tu as bien un noyau 2.6.26.11 ?

Regarde dans dans la conf grub s'il y a une commande qui les désactive.

Hors ligne

#7 Le 20/02/2009, à 14:06

TuxDav

Re : Touches magiques HS

Oui pour le noyau

david@pc:~$ uname -a
Linux pc 2.6.27-11-generic #1 SMP Thu Jan 29 19:24:39 UTC 2009 i686 GNU/Linux

J'ai trouvé à cette page ceci :

Configuration de Sysctl

Un certain nombre de paramètres de noyau doivent être définis pour qu’OpenVZ fonctionne correctement. Ces paramètres se trouvent dans le fichier /etc/sysctl.conf. Voici les points pertinents du fichier ; éditez-les en fonction de vos besoins.

# On Hardware Node we generally need
# packet forwarding enabled and proxy arp disabled
net.ipv4.ip_forward = 1
net.ipv4.conf.default.proxy_arp = 0
# Enables source route verification
net.ipv4.conf.all.rp_filter = 1
# Enables the magic-sysrq key
kernel.sysrq = 1

# TCP Explict Congestion Notification
#net.ipv4.tcp_ecn = 0
# we do not want all our interfaces to send redirects
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0

Or, mon /etc/sysctl.conf ressemble à ça (cf en dessous). Non seulement il n'y a pas trace de "kernel.sysrq" mais de toute façon tout est commenté donc...

#
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additional system variables.
[i] ********"Apparté : il n'y a pas de /etc/sysctl.d/"******** [/i]
# See sysctl.conf (5) for information.
#

#kernel.domainname = example.com

# Uncomment the following to stop low-level messages on console
#kernel.printk = 4 4 1 7

##############################################################3
# Functions previously found in netbase
#

# Uncomment the next two lines to enable Spoof protection (reverse-path filter)
# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks
#net.ipv4.conf.default.rp_filter=1
#net.ipv4.conf.all.rp_filter=1

# Uncomment the next line to enable TCP/IP SYN cookies
# This disables TCP Window Scaling (http://lkml.org/lkml/2008/2/5/167),
# and is not recommended.
#net.ipv4.tcp_syncookies=1

# Uncomment the next line to enable packet forwarding for IPv4
#net.ipv4.ip_forward=1

# Uncomment the next line to enable packet forwarding for IPv6
#net.ipv6.conf.all.forwarding=1


###################################################################
# Additional settings - these settings can improve the network
# security of the host and prevent against some network attacks
# including spoofing attacks and man in the middle attacks through
# redirection. Some network environments, however, require that these
# settings are disabled so review and enable them as needed.
#
# Ignore ICMP broadcasts
#net.ipv4.icmp_echo_ignore_broadcasts = 1
#
# Ignore bogus ICMP errors
#net.ipv4.icmp_ignore_bogus_error_responses = 1
# 
# Do not accept ICMP redirects (prevent MITM attacks)
#net.ipv4.conf.all.accept_redirects = 0
#net.ipv6.conf.all.accept_redirects = 0
# _or_
# Accept ICMP redirects only for gateways listed in our default
# gateway list (enabled by default)
# net.ipv4.conf.all.secure_redirects = 1
#
# Do not send ICMP redirects (we are not a router)
#net.ipv4.conf.all.send_redirects = 0
#
# Do not accept IP source route packets (we are not a router)
#net.ipv4.conf.all.accept_source_route = 0
#net.ipv6.conf.all.accept_source_route = 0
#
# Log Martian Packets
#net.ipv4.conf.all.log_martians = 1
#
# The contents of /proc/<pid>/maps and smaps files are only visible to 
# readers that are allowed to ptrace() the process
# sys.kernel.maps_protect = 1

Penses-tu qu'il est raisonnable de rajouter ces lignes à mon /etc/sysctl.conf:
# Enables the magic-sysrq key
kernel.sysrq = 1

Je précise que là j'y vais à l'aveuglette pour ma part je ne connais absolument pas l'utilité de ce fichier.


Enfin pour la piste GRUB je n'ai rien trouvé de concluant dans le menu.lst. A noter que GRUB est lancer par l'amorceur de winXP ntldr selon cette méthodo du coup mon grub est installé sur mon /.

# menu.lst - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default		0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout		10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the
# command 'lock'
# e.g. password topsecret
#      password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title		Windows 95/98/NT/2000
# root		(hd0,0)
# makeactive
# chainloader	+1
#
# title		Linux
# root		(hd0,1)
# kernel	/vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=5a4e7a1b-3f94-464f-8112-41addf2ecdbf ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=5a4e7a1b-3f94-464f-8112-41addf2ecdbf

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
##      lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title		Ubuntu 8.10, kernel 2.6.27-11-generic
uuid		5a4e7a1b-3f94-464f-8112-41addf2ecdbf
kernel		/boot/vmlinuz-2.6.27-11-generic root=UUID=5a4e7a1b-3f94-464f-8112-41addf2ecdbf ro quiet splash 
initrd		/boot/initrd.img-2.6.27-11-generic
quiet

title		Ubuntu 8.10, kernel 2.6.27-11-generic (recovery mode)
uuid		5a4e7a1b-3f94-464f-8112-41addf2ecdbf
kernel		/boot/vmlinuz-2.6.27-11-generic root=UUID=5a4e7a1b-3f94-464f-8112-41addf2ecdbf ro  single
initrd		/boot/initrd.img-2.6.27-11-generic

title		Ubuntu 8.10, kernel 2.6.27-7-generic
uuid		5a4e7a1b-3f94-464f-8112-41addf2ecdbf
kernel		/boot/vmlinuz-2.6.27-7-generic root=UUID=5a4e7a1b-3f94-464f-8112-41addf2ecdbf ro quiet splash 
initrd		/boot/initrd.img-2.6.27-7-generic
quiet

title		Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
uuid		5a4e7a1b-3f94-464f-8112-41addf2ecdbf
kernel		/boot/vmlinuz-2.6.27-7-generic root=UUID=5a4e7a1b-3f94-464f-8112-41addf2ecdbf ro  single
initrd		/boot/initrd.img-2.6.27-7-generic

title		Ubuntu 8.10, memtest86+
uuid		5a4e7a1b-3f94-464f-8112-41addf2ecdbf
kernel		/boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title		Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda2
title		Microsoft Windows XP Professionnel
root		(hd0,1)
savedefault
chainloader	+1

Dernière modification par TuxDav (Le 20/02/2009, à 14:15)


Ubuntu 12.10

Hors ligne

#8 Le 20/02/2009, à 14:51

Peck

Re : Touches magiques HS

Euh, tu me dis oui pour le noyau alors que la commande que tu donne prouve exactement le contraire.

Pour ce qui est de la ligne sysctl, pourquoi pas, de toute facon ca ne casse rien. Il faut rebooter pour qu'elle soit prise en compte, mais avant regarde le contenu de /proc/sys/kernel/sysrq

Hors ligne

#9 Le 20/02/2009, à 15:06

TuxDav

Re : Touches magiques HS

Oui autant pour moi je me suis trompé en recopiant les nom de fichier, c'est corrigé avec un ls en plus, plus d'erreur.

Sinon dans mon "/proc/sys/kernel/sysrq" il y a 1


Ubuntu 12.10

Hors ligne

#10 Le 20/02/2009, à 17:17

Peck

Re : Touches magiques HS

C'est louche, cette valeur est celle qui est modifiée par sysctl.conf
Elle indique que les magic sysrq sont activées.

D'ailleurs je relis : et tu dis "Effectivement en mode console avec alt syst espace ça me renvoit la liste des combinaisons possibles" donc ca veut dire qu'elle marchent.

C'est quoi qui ne marche pas ?

Hors ligne