Outils pour utilisateurs

Outils du site


issue170:mon_opinion

Q Can a desktop user follow the Ubuntu 20.04 boot process through to Log In? The reason I posed the above question was due to a speed problem with both WiFi & Bluetooth. The problem showed up when opening a web page, but would then time out, whereas the transfer of a file using Bluetooth would state that a small file would take over ten minutes or more to load. After looking on the web, I found that I could use ‘speedtest-cli’ to check the network speed. It can be seen that the download speed is non-existent (below). While writing these notes, I wanted to check the above ‘Hosted by ….’ timing when the WiFi was working correctly but, unfortunately, ‘speedtest-cli’ which is written in Python, is now not working and gives runtime errors.

Q : Un utilisateur d’Ubuntu Desktop peut-il suivre le processus de démarrage d’Ubuntu 20.04 jusqu’à l’écran de connexion ?

La raison pour laquelle j’ai posé la question ci-dessus était que j'avais un problème de lenteur avec à la fois le WiFi et le Bluetooth. J’ai vu le problème quand j’ouvrais une page Web, dont l’ouverture s’arrêtait, alors que le transfert d’un fichier avec Bluetooth annonçait qu’il faudrait plus de 10 minutes pour charger un petit fichier.

Après avoir cherché sur le Web, j’ai trouvé que je pouvais utiliser « speedtest-cli » pour vérifier la vitesse du réseau. Vous verrez que la vitesse de téléchargement est inexistante (ci-dessous).

Tout en écrivant ces notes, je voulais vérifier le temps du « Hosted by… » (hébergé par…) ci-dessus quand le WiFi fonctionnait correctement, mais, malheureusement, « speedtest-cli », qui est écrit en Python ne fonctionne pas actuellement et donne des erreurs de durée d’exécution.

Also from the web, use ‘lspci -v’ to find the WiFi / Bluetooth device and driver being used, i.e. Qualcomm QCA9377 Adapter and ath10k_pci driver (bottom right). But, looking under ‘Settings / About / Software Updates / Additional Drivers’ (see top right), the QCA9377 Adapter we are told is using the ‘Disable WiFi ASPM L0s’ driver?? So can we use the boot process to find where the driver for the Network Adapter gets loaded? Booting Ubuntu The following is my understanding of what happens when a computer starts Ubuntu. Please email ronnie@fullcirclemagazine.org with any comments, corrections, or observations; your help is appreciated, as I am unable to find a definitive explanation.

Également du Web, utiliser « lspci -v » pour trouver le dispositif WiFi/Bluetooth et le pilote utilisés, c'est-à-dire l’adaptateur Qualcomm QCA9377 et le pilote ath10k_pci.

Mais, si je regarde sous « Paramètres/À propos/Mises à jour logicielles/ Pilotes additionnels » (en haut à droite), on me dit que l’adaptateur QCA9377 utilise le pilote « WiFi ASPM L0 désactivé » ??

Bon. Peut-on utiliser le processus de démarrage pour trouver l’endroit où le pilote de l’adaptateur réseau est chargé ?

Démarrer Ubuntu

Voici ce que je comprends de ce qui se passe quand un ordinateur démarre sous Ubuntu. Je vous prie d’envoyer un mail à « ronnie@fullcirclemagazine.org » avec vos commentaires, corrections ou observations ; votre aide sera appréciée, car je n’arrive pas à trouver une explication définitive.

