wok-next annotate syslinux/stuff/iso2exe/README.custom @ rev 21276

try to build gens-gs again
author Hans-G?nter Theisgen
date Sat Dec 07 15:51:18 2019 +0100 (2019-12-07)
parents 37bef16b6789
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@19450 38 win32.exe at 0000 (6144 bytes).
pascal@19450 39 syslinux.mbr at 1800 (512 bytes).
pascal@19450 40 flavor.info at 1A00 (664 bytes).
pascal@19450 41 6841 free bytes in 1C98..3751
pascal@19450 42 tazboot.com at 3751 (6994 bytes).
pascal@19450 43 rootfs.gz at 52A3 (11429 bytes).
pascal@19450 44 dosstub at 7F48 (184 bytes).
pascal@19450 45 boot.md5 at 7FF0 (16 bytes).
pascal@19450 46 fs.iso at 8000 (47065088 bytes).
pascal@19450 47 custom.magic at 2CEA800 (39 bytes).
pascal@19450 48 custom.append at 2CEA82F (59 bytes).
pascal@19450 49 custom.initrd at 2CEA878 (46749 bytes).
pascal@19450 50 41195 free bytes in 2CF5F15..2D00000
pascal@19450 51 MBR partitions :
pascal@19450 52 1:00000000 00016800 17
pascal@19450 53
pascal@19450 54 And extract the initramfs:
pascal@19450 55 $ iso2exe -r slitaz.iso custom.initrd
pascal@19450 56
pascal@19450 57 The taziso tool is custom live cd aware:
pascal@19450 58 # taziso slitaz.iso isomd5
pascal@19450 59 SliTaz core-4in1 2016-10-16 slitaz.iso
pascal@19450 60 Check the ISO image
pascal@19450 61 ----
pascal@19450 62 Checking iso image...OK
pascal@19450 63 Checking iso hybrid boot....OK
pascal@19450 64 Checking iso custom config...OK