issue112:mon_opinion
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
issue112:mon_opinion [2016/09/05 08:03] – d52fr | issue112:mon_opinion [2016/09/07 10:13] (Version actuelle) – [4] auntiee | ||
---|---|---|---|
Ligne 3: | Ligne 3: | ||
**In a recent statement (commented here: http:// | **In a recent statement (commented here: http:// | ||
- | Dans un récent article (commenté ici : http:// | + | Dans un récent article (commenté ici : http:// |
**Modern partition schemes | **Modern partition schemes | ||
Ligne 17: | Ligne 17: | ||
Schémas modernes de partitionnement | Schémas modernes de partitionnement | ||
- | En premier, il est peut-être utile de regarder la disposition d'un disque dur utilisé le système, une fois installé. La plupart des ordinateurs de bureau et portables | + | Tout d' |
/dev/sda1 -> monté comme / = partition système | /dev/sda1 -> monté comme / = partition système | ||
Ligne 23: | Ligne 23: | ||
/dev/sda2 -> monté comme /home = données utilisateur | /dev/sda2 -> monté comme /home = données utilisateur | ||
- | Sur les serveurs, d' | + | Sur les serveurs, d' |
**This tendency to split the file system up into distinct partitions is also applicable to devices. On a modern mobile device, the internal Flash-based storage space is organized in a similar fashion to a computer’s hard drive, with a partition table and separate partitions for different purposes. For example, a typical Android-based device with 32 GBytes capacity was structured as follows: | **This tendency to split the file system up into distinct partitions is also applicable to devices. On a modern mobile device, the internal Flash-based storage space is organized in a similar fashion to a computer’s hard drive, with a partition table and separate partitions for different purposes. For example, a typical Android-based device with 32 GBytes capacity was structured as follows: | ||
Ligne 35: | Ligne 35: | ||
Here, we can identify the Flash device used as / | Here, we can identify the Flash device used as / | ||
- | Cette tendance à découper le système de fichiers en partitions distinctes est aussi applicable aux dispositifs. Sur un mobile moderne, l' | + | Cette tendance à découper le système de fichiers en partitions distinctes est aussi applicable aux dispositifs. Sur un dispositif |
$ df | $ df | ||
Ligne 43: | Ligne 43: | ||
/ | / | ||
- | Voici. Nous pouvons identifier | + | Ici, nous pouvons identifier le module |
**Such a layout may seem excessively complex at first glance. However, it does retain the advantage of being able to alter just one of the partitions without affecting the others. A system upgrade, for instance, may alter only data in partition 3 (/system), while affecting neither user data nor vendor-specific applications. | **Such a layout may seem excessively complex at first glance. However, it does retain the advantage of being able to alter just one of the partitions without affecting the others. A system upgrade, for instance, may alter only data in partition 3 (/system), while affecting neither user data nor vendor-specific applications. | ||
Ligne 61: | Ligne 61: | ||
Here, the main system hard drive /dev/sda contains two system partitions (2 and 4), while partition 5 is for user-installed applications.** | Here, the main system hard drive /dev/sda contains two system partitions (2 and 4), while partition 5 is for user-installed applications.** | ||
- | Une telle disposition peut sembler extrêmement complexe à première vue. Cependant, elle conserve l' | + | Une telle disposition peut sembler extrêmement complexe à première vue. Cependant, elle conserve l' |
- | Les installations par Snappy et Touch sont organisées | + | Les installations par Snappy et Touch sont organisées |
/dev/sda1 (8M) = zone de GRUB, marquée bios_grub, " | /dev/sda1 (8M) = zone de GRUB, marquée bios_grub, " | ||
Ligne 74: | Ligne 74: | ||
/dev/sda5 (1.6G, 40M utilisés, ext4) -> /oem = zone des applications, | /dev/sda5 (1.6G, 40M utilisés, ext4) -> /oem = zone des applications, | ||
+ | |||
+ | Ici, le disque dur principal du système /dev/sda contient deux partitions système (2 et 4), tandis que la partition 5 sert pour les applications installées par l' | ||
======2====== | ======2====== | ||
Ligne 85: | Ligne 87: | ||
Images du système Ubuntu | Images du système Ubuntu | ||
- | Qu' | + | Qu' |
- | Typiquement de nos jours, | + | Typiquement de nos jours, |
**One may ask for what reason an Ubuntu system image is not distributed in one of these compressed file formats. This would actually be possible, at least as far as the file system itself is concerned. However, the end result, once downloaded, would somehow need to be made bootable so we can actually start the computer from it, and launch the installation process. Further information must be included within the compressed file so that the BIOS can detect and boot the image, once written to a physical medium (optical disk or USB drive). | **One may ask for what reason an Ubuntu system image is not distributed in one of these compressed file formats. This would actually be possible, at least as far as the file system itself is concerned. However, the end result, once downloaded, would somehow need to be made bootable so we can actually start the computer from it, and launch the installation process. Further information must be included within the compressed file so that the BIOS can detect and boot the image, once written to a physical medium (optical disk or USB drive). | ||
The simplest tool to do this is an IMG file. This can be seen as a byte-for-byte clone of an existing hard disk. The distribution manager creates a working system or “Gold Master” (in Apple’s terms), which is then cloned into a file for distribution, | The simplest tool to do this is an IMG file. This can be seen as a byte-for-byte clone of an existing hard disk. The distribution manager creates a working system or “Gold Master” (in Apple’s terms), which is then cloned into a file for distribution, | ||
+ | |||
+ | Pour quelle raison, peut-on se demander, une image du système Ubuntu n' | ||
+ | |||
+ | L' | ||
**The IMG file can be an image either of a single partition, or of a complete drive with several partitions and a partition table to identify each. In most cases, an IMG file for an Ubuntu bootable USB contains a single partition, unlike OpenSUSE images which contain two. IMG files for flashing devices with Ubuntu Touch have their own particularities, | **The IMG file can be an image either of a single partition, or of a complete drive with several partitions and a partition table to identify each. In most cases, an IMG file for an Ubuntu bootable USB contains a single partition, unlike OpenSUSE images which contain two. IMG files for flashing devices with Ubuntu Touch have their own particularities, | ||
Ligne 102: | Ligne 108: | ||
vivid-preinstalled-system-i386+generic_x86.img: | vivid-preinstalled-system-i386+generic_x86.img: | ||
+ | |||
+ | Le fichier IMG peut être l' | ||
+ | |||
+ | # file vivid-preinstalled-boot-i386+generic_x86.img | ||
+ | |||
+ | vivid-preinstalled-boot-i386+generic_x86.img: | ||
+ | |||
+ | # file vivid-preinstalled-system-i386+generic_x86.img | ||
+ | |||
+ | vivid-preinstalled-system-i386+generic_x86.img: | ||
**ISO files are another beast altogether. ISO files are designed as a byte-by-byte copy of the contents of an optical disk, be it CD or DVD, which gives them several particularities. One is size limits: once upon a time, CDs were limited in capacity to 700 MBytes. The ISO 9660 standardized the filesystem used, with quirks that harken back to the the MS-DOS era such as filenames limited to the 8.3 format (eight characters for the file name, three characters for the extension); extensions of the standard allowed longer filenames. The “El Torito” extension, for example, allowed CDs to be used as a boot medium for computers. It should be noted that this was not a feature of the original filesystem, but rather an addition that at first inserted a floppy-disk image of 1440 kBytes that computers detected and booted from. | **ISO files are another beast altogether. ISO files are designed as a byte-by-byte copy of the contents of an optical disk, be it CD or DVD, which gives them several particularities. One is size limits: once upon a time, CDs were limited in capacity to 700 MBytes. The ISO 9660 standardized the filesystem used, with quirks that harken back to the the MS-DOS era such as filenames limited to the 8.3 format (eight characters for the file name, three characters for the extension); extensions of the standard allowed longer filenames. The “El Torito” extension, for example, allowed CDs to be used as a boot medium for computers. It should be noted that this was not a feature of the original filesystem, but rather an addition that at first inserted a floppy-disk image of 1440 kBytes that computers detected and booted from. | ||
Later DVD formats evolved somewhat, with capacities ranging from 4.37 GBytes (DVD-5 single-layer) to 7.95 GBytes (DVD-9 double-layer). Disks with higher capacities have been produced, but have not really gone mainstream for computer applications. The more modern Universal Disk Format (UDF) filesystem is now commonplace.** | Later DVD formats evolved somewhat, with capacities ranging from 4.37 GBytes (DVD-5 single-layer) to 7.95 GBytes (DVD-9 double-layer). Disks with higher capacities have been produced, but have not really gone mainstream for computer applications. The more modern Universal Disk Format (UDF) filesystem is now commonplace.** | ||
+ | |||
+ | Les fichiers ISO sont tout à fait autre chose. Les fichiers ISO sont conçus comme une copie octet-par-octet des contenus d'un disque optique, CD ou DVD, ce qui leur donne certaines particularités. L'une est la limite de taille : autrefois, les CD étaient limités à 700 Mo. La norme ISO 9660 a standardisé le système de fichiers utilisé, avec des bizarreries qui remontent à l' | ||
+ | |||
+ | Plus tard, les formats des DVD ont évolué un peu, avec des capacités s' | ||
======3====== | ======3====== | ||
Ligne 128: | Ligne 148: | ||
boot dists | boot dists | ||
+ | |||
+ | Ces restrictions du support physique et du système de fichiers - avec le souhait de rester compatible avec les vieux ordinateurs - ont limité la liberté des producteurs des images des systèmes GNU/Linux. Le fichier image doit être réalisé de telle sorte qu'il puisse être bootable sur toute une variété de systèmes - le récent BIOS EFI a compliqué les choses encore un peu plus. | ||
+ | |||
+ | En simplifiant un peu, voici ce qu'on trouve dans un fichier ISO récent d' | ||
+ | |||
+ | # mount -o loop ubuntu-16.04-desktop-amd64.iso /mnt | ||
+ | |||
+ | mount: /dev/loop0 is write-protected, | ||
+ | |||
+ | # mount | grep ubuntu | ||
+ | |||
+ | ubuntu-16.04-desktop-amd64.iso on /mnt type iso9660 (ro, | ||
+ | |||
+ | # df -lh | grep loop | ||
+ | |||
+ | / | ||
+ | |||
+ | # ls /mnt | ||
+ | |||
+ | boot dists install md5sum.txt pool README.diskdefines casper EFI isolinux pics preseed ubuntu | ||
**The basic file system is the ISO9660 compatible with the original CD format, though grown in size from the original 700 MByte limit, up to about 1.4 GBytes. The directory structure contains several specific directories such as isolinux for the Isolinux boot system for older BIOS, and EFI for the newer EFI-capable computers. The one that really concerns us, however, is the /casper directory. It contains the main contents of the ISO image such as the Linux kernel (vmlinux.efi), | **The basic file system is the ISO9660 compatible with the original CD format, though grown in size from the original 700 MByte limit, up to about 1.4 GBytes. The directory structure contains several specific directories such as isolinux for the Isolinux boot system for older BIOS, and EFI for the newer EFI-capable computers. The one that really concerns us, however, is the /casper directory. It contains the main contents of the ISO image such as the Linux kernel (vmlinux.efi), | ||
Ligne 148: | Ligne 188: | ||
< | < | ||
+ | |||
+ | Le système de fichiers de base est le format ISO9660, | ||
+ | |||
+ | # ls -lh / | ||
+ | |||
+ | -r--r--r-- 1 root root 1.4G apr 21 00:25 filesystem.squashfs | ||
+ | |||
+ | -r--r--r-- 1 root root 26M apr 21 00:25 initrd.lz | ||
+ | |||
+ | -r--r--r-- 1 root root 6.7M apr 21 00:25 vmlinuz.efi | ||
+ | |||
+ | Ce fichier SquashFS est le vrai fichier système qui est décompressé en RAM et monté sur / dans le Live CD pendant le démarrage. Nous pouvons le voir depuis le Live CD lui-même : | ||
+ | |||
+ | ubuntu@ubuntu: | ||
+ | |||
+ | /dev/sr0 on /cdrom type iso9660 (ro, | ||
+ | |||
+ | /dev/loop0 on /rofs type squashfs (ro, | ||
+ | |||
+ | < | ||
**The first entry here is the ISO image itself, giving access to all its files - including the /pool directory. Naturally, it is mounted read-only “ro”, and no changes can be made to its contents from within the newly booted Live CD. /rofs is the SquashFS, still in compressed form. This is also read-only, by design as well as the fact that it resides in an ISO image. | **The first entry here is the ISO image itself, giving access to all its files - including the /pool directory. Naturally, it is mounted read-only “ro”, and no changes can be made to its contents from within the newly booted Live CD. /rofs is the SquashFS, still in compressed form. This is also read-only, by design as well as the fact that it resides in an ISO image. | ||
Ligne 154: | Ligne 214: | ||
On a system booted from a Live CD that is, in fact, a physical DVD or an ISO image booted in a virtual machine, the boot medium cannot be altered. In these cases, the upper part of the overlay file system is maintained in RAM, and will be lost when the machine is shut down. If, on the other hand, the boot medium is a writable device such as an USB stick, persistency can be implemented – by storing the upper layer in a special file on the device, and changes can be preserved from one boot to another.** | On a system booted from a Live CD that is, in fact, a physical DVD or an ISO image booted in a virtual machine, the boot medium cannot be altered. In these cases, the upper part of the overlay file system is maintained in RAM, and will be lost when the machine is shut down. If, on the other hand, the boot medium is a writable device such as an USB stick, persistency can be implemented – by storing the upper layer in a special file on the device, and changes can be preserved from one boot to another.** | ||
+ | |||
+ | Ici, la première ligne est l' | ||
+ | |||
+ | Enfin, le petit bout /cow est une fascinante morceau de technologie qui rend possible le fonctionnement de toute la construction du Live CD. Dans un système GNU/Linux, certaines parties du système de fichiers ont besoin d' | ||
+ | |||
+ | Sur un système lancé depuis un Live CD, c' | ||
======4====== | ======4====== | ||
Ligne 162: | Ligne 228: | ||
In the case of a server image, Ubuntu Server goes the route of the traditional Debian install ISO. In this case, a minimal bootstrap environment is transferred onto the computer’s hard drive, and then software packages in the DEB format are installed on that drive using apt-get commands much in the way an administrator could do by hand. The only difference is that many of these packages are files located on the CD itself, within the /pool directory. These may be supplemented by other package files brought down from the repositories on the Internet if a network connection is available.** | In the case of a server image, Ubuntu Server goes the route of the traditional Debian install ISO. In this case, a minimal bootstrap environment is transferred onto the computer’s hard drive, and then software packages in the DEB format are installed on that drive using apt-get commands much in the way an administrator could do by hand. The only difference is that many of these packages are files located on the CD itself, within the /pool directory. These may be supplemented by other package files brought down from the repositories on the Internet if a network connection is available.** | ||
+ | |||
+ | Installation du système | ||
+ | |||
+ | Une fois que le Live CD a été lancé, l' | ||
+ | |||
+ | Dans le cas d'une image serveur, Ubuntu Server suit le parcours de l' | ||
**On the other hand, an Ubuntu desktop image contains a large selection of software, already installed in the SquashFS file system: applications such as Firefox, Libreoffice and the desktop environment itself (Unity, Gnome or whatever). It would be wasteful to have these programs in software packages on the CD as well, so a different installation strategy is preferred. The main root file system is simply cloned over on to the computer’s hard drive, and then specific changes are performed - such as creating new user profiles, tweaking GRUB, etc. | **On the other hand, an Ubuntu desktop image contains a large selection of software, already installed in the SquashFS file system: applications such as Firefox, Libreoffice and the desktop environment itself (Unity, Gnome or whatever). It would be wasteful to have these programs in software packages on the CD as well, so a different installation strategy is preferred. The main root file system is simply cloned over on to the computer’s hard drive, and then specific changes are performed - such as creating new user profiles, tweaking GRUB, etc. | ||
Even so, when installing a desktop system, an attentive user can see how the installation process finishes up by downloading software packages with newer versions of some applications if available, and also removing some software packages such as language packs that the user has not chosen.** | Even so, when installing a desktop system, an attentive user can see how the installation process finishes up by downloading software packages with newer versions of some applications if available, and also removing some software packages such as language packs that the user has not chosen.** | ||
+ | |||
+ | En revanche, une image d' | ||
+ | |||
+ | Même ainsi, à l' | ||
**Some final thoughts | **Some final thoughts | ||
Ligne 171: | Ligne 247: | ||
On the one hand, the amount of applications within the Live system can be increased. This would mean a larger SquashFS file - but also a larger amount of space used in a freshly installed system’s hard drive. In this day and age, this is probably not a concern for most people; going up from Ubuntu’s 3.5 GByte disk usage on a new system to -let’s say- about 5 or 6 GBytes would be feasible nowadays even on machines with restrictions on disk space, such as SSD hard drives or virtual machines. These applications would be available from the Live CD environment, | On the one hand, the amount of applications within the Live system can be increased. This would mean a larger SquashFS file - but also a larger amount of space used in a freshly installed system’s hard drive. In this day and age, this is probably not a concern for most people; going up from Ubuntu’s 3.5 GByte disk usage on a new system to -let’s say- about 5 or 6 GBytes would be feasible nowadays even on machines with restrictions on disk space, such as SSD hard drives or virtual machines. These applications would be available from the Live CD environment, | ||
+ | |||
+ | Dernières réflexions | ||
+ | |||
+ | Quand Mark Shuttleworth parlait d' | ||
+ | |||
+ | D'une part, la quantité d' | ||
**Another option would be a hybrid approach. The basic SquashFS would contain just the basic system and desktop manager, with a larger selection of software packages available in DEB files within the CD image’s /pool directory. Some sort of selection procedure would then need to be put in place during installation - as in the current Ubuntu Server. This would mean only software that the user really wishes to install ends up on the final system. However, it would also mean that some of this software would not be available from within the Live environment, | **Another option would be a hybrid approach. The basic SquashFS would contain just the basic system and desktop manager, with a larger selection of software packages available in DEB files within the CD image’s /pool directory. Some sort of selection procedure would then need to be put in place during installation - as in the current Ubuntu Server. This would mean only software that the user really wishes to install ends up on the final system. However, it would also mean that some of this software would not be available from within the Live environment, | ||
Ligne 177: | Ligne 259: | ||
In any case, it seems rather certain that one of these images will be chosen over the others and proposed as a “main” image, the go-to ISO file to download for users unsure of their choice and its implications. The Ubuntu distribution has always been about making it simple for new users; it would perhaps be best to continue on this track.** | In any case, it seems rather certain that one of these images will be chosen over the others and proposed as a “main” image, the go-to ISO file to download for users unsure of their choice and its implications. The Ubuntu distribution has always been about making it simple for new users; it would perhaps be best to continue on this track.** | ||
+ | |||
+ | Une autre option serait une approche hybride. De base, SqhashFS ne contiendrait que le système de base et le gestionnaire de bureau, avec une plus vaste sélection de paquets logiciels disponibles en fichiers DEB dans le répertoire /pool de l' | ||
+ | |||
+ | La voie que suivra Canonical à ce sujet dépendra évidemment de leur appréciation de ce qui est le mieux pour la plupart des utilisateurs. La beauté de la structure de fichiers ISO, qui a évolué pour créer le Live CD que nous connaissons tous, est sa flexibilité. Les différents choix de logiciels dans SquashFS nous donnent, aujourd' | ||
+ | |||
+ | Dans tous les cas, il semble plutôt certain que l'une des ces images sera préférée et proposée comme l' |
issue112/mon_opinion.1473055403.txt.gz · Dernière modification : 2016/09/05 08:03 de d52fr