Table des matières
- 2026:
- 2025:
1 billet(s) pour avril 2026
| Notes ping ICMP | 2026/04/03 23:01 | Jean-Baptiste |
Note ISO CD DVD ISO9660
genisoimage / xorriso
Voir https://wiki.debian.org/RepackBootableISO
Exemples :
#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 /LinuxISO.iso . #Solaris mkisofs -b boot/grub/stage2_eltorito -c .catalog -no-emul-boot -boot-load-size 4 -boot-info-table -relaxed-filenames -l -ldots -r -N -d -D -V VOLUME_NAME -o /SolarisISO.iso . 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 /WindowsISO.iso .
Source : https://www.romant.net/2010/05/creating-bootable-iso-linux-solaris-windows/
Création d'ISO de démarrage personnalisées
Source : RedHat - Création d'image de démarrage personnalisées
genisoimage -U -r -v -T -J -joliet-long -V "RHEL-9 Server.x86_64" -volset \N- "Serveur RHEL-9.x86_64" (en anglais) -A "Serveur RHEL-9.x86_64" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot -o ../NEWISO.iso .
Dans l'exemple ci-dessus :
Assurez-vous que les valeurs des options -V, -volset, et -A correspondent à la configuration du chargeur de démarrage de l'image, si vous utilisez la directive LABEL= pour les options qui nécessitent un emplacement pour charger un fichier sur le même disque. Si la configuration de votre chargeur de démarrage (isolinux/isolinux.cfg pour le BIOS et EFI/BOOT/grub.cfg pour l'UEFI) utilise la directive inst.stage2=LABEL=disk_label pour charger la deuxième étape du programme d'installation à partir du même disque, les étiquettes des disques doivent correspondre.
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'option -o (-o ../NEWISO.iso) par le nom de fichier de votre nouvelle image. La valeur indiquée dans l'exemple crée le fichier NEWISO.iso dans le répertoire above, le répertoire actuel.
Pour plus d'informations sur cette commande, voir la page de manuel genisoimage(1).
Implanter une somme de contrôle MD5 dans l'image. Notez que sans somme de contrôle MD5, la vérification de l'image peut échouer (option rd.live.check dans la configuration du chargeur de démarrage) et l'installation peut se bloquer.
- implantisomd5 ../NEWISO.iso
Dans l'exemple ci-dessus, remplacez ../NEWISO.iso par le nom de fichier et l'emplacement de l'image ISO que vous avez créée à l'étape précédente.
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'utiliser pour commencer l'installation d'une machine virtuelle.
Hack Utilisation de xorriso pour remplacer genisoimage
Erreur genisoimage: option '-e' is ambiguous sous Debian 8
Voir :
-eltorito-alt-boot -e EFI/images/efiboot.img ou pour RedHat -eltorito-alt-boot -e images/efiboot.img
#genisoimage -quiet -o "$ISO_OUTPUT" -r -J -no-emul-boot -boot-load-size 4 -boot-info-table -b syslinux/isolinux.bin -c syslinux/boot.cat ./iso xorriso -as mkisofs -quiet -o "$ISO_OUTPUT" -r -J -no-emul-boot -boot-load-size 4 -boot-info-table -b syslinux/isolinux.bin -c syslinux/boot.cat -eltorito-alt-boot -e EFI/images/efiboot.img -no-emul-boot ./iso
mv /usr/bin/genisoimage /usr/bin/genisoimage.dist
/usr/bin/genisoimage
#!/bin/bash options=() # the buffer array for the parameters while [[ $1 ]] do case "$1" in -e) options+=("--eltorito-boot") shift ;; *) options+=("$1") shift ;; esac done echo Calling genisoimage.dist "${options[@]}" eval exec /usr/bin/genisoimage.dist "${options[@]}"
chmod +x /usr/bin/genisoimage
Clef USB
Voir https://etcher.io, l'outil qui marche sur tous les systèmes (de façon on ne peut plus simple) et qui, à la fin, vérifie ce qu'il a écrit sur la clé
Voir Ventoy
Utilisation partition FAT et syslinux
Source: http://www.system-rescue-cd.org/Installing-SystemRescueCd-on-a-USB-stick/
Select type LBA FAT32 may be 0B or 0C, to make it bootable.
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.
dd if=/usr/share/syslinux/mbr.bin of=/dev/sdf sync
cp -af /mnt/cdrom/* /mnt/usbstick/ rm -rf /mnt/usbstick/syslinux mv /mnt/usbstick/isolinux/isolinux.cfg /mnt/usbstick/isolinux/syslinux.cfg sed -i -e 's/scandelay=1/scandelay=5/g' /mnt/usbstick/isolinux/syslinux.cfg mv /mnt/usbstick/isolinux /mnt/usbstick/syslinux
umount /mnt/usbstick syslinux /dev/sdf1 sync
isohybrid
Rendre l'iso bootable aussi pour une clef USB avec isohybrid
isohybrid plop.iso
isohybrid --uefi plop.iso
Alternative à isohybrid :
Utiliser l'option -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -isohybrid-gpt-basdat à xorriso
sudo apt-get install isolinux #xorriso -as mkisofs -quiet -o "$ISO_NEWFILE_OUTPUT" -r -J -no-emul-boot -boot-load-size 4 -boot-info-table -V "$ISO_LABEL_NAME" -volset "$ISO_LABEL_NAME" -A "$ISO_LABEL_NAME" -b isolinux/isolinux.bin -c isolinux/boot.cat -eltorito-alt-boot -e EFI/BOOT/BOOTX64.EFI -no-emul-boot . xorriso -as mkisofs -quiet -o "$ISO_NEWFILE_OUTPUT" -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -isohybrid-gpt-basdat -r -J -no-emul-boot -boot-load-size 4 -boot-info-table -V "$ISO_LABEL_NAME" -volset "$ISO_LABEL_NAME" -A "$ISO_LABEL_NAME" -b isolinux/isolinux.bin -c isolinux/boot.cat -eltorito-alt-boot -e EFI/BOOT/BOOTX64.EFI -no-emul-boot .
Vérifier une iso
dumpet -i plop.iso isoinfo -d -i plop.iso file plop.iso fdisk -l plop.iso
Autres
Convertion format iso avec iat.
Voir
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: Extract UBCD ISO image to your hard disk, or mount the ISO image using loopback.
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] sdb: sdb1
[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.
/dev/sdb1 2,0G 1,9G 87M 96% /media/NANO
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.
WARNING: backup all files that you want to preserve to another drive.
WARNING: This process will delete any information that is currently stored on the USB key.
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:
'W95 FAT16 (LBA)' ==> press e
If you want to format your USB thumb drive with FAT32
(needed for partitions, larger than 2 GB, use:
'W95 FAT32 (LBA)' ==> press c
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:
mkfs.vfat -F 16 /dev/sdX1 (replacing X with your USB key drive letter)
2. If you have chosen to format your USB thumb drive in FAT32
('W95 FAT32 (LBA)' in previous step), use:
mkfs.vfat -F 32 /dev/sdX1 (replacing X with your USB key drive letter)
4. Now, we write the syslinux mbr to the USB drive.
The mbr.bin file is located in ./ubcd/tools/linux/ubcd2usb/ of the extracted UBCD iso.
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, you can remove and replug your USB thumb drive.
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.
Unmount the target device.
Make sure that ./ubcd/tools/linux/ubcd2usb/syslinux is executable, if not, run:
chmod a+x ./ubcd/tools/linux/ubcd2usb/syslinux (adapt the path if necessary)
If it is executable, run:
sudo ./ubcd/tools/linux/ubcd2usb/syslinux --install -s -d /boot/syslinux /dev/sdX1
(replacing X with your USB key drive letter)
NOTE: If you are running x64 kernel instead of x86, you will need to use syslinux64
instead of syslinux. Alternatively, install syslinux using the package manager supported
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://nlug.ml1.co.uk/2012/04/installing-the-ultimate-boot-cd-to-usb-memory-stick/2512
Le fichier mbr.bin est fourni avec. Il peut être crée en faisant.
dd if=/dev/sdX of=mbr.bin bs=440 count=1
mount fuse - userland
sudo apt-get install fuseiso9660 mkdir -p ~/mnt/iso/plop fuseiso9660 plop.iso ~/mnt/iso/plop fusermount -u ~/mnt/iso/plop
Autres
#sudo mount plop/images/efiboot.img ~/mnt/tmp #sudo apt install udisks2 udisksctl loop-setup --no-user-interaction --file plop/images/efiboot.img TMP_DEV=$(/sbin/losetup -l |grep images/efiboot.img |awk '{print $1}') TMP_MOUNTP=$(lsblk "$TMP_DEV" |tail -1 |awk '{print $7}') #fusermount -u ~/mnt/tmp #sudo umount ~/mnt/tmp udisksctl unmount --no-user-interaction -b "$TMP_DEV"
Exemple de commande xorriso / mkisofs générée par CloneZilla
xorriso -as mkisofs -R -r -J -joliet-long -l -cache-inodes -iso-level 3 -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -partition_offset 16 -A "Debian Live" -p "live-build 1:20200314.drbl1; https://salsa.debian.org/live-team/live-build" -publisher "Debian Live project; https://wiki.debian.org/DebianLive; debian-live@lists.debian.org" -V "Debian sid 20200428-22:24" --modification-date=2020042814042600 -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -isohybrid-gpt-basdat -isohybrid-apm-hfsplus -o live-image-amd64.hybrid.iso binary
Note émulation retro gaming
Supernes - snes
Voir gnome-games
Zsnes
dpkg --add-architecture i386 apt-get update apt-get install zsnes
Higan
apt-get install higan
Note Android smartphone root LG G3 D855
Voir :
- /e/ os
- TWRP
- Désactiver le verrouillage OEM (OEM unlock)
Voir aussi :
Téléchargement de LG_Root.zip
Ici
Ou
upload scripts et binaires
adb push busybox /data/local/tmp/ && adb push lg_root.sh /data/local/tmp && adb push UPDATE-SuperSU-v2.46.zip /data/local/tmp
Accès console via /dev/ttyUSB
Ils existe plusieurs outils :
- Send_Command.exe (pour windows)
- qcdlcomm.py (Script Python)
- lglaf (Script Python)
qcdlcomm.py
Vor : https://forum.frandroid.com/topic/219747-tuto-root-du-lg-g3-depuis-un-syst%C3%A8me-linux/
Préreq
apt-get install python2-minimal python-serial
#wget https://gist.githubusercontent.com/corwin-of-amber/8f5ce36611dce12950e8d34a608f5ece/raw/28ea7c2faf92fce7c7588f52869faba4eeae7182/qcdlcomm.py wget http://jacobstoner.com/qcdlcomm.py rmmod cdc_acm rmmod usbserial
# lsusb |grep LG Bus 001 Device 003: ID 1004:633e LG Electronics, Inc. LM-X420xxx/G2/G3 Android Phone (MTP/download mode)
modprobe usbserial vendor=0x1004 product=0x633e python2 qcdlcomm.py /dev/ttyUSB1
# python2 qcdlcomm.py /dev/ttyUSB1
Special commands: ENTER, LEAVE, exit
#
Traceback (most recent call last):
File "qcdlcomm.py", line 97, in <module>
cmd(input)
File "qcdlcomm.py", line 89, in cmd
print output.split('\xba\xa7\xba\xbc')[1][:-1]
IndexError: list index out of range
Solution
python2 qcdlcomm.py /dev/ttyUSB2
Hélas avec qcdlcomm.py les erreurs ne sont pas redirigées !
Heureusement il existe un meilleurs outil.
Libérons le module usbserial
rmmod usbserial
Scripts lglaf
Préreq
sudo apt-get install python-usb
git clone https://github.com/Lekensteyn/lglaf cd lglaf ./lglaf.py
Lancement du hack
sh /data/local/tmp/lg_root.sh dummy 1 /data/local/tmp/UPDATE-SuperSU-v2.46.zip /data/local/tmp/busybox
Pb la partition /system reste en lecture-seule
# mount |grep ro, /dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,seclabel,noatime,data=ordered 0 0 /dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 ro,seclabel,nosuid,nodev,relatime,data=ordered 0 0
fastboot
Voir : https://nerdschalk.com/unlock-bootloader-via-fastboot-android/
fastboot adb reboot recovery fastboot reboot bootloader fastboot devices fastboot flash recovery twrp-3.4.0-0-d855.img fastboot reboot fastboot flash recovery twrp-3.4.0-0-d855.img fastboot reboot fastboot erase recovery fastboot erase laf fastboot flash laf laf.img fastboot flash recovery recovery.img fastboot reboot
Autres
adb push busybox /data/local/tmp/ adb push g2_root.sh /data/local/tmp adb push UPDATE-SuperSU-v2.46.zip /data/local/tmp
sudo rmmod cdc_acm sudo rmmod usbserial sudo modprobe usbserial vendor=0x1004 product=0x633e
./lglaf.py
#sh /data/local/tmp/lg_root.sh dummy 1 /data/local/tmp/UPDATE-SuperSU-v2.46.zip /data/local/tmp/busybox sh /data/local/tmp/g2_root.sh dummy 1 /data/local/tmp/UPDATE-SuperSU-v2.46.zip /data/local/tmp/busybox # sh /plop/tmp/g2_root.sh dummy 1 /plop/tmp/UPDATE-SuperSU-v2.46.zip /plop/tmp/busybox
# sh /data/local/tmp/g2_root.sh dummy 1 /data/local/tmp/UPDATE-SuperSU-v2.46.zip /data/local/tmp/busybox Unable to chmod /data/local/tmp/busybox: Operation not permitted ui_print ***************** ui_print SuperSU installer ui_print ***************** ui_print - Mounting /system, /data and rootfs Usage: mount [-r] [-w] [-o options] [-t type] device directory Usage: mount [-r] [-w] [-o options] [-t type] device directory mount: Permission denied mount: Permission denied mount: Permission denied mount: Permission denied /data/local/tmp/g2_root.sh[65]: can't create /system/toolbox: Read-only file system Unable to open /system/toolbox: No such file or directory /data/local/tmp/g2_root.sh[67]: /system/toolbox: not found /system/bin/toolbox: invalid option -- h aaa chcon: invalid option -- h aaa /data/local/tmp/g2_root.sh[67]: /system/toolbox: not found aaa aaa 2+0 records in 2+0 records out 2 bytes transferred in 0.001 secs (2000 bytes/sec) 3+0 records in 3+0 records out 3 bytes transferred in 0.001 secs (3000 bytes/sec) 12+0 records in 12+0 records out 12 bytes transferred in 0.001 secs (12000 bytes/sec) 3+0 records in 3+0 records out 3 bytes transferred in 0.001 secs (3000 bytes/sec) /data/local/tmp/g2_root.sh[113]: /system/toolbox: not found ui_print - Extracting files /data/local/tmp/g2_root.sh[130]: /data/local/tmp/busybox: can't execute: Permission denied ui_print - Disabling OTA survival Unable to open /tmp/supersu/armv7/chattr.pie: No such file or directory /data/local/tmp/g2_root.sh[134]: /tmp/supersu/armv7/chattr.pie: not found /data/local/tmp/g2_root.sh[135]: /tmp/supersu/armv7/chattr.pie: not found /data/local/tmp/g2_root.sh[136]: /tmp/supersu/armv7/chattr.pie: not found /data/local/tmp/g2_root.sh[137]: /tmp/supersu/armv7/chattr.pie: not found /data/local/tmp/g2_root.sh[138]: /tmp/supersu/armv7/chattr.pie: not found /data/local/tmp/g2_root.sh[139]: /tmp/supersu/armv7/chattr.pie: not found /data/local/tmp/g2_root.sh[140]: /tmp/supersu/armv7/chattr.pie: not found /data/local/tmp/g2_root.sh[141]: /tmp/supersu/armv7/chattr.pie: not found /data/local/tmp/g2_root.sh[142]: /tmp/supersu/armv7/chattr.pie: not found /data/local/tmp/g2_root.sh[143]: /tmp/supersu/armv7/chattr.pie: not found /data/local/tmp/g2_root.sh[144]: /tmp/supersu/armv7/chattr.pie: not found ui_print - Removing old files mv: rename /system/bin/install-recovery.sh to /system/bin/install-recovery_original.sh: Read-only file system /data/local/tmp/g2_root.sh[153]: /system/toolbox: not found /system/bin/toolbox: invalid option -- h aaa chcon: invalid option -- h aaa /data/local/tmp/g2_root.sh[153]: /system/toolbox: not found aaa aaa rm: /system/bin/install-recovery.sh: Read-only file system ui_print - Placing files mkdir failed for /system/bin/.ext, Read-only file system chown: /system/bin/.ext: No such file or directory chown: /system/bin/.ext: No such file or directory Unable to open /system/bin/.ext: No such file or directory /data/local/tmp/g2_root.sh[231]: /system/toolbox: not found /system/bin/toolbox: invalid option -- h aaa chcon: invalid option -- h aaa /data/local/tmp/g2_root.sh[231]: /system/toolbox: not found aaa aaa /data/local/tmp/g2_root.sh[231]: /system/toolbox: not found [64/1484] usage: chcon context path... usage: chcon context path... rm: /system/bin/.ext/.su: No such file or directory rm: /system/xbin/su: No such file or directory rm: /system/xbin/daemonsu: No such file or directory rm: /system/xbin/sugote: No such file or directory rm: /system/xbin/sugote-mksh: No such file or directory /data/local/tmp/g2_root.sh[238]: can't create /system/xbin/sugote-mksh: Read-only file system chown: /system/xbin/sugote-mksh: No such file or directory chown: /system/xbin/sugote-mksh: No such file or directory Unable to open /system/xbin/sugote-mksh: No such file or directory /data/local/tmp/g2_root.sh[238]: /system/toolbox: not found /system/bin/toolbox: invalid option -- h aaa chcon: invalid option -- h aaa /data/local/tmp/g2_root.sh[238]: /system/toolbox: not found aaa aaa /data/local/tmp/g2_root.sh[238]: /system/toolbox: not found usage: chcon context path... usage: chcon context path... rm: /system/xbin/supolicy: No such file or directory rm: /system/lib/libsupol.so: No such file or directory mkdir failed for /system/app/SuperSU, Read-only file system chown: /system/app/SuperSU: No such file or directory chown: /system/app/SuperSU: No such file or directory Unable to open /system/app/SuperSU: No such file or directory /data/local/tmp/g2_root.sh[246]: /system/toolbox: not found /system/bin/toolbox: invalid option -- h aaa chcon: invalid option -- h aaa /data/local/tmp/g2_root.sh[246]: /system/toolbox: not found aaa aaa /data/local/tmp/g2_root.sh[246]: /system/toolbox: not found [27/1484] usage: chcon context path... usage: chcon context path... rm: /system/app/SuperSU/SuperSU.apk: No such file or directory rm: /system/etc/install-recovery.sh: No such file or directory /data/local/tmp/g2_root.sh[249]: /system/toolbox: not found ln: /system/bin/install-recovery.sh: File exists ln: /system/bin/install-recovery.sh: File exists /data/local/tmp/g2_root.sh[249]: /system/toolbox: not found /system/bin/toolbox: invalid option -- h aaa chcon: invalid option -- h aaa /data/local/tmp/g2_root.sh[249]: /system/toolbox: not found aaa aaa rm: /system/bin/app_process: Read-only file system /data/local/tmp/g2_root.sh[274]: /system/toolbox: not found ln: /system/bin/app_process: File exists ln: /system/bin/app_process: File exists /data/local/tmp/g2_root.sh[274]: /system/toolbox: not found /system/bin/toolbox: invalid option -- h aaa chcon: invalid option -- h aaa /data/local/tmp/g2_root.sh[274]: /system/toolbox: not found aaa aaa mv: rename /system/bin/app_process32 to /system/bin/app_process32_original: Read-only file system /data/local/tmp/g2_root.sh[274]: /system/toolbox: not found ln: /system/bin/app_process32: File exists ln: /system/bin/app_process32: File exists /data/local/tmp/g2_root.sh[274]: /system/toolbox: not found /system/bin/toolbox: invalid option -- h aaa chcon: invalid option -- h aaa /data/local/tmp/g2_root.sh[274]: /system/toolbox: not found aaa aaa rm: /system/bin/app_process_init: No such file or directory rm: /system/etc/init.d/99SuperSUDaemon: No such file or directory /data/local/tmp/g2_root.sh[276]: can't create /system/etc/.installed_su_daemon: Read-only file system chown: /system/etc/.installed_su_daemon: No such file or directory chown: /system/etc/.installed_su_daemon: No such file or directory Unable to open /system/etc/.installed_su_daemon: No such file or directory /data/local/tmp/g2_root.sh[277]: /system/toolbox: not found /system/bin/toolbox: invalid option -- h aaa chcon: invalid option -- h aaa /data/local/tmp/g2_root.sh[277]: /system/toolbox: not found aaa aaa /data/local/tmp/g2_root.sh[277]: /system/toolbox: not found usage: chcon context path... usage: chcon context path... ui_print - Post-installation script rm: /system/toolbox: No such file or directory /data/local/tmp/g2_root.sh[281]: /system/xbin/su: not found ui_print - Unmounting /system and /data failed: Device or resource busy failed: Device or resource busy ui_print - Done !
# ls -l /data/local/tmp/busybox -rw-rw-rw- shell shell 1048328 2015-01-18 16:00 busybox # chmod 777 /data/local/tmp/busybox Unable to chmod /data/local/tmp/busybox: Operation not permitted # df |grep /data /data 25.48G 1.50G 23.98G 4096 # mount |grep data /dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,seclabel,noatime,data=ordered 0 0 /dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 rw,seclabel,nosuid,nodev,noatime,noauto_da_alloc,resuid=1000,errors=continue,data=ordered 0 0 /dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 ro,seclabel,nosuid,nodev,relatime,data=ordered 0 0 /dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,noatime,data=ordered 0 0
/system/etc/.installed_su_daemon: Read-only file system /data/local/tmp/g2_root.sh[130]: /data/local/tmp/busybox: can't execute: Permission denied /plop/tmp/g2_root.sh[242]: can't create /system/xbin/supolicy: Read-only file system /plop/tmp/g2_root.sh[242]: can't create /system/lib/libsupol.so: Read-only file system
# mount -o remount,rw /system mount: Permission denied
Apache Proxy inverse sort par un proxy
Exemple de configuration Apache
http://monsite.fr
http://monsite.fr/sitedistant
Activation des modules apaches
a2enmod proxy proxy_http proxy_connect
/etc/apache2/conf.d/truc.conf
# Conf Proxy inverse AllowCONNECT 443 SSLProxyEngine on ProxyPass /Truc/ https://monsite.fr/Arbo/ # retry=0 ProxyPassReverse /Truc/ https://monsite.fr/Arbo/ # Conf client proxy # Si le serveur doit sortir par un proxy ProxyRemote * http://192.168.2.104:3128
On vérifie la conf
apachectl -t
On recharge la conf Apache
service apache2 reload
Exemple de conf/directives de reverse proxy Apache
<VirtualHost *:80> ServerName jenkins.acme.fr <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} !on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} </IfModule> </VirtualHost> <VirtualHost *:443> ServerName jenkins.acme.fr SSLEngine On SSLCertificateFile /etc/ssl/certs/wildcard_acme.fr.crt SSLCertificateKeyFile /etc/ssl/private/wildcard_acme.fr.key SSLCertificateChainFile /etc/ssl/certs/wildcard_acme.fr_ca-bundle.crt SSLProtocol all -SSLv2 -SSLv3 SSLHonorCipherOrder on # apache 2.1+ <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^/jenkins/(.*) https://jenkins.acme.fr/$1 [R,L] </IfModule> ProxyPass / http://127.0.0.1:8880/jenkins/ nocanon ProxyPassReverse / http://127.0.0.1:8880/jenkins/ ProxyPassReverse / https://jenkins.acme.fr/ ProxyRequests Off ProxyPreserveHost On AllowEncodedSlashes NoDecode </VirtualHost>
Ou moins impactant
<VirtualHost *:80> ServerName jenkins.acme.fr <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^/$ http://jenkins.acme.fr/jenkins/ [R,L] </IfModule> ProxyPass /jenkins/ http://127.0.0.1:8880/jenkins/ ProxyPassReverse /jenkins/ http://127.0.0.1:8880/jenkins/ </VirtualHost>
Désactiver IPv6
Boot Linux Kernel parameter
ipv6.disable=1 # disable_ipv6=
Désactiver IPv6 sous Debian
cat > /etc/sysctl.d/70-disable-ipv6.conf <<EOF net.ipv6.conf.all.disable_ipv6 = 1 EOF sysctl -p /etc/sysctl.d/10-noipv6.conf
Si module
cat >/etc/modprobe.d/blacklist-ipv6.conf <<EOF blacklist ipv6 install ipv6 /bin/false EOF
/etc/apt/apt.conf.d/99force-ipv4
Acquire::ForceIPv4 "true";
Désactiver IPv6 sous RedHat
sysctl -w net.ipv6.conf.all.disable_ipv6=1 sysctl -w net.ipv6.conf.default.disable_ipv6=1 #sysctl -w net.ipv6.conf.lo.disable_ipv6 = 1
/etc/sysconfig/network-scripts/ifcfg-eth0
IPV6INIT=no IPV6_DISABLED=yes
nmcli connection show nmcli connection modify Example ipv6.method disabled
/etc/default/grub
GRUB_CMDLINE_LINUX="ipv6.disable=1 crashkernel=auto rhgb quiet"
grub2-mkconfig -o /boot/grub2/grub.cfg grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
/etc/ssh/sshd_config
AddressFamily inet
Java
Djava.net.preferIPv4Stack=true
Autres
/etc/systemd/system/rpcbind.socket.d/noipv6.conf
[Socket] ListenStream= ListenDatagram= ListenStream=0.0.0.0:111 ListenDatagram=0.0.0.0:111
/etc/wgetrc
# To try ipv6 addresses first: #prefer-family = IPv6
Pb
Erreur Address family not supported by protocol
Exemple
SystemD Socket
BindIPv6Only=both
Erreur Address family not supported by protocol lors de systemctl status quand IPV6 est désactivé dans sysctl.conf.
A tester : systemctl --failed
Résolution Après avoir modifié /etc/sysctl.conf ou des fichiers dans /etc/sysctl.d/ il est nécessaire de reconstruire l'initramfs.
dracut -f -v
Pour vérifier
ifconfig | grep inet6 cat /proc/sys/net/ipv6/conf/eth0/disable_ipv6
