Compilation noyau linux ==> kernel panic
Fermé
doumeasse38
Messages postés
39
Date d'inscription
jeudi 28 mars 2002
Statut
Membre
Dernière intervention
3 avril 2009
-
28 sept. 2005 à 23:38
goldenconti - 5 avril 2009 à 23:08
goldenconti - 5 avril 2009 à 23:08
A voir également:
- Compilation noyau linux ==> kernel panic
- Linux mint - Télécharger - Systèmes d'exploitation
- Compilation pdf - Guide
- Diskinternals linux reader - Télécharger - Stockage
- Kernel panic upload mode - Forum Téléphones & tablettes Android
- Kernel power - Forum Windows 10
6 réponses
kmf31
Messages postés
1564
Date d'inscription
mercredi 30 mars 2005
Statut
Contributeur
Dernière intervention
22 juin 2007
500
29 sept. 2005 à 00:04
29 sept. 2005 à 00:04
Tu as correctement mis le bon truc root=/dev/hda? ou root=/dev/sda? pour le nouveau noyau dans le fichier config pour grub ou lilo ?
Tu as cree un init-ramdisk (le fichier /boot/inird-blabla.img ) ou au moins mis ext3 en dur et pas en module (si on a de disques ide c'est le seul truc necessitant un init-ramdisk).
Tu n'as pas oublie un truc crucial dans la config du noyau, de genre oublie de support de ext2/3 filesysteme ?
Tu es bien sur d'avoir tout fait comme il faut ?
Bref en absence d'info c'est la pure speculation. Si ce n'est pas un truc banal, il te faut vraiement preciser ce que tu as fait exactement (suite exacte des commandes) pour la configuration et pour la compilation du noyau.
Normalement le plus facile et plus sur et de prendre l'ancienne config:
et apres copier arch/i386/boot/bzImage vers /boot/vmlinuz-2.6.12.4 et modifier lilo ou grub.
Tu as cree un init-ramdisk (le fichier /boot/inird-blabla.img ) ou au moins mis ext3 en dur et pas en module (si on a de disques ide c'est le seul truc necessitant un init-ramdisk).
Tu n'as pas oublie un truc crucial dans la config du noyau, de genre oublie de support de ext2/3 filesysteme ?
Tu es bien sur d'avoir tout fait comme il faut ?
Bref en absence d'info c'est la pure speculation. Si ce n'est pas un truc banal, il te faut vraiement preciser ce que tu as fait exactement (suite exacte des commandes) pour la configuration et pour la compilation du noyau.
Normalement le plus facile et plus sur et de prendre l'ancienne config:
cd linux-2.6.12.4 make mrproper # pour nettoyer cp /boot/config-<ancien_2.6> .config make oldconfig # repondre a toute question par entree make bzImage make modules make modules_install mkinitrd /boot/initrd-2.6.12.4 2.6.12.4
et apres copier arch/i386/boot/bzImage vers /boot/vmlinuz-2.6.12.4 et modifier lilo ou grub.
doumeasse38
Messages postés
39
Date d'inscription
jeudi 28 mars 2002
Statut
Membre
Dernière intervention
3 avril 2009
1
29 sept. 2005 à 13:34
29 sept. 2005 à 13:34
Alors ce que j'ai fait :
Ensuite modif du lilo.conf par :
Regénération de lilo :
Et reboot ...
J'espère que ces qques infos supplémentaires t'aideront !!!
Merci beaucoup
Dom.
- ln -sfn linux-2.6.12.4 linux - make mrproper - cp config-2.6.12.4 .config ==> Je n'utilise pas mon config-<ancien_2.6> car plantage lors du make. Ce config-2.6.12.4 a été récupéré sur le site du tuto dont je me suis inspiré. - make menuconfig ==> chargement du .config - make - cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.12.4 - cp System.map /boot/System.map-2.6.12.4 - make modules_install - mkinitrd -o /boot/initrd-2.6.12.4 2.6.12.4 ==> sous /lib/modules/2.6.12.4
Ensuite modif du lilo.conf par :
boot=/dev/hda root=/dev/hda1 map=/boot/map prompt timeout=15 default=Linux-2.6.12.4 # Noyau 2.6.12.4 image=/boot/vmlinuz-2.6.12.4 label=Linux-2.6.12.4 read-only # restricted # alias=1 initrd=/boot/initrd.img-2.6.12.4 # Noyau 2.6.8-2-386 image=/boot/vmlinuz-2.6.8-2-386 label=Linux-2.6.8-2 read-only optional # restricted # alias=2 initrd=/boot/initrd.img-2.6.8-2-386
Regénération de lilo :
- /sbin/lilo -v
Et reboot ...
J'espère que ces qques infos supplémentaires t'aideront !!!
Merci beaucoup
Dom.
kmf31
Messages postés
1564
Date d'inscription
mercredi 30 mars 2005
Statut
Contributeur
Dernière intervention
22 juin 2007
500
29 sept. 2005 à 14:10
29 sept. 2005 à 14:10
Tout ca a l'aire correct, j'aurais remplace le "make" par:
mais en theorie ca doit etre identique au moins pour le 2.6 (je crois avec un 2.4 ce n'est pas equivalent et il faut aussi faire un "make dep" avant le "make bzImage).
Un autre point ou il faut faire attenion: Tu as (tres correctement) lance un "make menuconfig" apres la copie du fichier config et je suppose dans le "make menuconfig" tu as bien sur saufgarde le fichier .config (meme si tu n'as rien change) !? Il est absolument imperative qu'avant le "make" (ou "make bzImage") qu'il ait un machin de genre "make <blablab>config", ca peut etre "make config", "make menuconfig", "make xconfig" ou "make gconfig" ou si tu ne veux rien changer a un fichier .config deja existant tu fais au moins "make oldconfig" (c'est le plus simple). De ne pas faire un de ces truc est un faute qui induit a d'erreurs serieuses dans la mise en place de la compilation!! Bref un truc comme:
est absolument faux. Si on veut prendre le .config sans changement il faut faire:
En principe, ce que tu as mis ci-dessus avec le "make menuconfig" c'est bon (et ca remplace le "make oldconfig") mais peut-etre tu as lance la compilation plusieures fois et pour la 2eme fois tu n'as pas toujours refait le "make menuconfig" ? Donc fais attention a ce detail. A l'instant ou tu fais un "make mrproper" ou "make clean" ou une modif de .config (par un editeur ou une copie) au debut il faut impartivement refaire un "make <blabla>config". C'est le piege a eviter.
Apart ca tu utilses quelle versios du compilateur (tape: "gcc -v" pour la voire) ?? Je conseille d'utiliser un gcc-3.2.x ou gcc-3.3.x. Par contre un gcc-3.4.x et surtout un gcc-4.0.x est tres limite, ca peut planter ou creer un code faux!! Je crois maintenant il vaut aussi mieux eviter le gcc-2.95.x (qui etait pendant longtemps "le compilateur" pour le noyau).
Peut-etre le probleme avec ton anienne config est lie a ca!!
Regarde aussi dans les menus filesystemes, drivers etc. (quand tu es dans le "make menuconfig") s'il n'y a pas un truc superimportant qui manque, notamment pour le ext2, ext3, virtuel file systeme etc.
make bzImage make modules
mais en theorie ca doit etre identique au moins pour le 2.6 (je crois avec un 2.4 ce n'est pas equivalent et il faut aussi faire un "make dep" avant le "make bzImage).
Un autre point ou il faut faire attenion: Tu as (tres correctement) lance un "make menuconfig" apres la copie du fichier config et je suppose dans le "make menuconfig" tu as bien sur saufgarde le fichier .config (meme si tu n'as rien change) !? Il est absolument imperative qu'avant le "make" (ou "make bzImage") qu'il ait un machin de genre "make <blablab>config", ca peut etre "make config", "make menuconfig", "make xconfig" ou "make gconfig" ou si tu ne veux rien changer a un fichier .config deja existant tu fais au moins "make oldconfig" (c'est le plus simple). De ne pas faire un de ces truc est un faute qui induit a d'erreurs serieuses dans la mise en place de la compilation!! Bref un truc comme:
cp autre_config .config make
est absolument faux. Si on veut prendre le .config sans changement il faut faire:
cp autre_config .config make oldconfig make
En principe, ce que tu as mis ci-dessus avec le "make menuconfig" c'est bon (et ca remplace le "make oldconfig") mais peut-etre tu as lance la compilation plusieures fois et pour la 2eme fois tu n'as pas toujours refait le "make menuconfig" ? Donc fais attention a ce detail. A l'instant ou tu fais un "make mrproper" ou "make clean" ou une modif de .config (par un editeur ou une copie) au debut il faut impartivement refaire un "make <blabla>config". C'est le piege a eviter.
Apart ca tu utilses quelle versios du compilateur (tape: "gcc -v" pour la voire) ?? Je conseille d'utiliser un gcc-3.2.x ou gcc-3.3.x. Par contre un gcc-3.4.x et surtout un gcc-4.0.x est tres limite, ca peut planter ou creer un code faux!! Je crois maintenant il vaut aussi mieux eviter le gcc-2.95.x (qui etait pendant longtemps "le compilateur" pour le noyau).
Peut-etre le probleme avec ton anienne config est lie a ca!!
Regarde aussi dans les menus filesystemes, drivers etc. (quand tu es dans le "make menuconfig") s'il n'y a pas un truc superimportant qui manque, notamment pour le ext2, ext3, virtuel file systeme etc.
doumeasse38
Messages postés
39
Date d'inscription
jeudi 28 mars 2002
Statut
Membre
Dernière intervention
3 avril 2009
1
29 sept. 2005 à 17:38
29 sept. 2005 à 17:38
version gcc-3.3.5
je fais tjs make mrproper et make menuconfig entre les recompile
Menu file systems
voili voilou
je fais tjs make mrproper et make menuconfig entre les recompile
Menu file systems
# # File systems # CONFIG_EXT2_FS=y # CONFIG_EXT2_FS_XATTR is not set CONFIG_EXT3_FS=y CONFIG_EXT3_FS_XATTR=y CONFIG_EXT3_FS_POSIX_ACL=y CONFIG_EXT3_FS_SECURITY=y CONFIG_JBD=y # CONFIG_JBD_DEBUG is not set CONFIG_FS_MBCACHE=y CONFIG_REISERFS_FS=y # CONFIG_REISERFS_CHECK is not set # CONFIG_REISERFS_PROC_INFO is not set # CONFIG_REISERFS_FS_XATTR is not set CONFIG_JFS_FS=y CONFIG_JFS_POSIX_ACL=y # CONFIG_JFS_SECURITY is not set # CONFIG_JFS_DEBUG is not set # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y
voili voilou
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
kmf31
Messages postés
1564
Date d'inscription
mercredi 30 mars 2005
Statut
Contributeur
Dernière intervention
22 juin 2007
500
29 sept. 2005 à 18:29
29 sept. 2005 à 18:29
Tu as aussi:
c'est dans les "Pseudo filesystems":
Virtual memory file system support (former shm fs) (TMPFS)
Tmpfs is a file system which keeps all files in virtual memory.
Everything in tmpfs is temporary in the sense that no files will be
created on your hard drive. The files live in memory and swap
space. If you unmount a tmpfs instance, everything stored therein is
lost.
See <file:Documentation/filesystems/tmpfs.txt> for details.
Je crois tu peux l'avoir besoin pour faire fonctionner l'initrd. Donc ce serait util de l'ajouter.
Sinon comme tu as mis l'ext3 en dur (et pas en module) et comme tu as un 1er DD en ide (et pas en scsi ou sata) tu n'as en effet pas besoin de l'initrd. Tu peux deja essayer sans ca (simplement commenter la ligne avec initrd dans lilo.conf et refaire la commande "lilo" et apres redemarrer).
Cependant le tmpfs est tres utile aussi pour autre chose, ca fait un ramdisk elastique, c.-a-d. ca occupe de la memoire vive uniquement quand on met de fichiers la dedans. Pour l'utiliser du ajoutes (apart du support dans le noyau bien sur) dans /etc/fstab une ligne comme:
et apres le prochain boot (ou "mount /dev/shm") tu aurras ton ramdisk dans le repertoire /dev/shm. Par defaut ca a la taille (maximale) de la moitie de ton RAM mais ce n'est bouffe quand on y met vraiement de fichiers. Ca peut bien servir pour faire des taches de manipulations de fichiers complique sans utiliser le DD (par exemple de compilations des tar.gz).
CONFIG_TMPFS=y
c'est dans les "Pseudo filesystems":
Virtual memory file system support (former shm fs) (TMPFS)
Tmpfs is a file system which keeps all files in virtual memory.
Everything in tmpfs is temporary in the sense that no files will be
created on your hard drive. The files live in memory and swap
space. If you unmount a tmpfs instance, everything stored therein is
lost.
See <file:Documentation/filesystems/tmpfs.txt> for details.
Je crois tu peux l'avoir besoin pour faire fonctionner l'initrd. Donc ce serait util de l'ajouter.
Sinon comme tu as mis l'ext3 en dur (et pas en module) et comme tu as un 1er DD en ide (et pas en scsi ou sata) tu n'as en effet pas besoin de l'initrd. Tu peux deja essayer sans ca (simplement commenter la ligne avec initrd dans lilo.conf et refaire la commande "lilo" et apres redemarrer).
Cependant le tmpfs est tres utile aussi pour autre chose, ca fait un ramdisk elastique, c.-a-d. ca occupe de la memoire vive uniquement quand on met de fichiers la dedans. Pour l'utiliser du ajoutes (apart du support dans le noyau bien sur) dans /etc/fstab une ligne comme:
tmpfs /dev/shm tmpfs defaults 0 0
et apres le prochain boot (ou "mount /dev/shm") tu aurras ton ramdisk dans le repertoire /dev/shm. Par defaut ca a la taille (maximale) de la moitie de ton RAM mais ce n'est bouffe quand on y met vraiement de fichiers. Ca peut bien servir pour faire des taches de manipulations de fichiers complique sans utiliser le DD (par exemple de compilations des tar.gz).
Bonsoir
Moi aussi j'ai le même prob
J'était en 2.4.35 et j'ai recompilé les sources de 2.6.29 avec la config proposée dans les sources
La compilation s'est bien déroulée et j'ai fait les changements dans lilo pour pouvoir avoir le choix de démarrer en 2.4.35 ou en 2.6.29
Quand je démarre en 2.6.29 j'ai le probleme évoqué plus haut
Ma machine est équipée de disques IDE seulement et mon fstab est tout ce qu'il y a de plus simple
-----------------------
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/hda1 / ext2 errors=remount-ro 0 1
/dev/hda5 none swap sw 0 0
/dev/hdb1 /home ext2 errors=remount-ro 0 1
/dev/hdb2 /var ext2 errors=remount-ro 0 1
/dev/hdb4 /usr ext2 errors=remount-ro 0 1
/proc proc defaults 0 0
/dev/fd0 /floppy auto user,noauto 0 0
/dev/cdrom /cdrom iso9660 ro,user,noauto 0 0
------------------------
Voici mon lilo.conf
----------------
# /etc/lilo.conf - See: `lilo(8)' and `lilo.conf(5)',
# --------------- `install-mbr(8)', `/usr/share/doc/lilo/',
# and `/usr/share/doc/mbr/'.
# +---------------------------------------------------------------+
# | !! Reminder !! |
# | |
# | Don't forget to run `lilo' after you make changes to this |
# | conffile, `/boot/bootmess.txt', or install a new kernel. The |
# | computer will most likely fail to boot if a kernel-image |
# | post-install script or you don't remember to run `lilo'. |
# | |
# +---------------------------------------------------------------+
# Support LBA for large hard disks.
#
lba32
# Overrides the default mapping between harddisk names and the BIOS'
# harddisk order. Use with caution.
#disk=/dev/hde
# bios=0x81
#disk=/dev/sda
# bios=0x80
# Specifies the boot device. This is where Lilo installs its boot
# block. It can be either a partition, or the raw device, in which
# case it installs in the MBR, and will overwrite the current MBR.
#
boot=/dev/hda
# Specifies the device that should be mounted as root. (`/')
#
root=/dev/hda1
# Enable map compaction:
# Tries to merge read requests for adjacent sectors into a single
# read request. This drastically reduces load time and keeps the
# map smaller. Using `compact' is especially recommended when
# booting from a floppy disk. It is disabled here by default
# because it doesn't always work.
#
# compact
# Installs the specified file as the new boot sector
# You have the choice between: bmp, compat, menu and text
# Look in /boot/ and in lilo.conf(5) manpage for details
#
install=/boot/boot-menu.b
# Specifies the location of the map file
#
map=/boot/map
# You can set a password here, and uncomment the `restricted' lines
# in the image definitions below to make it so that a password must
# be typed to boot anything but a default configuration. If a
# command line is given, other than one specified by an `append'
# statement in `lilo.conf', the password will be required, but a
# standard default boot will not require one.
#
# This will, for instance, prevent anyone with access to the
# console from booting with something like `Linux init=/bin/sh',
# and thus becoming `root' without proper authorization.
#
# Note that if you really need this type of security, you will
# likely also want to use `install-mbr' to reconfigure the MBR
# program, as well as set up your BIOS to disallow booting from
# removable disk or CD-ROM, then put a password on getting into the
# BIOS configuration as well. Please RTFM `install-mbr(8)'.
#
# password=tatercounter2000
# Specifies the number of deciseconds (0.1 seconds) LILO should
# wait before booting the first image.
#
#delay=100
# You can put a customized boot message up if you like. If you use
# `prompt', and this computer may need to reboot unattended, you
# must specify a `timeout', or it will sit there forever waiting
# for a keypress. `single-key' goes with the `alias' lines in the
# `image' configurations below. eg: You can press `1' to boot
# `Linux', `2' to boot `LinuxOLD', if you uncomment the `alias'.
#
message=/boot/bootmess.txt
prompt
single-key
delay=100
timeout=100
default=Linux2.4.35
# Specifies the VGA text mode at boot time. (normal, extended, ask, <mode>)
#
# vga=ask
# vga=9
#
vga=normal
# Kernel command line options that apply to all installed images go
# here. See: The `boot-prompt-HOWO' and `kernel-parameters.txt' in
# the Linux kernel `Documentation' directory.
#
# append=""
image=/boot/vmlinuz4
label=Linux2.4.35
read-only
# restricted
alias=1
image=/boot/vmlinuz-2.6.29
label=Linux2.6.29
read-only
# restricted
alias=2
# If you have another OS on this machine to boot, you can uncomment the
# following lines, changing the device name on the `other' line to
# where your other OS' partition is.
#
# other=/dev/hda4
# label=HURD
# restricted
# alias=3
------------------------------
Quelles modifications faut-il apporter pour corriger le problème
Thanks a lot
Moi aussi j'ai le même prob
J'était en 2.4.35 et j'ai recompilé les sources de 2.6.29 avec la config proposée dans les sources
La compilation s'est bien déroulée et j'ai fait les changements dans lilo pour pouvoir avoir le choix de démarrer en 2.4.35 ou en 2.6.29
Quand je démarre en 2.6.29 j'ai le probleme évoqué plus haut
Ma machine est équipée de disques IDE seulement et mon fstab est tout ce qu'il y a de plus simple
-----------------------
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/hda1 / ext2 errors=remount-ro 0 1
/dev/hda5 none swap sw 0 0
/dev/hdb1 /home ext2 errors=remount-ro 0 1
/dev/hdb2 /var ext2 errors=remount-ro 0 1
/dev/hdb4 /usr ext2 errors=remount-ro 0 1
/proc proc defaults 0 0
/dev/fd0 /floppy auto user,noauto 0 0
/dev/cdrom /cdrom iso9660 ro,user,noauto 0 0
------------------------
Voici mon lilo.conf
----------------
# /etc/lilo.conf - See: `lilo(8)' and `lilo.conf(5)',
# --------------- `install-mbr(8)', `/usr/share/doc/lilo/',
# and `/usr/share/doc/mbr/'.
# +---------------------------------------------------------------+
# | !! Reminder !! |
# | |
# | Don't forget to run `lilo' after you make changes to this |
# | conffile, `/boot/bootmess.txt', or install a new kernel. The |
# | computer will most likely fail to boot if a kernel-image |
# | post-install script or you don't remember to run `lilo'. |
# | |
# +---------------------------------------------------------------+
# Support LBA for large hard disks.
#
lba32
# Overrides the default mapping between harddisk names and the BIOS'
# harddisk order. Use with caution.
#disk=/dev/hde
# bios=0x81
#disk=/dev/sda
# bios=0x80
# Specifies the boot device. This is where Lilo installs its boot
# block. It can be either a partition, or the raw device, in which
# case it installs in the MBR, and will overwrite the current MBR.
#
boot=/dev/hda
# Specifies the device that should be mounted as root. (`/')
#
root=/dev/hda1
# Enable map compaction:
# Tries to merge read requests for adjacent sectors into a single
# read request. This drastically reduces load time and keeps the
# map smaller. Using `compact' is especially recommended when
# booting from a floppy disk. It is disabled here by default
# because it doesn't always work.
#
# compact
# Installs the specified file as the new boot sector
# You have the choice between: bmp, compat, menu and text
# Look in /boot/ and in lilo.conf(5) manpage for details
#
install=/boot/boot-menu.b
# Specifies the location of the map file
#
map=/boot/map
# You can set a password here, and uncomment the `restricted' lines
# in the image definitions below to make it so that a password must
# be typed to boot anything but a default configuration. If a
# command line is given, other than one specified by an `append'
# statement in `lilo.conf', the password will be required, but a
# standard default boot will not require one.
#
# This will, for instance, prevent anyone with access to the
# console from booting with something like `Linux init=/bin/sh',
# and thus becoming `root' without proper authorization.
#
# Note that if you really need this type of security, you will
# likely also want to use `install-mbr' to reconfigure the MBR
# program, as well as set up your BIOS to disallow booting from
# removable disk or CD-ROM, then put a password on getting into the
# BIOS configuration as well. Please RTFM `install-mbr(8)'.
#
# password=tatercounter2000
# Specifies the number of deciseconds (0.1 seconds) LILO should
# wait before booting the first image.
#
#delay=100
# You can put a customized boot message up if you like. If you use
# `prompt', and this computer may need to reboot unattended, you
# must specify a `timeout', or it will sit there forever waiting
# for a keypress. `single-key' goes with the `alias' lines in the
# `image' configurations below. eg: You can press `1' to boot
# `Linux', `2' to boot `LinuxOLD', if you uncomment the `alias'.
#
message=/boot/bootmess.txt
prompt
single-key
delay=100
timeout=100
default=Linux2.4.35
# Specifies the VGA text mode at boot time. (normal, extended, ask, <mode>)
#
# vga=ask
# vga=9
#
vga=normal
# Kernel command line options that apply to all installed images go
# here. See: The `boot-prompt-HOWO' and `kernel-parameters.txt' in
# the Linux kernel `Documentation' directory.
#
# append=""
image=/boot/vmlinuz4
label=Linux2.4.35
read-only
# restricted
alias=1
image=/boot/vmlinuz-2.6.29
label=Linux2.6.29
read-only
# restricted
alias=2
# If you have another OS on this machine to boot, you can uncomment the
# following lines, changing the device name on the `other' line to
# where your other OS' partition is.
#
# other=/dev/hda4
# label=HURD
# restricted
# alias=3
------------------------------
Quelles modifications faut-il apporter pour corriger le problème
Thanks a lot
13 mars 2007 à 00:10
24 avril 2008 à 19:57