Outils pour utilisateurs

Outils du site


issue131:labo_linux

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
issue131:labo_linux [2018/03/31 17:43] – créée auntieeissue131:labo_linux [2018/04/16 19:45] (Version actuelle) andre_domenech
Ligne 1: Ligne 1:
-My work normally entails running the daily operations of our Computer Recycling/Refurbishing Project, but I’m also part of our organization’s IT Team, and as such sometimes (very rarely) get called on to solve issues in other parts of the organization. Our organization runs Windows on the desktop for most of the staff, but there are a few areas of the organization where the staff use Linux. Recently, I was asked to solve an issue at one of the locations we use Linux on the desktop. The way the issue was initially described to me sounded like a possible hardware issue - the system would start booting then hang at a black screen.+**My work normally entails running the daily operations of our Computer Recycling/Refurbishing Project, but I’m also part of our organization’s IT Team, and as such sometimes (very rarely) get called on to solve issues in other parts of the organization. Our organization runs Windows on the desktop for most of the staff, but there are a few areas of the organization where the staff use Linux. Recently, I was asked to solve an issue at one of the locations we use Linux on the desktop. The way the issue was initially described to me sounded like a possible hardware issue - the system would start booting then hang at a black screen.
  
 When I arrived on site, I confirmed that the system was just sitting on a black screen with a non-blinking cursor line in the top left of the screen. The normal behaviour for this machine was to boot to a LightDM login screen for Xubuntu Linux. I tried CTRL+ALT+F1 to switch to a virtual terminal, it didn’t work.  When I arrived on site, I confirmed that the system was just sitting on a black screen with a non-blinking cursor line in the top left of the screen. The normal behaviour for this machine was to boot to a LightDM login screen for Xubuntu Linux. I tried CTRL+ALT+F1 to switch to a virtual terminal, it didn’t work. 
  
-I powered the system down and powered it up again to the same result. I repeated the process this time hitting the TAB key a few times and pressing CTRL+ALT+F1 for the first virtual terminal; this time I successfully brought up a terminal login. +I powered the system down and powered it up again to the same result. I repeated the process this time hitting the TAB key a few times and pressing CTRL+ALT+F1 for the first virtual terminal; this time I successfully brought up a terminal login. **
  
-Earlier in the week, I had one of our Computer Recycling clients bring in a laptop where the xserver configuration file had become corrupted. This problem had some similarities to the laptop issue, so I tried:+Normalement, mon travail consiste en la gestion des opérations quotidiennes de notre projet de recyclage et de rénovation d'ordinateurs, mais je fais aussi partie de l'équipe IT de notre organisme et, en tant que tel, je suis parfois (très rarement) appelé pour résoudre des problèmes dans d'autres parties de l'organisation. Celle-ci fait tourner Windows sur les ordinateurs de bureau de la plupart du personnel, mais il y a quelques endroits où le personnel se sert de Linux. On m'a récemment demandé de résoudre un problème à l'un des emplacements où nous utilisons Linux sur un ordinateur de bureau. D'après la description initiale du problème, il me semblait que c'était sans doute un problème du matériel : le système commençait à démarrer, puis se gelait sur un écran noir. 
 + 
 +Lors de mon arrivée sur site, j'ai confirmé que le système restait sur un écran noir avec une ligne non clignotante du curseur en haut et à gauche de l'écran. Normalement, cette machine démarrait sur un écran de connexion LightDM pour Xubuntu Linux. J'ai essayé CTRL+ALT+F1 pour basculer sur un terminal virtuel, mais cela n'a pas fonctionné. 
 + 
 +J'ai arrêté le système et l'ai allumé à nouveau avec le même résultat. J'ai répété le processus en appuyant plusieurs fois sur la touche TAB, puis en appuyant sur CTRL+ALT+F1 pour le premier terminal virtuel ; cette fois-ci, une page de connexion au terminal s'est affichée - j'avais réussi. 
 + 
 +**Earlier in the week, I had one of our Computer Recycling clients bring in a laptop where the xserver configuration file had become corrupted. This problem had some similarities to the laptop issue, so I tried:
  
 sudo dpkg-reconfigure xserver-xorg-video-intel sudo dpkg-reconfigure xserver-xorg-video-intel
Ligne 15: Ligne 21:
 sudo apt-get -f install sudo apt-get -f install
  
-It was at this moment that I noticed an inordinate amount of kernel images. This was the eureka moment, literally pages of kernel images had been left on the system. Removing old images was simple (or so I thought):+It was at this moment that I noticed an inordinate amount of kernel images. This was the eureka moment, literally pages of kernel images had been left on the system. Removing old images was simple (or so I thought):**
  