I wanted to try and understand the boot process, and find any files that link through from power up, to a prompt for me to log in. There have been many hours reading books, and looking on many, many web pages to get the information listed below. There are a number of distinct steps before an operating system asks you to log in to a username. The main steps for computers before 2011 are: • Power On Self Test (POST) • Basic Input/Output System (BIOS) • Master Boot Record (MBR) • GRand Unified Bootloader (GRUB{this has three sub-stages}, GRUB2) • Linux Kernel • Initial (init) • Runlevel Programs… In 2011 the combined BIOS + MBR was updated, and now uses EFI or Unified EFI, so the main steps are: • Power On Self Test (POST) • Extensible Firmware Interface (EFI) or Unified EFI (UEFI) • GRand Unified Bootloader (GRUB{this has three sub-stages}, GRUB2) • Linux Kernel • Initial (systemd).. The first steps are the same for any computer and are hardware specific. Je voulais essayer de comprendre le processus de démarrage et trouver tous les fichiers qui s’ouvrent entre la mise sous tension et la page de connexion. J’ai passé des heures et des heures à lire des livres et à chercher dans de très, très nombreuses pages Web pour obtenir les informations données ci-dessous. Avant qu’un système d’exploitation vous demande de vous connecter, il y a plusieurs étapes distinctes. Les étapes principales pour des ordinateurs d’avant 2011 sont : ••Power On Self Test (POST) ••Basic Input/Output System (BIOS) ••Master Boot Record (MBR) ••GRand Unified Bootloader (GRUB{qui a trois sous-étapes}, GRUB2) ••Noyau Linux ••Initial (init) ••Les programmes du niveau de fonctionnement En 2011, le BIOS et le MBR combinés ont été mis à jour et utilisent maintenant EFI ou Unified EFI ; aussi, les étapes principales sont : ••Power On Self Test (POST) ••Extensible Firmware Interface (EFI) or Unified EFI (UEFI) ••GRand Unified Bootloader (GRUB{avec ses trois sous-étapes}, GRUB2) ••Noyau Linux ••Initial (systemd).. POST, as the name implies, is a self-test of direct memory access and other hardware, initializing it to a known operational, working state, i.e. the power supply, memory, cpu, etc.

The order that the computer looks for a boot loader can be adjusted using the BIOS, e.g. CD-ROM, USB, Hard Disk, etc. The main use of the original BIOS was to read the MBR (Master Boot Record) which pointed to the one and only operating system stored in the boot sector.

