tech:note_iso_cd_dvd_iso9660
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 | ||
| tech:note_iso_cd_dvd_iso9660 [2026/03/18 10:03] – Jean-Baptiste | tech:note_iso_cd_dvd_iso9660 [2026/06/29 14:41] (Version actuelle) – Jean-Baptiste | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | # Note ISO CD DVD ISO9660 | ||
| + | |||
| + | |||
| + | Voir : | ||
| + | * isosize | ||
| + | |||
| + | Voir aussi : | ||
| + | * [dvd+rw-tools / growisof](https:// | ||
| + | |||
| + | |||
| + | ## genisoimage / xorriso | ||
| + | |||
| + | Voir https:// | ||
| + | |||
| + | Exemples : | ||
| + | ~~~bash | ||
| + | #Linux | ||
| + | mkisofs -q -V VOLUME_NAME -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -J -T -o / | ||
| + | |||
| + | #Solaris | ||
| + | mkisofs -b boot/ | ||
| + | |||
| + | Windows | ||
| + | # The Bootable_NoEmulation.img normally lives in the [BOOT] folder. I tend to move it. | ||
| + | mkisofs -q -b Bootable_NoEmulation.img -no-emul-boot -boot-load-seg 1984 -boot-load-size 4 -iso-level 2 -J -joliet-long -l -D -relaxed-filenames -N -V VOLUME_NAME -o / | ||
| + | ~~~ | ||
| + | |||
| + | Source : https:// | ||
| + | |||
| + | |||
| + | ### Création d'ISO de démarrage personnalisées | ||
| + | |||
| + | Source : [RedHat - Création d' | ||
| + | |||
| + | ~~~bash | ||
| + | genisoimage -U -r -v -T -J -joliet-long -V " | ||
| + | ~~~ | ||
| + | |||
| + | Dans l' | ||
| + | |||
| + | Assurez-vous que les valeurs des options -V, -volset, et -A correspondent à la configuration du chargeur de démarrage de l' | ||
| + | |||
| + | Important | ||
| + | Dans les fichiers de configuration du chargeur de démarrage, remplacez tous les espaces dans les étiquettes de disque par \x20. Par exemple, si vous créez une image ISO avec un label RHEL 9.0, la configuration du chargeur de démarrage doit utiliser RHEL\x209.0. | ||
| + | |||
| + | Remplacez la valeur de l' | ||
| + | |||
| + | Pour plus d' | ||
| + | |||
| + | Implanter une somme de contrôle MD5 dans l' | ||
| + | |||
| + | ~~~ | ||
| + | # implantisomd5 ../ | ||
| + | ~~~ | ||
| + | |||
| + | Dans l' | ||
| + | |||
| + | Vous pouvez maintenant écrire la nouvelle image ISO sur un support physique ou un serveur réseau pour la démarrer sur du matériel physique, ou vous pouvez l' | ||
| + | |||
| + | |||
| + | |||
| + | ### Hack Utilisation de xorriso pour remplacer genisoimage | ||
| + | |||
| + | Erreur **genisoimage: | ||
| + | |||
| + | Voir : | ||
| + | * http:// | ||
| + | * https:// | ||
| + | |||
| + | `-eltorito-alt-boot -e EFI/ | ||
| + | |||
| + | ~~~bash | ||
| + | # | ||
| + | xorriso -as mkisofs -quiet -o " | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ~~~bash | ||
| + | mv / | ||
| + | ~~~ | ||
| + | |||
| + | `/ | ||
| + | ~~~bash | ||
| + | #!/bin/bash | ||
| + | |||
| + | options=() # the buffer array for the parameters | ||
| + | |||
| + | while [[ $1 ]] | ||
| + | do | ||
| + | case " | ||
| + | -e) | ||
| + | | ||
| + | shift | ||
| + | ;; | ||
| + | *) | ||
| + | | ||
| + | shift | ||
| + | ;; | ||
| + | esac | ||
| + | done | ||
| + | |||
| + | echo Calling genisoimage.dist " | ||
| + | eval exec / | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | chmod +x / | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ## Clef USB | ||
| + | |||
| + | Voir [[https:// | ||
| + | |||
| + | Voir Ventoy | ||
| + | |||
| + | |||
| + | ### Utilisation partition FAT et syslinux | ||
| + | |||
| + | Source: http:// | ||
| + | |||
| + | Select type LBA FAT32 may be 0B or 0C, to make it bootable. | ||
| + | ~~~bash | ||
| + | cfdisk /dev/sdf | ||
| + | mkfs.vfat -F 32 -n SYSRESC /dev/sdf1 | ||
| + | ~~~ | ||
| + | |||
| + | The following dd command will overwrite the first 404 bytes of the MBR of your stick. It will erase the previous boot instructions with the default ones to make sure that it will work. It does not change anything in the partition table since the partition table starts at offset 446 in the MBR. | ||
| + | |||
| + | ~~~bash | ||
| + | dd if=/ | ||
| + | sync | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | cp -af / | ||
| + | rm -rf / | ||
| + | mv / | ||
| + | sed -i -e ' | ||
| + | mv / | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | umount / | ||
| + | syslinux /dev/sdf1 | ||
| + | sync | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ### isohybrid | ||
| + | |||
| + | Rendre l'iso bootable aussi pour une clef USB avec isohybrid | ||
| + | ~~~bash | ||
| + | isohybrid plop.iso | ||
| + | isohybrid --uefi plop.iso | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | Alternative à isohybrid | ||
| + | Utiliser l' | ||
| + | |||
| + | ~~~bash | ||
| + | sudo apt-get install isolinux | ||
| + | #xorriso -as mkisofs -quiet -o " | ||
| + | | ||
| + | xorriso -as mkisofs -quiet -o " | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | Vérifier une iso | ||
| + | ~~~bash | ||
| + | dumpet -i plop.iso | ||
| + | isoinfo -d -i plop.iso | ||
| + | file plop.iso | ||
| + | fdisk -l plop.iso | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ### Autres | ||
| + | |||
| + | Convertion format iso avec iat. | ||
| + | |||
| + | Voir | ||
| + | * https:// | ||
| + | |||
| + | ~~~bash | ||
| + | apt-get install iat | ||
| + | iat input-image-file output-iso-file | ||
| + | |||
| + | iat image.nrg image.iso | ||
| + | iat image.bin > image.iso | ||
| + | ~~~ | ||
| + | |||
| + | #### Créer une clef bootable à partir d'un ISO | ||
| + | |||
| + | Source : Ultimate Boot CD | ||
| + | |||
| + | `ubcd538\ubcd\tools\linux\ubcd2usb\readme.txt` | ||
| + | ~~~ | ||
| + | PREREQUISITE: | ||
| + | You cannot run syslinux from the USB thumb drive because files cannot be marked as executable | ||
| + | on a FAT32 partition. | ||
| + | |||
| + | To put UBCD on a USB thumb drive, your thumb drive needs to be partitioned in FAT16 or FAT32. | ||
| + | |||
| + | First we need to know on which device your USB thumb drive is listed in /dev/. | ||
| + | Afterwards we can format it and copy the necessary files. | ||
| + | |||
| + | 1. Remove your USB thumb drive from your USB port if you already attached it. | ||
| + | |||
| + | 2. Run one of the following command: | ||
| + | A) fdisk -l | ||
| + | It will list all drives. Look at the size to determine which one is your | ||
| + | USB thumb drive. It can be that you need root rights to see the drives. | ||
| + | |||
| + | B) dmesg | tail | ||
| + | This will display something like the following, if you have just put in the | ||
| + | USB thumb drive. | ||
| + | [38350.743408] sd 9:0:0:0: [sdb] 4028416 512-byte hardware sectors (2063 MB) | ||
| + | [38350.744272] sd 9:0:0:0: [sdb] Write Protect is off | ||
| + | [38350.744284] sd 9:0:0:0: [sdb] Mode Sense: 23 00 00 00 | ||
| + | [38350.744291] sd 9:0:0:0: [sdb] Assuming drive cache: write through | ||
| + | [38350.747289] sd 9:0:0:0: [sdb] 4028416 512-byte hardware sectors (2063 MB) | ||
| + | [38350.748267] sd 9:0:0:0: [sdb] Write Protect is off | ||
| + | [38350.748284] sd 9:0:0:0: [sdb] Mode Sense: 23 00 00 00 | ||
| + | [38350.748289] sd 9:0:0:0: [sdb] Assuming drive cache: write through | ||
| + | [38350.748305] | ||
| + | [38350.749432] sd 9:0:0:0: [sdb] Attached SCSI removable disk | ||
| + | |||
| + | In this case, my USB thumb drive is /dev/sdc. | ||
| + | |||
| + | C) df -h | ||
| + | You can use this only when the USB thumb drive is automounted by your | ||
| + | distribution or when you mount it yourself. | ||
| + | It will list all mounted filesystems. You have to find and know the size | ||
| + | of the partitions which are already on the USB thumb drive. | ||
| + | |||
| + | / | ||
| + | |||
| + | In my case, my USB thumb drive is /dev/sdb (discard the number on the end). | ||
| + | |||
| + | 3. If you have found on which device in /dev/, your USB thumb drive is, you can partition it. | ||
| + | |||
| + | | ||
| + | | ||
| + | Proceed with caution! | ||
| + | |||
| + | A) First, we delete all old partitions that remain on the USB key. | ||
| + | |||
| + | 1. Open a terminal and type sudo su | ||
| + | 2. Type umount /dev/sdX to unmount your USB thumb drive | ||
| + | (replace X with the right letter for your device. BE CAREFUL) | ||
| + | 3. Type fdisk /dev/sdX (replacing X with your drive letter) | ||
| + | 4. Type d to proceed to delete a partition | ||
| + | 5. Type 1 to select the 1st partition and press enter | ||
| + | 6. Type d to proceed to delete another partition | ||
| + | (fdisk should automatically select the second partition) | ||
| + | |||
| + | B) Next, we need to create the new partition. | ||
| + | |||
| + | 1. Type n to make a new partition | ||
| + | 2. Type p to make this partition primary and press enter | ||
| + | 3. Type 1 to make this the first partition and then press enter | ||
| + | 4. Type a, then 1, to make the first primary partition active or bootable. | ||
| + | 5. Press enter to accept the default first cylinder | ||
| + | 6. Press enter again to accept the default last cylinder | ||
| + | 7. Press t to change the partition ID: | ||
| + | If you want to format your USB thumb drive with FAT16, use: | ||
| + | ' | ||
| + | If you want to format your USB thumb drive with FAT32 | ||
| + | (needed for partitions, larger than 2 GB, use: | ||
| + | ' | ||
| + | 8. Type w to write the new partition information to the USB key | ||
| + | |||
| + | |||
| + | C) Now, we need to create the fat filesystem. | ||
| + | |||
| + | 1. If you have chosen to format your USB thumb drive in FAT16 | ||
| + | ('W95 FAT16 (LBA)' in previous step), use: | ||
| + | |||
| + | | ||
| + | |||
| + | 2. If you have chosen to format your USB thumb drive in FAT32 | ||
| + | ('W95 FAT32 (LBA)' in previous step), use: | ||
| + | |||
| + | | ||
| + | |||
| + | 4. Now, we write the syslinux mbr to the USB drive. | ||
| + | The mbr.bin file is located in ./ | ||
| + | |||
| + | dd if=mbr.bin of=/dev/sdX (replacing X with your USB key drive letter) | ||
| + | |||
| + | 5. Mount the partition of your USB drive | ||
| + | You can use the GUI mounting utility of your distribution. | ||
| + | If your distribution mounts USB drives automatically, | ||
| + | |||
| + | 6. Copy all files of the extracted UBCD iso to your USB thumb drive. | ||
| + | |||
| + | 7. Install syslinux to the partition of your USB thumb drive. | ||
| + | |||
| + | | ||
| + | |||
| + | Make sure that ./ | ||
| + | |||
| + | chmod a+x ./ | ||
| + | |||
| + | If it is executable, run: | ||
| + | |||
| + | sudo ./ | ||
| + | (replacing X with your USB key drive letter) | ||
| + | |||
| + | NOTE: If you are running x64 kernel instead of x86, you will need to use syslinux64 | ||
| + | | ||
| + | by your distribution. The last resort is to download the syslinux tarball and compile | ||
| + | from scratch. | ||
| + | |||
| + | 8. Now you can boot UBCD from your USB drive, if your BIOS supports it of course. | ||
| + | |||
| + | Additional resources: | ||
| + | |||
| + | - http:// | ||
| + | |||
| + | ~~~ | ||
| + | |||
| + | Le fichier mbr.bin est fourni avec. Il peut être crée en faisant. | ||
| + | ~~~bash | ||
| + | dd if=/dev/sdX of=mbr.bin bs=440 count=1 | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ### mount fuse - userland | ||
| + | |||
| + | ~~~bash | ||
| + | sudo apt-get install fuseiso9660 | ||
| + | |||
| + | mkdir -p ~/ | ||
| + | fuseiso9660 plop.iso ~/ | ||
| + | |||
| + | fusermount -u ~/ | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | #### Autres | ||
| + | |||
| + | ~~~bash | ||
| + | #sudo mount plop/ | ||
| + | #sudo apt install udisks2 | ||
| + | udisksctl loop-setup --no-user-interaction --file plop/ | ||
| + | TMP_DEV=$(/ | ||
| + | TMP_MOUNTP=$(lsblk " | ||
| + | #fusermount -u ~/mnt/tmp | ||
| + | #sudo umount ~/mnt/tmp | ||
| + | udisksctl unmount --no-user-interaction -b " | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ### Exemple de commande xorriso / mkisofs | ||
| + | |||
| + | ~~~bash | ||
| + | xorriso -as mkisofs -R -r -J -joliet-long -l -cache-inodes -iso-level 3 -isohybrid-mbr / | ||
| + | ~~~ | ||
| + | |||
