issue173:tutoriel2
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 | ||
issue173:tutoriel2 [2021/09/27 15:17] – auntiee | issue173:tutoriel2 [2021/10/04 18:30] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
**In a previous article, I described a step-by-step procedure to create a hybrid (boots on BIOS or UEFI system) portable clone of your system on a 512 byte sector USB drive. Although I had tested the technique successfully on a number of devices I had laying around, when I tried it on a recently purchased SSD, it did not work! It turned out that the new SSD had physical/ | **In a previous article, I described a step-by-step procedure to create a hybrid (boots on BIOS or UEFI system) portable clone of your system on a 512 byte sector USB drive. Although I had tested the technique successfully on a number of devices I had laying around, when I tried it on a recently purchased SSD, it did not work! It turned out that the new SSD had physical/ | ||
- | Dans un précédent article, j’ai décrit une procédure étape par étape | + | Dans un précédent article, j’ai décrit une procédure |
- | It is not possible to anticipate the particulars of every conceivable system configuration so I have made a few assumptions: | + | **It is not possible to anticipate the particulars of every conceivable system configuration so I have made a few assumptions: |
• The system to be cloned is a typical installation with the Ubuntu system on a single partition, and no swap partition. | • The system to be cloned is a typical installation with the Ubuntu system on a single partition, and no swap partition. | ||
• The source computer that you are cloning boots in UEFI mode and has a separate EFI partition. | • The source computer that you are cloning boots in UEFI mode and has a separate EFI partition. | ||
Ligne 9: | Ligne 9: | ||
• Many of these steps require Administrator privileges so make sure you know how to use this facility on your system as it varies a bit across Ubuntu flavours. | • Many of these steps require Administrator privileges so make sure you know how to use this facility on your system as it varies a bit across Ubuntu flavours. | ||
- | I have written this article for the non-expert (like myself) and so I have included a lot of cross-checks to avoid errors. More experienced readers can probably skip some of these steps if desired. | + | I have written this article for the non-expert (like myself) and so I have included a lot of cross-checks to avoid errors. More experienced readers can probably skip some of these steps if desired.** |
- | Getting Information About Your System | + | Étant donné l’impossibilité d’anticiper les particularités de toute configuration de système imaginable, j’ai fait quelques suppositions : |
+ | ••Le système à cloner est une installation typique où le système Ubuntu se trouve sur une seule partition, sans partition swap. | ||
+ | ••L’ordinateur source que vous clonez démarre en mode UEFI et a une partition EFI séparée. | ||
+ | ••Le disque de destination doit être assez grand pour contenir la partition Ubuntu que nous allons cloner – toute la partition et pas seulement l’espace utilisé ! (Le redimensionnement de votre partition Ubuntu pour la rendre plus petite avec gparted, est très sûr – MAIS le potentiel de perte de données existe toujours. Ne le faites pas sans avoir sauvegardé tout ce que vous ne devez pas perdre.) | ||
+ | ••Beaucoup de ces étapes nécessitent les droits d’Administrateur ; | ||
+ | |||
+ | J’ai écrit cet article pour les non-experts (comme moi) et j’ai donc inclus beaucoup de contrôles croisés pour éviter des erreurs. Les lecteurs plus expérimentés peuvent sans doute sauter certaines de ces étapes s’ils le souhaitent. | ||
+ | |||
+ | **Getting Information About Your System | ||
Boot your computer normally and open a terminal. Type: | Boot your computer normally and open a terminal. Type: | ||
Ligne 23: | Ligne 31: | ||
sudo mkdir /00_CLONE | sudo mkdir /00_CLONE | ||
- | to provide an easily recognizable marker for the cloned system in the root folder. | + | to provide an easily recognizable marker for the cloned system in the root folder.** |
+ | |||
+ | Récupérer des informations concernant votre système | ||
+ | |||
+ | Démarrez votre ordinateur normalement et ouvrez un terminal. Tapez : | ||
+ | |||
+ | df | ||
+ | |||
+ | et cherchez le symbole de root (/) dans la colonne « Monté sur ». Sur ma machine, c’est en face de /dev/sda2 et cela m’indique que le système s’exécute sur la Partition n° 2 (ci-dessous). Notez ce numéro sur votre propre système, car le nom du disque peut changer après un redémarrage, | ||
+ | |||
+ | Tapez maintenant : | ||
+ | |||
+ | sudo mkdir /00_CLONE | ||
+ | |||
+ | afin de fournir un marqueur pour le système cloné qui soit facilement reconnaissable dans le dossier root. | ||
- | Cloning Your System | + | **Cloning Your System |
Now reboot your computer from a Live USB stick; you can use the install media for your system or any other Ubuntu flavour – I am using a clone of my base system on a USB. Booting from a live USB is important as you will be working on the system partitions, and it is much safer if nothing is mounted. This way, we can be sure that your base system in particular is unmounted, and not damaged by anything that you do. So, begin by opening a terminal and typing | Now reboot your computer from a Live USB stick; you can use the install media for your system or any other Ubuntu flavour – I am using a clone of my base system on a USB. Booting from a live USB is important as you will be working on the system partitions, and it is much safer if nothing is mounted. This way, we can be sure that your base system in particular is unmounted, and not damaged by anything that you do. So, begin by opening a terminal and typing | ||
Ligne 35: | Ligne 58: | ||
Plug in your installation media to a vacant USB port. | Plug in your installation media to a vacant USB port. | ||
- | Open the program gparted (included as part of the live USB) | + | Open the program gparted (included as part of the live USB) ** |
- | This is my “testing” laptop and you can see that I have a 250GB drive designated as /dev/sda with 4 partitions (below). I have arranged my system with 2 partitions for storage of personal files (/dev/sda3 and /dev/sda4), so my Ubuntu system partition (/dev/sda2, mounted at /) is just 30GB. If you click the pulldown menu at the top-right, you will get the partition layout for the other drives on the system, in this case the portable SSD that you will use to clone your system, as well as the Live USB that you booted from. | + | Cloner votre système |
- | If your drive contains any data, it will be completely destroyed by the following process so make sure you don’t need anything that is left on the SSD. Select the SSD from the drop-down menu, click on Device > Create Partition Table, and make sure you choose “gpt” as the partitioning system so that it is compatible with UEFI booting. Click Apply to make the change, your device now shows unallocated space for the entire drive (top right). | + | Maintenant, redémarrez votre ordinateur à partir d’une clé USB Live ; vous pouvez utiliser le média d’installation de votre système ou celui de n’importe quelle saveur d’Ubuntu – j’utilise un clone de mon système de base sur une clé USB. C'est important de démarrer à partir d’une clé USB Live, car vous travaillerez sur les partitions du système sur l’ordinateur, et c’est beaucoup plus sûr si rien n’est monté. Comme cela, on peut être certain que votre système de base, en particulier, |
- | to reboot. It is unclear why this message sometimes appears when other times it does not; however, it seems that clicking Ignore and proceeding does not appear to cause any problems. If this makes you nervous, close gparted, reboot, and then proceed. | + | sudo umount -a |
+ | |||
+ | pour tout démonter. | ||
+ | |||
+ | Branchez le média d’installation sur un port USB vacant. | ||
+ | |||
+ | Ouvrez le programme gparted, qui est inclus sur l’USB live. | ||
+ | |||
+ | **This is my “testing” laptop and you can see that I have a 250GB drive designated as /dev/sda with 4 partitions (below). I have arranged my system with 2 partitions for storage of personal files (/dev/sda3 and /dev/sda4), so my Ubuntu system partition (/dev/sda2, mounted at /) is just 30GB. If you click the pulldown menu at the top-right, you will get the partition layout for the other drives on the system, in this case the portable SSD that you will use to clone your system, as well as the Live USB that you booted from. | ||
+ | |||
+ | If your drive contains any data, it will be completely destroyed by the following process so make sure you don’t need anything that is left on the SSD. Select the SSD from the drop-down menu, click on Device > Create Partition Table, and make sure you choose “gpt” as the partitioning system so that it is compatible with UEFI booting. Click Apply to make the change, your device now shows unallocated space for the entire drive (top right).** | ||
+ | |||
+ | Ceci est mon portable de « tests ». Vous pouvez voir que j’ai un disque de 250 Go appelé /dev/sda avec 4 partitions (page précédente, | ||
+ | |||
+ | Si votre disque SSD contient des données, elles seront complètement détruites par le processus qui suit. Aussi, assurez-vous de n’avoir besoin de rien de ce qui reste sur ce SSD. Sélectionnez le SSD dans le menu déroulant, cliquez sur Périphérique → Créer une table de partitions et assurez-vous de choisir « gpt » comme système de partitionnement pour qu’il soit compatible avec le démarrage UEFI. Cliquez sur Appliquer pour faire la modification et votre dispositif affiche maintenant Non alloué pour le disque entier (en bas à gauche). | ||
+ | |||
+ | **to reboot. It is unclear why this message sometimes appears when other times it does not; however, it seems that clicking Ignore and proceeding does not appear to cause any problems. If this makes you nervous, close gparted, reboot, and then proceed. | ||
Now select Partition > New to create the first of 2 partitions. | Now select Partition > New to create the first of 2 partitions. | ||
- | The “Free space following (MiB)” will vary depending on the size of your SSD, but the other values should be as shown here – note the use of “cleared” in the File System box, this ensures there are no filesystem remnants still present (bottom right). Click “Add” and then click on the green checkmark at the top to apply this change. Do NOT format this partition to FAT 32, it will not work for devices with 4096-byte sectors. (See Technical Note #1 at the end of the article for a full explanation of why this is the case). | + | The “Free space following (MiB)” will vary depending on the size of your SSD, but the other values should be as shown here – note the use of “cleared” in the File System box, this ensures there are no filesystem remnants still present (bottom right). Click “Add” and then click on the green checkmark at the top to apply this change. Do NOT format this partition to FAT 32, it will not work for devices with 4096-byte sectors. (See Technical Note #1 at the end of the article for a full explanation of why this is the case).** |
+ | |||
+ | Redémarrer. La raison pour laquelle ce message apparaît - ou pas – n’est pas claire ; toutefois, cliquer sur Ignorer et continuer ne semble pas poser de problème. Si cela vous rend anxieux, fermez gparted, redémarrez, | ||
+ | |||
+ | Maintenant sélectionnez Partition → Nouvelle pour créer la première de 2 partitions. | ||
+ | |||
+ | L’« Espace disponible suivant (Mo) » | ||
- | Next select Partition > New to create the second partition for the Ubuntu system itself and adjust the values as appropriate (above). | + | **Next select Partition > New to create the second partition for the Ubuntu system itself and adjust the values as appropriate (above). |
Once again, select Add and then apply this change. | Once again, select Add and then apply this change. | ||
Ligne 53: | Ligne 99: | ||
Each of these partitions serves an important function: Partition #1 provides a place for the UEFI GRUB bootloader files, and Partition #2 contains your Ubuntu filesystem. | Each of these partitions serves an important function: Partition #1 provides a place for the UEFI GRUB bootloader files, and Partition #2 contains your Ubuntu filesystem. | ||
- | Now go back to select the device name of your hard drive, right-click on your Ubuntu partition, and select Copy. Switch to the SSD, double check that Partition #2 is unmounted, right-click on it, and select Paste. Depending on the size of the partition you are copying, this could take an hour or more; for this size of partition it was about 15 minutes. This procedure makes an exact and complete copy of your Ubuntu partition, including the label if there is one, and the UUID (Universal Unique ID). Furthermore, | + | Now go back to select the device name of your hard drive, right-click on your Ubuntu partition, and select Copy. Switch to the SSD, double check that Partition #2 is unmounted, right-click on it, and select Paste. Depending on the size of the partition you are copying, this could take an hour or more; for this size of partition it was about 15 minutes. This procedure makes an exact and complete copy of your Ubuntu partition, including the label if there is one, and the UUID (Universal Unique ID). Furthermore, |
- | Once this copying step is complete, right-click on Partition #2, and give the partition the label Ubuntu_SSD, just to make it easier to identify; and apply the change. Right-click on Partition #1 and select Manage Flags > boot,esp so that this partition is recognized as an EFI partition. Click Close to apply the change but don’t close gparted yet as it is still needed in the next step. | + | |
+ | Ensuite sélectionnez Partition -> Nouvelle pour créer la seconde partition pour le système d’Ubuntu lui-même | ||
+ | |||
+ | Chacune de ces partitions a une fonction importante : | ||
+ | |||
+ | Maintenant, retournez sélectionner le nom de dispositif de votre disque dur. Faites un clic droit sur la partition Ubuntu et sélectionnez Copier. Changez pour le SSD, vérifiez à nouveau que la Partition n° 2 n’est pas montée, faites un clic droit dessus et sélectionnez Coller. Selon la taille de la partition que vous copiez, cela peut prendre une heure ou plus ; pour cette taille de partition, c’était environ 15 minutes. Cette procédure crée une copie exacte et complète de la partition d’Ubuntu, y compris l’étiquette, | ||
+ | |||
+ | **Once this copying step is complete, right-click on Partition #2, and give the partition the label Ubuntu_SSD, just to make it easier to identify; and apply the change. Right-click on Partition #1 and select Manage Flags > boot,esp so that this partition is recognized as an EFI partition. Click Close to apply the change but don’t close gparted yet as it is still needed in the next step. | ||
If you open a terminal and type: | If you open a terminal and type: | ||
Ligne 65: | Ligne 118: | ||
sudo blkid | sudo blkid | ||
- | again and you will see that the UUID for the Ubuntu system partition is unchanged BUT the Ubuntu_SSD partition now has a different UUID. | + | again and you will see that the UUID for the Ubuntu system partition is unchanged BUT the Ubuntu_SSD partition now has a different UUID.** |
+ | |||
+ | Une fois cette étape de copie terminée, faites un clic droit sur la Partition n° 2 et donnez-lui l’étiquette Ubuntu_SSD pour la rendre plus facile à identifier, puis appliquez le changement. Faites un clic droit sur la Partition n° 1 et sélectionnez Gérer les drapeaux → boot, esp afin que cette partition soit reconnue comme une partition EFI. Cliquez sur Fermer pour appliquer le changement, mais ne quittez pas encore gparted, car vous en aurez besoin lors de la prochaine étape. | ||
+ | |||
+ | Si vous ouvrez un terminal et saississez : | ||
+ | |||
+ | sudo blkid | ||
+ | |||
+ | vous verrez que les deux partitions Ubuntu, celle sur le disque sur (/dev/sda2 dans mon cas) et celle sur le SSD (/dev/sdb2 dans mon cas) ont exactement la même UUID. C’est un problème pour GRUB car, habituellement, | ||
+ | |||
+ | sudo blkid | ||
+ | |||
+ | à nouveau et vous verrez que l’UUID pour la partition du système Ubuntu n’a pas changé, MAIS que la partition Ubuntu_SSD a maintenant une UUID différente. | ||
- | Now we need to format the EFI partition (/dev/sdb1 in my case) with a FAT32 filesystem. Open a terminal and type: | + | **Now we need to format the EFI partition (/dev/sdb1 in my case) with a FAT32 filesystem. Open a terminal and type: |
sudo mkfs.fat -v -F 32 -S 4096 -s 1 /dev/sdX1 | sudo mkfs.fat -v -F 32 -S 4096 -s 1 /dev/sdX1 | ||
Ligne 77: | Ligne 142: | ||
sudo rmdir /00_CLONE | sudo rmdir /00_CLONE | ||
- | which puts your base system back the way it was before we started; but, leaves a 00_CLONE marker in the root directory of the SSD. This marker provides a good way to ensure that we don’t mix up our locations between the hard drive and the SSD clone and edit the wrong system files. | + | which puts your base system back the way it was before we started; but, leaves a 00_CLONE marker in the root directory of the SSD. This marker provides a good way to ensure that we don’t mix up our locations between the hard drive and the SSD clone and edit the wrong system files.** |
- | Adjusting UUIDs to Correct Values | + | Maintenant, il nous faut formater la partition EFI (/dev/sdb1 dans mon cas) en FAT32 (en bas à gauche). Ouvrez un terminal et tapez : |
+ | |||
+ | sudo mkfs.fat -v -F 32 -S 4096 -s 1 /dev/sdX1 | ||
+ | |||
+ | (en changeant X par la valeur appropriée pour votre système où X = a, b, c ...), et, quand cela se termine avec succès, vous pouvez fermer la clé USB Live ; enlevez-la à l' | ||
+ | |||
+ | À ce stade, je suggère de faire un clic droit sur le Bureau et de changer le fond d' | ||
+ | |||
+ | sudo rmdir /00_CLONE | ||
+ | |||
+ | ce qui mettra votre système de base à son état de départ, avant que l'on n'ait commencé le travail ; mais laissera un repère 00_CLONE dans le répertoire root du SSD. Ce repère fournit une bonne façon de nous assurer que nous ne mélangeons pas notre emplacement - soit sur le disque dur, soit sur le clone SSD - et que ne n' | ||
+ | |||
+ | **Adjusting UUIDs to Correct Values | ||
The next thing to do is to change the UUIDs in two system files on the SSD to match their new values so that GRUB finds the SSD system rather than the system on the hard drive that we cloned. (Note: Remember, all of these UUIDs will be different on your system so use the ones displayed in your terminal window rather than the ones displayed here). The two files that require adjustment are: /etc/fstab and / | The next thing to do is to change the UUIDs in two system files on the SSD to match their new values so that GRUB finds the SSD system rather than the system on the hard drive that we cloned. (Note: Remember, all of these UUIDs will be different on your system so use the ones displayed in your terminal window rather than the ones displayed here). The two files that require adjustment are: /etc/fstab and / | ||
Ligne 85: | Ligne 162: | ||
sudo blkid | sudo blkid | ||
- | to bring up the UUIDs of all the partitions on your system once again, then open the File Manager and click on Ubuntu_SSD. (bottom left) | + | to bring up the UUIDs of all the partitions on your system once again, then open the File Manager and click on Ubuntu_SSD. (bottom left)** |
+ | |||
+ | Ajuster les UUID aux valeurs correctes | ||
+ | |||
+ | Ensuite, dans deux fichiers système sur le SSD, il faudra changer l'UUID à sa nouvelle valeur afin que GRUB trouve le système sur le SSD plutôt que celui sur le disque dur que nous avons cloné. (Note : Souvenez-vous que toutes ces UUID seront différentes de celles de votre système ; il faut utiliser celles affichées dans la fenêtre de votre terminal plutôt que celles montrées ici). Les deux fichiers qu'il faut ajuster sont : /etc/fstab et / | ||
+ | |||
+ | sudo blkid | ||
+ | |||
+ | pour faire afficher à nouveau les UUID de toutes les partitions sur votre système, puis ouvrez le Gestionnaire de fichiers et cliquez sur Ubuntu_SSD. | ||
+ | |||
+ | **You should see the folder 00_CLONE and the address bar showing Ubuntu_SSD mounted at /media since it is an external USB device, otherwise you are in the wrong location. Remedy this immediately, | ||
+ | |||
+ | Next, use the up-arrow of File Manager to move back up the directory structure to navigate to /boot/grub, and Edit as Administrator the file / | ||
- | You should see the folder | + | Vous devez voir le dossier |
- | Next, use the up-arrow of File Manager to move back up the directory | + | Ensuite, utilisez la flèche vers le haut du Gestionnaire de fichiers pour remonter le structure |
- | Installing Bootloaders | + | **Installing Bootloaders |
Although there is a complete Ubuntu installation on the SSD, it is not yet directly bootable; however, it is safest to install boot loaders from a working system. As this step is crucial to the process, I am providing two different methods of booting into your cloned system in the unlikely event that one or the other does not work. This way, the appropriate bootloaders can be installed from the SSD in a working state. | Although there is a complete Ubuntu installation on the SSD, it is not yet directly bootable; however, it is safest to install boot loaders from a working system. As this step is crucial to the process, I am providing two different methods of booting into your cloned system in the unlikely event that one or the other does not work. This way, the appropriate bootloaders can be installed from the SSD in a working state. | ||
Ligne 101: | Ligne 190: | ||
sudo update-grub | sudo update-grub | ||
- | When you do this, GRUB should find the Ubuntu_SSD installation on /dev/sdX2 (where /dev/sdX2 is the device name for your Ubuntu_SSD partition), and add it to the GRUB boot menu. If update-grub does not find Ubuntu_SSD on /dev/sdX2, then use Method #2. Otherwise reboot your system and use the down-arrow to select the new entry corresponding to your Ubuntu_SSD installation and boot into the cloned system – you will know you were successful as long as the old background appears. | + | When you do this, GRUB should find the Ubuntu_SSD installation on /dev/sdX2 (where /dev/sdX2 is the device name for your Ubuntu_SSD partition), and add it to the GRUB boot menu. If update-grub does not find Ubuntu_SSD on /dev/sdX2, then use Method #2. Otherwise reboot your system and use the down-arrow to select the new entry corresponding to your Ubuntu_SSD installation and boot into the cloned system – you will know you were successful as long as the old background appears.** |
- | Method #2 (Fallback): | + | L' |
+ | |||
+ | Bien qu'il y ait une installation Ubuntu complète sur le SSD, elle n'est pas encore amorçable directement ; toutefois, il est plus sûr d' | ||
+ | |||
+ | Méthode n° 1 (préférée) | ||
+ | |||
+ | Il y a un truc facile que vous pouvez utiliser pour démarrer votre système Ubuntu_SSD nouvellement créé sans avoir installé un chargeur de démarrage. Il suffit d' | ||
+ | |||
+ | sudo update-grub | ||
+ | |||
+ | Quand vous le faites, GRUB devrait trouver l' | ||
+ | |||
+ | **Method #2 (Fallback): | ||
Reboot your system normally and when the GRUB menu appears, press the “c” key immediately to get a grub > prompt. If you don’t normally get a GRUB menu when you boot, then press the ESC key repeatedly as soon as you reboot and the GRUB menu should appear, then press “c” immediately. Type: | Reboot your system normally and when the GRUB menu appears, press the “c” key immediately to get a grub > prompt. If you don’t normally get a GRUB menu when you boot, then press the ESC key repeatedly as soon as you reboot and the GRUB menu should appear, then press “c” immediately. Type: | ||
Ligne 113: | Ligne 214: | ||
ls (hd0,2)/ | ls (hd0,2)/ | ||
- | If you see the folder 00_CLONE, you’re done; if not, type ls (hd1,2)/ then ls (hd2,2)/ ... until you find it. Now type each of the following commands, one at a time, and press ENTER after each command. If you don’t get an error message, then they have executed correctly. Replace X with the value you found for the Ubuntu_SSD partition in the previous step. | + | If you see the folder 00_CLONE, you’re done; if not, type ls (hd1,2)/ then ls (hd2,2)/ ... until you find it. Now type each of the following commands, one at a time, and press ENTER after each command. If you don’t get an error message, then they have executed correctly. Replace X with the value you found for the Ubuntu_SSD partition in the previous step.** |
+ | |||
+ | Méthode n° 2 (solution de repli) : | ||
+ | |||
+ | Redémarrez votre système normalement et quand le menu GRUB s' | ||
+ | |||
+ | ls | ||
+ | |||
+ | et vous aurez une liste de tous les dispositifs que GRUB reconnaît, notamment (hd0), (hd0,gpt1), (hd0, gpt2), (hd1), (hd1,gpt1) et ainsi de suite. Il faut que vous trouviez celui qui correspond à Ubuntu_SSD. Puisqu' | ||
+ | |||
+ | ls (hd0,2)/ | ||
+ | |||
+ | Si vous voyez le dossier 00_CLONE, vous avez terminé ; sinon, tapez type ls (hd1,2)/ puis ls (hd2,2)/... jusqu' | ||
+ | |||
+ | **set prefix=(hdX, | ||
+ | |||
+ | set root=(hdX, | ||
+ | |||
+ | insmod normal | ||
+ | |||
+ | normal | ||
+ | |||
+ | The computer should now boot and display a rather unusual GRUB menu which consists of two typical GRUB menus stacked one after the other. These are the menus from the base system (the top one) and the SSD system (the second one). Simply use the down-arrow to select the “Ubuntu” entry in the second GRUB menu and the computer should boot into the cloned system – once again the old background tells you that you have successfully booted from the SSD.** | ||
set prefix=(hdX, | set prefix=(hdX, | ||
Ligne 123: | Ligne 246: | ||
normal | normal | ||
- | The computer should now boot and display a rather unusual GRUB menu which consists of two typical | + | L' |
- | Open a terminal and type: | + | |
+ | **Open a terminal and type: | ||
df | df | ||
Ligne 137: | Ligne 261: | ||
sudo mount /dev/sdX1 /boot/efi | sudo mount /dev/sdX1 /boot/efi | ||
- | (where /dev/sdX1 is the device name for your EFI partition) so that bootloader files can be written to that partition. | + | (where /dev/sdX1 is the device name for your EFI partition) so that bootloader files can be written to that partition.** |
- | The first thing to check before doing anything else is that all of the appropriate grub packages are installed on your SSD. To do this, open Synaptic, select Status > Installed, and scroll down to grub entries. There are 6 things to look for (below). Depending on how your system is configured, these may or may not be installed but they all need to be there to proceed. | + | Ouvrez un terminal et tapez : |
+ | |||
+ | df | ||
+ | |||
+ | et vérifiez le nom du dispositif (/dev/sdX2) monté comme racine (/) car les noms de disques changent après un redémarrage. Vous devriez trouver aussi un dispositif (/dev/sdX1) monté à /boot/efi (sinon, j'en parlerai dans un moment). Ouvrez le Gestionnaire de fichiers et vérifiez que 00_CLONE est présent dans le système de fichiers de la racine puis ouvrez en tant qu' | ||
+ | |||
+ | sudo umount /boot/efi | ||
+ | |||
+ | puis montez la partition EFI du SSD avec : | ||
+ | |||
+ | sudo mount /dev/sdX1 /boot/efi | ||
+ | |||
+ | (où /dev/sdX1 est le nom de dispositif pour votre partition EFI, afin que les fichiers du chargeur de démarrage puissent être écrits sur cette partition. | ||
+ | |||
+ | |||
+ | **The first thing to check before doing anything else is that all of the appropriate grub packages are installed on your SSD. To do this, open Synaptic, select Status > Installed, and scroll down to grub entries. There are 6 things to look for (below). Depending on how your system is configured, these may or may not be installed but they all need to be there to proceed. | ||
If any are missing, select All and scroll down to the grub packages and install it/ | If any are missing, select All and scroll down to the grub packages and install it/ | ||
Ligne 146: | Ligne 285: | ||
However, if you have another preferred method for checking installed packages and installing any missing ones, you can use that instead. Once the 6 grub packages are all installed, open a terminal and type: | However, if you have another preferred method for checking installed packages and installing any missing ones, you can use that instead. Once the 6 grub packages are all installed, open a terminal and type: | ||
+ | |||
+ | sudo apt-get install --reinstall shim-signed** | ||
+ | |||
+ | Avant de faire quoi que ce soit d' | ||
+ | |||
+ | S'il y en a qui manquent, sélectionnez Tous et faites défiler jusqu' | ||
+ | |||
+ | sudo apt-get install synaptic | ||
+ | |||
+ | Toutefois, si vous préférez une autre méthode pour la vérification des paquets installés et l' | ||
sudo apt-get install --reinstall shim-signed | sudo apt-get install --reinstall shim-signed | ||
- | You may be asked to confirm where you want to install the bootloader files and this is /dev/sdX1 (the EFI partition we created at the start). If you are presented with a graphical screen with several choices, use the space-bar to toggle the asterisk indicating your choice, the arrow keys to navigate; and the ENTER key when you are ready to proceed. | + | **You may be asked to confirm where you want to install the bootloader files and this is /dev/sdX1 (the EFI partition we created at the start). If you are presented with a graphical screen with several choices, use the space-bar to toggle the asterisk indicating your choice, the arrow keys to navigate; and the ENTER key when you are ready to proceed. |
+ | |||
+ | This particular method actually installs a series of bootloader files, including those required for booting with secure boot enabled. If you Open as Administrator the folder /boot/efi and then double-click on EFI, you should see 2 folders, BOOT and ubuntu. These folders contain the files needed to boot Ubuntu (ubuntu) and also a “fallback” option (BOOT) in case something doesn’t work properly.** | ||
+ | |||
+ | Il se peut qu'on vous demande de confirmer l' | ||
- | This particular method actually installs a series of bootloader files, including those required for booting with secure boot enabled. If you Open as Administrator the folder | + | En fait, cette méthode installe une série de fichiers du chargeur de démarrage, y compris ceux nécessaires au démarrage quand « secure boot » est activé. En faisant Ouvrir en tant qu' |
- | Your clone Ubuntu_SSD is now a complete, portable system. Reboot your computer and press the F12 key (or whatever key you normally use) to bring up the boot menu. Select the USB SSD device and you should boot into Ubuntu with the old background screen. Open a terminal and type: | + | **Your clone Ubuntu_SSD is now a complete, portable system. Reboot your computer and press the F12 key (or whatever key you normally use) to bring up the boot menu. Select the USB SSD device and you should boot into Ubuntu with the old background screen. Open a terminal and type: |
df | df | ||
Ligne 163: | Ligne 316: | ||
to ensure that the GRUB configuration file is correctly updated. If you plan to use this SSD clone in a semi-permanent way, I suggest you modify the boot order settings in the UEFI firmware to boot from USB first. This way, the computer will always boot from the USB SSD if it’s plugged in, and you can always choose to boot to the hard drive by selecting the appropriate option from the GRUB menu that will be displayed at boot time. | to ensure that the GRUB configuration file is correctly updated. If you plan to use this SSD clone in a semi-permanent way, I suggest you modify the boot order settings in the UEFI firmware to boot from USB first. This way, the computer will always boot from the USB SSD if it’s plugged in, and you can always choose to boot to the hard drive by selecting the appropriate option from the GRUB menu that will be displayed at boot time. | ||
- | I have successfully booted this SSD drive on both of my laptops that support UEFI booting (Acer and Dell). It is impossible to guarantee that it will perform correctly on every system; but, hopefully it works for you! | + | I have successfully booted this SSD drive on both of my laptops that support UEFI booting (Acer and Dell). It is impossible to guarantee that it will perform correctly on every system; but, hopefully it works for you!** |
- | Technical Note #1 | + | Votre clone Ubuntu_SSD est maintenant un système complet et portable. Redémarrez l' |
+ | |||
+ | df | ||
+ | |||
+ | et vous devriez voir à la fois la partition Ubuntu_SSD monté comme root (/) et la partition EFI monté sur /boot/efi ; sinon, retournez vérifier les UUID dans /etc/fstab et éditez si nécessaire. L' | ||
+ | |||
+ | sudo update-grub | ||
+ | |||
+ | pour être certain que le fichier de configuration de GRUB est mis à jour correctement. Si vous voulez utiliser ce clone SSD d'une façon quasi permanente, je vous suggère de modifier les paramètres de l' | ||
+ | |||
+ | J'ai démarré ce disque SSD avec succès sur mes deux portables qui supportent le démarrage UEFI (Acer et Dell). Il est impossible de garantir que cela fonctionnera correctement sur tous les systèmes, mais j' | ||
+ | |||
+ | |||
+ | |||
+ | **Technical Note #1 | ||
I originally used gparted to format the EFI partition to a FAT32 filesystem and although I did not receive any error messages, the resulting system would not boot! Interestingly, | I originally used gparted to format the EFI partition to a FAT32 filesystem and although I did not receive any error messages, the resulting system would not boot! Interestingly, | ||
Ligne 171: | Ligne 338: | ||
sudo fsck.fat -v -n /dev/sdb1 | sudo fsck.fat -v -n /dev/sdb1 | ||
- | to check the filesystem on the EFI partition to try to get more detailed information. The resulting details (Figure 11), along with some digging into the FAT32 specification, | + | to check the filesystem on the EFI partition to try to get more detailed information. The resulting details (Figure 11), along with some digging into the FAT32 specification, |
- | A valid FAT32 partition must contain a minimum of 65,525 clusters, where a cluster is a whole number (1, 2, 4, 8, ... 128) multiple of the sector size. The sector size of this SSD is 4096 and the program that gparted calls to do the formatting (mkfs.fat) chooses to use a multiple of 8 for a cluster size of 8 × 4096 = 32,768 bytes. The minimum size for a valid FAT32 partition with this cluster size would be 65,525 × 32,768 = 2, | + | Note technique n° 1 |
+ | |||
+ | Au départ, j'ai utilisé gparted pour formater la partition EFI en FAT32 comme système de fichiers et, bien qu'il n'y ait pas de messages d' | ||
+ | |||
+ | sudo fsck.fat -v -n /dev/sdb1 | ||
+ | |||
+ | pour vérifier le système de fichiers sur la partition EFI afin d' | ||
+ | |||
+ | **A valid FAT32 partition must contain a minimum of 65,525 clusters, where a cluster is a whole number (1, 2, 4, 8, ... 128) multiple of the sector size. The sector size of this SSD is 4096 and the program that gparted calls to do the formatting (mkfs.fat) chooses to use a multiple of 8 for a cluster size of 8 × 4096 = 32,768 bytes. The minimum size for a valid FAT32 partition with this cluster size would be 65,525 × 32,768 = 2, | ||
sudo mkfs.fat -v -F 32 -S 4096 -s 1 /dev/sdX1 | sudo mkfs.fat -v -F 32 -S 4096 -s 1 /dev/sdX1 | ||
- | where the -s 1 option specifies a multiple of 1. A multiple of 1 produces a cluster size of 1 × 4096 = 4096, which requires only 4096 × 65,525 = 268,390,400 bytes (~ 268MB), well within the 500 MB size of the EFI partition. Problem solved. | + | where the -s 1 option specifies a multiple of 1. A multiple of 1 produces a cluster size of 1 × 4096 = 4096, which requires only 4096 × 65,525 = 268,390,400 bytes (~ 268MB), well within the 500 MB size of the EFI partition. Problem solved.** |
+ | |||
+ | Une partition FAT32 valide doit contenir un minimum de 65 525 clusters, où un cluser est un multiple d' | ||
+ | |||
+ | sudo mkfs.fat -v -F 32 -S 4096 -s 1 /dev/sdX1 | ||
+ | |||
+ | où l' | ||
+ | |||
+ | **Technical Note #2 | ||
+ | |||
+ | If you are using a device with 512-byte sectors, just use gparted to format the EFI partition to FAT32 rather than using the terminal command. Everything else stays the same.** | ||
- | Technical | + | Note technique n° 2 |
- | If you are using a device with 512-byte sectors, just use gparted | + | Si vous utilisez un dispositif avec des secteurs à 512 bytes, il suffit d' |
issue173/tutoriel2.1632748677.txt.gz · Dernière modification : 2021/09/27 15:17 de auntiee