Computer manufacturers’ EFI (firmware interface) varies greatly but is more complex than the older BIOS. Instead of relying on code in the boot sector on the hard disk, EFI relies on boot loaders stored as files in a disk partition known as the EFI System Partition (ESP). Thus EFI manages the storage of separate boot loaders for each OS that you install on the computer, e.g. Ubuntu, Mint, Windows, etc. POST, comme le nom suggère, est un auto-test d’accès à la mémoire directe et à d’autres matériels, les initialisant à un état opérationnel et fonctionnel connu, c’est-à-dire l’alimentation, la mémoire, le processeur, etc. L’ordre dans lequel l’ordinateur recherche un chargeur de démarrage peut être ajusté en utilisant le BIOS, par exemple CD-ROM, USB, disque dur, etc. La fonction principale du BIOS original était de lire le MBR (Master Boot Record, parfois « zone d’amorçage » en français) qui pointait vers le seul et unique système d’exploitation stocké dans le secteur de démarrage. L’EFI (interface du firmware) des fabricants varie énormément, mais est plus complexe que son aîné, le BIOS. Au lieu de se fier au code dans le secteur boot sur le disque dur, l’EFI fait confiance aux chargeurs de démarrage stockés en tant que fichiers dans une partition du disque appelée (l’EFI System Partition (ESP). Ainsi, l’EFI gère le stockage de chaque chargeur de démarrage pour chaque système d’exploitation que vous installez sur l’ordinateur, notamment Ubuntu, Mint, Windows, etc. GRUB is the program which makes the computer smart enough to find the operating system kernel and start loading it into memory. The original GRUB has been superseded by GRUB2, but most systems use the name of ‘GRUB’ for GRUB2, and ‘GRUB Legacy’ for the original GRUB. The main difference is that GRUB Legacy was used with BIOS, whereas GRUB (GRUB2) is designed to work with EFI.

Linux Kernel is at the heart of every Linux system, and is made up of kernel drivers, many of which come in the form of Kernel Modules which handle the hardware in Linux.

Initial (or the initialization process) starts all the programs based on the desired features that the user wants to run in the Linux system. For example, on a laptop computer, the Linux system does not need to start a web server service, and a Linux server used by a company does not need to start a graphical desktop environment.

Runlevel Programs. The initialization process determines what services to start based on the runlevel of the system. There are seven levels numbered 0 to 6, and each one is assigned a set of services that should be active for that runlevel. GRUB est le programme qui rend l’ordinateur assez intelligent pour trouver le noyau du système d’exploitation et commencer à le charger en mémoire. Le GRUB d’origine a été supplanté par GRUB2, mais la plupart des systèmes utilisent le nom « GRUB » pour GRUB2 et « GRUB Legacy » pour le GRUB d’origine. La principale différence entre les deux est que GRUB Legacy était utilisé avec le BIOS, alors que GRUB (GRUB2) est conçu pour fonctionner avec l'EFI. Le noyau Linux est au cœur de tout système Linux ; il est composé de pilotes du noyau, dont beaucoup sont sous la forme de modules du noyau qui gèrent le matériel sous Linux. Initial (ou le processus d’initialisation) démarre tous les programmes selon les fonctionnalités que l’utilisateur veut exécuter dans le système Linux. Par exemple, sur un ordinateur portable, le système Linux n’a pas besoin de démarrer un service de serveur Web, et un serveur Linux utilisé en entreprise n’a pas besoin de démarrer un environnement graphique de bureau. « Runlevel Programs » (les programmes du niveau de fonctionnement). C'est le processus d’initialisation qui décide quels services il faut démarrer selon le niveau de fonctionnement du système. Il y a sept niveaux, de 0 à 6, et un ensemble de services, qui devrait être activé pour un niveau de fonctionnement précis, est assigné à chacun. Background of GNU/Linux

We need an understanding of where Linux (as we call it) comes from, so that we can understand why Ubuntu uses the above steps in the way it does.

It was both Richard M Stallman & Linus Torvalds who originally started GNU/Linux. All systems that we call Linux today are, in fact, built on the work of this collaboration. Linux is a Unix-like operating system that conforms closely to conventions & standards associated with Unix, but does not contain any of the original Unix code.

Unix and GNU/Linux use runlevels, which are numbered from zero to 6, and S is sometimes used as a synonym for one of the levels. Folder ‘etc/’ (in Ubuntu 20.04) has sub-folders of rc0.d to rc6.d, as well as rcS.d – which look like runlevels.

Ubuntu is what is called a distribution of GNU/Linux – a distro for short. There are many Linux distros, Mint, SUSE, Fedora Red Hat, etc, including Ubuntu, that all use the Linux Kernel but then build their own user interface and other software on top. Historique de GNU/Linux Nous devons comprendre les origines de Linux (comme nous l’appelons), afin de pouvoir comprendre pourquoi Ubuntu se sert des étapes ci-dessus de la façon dont il le fait. Au départ, c’était à la fois Richard M. Stallman et Linus Torvalds qui ont créé GNU/Linux. Tous les systèmes que nous appelons aujourd’hui Linux sont, en fait, construits sur le travail de cette collaboration. Linux est un système d’exploitation du type Unix qui se conforme de près aux conventions et normes associées à Unix, mais ne contient aucun morceau du code Unix original. Unix et GNU/Linux utilisent des « runlevels » (niveaux de fonctionnement), numérotés de 0 à 6, et S est parfois utilisé comme synonyme d’un de ces niveaux. Le dossier « etc/ » (dans Ubuntu 20.04) a des sous-dossiers de rc0.d à rc6.d, ainsi que rcS.d – qui ressemblent à des niveaux de fonctionnement. Ubuntu est ce qui s’appelle une distribution de GNU/Linux, ou distrib. en abréviation. Il y a de nombreuses distrib. Linux : Mint, SUSE, Fedora Red Hat, etc., y compris Ubuntu, qui utilisent tous le noyau Linux, mais ensuite construisent leur propre interface utilisateur et autres logiciels par-dessus. Ubuntu 20.04

The computer used to view the boot process was a Dell Inspiron 3000 model 3581, with a disk partitioned into three - i.e. dev/sda1, dev/sda2 and dev/sda3.

The grand unified boot loader that Ubuntu 20.04 uses is GRUB (GRUB2, not GRUB Legacy). Linux uses GRUB to enable the user to boot different operating systems on the one computer system, albeit at different times.

The GRUB file that the computer runs is named grub.cfg, and is in the directory folder /boot/grub/grub.cfg. The contents of the grub.cfg file are automatically generated by ‘grub-mkconfig’ using templates from /etc/grub.d and settings from /etc/default/grub.

As mentioned above, the Linux Kernel is at the heart of all the distros. Ubuntu 20.04 L’ordinateur que j’ai utilisé pour regarder le processus de démarrage était un Dell Inspiron 3000 modèle 3581, avec un disque qui a trois partitions, c’est-à-dire dev/sda1, dev/sda2 et dev/sda3. Le « grand unified boot loader » qu’utilise Ubuntu 20.04 est GRUB (GRUB2, pas GRUB Legacy). Linux se sert de GRUB pour permettre à l’utilisateur de démarrer différents systèmes d’exploitation sur un seul ordinateur, mais à des moments différents. Le fichier de GRUB, que l’ordinateur lance se nomme grub.cfg, est dans le répertoire boot/grub/grub.cfg. Le contenu du fichier grub.cfg est généré automatiquement par « grub-mkconfig » en utilisant des modèles venant de /etc/grub.d et des paramètres qui viennent de /etc/default/grub. Comme mentionné ci-dessus, le noyau Linux est au cœur de toutes les distrib. The part of the grub.cfg file shown top right can be seen to set root to ‘hd0,gpt3’ which points to partition dev/sba3. The grub.cfg file also uses ‘initrd’ which is an initial RAM disk bound to the kernel and loaded as part of the kernel boot procedure. The ‘initrd’ contains a minimum set of directories & exe’s to get to the real root file system including the ‘insmod’ tool which installs kernel modules into the kernel.

There is also ‘vmlinuz-5…’ which is the statically linked executable file that contains the Linux kernel, and gets loaded from the GRUB file. This can be checked by opening a terminal window and running ‘uname -srm’ and ‘hostnamectl status’ (shown bottom right). On peut voir que la partie du fichier grub.cfg ci-dessus à droite règle la racine à « hd0,gpt3 » qui pointe vers la partition dev/sda3. Le fichier grub.cfg utilise également « initrd » qui est un disque RAM initial lié au noyau et chargé en tant que partie de la procédure du démarrage du noyau. « initrd » contient un ensemble minimal de répertoires et exécutables pour récupérer le système de fichiers véritable de root (la racine), y compris l’outil « insmod » qui installe les modules du noyau dans le noyau. Il y a aussi « vmlinuz-5… » qui est le fichier exécutable, lié de façon statique, qui contient le noyau Linux, et qui est chargé à partir du fichier GRUB. Vous pouvez le vérifier en ouvrant une fenêtre de terminal et en lançant « uname -srm » et « hostnamectl status » (en bas à droite). This is where I get confused, as the earlier Ubuntu distros have used ‘init’, ‘SystemV’ and ‘run levels’ to load other files, drivers, etc, to get to a usable operating system. As mentioned earlier, Ubuntu 20.04 has sub-folders that look just like the ‘run levels’.

We are told that Ubuntu 20.04 uses ‘systemd’. ‘systemd’ looks in the etc/systemd/system folder for the default.target file. When you find this file, it’s only a link to the file lib/systemd/system/graphical.target.

I was hoping to see ‘systemd’ being called from GRUB, but all I could find there was the ‘initrd’ ram file and the ‘insmod’ tool. So I do not know how ‘systemd’ gets started. It may be that the last thing that the kernel does is to start ‘systemd’, but I can not find anywhere to confirm this. Là, je ne comprends plus grand-chose , car les distrib. Ubuntu antérieures utilisaient « init », « SystemV » et « run levels » pour charger d’autres fichiers, pilotes, etc., pour arriver à un système d’exploitation fonctionnel. Comme je l’ai déjà mentionné, Ubuntu 20.04 contient des sous-dossiers qui ressemblent tout à fait à des « niveaux de fonctionnement ». On nous dit qu'Ubuntu 20.04 utilise « systemd ». « systemd » regarde dans le dossier etc/dystemd/system pour le fichier default.target. Quand vous trouvez ce fichier, ce n’est qu’un lien vers le fichier lib/systemd/system/graphical.target. J’espérais voir que « systemd » était appelé à partir de GRUB, mais tout ce que je pouvais y trouver était le fichier ram « initrd » et l’outil « insmod ». Ainsi, je ne sais pas du tout comment « systemd » est démarré. Démarrer « systemd » est peut-être la dernière chose que fait le noyau, mais je ne trouve une confirmation de cela nulle part. ‘systemd’ uses ‘target’ files which are the Linux current or desired run state, and they define the services that must be present, running and active for the system to run in that desired state. A desired state could be the ‘rescue.target’, just a basic system, or the ‘graphical.target’ which has all services running with a graphical user interface.

The diagram bottom left is a copy from the boot man page, and shows the general sequence of events during the systemd startup.

(near the heading Network File System in the list) and find a reference to either of the WiFi network drivers that we have found earlier? (see bottom right).

Opening the files only shows that the contents of these files point to more general target files. « systemd » utilise des fichiers « cible » qui sont l’état d’exécution actuel ou désiré de Linux et ce sont eux qui définissent les services qui doivent être présents, lancés et actifs pour que le système tourne dans cet état désiré. Un état désiré pourrait être le « rescue.target », juste un système de base ou le « graphical.target » dans lequel tous les services sont démarrés et qui a une interface graphique. Le diagramme ci-dessous est une copie de la page man « boot » et montre la séquence générale des événements pendant le démarrage systemd. L’ouverture des fichiers montre uniquement que le contenu de ces fichiers pointe vers des fichiers cible qui sont plus généraux. Summing Up

The question we posed was “Can a desktop user follow the Ubuntu 20.04 boot process through to Log In?”

For this user the answer would be a resounding “NO”.

The amount of files that are loaded, points towards backwards compatibility to earlier GNU/Linux boot-up procedures.

As the laptop was still in warranty, Dell was approached a number of times for technical advice as to why the WiFI was running slow, but I was told that as the operating system was Ubuntu they could not help.

During investigations of why the WiFi & Bluetooth was so slow, Dell’s Ubuntu test procedure web pages were used to record test results in preparation of another discussion with Dell. No files were changed, but for no reason I can find, the system just started working at full capacity again.**

En résumé

La question était « Est-ce qu’un utilisateur de Desktop peut suivre le processus de démarrage d’Ubuntu 20.04 jusqu’à l’écran de connexion ? »

Pour cet utilisateur-ci, la réponse serait un « NON » retentissant.

La quantité de fichiers chargés indique une rétro-compatibilité avec des procédures de démarrage antérieures de GNU/Linux.

Puisque le portable était toujours sous garantie, j’ai demandé de nombreuses fois des conseils techniques auprès de Dell sur la lenteur du WiFi, mais on m’a dit que, puisque le système d’exploitation était Ubuntu, ils ne pouvaient pas m’aider.

Pendant que j’essayais de trouver pourquoi le WiFi et le Bluetooth était tellement lents, j’ai utilisé les pages Web des procédures de test Ubuntu de chez Dell pour enregistrer les résultats de mes tests en vue d’une autre discussion avec Dell. Aucun fichier n’a été changé, mais, pour aucune raison que je puisse trouver, le système a tout simplement commencé à fonctionner pleinement à nouveau.

Bio : Wil Lake est un ingénieur mécanicien retraité qui a suivi une seconde formation comme ingénieur informatique quand les Micro-processeurs sont devenus populaires. Il travaille dans l’industrie informatique depuis plus de 30 ans et habite dans les Cotswolds, Angleterre, R.U. Depuis des années, il y rénove un étable.

issue170/mon_opinion.txt · Dernière modification : 2021/06/28 08:02 de d52fr