-sudo apt-get autoremove+Plus tôt dans la semaine, j'avais demandé à l'un des clients du projet de recyclage des ordinateurs de nous apporter un portable sur lequel le fichier de configuration de xserver s'était corrompu. Le problème auquel j'étais confronté était plus ou moins similaire au problème du portable ; aussi, j'ai essayé : 
 + 
 +sudo dpkg-reconfigure xserver-xorg-video-intel 
 + 
 +C'est alors que j'ai eu un message d'erreur me signalant qu'il ne restait plus d'espace système. (N.B. : si vous essayez ceci sur votre système, il faudra choisir le xserver pour lequel votre carte graphique est réglée, par exemple : xserver-xorg-video-nvidia). Quand j'ai lancé df - h /, cela m'a montré qu'en fait il restait encore environ 7 Go d'espace pour le système. Le disque sur cette machine précise était vraiment petit (40 Go), mais, avec 7 Go d'espace libre, il n'aurait pas dû se plaindre d'un manque d'espace. 
 + 
 +Perplexe, j'ai décidé d'essayer d'installer gparted (à la fois pour vérifier et redimensionner le disque). Quand j'ai essayé d'installer gparted, j'ai eu un message me disant que le système n'arrivait pas à écrire sur /var/cache. J'ai essayé de réparer cela avec : 
 + 
 +sudo apt-get -f install 
 + 
 +À ce moment j'ai remarqué un nombre démesuré d'images de noyau. C'était mon moment « eurêka » ; il restait littéralement des pages et des pages d'images du noyau. Enlever les vieilles images était simple (c'est du moins ce que je croyais) : 
 + 
 +**sudo apt-get autoremove
  
 This would have worked except the system was out of space (on /usr) and broken. In order to free up a bit of space to run the apt-get -f install and apt-get autoremove, I manually removed a couple of the kernel images. I chose images that were neither the oldest nor the newest, and then ran: This would have worked except the system was out of space (on /usr) and broken. In order to free up a bit of space to run the apt-get -f install and apt-get autoremove, I manually removed a couple of the kernel images. I chose images that were neither the oldest nor the newest, and then ran:
Ligne 31: Ligne 49:
 sudo apt-get autoremove sudo apt-get autoremove
  
-Removing the old kernel images took nearly 1 hour. As a kernel image is removed, grub2 regenerates the grub2 boot file. Remove an image, regenerate the grub2 boot file, rinse and repeat – until all the extra kernel images were removed. This freed up 14.9GB of drive space on the tiny drive.+Removing the old kernel images took nearly 1 hour. As a kernel image is removed, grub2 regenerates the grub2 boot file. Remove an image, regenerate the grub2 boot file, rinse and repeat – until all the extra kernel images were removed. This freed up 14.9GB of drive space on the tiny drive.** 
 + 
 +sudo apt-get autoremove 
 + 
 +Cela aurait fonctionné sauf que le système n'avait plus d'espace (sur /usr) et était cassé. Afin de pouvoir libérer assez d'espace pour lancer apt-get -f et apt-get autoremove, j'ai enlevé deux images noyau à la main. J'ai choisi des images qui n'étaient ni les plus vieilles, ni les plus récentes et ensuite j'ai lancé : 
 + 
 +sudo rm -rf /usr/src/linux-headers-4.0.3-20-generic 
 + 
 +sudo rm -rf /usr/src/linux-headers-4.0.3-20 
 + 
 +N.B. : les deux lignes ci-dessus sont un exemple (il faut toujours faire très attention en enlevant quelque partie du système que ce soit qui peut être critique). 
 + 
 +Après avoir enlevé deux jeux d'en-têtes de noyau Linux, je pouvais lancer la commande : 
 + 
 +sudo apt-get autoremove 
 + 
 +Il a fallu presque une heure pour supprimer les vieilles images noyau. Lors de la suppression d'une image noyau, grub2 régénère le fichier boot grub2. Enlever une image, régénérer le fichier boot grub2, encore et encore, jusqu'à ce que toutes les images noyau excédentaires soient supprimées. Cela a libéré 14,9 Go d'espace disque sur le petit disque. 
 + 
 +**I’d previously tried to install gparted and it failed because of the full drive. Now that the drive had more space, I was able to run sudo apt-get -f install to complete the installation. While we have unattended updates that run on this particular machine, those updates had stopped a few days earlier because of the full drive, so I also ran sudo apt-get update && sudo apt-get upgrade to upgrade the system to the latest packages. 
 + 
 +On reboot, the machine loaded the LightDM login screen and the staff were able to login to the machine normally.**
  
-I’previously tried to install gparted and it failed because of the full driveNow that the drive had more spaceI was able to run sudo apt-get -f install to complete the installation. While we have unattended updates that run on this particular machine, those updates had stopped a few days earlier because of the full drive, so I also ran sudo apt-get update && sudo apt-get upgrade to upgrade the system to the latest packages.+J'avais précédemment essayé d'installer gparted, mais sans succès à cause du disque pleinMaintenant qu'il y avait plus d'espace sur le disqueje pouvais lancer sudo apt-get -f install pour terminer l'installation. Bien que les mises à jour sur cette machine soient automatiséescelles-ci s'étaient arrêtées quelques journées plus tôt à cause du disque plein ; j'ai donc également lancé sudo apt-get update && sudo apt-get upgrade pour mettre le système à niveau avec les derniers paquets.
  
-On rebootthe machine loaded the LightDM login screen and the staff were able to login to the machine normally.+Au redémarragela machine a chargé l'écran de connexion LightDM et le personnel a pu se connecter à la machine normalement.
issue131/labo_linux.1522511011.txt.gz · Dernière modification : 2018/03/31 17:43 de auntiee