wok annotate syslinux/stuff/iso2exe/README.custom @ rev 24937

Up iptraf (3.0.2)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Apr 14 08:53:05 2022 +0000 (2022-04-14)
parents 2547fda51451
children
rev   line source
pascal@19450 1 iso2exe can insert your custom settings in the SliTaz live iso image:
pascal@19450 2
pascal@19450 3 For example let's say you live in Paris and you want to add your wifi settings
pascal@19450 4 and your SSH keys into the live CD.
pascal@19450 5
pascal@19450 6 Create a directory tree like
pascal@19450 7
pascal@19450 8 extra
pascal@19450 9 extra/init.d
pascal@19450 10 extra/etc
pascal@19450 11 extra/etc/dropbear
pascal@19450 12
paul@19451 13 copy /usr/share/boot/init.custom in the root (where extra/ is)
pascal@19450 14 copy /etc/dropbear/dropbear_*_host_key files in extra/etc/dropbear
pascal@19450 15
pascal@19450 16 either:
pascal@19450 17 copy your network.conf in extra/etc/
pascal@19450 18 or (better, compatible with any SliTaz version):
pascal@19450 19 add a shell script in extra/init.d/
pascal@19450 20 cat > extra/init.d/wifi <<EOT
pascal@19450 21 sed -i 's/^WIFI="no"/WIFI="yes"/' /etc/network.conf
pascal@19450 22 sed -i 's/^WIFI_ESSID=".*/WIFI_ESSID="TheCustomESSID"/' /etc/network.conf
pascal@19450 23 sed -i 's/^WIFI_KEY=".*/WIFI_KEY="TheWifiKey"/' /etc/network.conf
pascal@19450 24 EOT
pascal@19450 25
pascal@19450 26 Create the initranfs:
pascal@19450 27 # find init.custom extra | cpio -o -H newc | gzip -9 > ../initrd.custom
pascal@19450 28 # cd ..
pascal@19450 29
pascal@19450 30 And update the ISO image:
pascal@19450 31 # iso2exe -a "rdinit=/init.custom lang=fr_FR kmap=fr-latin1 tz=Europe/Paris" \
pascal@19450 32 -i initrd.custom slitaz.iso -f
pascal@19450 33
pascal@19450 34 That's it!
pascal@19450 35
pascal@19450 36 Note you can check whether an ISO image is customized:
pascal@19450 37 $ iso2exe -l slitaz.iso
pascal@23824 38 win32.exe at 0000 (10752 bytes).
pascal@23824 39 syslinux.mbr at 2A00 (512 bytes).
pascal@23824 40 flavor.info at 2C00 (664 bytes).
pascal@23824 41 18035 free bytes in 2E98..750B
pascal@23824 42 isoboot.com at 750B (1085 bytes).
pascal@23824 43 rootfs.gz at 7948 (1704 bytes).
pascal@19450 44 boot.md5 at 7FF0 (16 bytes).
pascal@19450 45 fs.iso at 8000 (47065088 bytes).
pascal@19450 46 custom.magic at 2CEA800 (39 bytes).
pascal@19450 47 custom.append at 2CEA82F (59 bytes).
pascal@19450 48 custom.initrd at 2CEA878 (46749 bytes).
pascal@19450 49 41195 free bytes in 2CF5F15..2D00000
pascal@19450 50 MBR partitions :
pascal@23824 51 0:00000001 0001A7FF EE
pascal@23824 52 EFI partitions :
pascal@23824 53 0:000001A4 00031C04 EFI System Partition
pascal@19450 54
pascal@19450 55 And extract the initramfs:
pascal@19450 56 $ iso2exe -r slitaz.iso custom.initrd
pascal@19450 57
pascal@19450 58 The taziso tool is custom live cd aware:
pascal@19450 59 # taziso slitaz.iso isomd5
pascal@23824 60 SliTaz core-4in1 2020-05-24 slitaz.iso
pascal@19450 61 Check the ISO image
pascal@19450 62 ----
pascal@19450 63 Checking iso image...OK
pascal@19450 64 Checking iso hybrid boot....OK
pascal@19450 65 Checking iso custom config...OK