penguins-eggs 10.1.1 → 25.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (422) hide show
  1. package/.oclif.manifest.json +1 -1
  2. package/README.md +55 -60
  3. package/assets/calamares/install-system.sh +2 -1
  4. package/conf/derivatives.yaml +5 -1
  5. package/conf/distros/alpine/calamares/modules/packages.yml +1 -1
  6. package/conf/distros/alpine/calamares/settings.yml +16 -29
  7. package/conf/distros/buster/calamares/modules/fstab.yml +1 -1
  8. package/conf/distros/buster/calamares/modules/mount.yml +4 -12
  9. package/conf/distros/fedora/calamares/modules/bootloader.yml +46 -17
  10. package/conf/distros/fedora/calamares/modules/fstab.yml +36 -11
  11. package/conf/distros/fedora/calamares/modules/mount.yml +101 -39
  12. package/conf/distros/fedora/calamares/modules/partition.yml +173 -23
  13. package/conf/distros/fedora/calamares/modules/users.yml +7 -9
  14. package/conf/distros/openmamba/calamares/settings.yml +0 -2
  15. package/conf/distros/opensuse/calamares/modules/bootloader.yml +46 -17
  16. package/conf/distros/opensuse/calamares/modules/displaymanager.yml +9 -5
  17. package/conf/distros/opensuse/calamares/modules/finished.yml +1 -1
  18. package/conf/distros/opensuse/calamares/modules/fstab.yml +36 -11
  19. package/conf/distros/opensuse/calamares/modules/grubcfg.yml +51 -0
  20. package/conf/distros/opensuse/calamares/modules/mount.yml +104 -39
  21. package/conf/distros/opensuse/calamares/modules/packages.yml +3 -3
  22. package/conf/distros/opensuse/calamares/modules/partition.yml +30 -237
  23. package/conf/distros/opensuse/calamares/modules/removeuser.yml +1 -14
  24. package/conf/distros/opensuse/calamares/modules/unpackfs.yml +0 -1
  25. package/conf/distros/opensuse/calamares/modules/users.yml +296 -16
  26. package/conf/distros/opensuse/calamares/modules/welcome.yml +91 -16
  27. package/conf/distros/opensuse/calamares/settings.yml +34 -120
  28. package/conf/distros/opensuse/calamares/zstd2lzo.sh +2 -0
  29. package/conf/distros/rolling/calamares/modules/shellprocess_sync.yml +5 -0
  30. package/conf/distros/rolling/calamares/settings.yml +4 -5
  31. package/dist/classes/bleach.d.ts +5 -0
  32. package/dist/classes/bleach.js +13 -0
  33. package/dist/classes/cli-autologin.js +14 -9
  34. package/dist/classes/daddy.js +9 -1
  35. package/dist/classes/distro.js +0 -9
  36. package/dist/classes/incubation/incubator.d/fedora.d.ts +32 -0
  37. package/dist/classes/incubation/incubator.d/fedora.js +79 -0
  38. package/dist/classes/incubation/incubator.d/opensuse.js +4 -6
  39. package/dist/classes/incubation/incubator.d/rolling.js +1 -3
  40. package/dist/classes/incubation/incubator.js +6 -11
  41. package/dist/classes/ovary.d/initrd.js +40 -11
  42. package/dist/classes/ovary.d/make-dot-disk.js +21 -11
  43. package/dist/classes/ovary.d/make-efi.js +13 -11
  44. package/dist/classes/ovary.d/merged.d.ts +1 -1
  45. package/dist/classes/ovary.d/merged.js +3 -2
  46. package/dist/classes/ovary.d/produce.js +7 -6
  47. package/dist/classes/ovary.d/user-create-live.js +15 -11
  48. package/dist/classes/ovary.d.ts +1 -1
  49. package/dist/classes/ovary.js +1 -1
  50. package/dist/classes/pacman.d/alpine.js +12 -7
  51. package/dist/classes/pacman.d/opensuse.js +4 -3
  52. package/dist/classes/pacman.js +3 -12
  53. package/dist/classes/pxe.d.ts +21 -18
  54. package/dist/classes/pxe.js +192 -259
  55. package/dist/classes/tailor.js +69 -33
  56. package/dist/classes/utils.d/filesystem.js +2 -0
  57. package/dist/classes/utils.d/kernel.js +12 -2
  58. package/dist/classes/utils.d/snapshot.js +1 -1
  59. package/dist/classes/utils.d/system.js +2 -2
  60. package/dist/commands/cuckoo.js +4 -6
  61. package/dist/commands/export/pkg.js +28 -12
  62. package/dist/commands/wardrobe/wear.js +1 -1
  63. package/dist/dhcpd-proxy/classes/packet.d.ts +36 -0
  64. package/dist/dhcpd-proxy/classes/packet.js +124 -0
  65. package/dist/dhcpd-proxy/index.d.ts +4 -0
  66. package/dist/dhcpd-proxy/index.js +4 -0
  67. package/dist/dhcpd-proxy/interfaces/i-pxe.d.ts +45 -0
  68. package/dist/dhcpd-proxy/interfaces/i-pxe.js +1 -0
  69. package/dist/dhcpd-proxy/lib/packet/converters.d.ts +11 -0
  70. package/dist/dhcpd-proxy/lib/packet/converters.js +395 -0
  71. package/dist/dhcpd-proxy/lib/packet/message-types.d.ts +10 -0
  72. package/dist/dhcpd-proxy/lib/packet/message-types.js +12 -0
  73. package/dist/dhcpd-proxy/lib/packet/options.d.ts +8 -0
  74. package/dist/dhcpd-proxy/lib/packet/options.js +264 -0
  75. package/dist/dhcpd-proxy/lib/sprintf.d.ts +6 -0
  76. package/dist/dhcpd-proxy/lib/sprintf.js +130 -0
  77. package/dist/dhcpd-proxy/lib/utils.d.ts +126 -0
  78. package/dist/dhcpd-proxy/lib/utils.js +255 -0
  79. package/dist/dhcpd-proxy/simple-proxy.d.ts +11 -0
  80. package/dist/dhcpd-proxy/simple-proxy.js +118 -0
  81. package/dist/interfaces/i-pxe.d.ts +16 -16
  82. package/dist/krill/classes/sequence.d/add_user.d.ts +3 -3
  83. package/dist/krill/classes/sequence.d/add_user.js +34 -29
  84. package/dist/krill/classes/sequence.d/bootloader_config.js +3 -26
  85. package/dist/krill/classes/sequence.d/fstab.js +10 -22
  86. package/dist/krill/classes/sequence.d/grubcfg.js +5 -3
  87. package/dist/krill/classes/sequence.d/mkfs.d.ts +1 -1
  88. package/dist/krill/classes/sequence.d/mkfs.js +10 -11
  89. package/dist/krill/classes/sequence.d/partition.d/bios_standard.d.ts +3 -4
  90. package/dist/krill/classes/sequence.d/partition.d/bios_standard.js +31 -16
  91. package/dist/krill/classes/sequence.d/partition.d/uefi_standard.js +0 -1
  92. package/dist/krill/lib/select_filesystem_type.js +2 -1
  93. package/dist/lib/utils.d.ts +2 -25
  94. package/dist/lib/utils.js +4 -27
  95. package/dist/{penguins-eggs_10.1.1-0_amd64.deb → penguins-eggs_25.7.7-1_amd64.deb} +0 -0
  96. package/dist/penguins-eggs_25.7.7-1_amd64.deb.sha256 +1 -0
  97. package/dracut/README.md +14 -0
  98. package/dracut/dracut.conf +3 -3
  99. package/dracut/dracut.conf.d/10-persistent_policy.conf +1 -0
  100. package/dracut/dracut.conf.d/{01-live.conf → 50-live.conf} +3 -2
  101. package/ipxe/grub/acpi.mod +0 -0
  102. package/ipxe/grub/adler32.mod +0 -0
  103. package/ipxe/grub/affs.mod +0 -0
  104. package/ipxe/grub/afs.mod +0 -0
  105. package/ipxe/grub/afsplitter.mod +0 -0
  106. package/ipxe/grub/ahci.mod +0 -0
  107. package/ipxe/grub/all_video.mod +0 -0
  108. package/ipxe/grub/aout.mod +0 -0
  109. package/ipxe/grub/appleldr.mod +0 -0
  110. package/ipxe/grub/archelp.mod +0 -0
  111. package/ipxe/grub/at_keyboard.mod +0 -0
  112. package/ipxe/grub/ata.mod +0 -0
  113. package/ipxe/grub/backtrace.mod +0 -0
  114. package/ipxe/grub/bfs.mod +0 -0
  115. package/ipxe/grub/bitmap.mod +0 -0
  116. package/ipxe/grub/bitmap_scale.mod +0 -0
  117. package/ipxe/grub/blocklist.mod +0 -0
  118. package/ipxe/grub/boot.mod +0 -0
  119. package/ipxe/grub/bsd.mod +0 -0
  120. package/ipxe/grub/bswap_test.mod +0 -0
  121. package/ipxe/grub/btrfs.mod +0 -0
  122. package/ipxe/grub/bufio.mod +0 -0
  123. package/ipxe/grub/cat.mod +0 -0
  124. package/ipxe/grub/cbfs.mod +0 -0
  125. package/ipxe/grub/cbls.mod +0 -0
  126. package/ipxe/grub/cbmemc.mod +0 -0
  127. package/ipxe/grub/cbtable.mod +0 -0
  128. package/ipxe/grub/cbtime.mod +0 -0
  129. package/ipxe/grub/chain.mod +0 -0
  130. package/ipxe/grub/cmdline_cat_test.mod +0 -0
  131. package/ipxe/grub/cmp.mod +0 -0
  132. package/ipxe/grub/cmp_test.mod +0 -0
  133. package/ipxe/grub/command.lst +194 -0
  134. package/ipxe/grub/config.h +69 -0
  135. package/ipxe/grub/configfile.mod +0 -0
  136. package/ipxe/grub/cpio.mod +0 -0
  137. package/ipxe/grub/cpio_be.mod +0 -0
  138. package/ipxe/grub/cpuid.mod +0 -0
  139. package/ipxe/grub/crc64.mod +0 -0
  140. package/ipxe/grub/crypto.lst +45 -0
  141. package/ipxe/grub/crypto.mod +0 -0
  142. package/ipxe/grub/cryptodisk.mod +0 -0
  143. package/ipxe/grub/cs5536.mod +0 -0
  144. package/ipxe/grub/ctz_test.mod +0 -0
  145. package/ipxe/grub/date.mod +0 -0
  146. package/ipxe/grub/datehook.mod +0 -0
  147. package/ipxe/grub/datetime.mod +0 -0
  148. package/ipxe/grub/disk.mod +0 -0
  149. package/ipxe/grub/diskfilter.mod +0 -0
  150. package/ipxe/grub/div.mod +0 -0
  151. package/ipxe/grub/div_test.mod +0 -0
  152. package/ipxe/grub/dm_nv.mod +0 -0
  153. package/ipxe/grub/echo.mod +0 -0
  154. package/ipxe/grub/efi_gop.mod +0 -0
  155. package/ipxe/grub/efi_uga.mod +0 -0
  156. package/ipxe/grub/efifwsetup.mod +0 -0
  157. package/ipxe/grub/efinet.mod +0 -0
  158. package/ipxe/grub/ehci.mod +0 -0
  159. package/ipxe/grub/elf.mod +0 -0
  160. package/ipxe/grub/eval.mod +0 -0
  161. package/ipxe/grub/exfat.mod +0 -0
  162. package/ipxe/grub/exfctest.mod +0 -0
  163. package/ipxe/grub/ext2.mod +0 -0
  164. package/ipxe/grub/extcmd.mod +0 -0
  165. package/ipxe/grub/f2fs.mod +0 -0
  166. package/ipxe/grub/fat.mod +0 -0
  167. package/ipxe/grub/fdt.lst +0 -0
  168. package/ipxe/grub/file.mod +0 -0
  169. package/ipxe/grub/fixvideo.mod +0 -0
  170. package/ipxe/grub/font.mod +0 -0
  171. package/ipxe/grub/fs.lst +37 -0
  172. package/ipxe/grub/fshelp.mod +0 -0
  173. package/ipxe/grub/functional_test.mod +0 -0
  174. package/ipxe/grub/gcry_arcfour.mod +0 -0
  175. package/ipxe/grub/gcry_blowfish.mod +0 -0
  176. package/ipxe/grub/gcry_camellia.mod +0 -0
  177. package/ipxe/grub/gcry_cast5.mod +0 -0
  178. package/ipxe/grub/gcry_crc.mod +0 -0
  179. package/ipxe/grub/gcry_des.mod +0 -0
  180. package/ipxe/grub/gcry_dsa.mod +0 -0
  181. package/ipxe/grub/gcry_idea.mod +0 -0
  182. package/ipxe/grub/gcry_md4.mod +0 -0
  183. package/ipxe/grub/gcry_md5.mod +0 -0
  184. package/ipxe/grub/gcry_rfc2268.mod +0 -0
  185. package/ipxe/grub/gcry_rijndael.mod +0 -0
  186. package/ipxe/grub/gcry_rmd160.mod +0 -0
  187. package/ipxe/grub/gcry_rsa.mod +0 -0
  188. package/ipxe/grub/gcry_seed.mod +0 -0
  189. package/ipxe/grub/gcry_serpent.mod +0 -0
  190. package/ipxe/grub/gcry_sha1.mod +0 -0
  191. package/ipxe/grub/gcry_sha256.mod +0 -0
  192. package/ipxe/grub/gcry_sha512.mod +0 -0
  193. package/ipxe/grub/gcry_tiger.mod +0 -0
  194. package/ipxe/grub/gcry_twofish.mod +0 -0
  195. package/ipxe/grub/gcry_whirlpool.mod +0 -0
  196. package/ipxe/grub/geli.mod +0 -0
  197. package/ipxe/grub/gettext.mod +0 -0
  198. package/ipxe/grub/gfxmenu.mod +0 -0
  199. package/ipxe/grub/gfxterm.mod +0 -0
  200. package/ipxe/grub/gfxterm_background.mod +0 -0
  201. package/ipxe/grub/gfxterm_menu.mod +0 -0
  202. package/ipxe/grub/gptsync.mod +0 -0
  203. package/ipxe/grub/gzio.mod +0 -0
  204. package/ipxe/grub/halt.mod +0 -0
  205. package/ipxe/grub/hashsum.mod +0 -0
  206. package/ipxe/grub/hdparm.mod +0 -0
  207. package/ipxe/grub/hello.mod +0 -0
  208. package/ipxe/grub/help.mod +0 -0
  209. package/ipxe/grub/hexdump.mod +0 -0
  210. package/ipxe/grub/hfs.mod +0 -0
  211. package/ipxe/grub/hfsplus.mod +0 -0
  212. package/ipxe/grub/hfspluscomp.mod +0 -0
  213. package/ipxe/grub/http.mod +0 -0
  214. package/ipxe/grub/iorw.mod +0 -0
  215. package/ipxe/grub/iso9660.mod +0 -0
  216. package/ipxe/grub/jfs.mod +0 -0
  217. package/ipxe/grub/jpeg.mod +0 -0
  218. package/ipxe/grub/json.mod +0 -0
  219. package/ipxe/grub/kernel.img +0 -0
  220. package/ipxe/grub/keylayouts.mod +0 -0
  221. package/ipxe/grub/keystatus.mod +0 -0
  222. package/ipxe/grub/ldm.mod +0 -0
  223. package/ipxe/grub/legacy_password_test.mod +0 -0
  224. package/ipxe/grub/legacycfg.mod +0 -0
  225. package/ipxe/grub/linux.mod +0 -0
  226. package/ipxe/grub/linux16.mod +0 -0
  227. package/ipxe/grub/linuxefi.mod +0 -0
  228. package/ipxe/grub/loadbios.mod +0 -0
  229. package/ipxe/grub/loadenv.mod +0 -0
  230. package/ipxe/grub/loopback.mod +0 -0
  231. package/ipxe/grub/ls.mod +0 -0
  232. package/ipxe/grub/lsacpi.mod +0 -0
  233. package/ipxe/grub/lsefi.mod +0 -0
  234. package/ipxe/grub/lsefimmap.mod +0 -0
  235. package/ipxe/grub/lsefisystab.mod +0 -0
  236. package/ipxe/grub/lsmmap.mod +0 -0
  237. package/ipxe/grub/lspci.mod +0 -0
  238. package/ipxe/grub/lssal.mod +0 -0
  239. package/ipxe/grub/luks.mod +0 -0
  240. package/ipxe/grub/luks2.mod +0 -0
  241. package/ipxe/grub/lvm.mod +0 -0
  242. package/ipxe/grub/lzopio.mod +0 -0
  243. package/ipxe/grub/macbless.mod +0 -0
  244. package/ipxe/grub/macho.mod +0 -0
  245. package/ipxe/grub/mdraid09.mod +0 -0
  246. package/ipxe/grub/mdraid09_be.mod +0 -0
  247. package/ipxe/grub/mdraid1x.mod +0 -0
  248. package/ipxe/grub/memdisk.mod +0 -0
  249. package/ipxe/grub/memrw.mod +0 -0
  250. package/ipxe/grub/minicmd.mod +0 -0
  251. package/ipxe/grub/minix.mod +0 -0
  252. package/ipxe/grub/minix2.mod +0 -0
  253. package/ipxe/grub/minix2_be.mod +0 -0
  254. package/ipxe/grub/minix3.mod +0 -0
  255. package/ipxe/grub/minix3_be.mod +0 -0
  256. package/ipxe/grub/minix_be.mod +0 -0
  257. package/ipxe/grub/mmap.mod +0 -0
  258. package/ipxe/grub/moddep.lst +267 -0
  259. package/ipxe/grub/modinfo.sh +40 -0
  260. package/ipxe/grub/monolithic/gcdx64.efi +0 -0
  261. package/ipxe/grub/monolithic/grubnetx64-installer.efi +0 -0
  262. package/ipxe/grub/monolithic/grubnetx64.efi +0 -0
  263. package/ipxe/grub/monolithic/grubx64.efi +0 -0
  264. package/ipxe/grub/morse.mod +0 -0
  265. package/ipxe/grub/mpi.mod +0 -0
  266. package/ipxe/grub/msdospart.mod +0 -0
  267. package/ipxe/grub/mul_test.mod +0 -0
  268. package/ipxe/grub/multiboot.mod +0 -0
  269. package/ipxe/grub/multiboot2.mod +0 -0
  270. package/ipxe/grub/nativedisk.mod +0 -0
  271. package/ipxe/grub/net.mod +0 -0
  272. package/ipxe/grub/newc.mod +0 -0
  273. package/ipxe/grub/nilfs2.mod +0 -0
  274. package/ipxe/grub/normal.mod +0 -0
  275. package/ipxe/grub/ntfs.mod +0 -0
  276. package/ipxe/grub/ntfscomp.mod +0 -0
  277. package/ipxe/grub/odc.mod +0 -0
  278. package/ipxe/grub/offsetio.mod +0 -0
  279. package/ipxe/grub/ohci.mod +0 -0
  280. package/ipxe/grub/part_acorn.mod +0 -0
  281. package/ipxe/grub/part_amiga.mod +0 -0
  282. package/ipxe/grub/part_apple.mod +0 -0
  283. package/ipxe/grub/part_bsd.mod +0 -0
  284. package/ipxe/grub/part_dfly.mod +0 -0
  285. package/ipxe/grub/part_dvh.mod +0 -0
  286. package/ipxe/grub/part_gpt.mod +0 -0
  287. package/ipxe/grub/part_msdos.mod +0 -0
  288. package/ipxe/grub/part_plan.mod +0 -0
  289. package/ipxe/grub/part_sun.mod +0 -0
  290. package/ipxe/grub/part_sunpc.mod +0 -0
  291. package/ipxe/grub/partmap.lst +11 -0
  292. package/ipxe/grub/parttool.lst +1 -0
  293. package/ipxe/grub/parttool.mod +0 -0
  294. package/ipxe/grub/password.mod +0 -0
  295. package/ipxe/grub/password_pbkdf2.mod +0 -0
  296. package/ipxe/grub/pata.mod +0 -0
  297. package/ipxe/grub/pbkdf2.mod +0 -0
  298. package/ipxe/grub/pbkdf2_test.mod +0 -0
  299. package/ipxe/grub/pcidump.mod +0 -0
  300. package/ipxe/grub/pgp.mod +0 -0
  301. package/ipxe/grub/play.mod +0 -0
  302. package/ipxe/grub/png.mod +0 -0
  303. package/ipxe/grub/priority_queue.mod +0 -0
  304. package/ipxe/grub/probe.mod +0 -0
  305. package/ipxe/grub/procfs.mod +0 -0
  306. package/ipxe/grub/progress.mod +0 -0
  307. package/ipxe/grub/raid5rec.mod +0 -0
  308. package/ipxe/grub/raid6rec.mod +0 -0
  309. package/ipxe/grub/random.mod +0 -0
  310. package/ipxe/grub/rdmsr.mod +0 -0
  311. package/ipxe/grub/read.mod +0 -0
  312. package/ipxe/grub/reboot.mod +0 -0
  313. package/ipxe/grub/regexp.mod +0 -0
  314. package/ipxe/grub/reiserfs.mod +0 -0
  315. package/ipxe/grub/relocator.mod +0 -0
  316. package/ipxe/grub/romfs.mod +0 -0
  317. package/ipxe/grub/scsi.mod +0 -0
  318. package/ipxe/grub/search.mod +0 -0
  319. package/ipxe/grub/search_fs_file.mod +0 -0
  320. package/ipxe/grub/search_fs_uuid.mod +0 -0
  321. package/ipxe/grub/search_label.mod +0 -0
  322. package/ipxe/grub/serial.mod +0 -0
  323. package/ipxe/grub/setjmp.mod +0 -0
  324. package/ipxe/grub/setjmp_test.mod +0 -0
  325. package/ipxe/grub/setpci.mod +0 -0
  326. package/ipxe/grub/sfs.mod +0 -0
  327. package/ipxe/grub/shift_test.mod +0 -0
  328. package/ipxe/grub/signature_test.mod +0 -0
  329. package/ipxe/grub/sleep.mod +0 -0
  330. package/ipxe/grub/sleep_test.mod +0 -0
  331. package/ipxe/grub/smbios.mod +0 -0
  332. package/ipxe/grub/spkmodem.mod +0 -0
  333. package/ipxe/grub/squash4.mod +0 -0
  334. package/ipxe/grub/strtoull_test.mod +0 -0
  335. package/ipxe/grub/syslinuxcfg.mod +0 -0
  336. package/ipxe/grub/tar.mod +0 -0
  337. package/ipxe/grub/terminal.lst +9 -0
  338. package/ipxe/grub/terminal.mod +0 -0
  339. package/ipxe/grub/terminfo.mod +0 -0
  340. package/ipxe/grub/test.mod +0 -0
  341. package/ipxe/grub/test_blockarg.mod +0 -0
  342. package/ipxe/grub/testload.mod +0 -0
  343. package/ipxe/grub/testspeed.mod +0 -0
  344. package/ipxe/grub/tftp.mod +0 -0
  345. package/ipxe/grub/tga.mod +0 -0
  346. package/ipxe/grub/time.mod +0 -0
  347. package/ipxe/grub/tpm.mod +0 -0
  348. package/ipxe/grub/tr.mod +0 -0
  349. package/ipxe/grub/trig.mod +0 -0
  350. package/ipxe/grub/true.mod +0 -0
  351. package/ipxe/grub/udf.mod +0 -0
  352. package/ipxe/grub/ufs1.mod +0 -0
  353. package/ipxe/grub/ufs1_be.mod +0 -0
  354. package/ipxe/grub/ufs2.mod +0 -0
  355. package/ipxe/grub/uhci.mod +0 -0
  356. package/ipxe/grub/usb.mod +0 -0
  357. package/ipxe/grub/usb_keyboard.mod +0 -0
  358. package/ipxe/grub/usbms.mod +0 -0
  359. package/ipxe/grub/usbserial_common.mod +0 -0
  360. package/ipxe/grub/usbserial_ftdi.mod +0 -0
  361. package/ipxe/grub/usbserial_pl2303.mod +0 -0
  362. package/ipxe/grub/usbserial_usbdebug.mod +0 -0
  363. package/ipxe/grub/usbtest.mod +0 -0
  364. package/ipxe/grub/video.lst +4 -0
  365. package/ipxe/grub/video.mod +0 -0
  366. package/ipxe/grub/video_bochs.mod +0 -0
  367. package/ipxe/grub/video_cirrus.mod +0 -0
  368. package/ipxe/grub/video_colors.mod +0 -0
  369. package/ipxe/grub/video_fb.mod +0 -0
  370. package/ipxe/grub/videoinfo.mod +0 -0
  371. package/ipxe/grub/videotest.mod +0 -0
  372. package/ipxe/grub/videotest_checksum.mod +0 -0
  373. package/ipxe/grub/wrmsr.mod +0 -0
  374. package/ipxe/grub/xfs.mod +0 -0
  375. package/ipxe/grub/xnu.mod +0 -0
  376. package/ipxe/grub/xnu_uuid.mod +0 -0
  377. package/ipxe/grub/xnu_uuid_test.mod +0 -0
  378. package/ipxe/grub/xzio.mod +0 -0
  379. package/ipxe/grub/zfs.mod +0 -0
  380. package/ipxe/grub/zfscrypt.mod +0 -0
  381. package/ipxe/grub/zfsinfo.mod +0 -0
  382. package/ipxe/grub/zstd.mod +0 -0
  383. package/ipxe/grubnetx64.efi.signed +0 -0
  384. package/ipxe/ipxe.pxe +0 -0
  385. package/ipxe/undionly.kpxe +0 -0
  386. package/mkinitcpio/arch/live.conf +3 -2
  387. package/mkinitcpio/manjaro/live.conf +1 -1
  388. package/mkinitfs/README.md +10 -49
  389. package/mkinitfs/live.conf +2 -0
  390. package/package.json +27 -24
  391. package/pods/ci/minimal/opensuse-container2host.sh +1 -1
  392. package/scripts/99clean +42 -0
  393. package/conf/distros/aldos/calamares/modules/bootloader.yml +0 -85
  394. package/conf/distros/aldos/calamares/modules/displaymanager.yml +0 -22
  395. package/conf/distros/aldos/calamares/modules/finished.yml +0 -5
  396. package/conf/distros/aldos/calamares/modules/fstab.yml +0 -12
  397. package/conf/distros/aldos/calamares/modules/locale.yml +0 -97
  398. package/conf/distros/aldos/calamares/modules/luksopenswaphookcfg.yml +0 -5
  399. package/conf/distros/aldos/calamares/modules/machineid.yml +0 -17
  400. package/conf/distros/aldos/calamares/modules/mount.yml +0 -56
  401. package/conf/distros/aldos/calamares/modules/packages.yml +0 -6
  402. package/conf/distros/aldos/calamares/modules/partition.yml +0 -242
  403. package/conf/distros/aldos/calamares/modules/removeuser.yml +0 -15
  404. package/conf/distros/aldos/calamares/modules/unpackfs.yml +0 -6
  405. package/conf/distros/aldos/calamares/modules/users.yml +0 -19
  406. package/conf/distros/aldos/calamares/modules/welcome.yml +0 -19
  407. package/conf/distros/aldos/calamares/settings.yml +0 -124
  408. package/conf/distros/fedora/calamares/modules/bootloader.conf +0 -85
  409. package/conf/distros/opensuse/calamares/modules/bootloader.conf +0 -86
  410. package/conf/distros/opensuse/calamares/modules/locale.yml +0 -98
  411. package/conf/distros/opensuse/calamares/modules/luksopenswaphookcfg.yml +0 -5
  412. package/conf/distros/opensuse/calamares/modules/machineid.yml +0 -17
  413. package/conf/distros/rolling/calamares/modules/shellprocess_removelink.yml +0 -8
  414. package/dist/index_old.d.ts +0 -8
  415. package/dist/index_old.js +0 -8
  416. package/dist/penguins-eggs_10.1.1-0_amd64.deb.sha256 +0 -1
  417. package/dracut/sidecar.sh +0 -19
  418. package/ipxe/ipxe.efi +0 -0
  419. package/mkinitfs/initramfs-init.in +0 -1051
  420. package/mkinitfs/sidecar.sh +0 -52
  421. /package/dist/classes/ovary.d/{xorriso-commend.d.ts → xorriso-command.d.ts} +0 -0
  422. /package/dist/classes/ovary.d/{xorriso-commend.js → xorriso-command.js} +0 -0
@@ -6,16 +6,16 @@
6
6
  * license: MIT
7
7
  */
8
8
  import fs from 'node:fs';
9
- import http from 'node:http';
10
9
  import path from 'node:path';
11
- import { dhcpd } from 'node-proxy-dhcpd';
12
- import nodeStatic from 'node-static';
10
+ import { startSimpleProxy } from '../dhcpd-proxy/simple-proxy.js';
11
+ import express from 'express';
13
12
  // @ts-ignore
14
13
  import tftp from 'tftp';
15
14
  import { exec } from '../lib/utils.js';
16
15
  import Distro from './distro.js';
17
16
  import Settings from './settings.js';
18
17
  import Utils from './utils.js';
18
+ import Diversions from './diversions.js';
19
19
  // _dirname
20
20
  const __dirname = path.dirname(new URL(import.meta.url).pathname);
21
21
  /**
@@ -29,6 +29,7 @@ export default class Pxe {
29
29
  isos = []; // cuckoo's eggs
30
30
  nest = '';
31
31
  pxeRoot = '';
32
+ distro = {};
32
33
  settings = {};
33
34
  verbose = false;
34
35
  vmlinuz = '';
@@ -41,44 +42,6 @@ export default class Pxe {
41
42
  this.nest = nest;
42
43
  this.pxeRoot = pxeRoot;
43
44
  }
44
- /**
45
- * build
46
- */
47
- async build() {
48
- if (fs.existsSync(this.pxeRoot)) {
49
- await this.tryCatch(`rm ${this.pxeRoot} -rf`);
50
- }
51
- await this.tryCatch(`mkdir ${this.pxeRoot} -p`);
52
- await this.tryCatch(`mkdir ${this.pxeRoot} -p`);
53
- await this.tryCatch(`ln -s ${this.eggRoot}live ${this.pxeRoot}/live`);
54
- await this.tryCatch(`ln -s ${this.nest}.disk ${this.pxeRoot}/.disk`);
55
- if (this.settings.distro.distroId === 'Manjaro') {
56
- await this.tryCatch(`ln -s ${this.eggRoot}manjaro ${this.pxeRoot}/manjaro`);
57
- }
58
- else if (this.settings.distro.distroId === 'Arch' || this.settings.distro.distroId === 'RebornOS') {
59
- await this.tryCatch(`ln -s ${this.eggRoot}arch ${this.pxeRoot}/arch`);
60
- }
61
- if (fs.existsSync(this.eggRoot)) {
62
- await this.tryCatch(`cp ${this.eggRoot}live/${this.vmlinuz} ${this.pxeRoot}/vmlinuz`, true);
63
- await this.tryCatch(`chmod 777 ${this.pxeRoot}/vmlinuz`);
64
- await this.tryCatch(`cp ${this.eggRoot}live/${this.initrdImg} ${this.pxeRoot}/initrd`, true);
65
- await this.tryCatch(`chmod 777 ${this.pxeRoot}/initrd`);
66
- }
67
- // link iso images in pxe
68
- for (const iso of this.isos) {
69
- await this.tryCatch(`ln -s ${this.nest}/${iso} ${this.pxeRoot}/${iso}`);
70
- }
71
- await this.bios();
72
- await this.ipxe();
73
- await this.http();
74
- }
75
- /**
76
- *
77
- * @param dhcpOptions
78
- */
79
- dhcpStart(dhcpOptions) {
80
- new dhcpd(dhcpOptions);
81
- }
82
45
  /**
83
46
  * fertilization()
84
47
  *
@@ -86,22 +49,10 @@ export default class Pxe {
86
49
  */
87
50
  async fertilization() {
88
51
  this.settings = new Settings();
89
- await this.settings.load();
52
+ this.settings.load();
53
+ this.distro = new Distro();
90
54
  if (Utils.isLive()) {
91
- this.eggRoot = this.settings.distro.liveMediumPath;
92
- if (
93
- // ArchisoCompatibles
94
- this.settings.distro.distroId === 'Arch' ||
95
- this.settings.distro.distroId === 'ArcoLinux' ||
96
- this.settings.distro.distroId === 'blendOS' ||
97
- this.settings.distro.distroId === 'EndeavourOS' ||
98
- this.settings.distro.distroId === 'Garuda' ||
99
- this.settings.distro.distroId === 'phyOS' ||
100
- this.settings.distro.distroId === 'RebornOS') {
101
- this.eggRoot = '/run/archiso/bootmnt/';
102
- await exec(`mkdir ${this.eggRoot} -p`);
103
- await exec(`mount /dev/sr0 ${this.eggRoot}`);
104
- }
55
+ this.eggRoot = this.distro.liveMediumPath;
105
56
  }
106
57
  else {
107
58
  this.eggRoot = this.settings.config.snapshot_mnt + 'iso/';
@@ -110,8 +61,6 @@ export default class Pxe {
110
61
  console.log('no image available, build an image with: sudo eggs produce');
111
62
  process.exit();
112
63
  }
113
- const settings = new Settings();
114
- settings.load();
115
64
  /**
116
65
  * se pxeRoot non esiste viene creato
117
66
  */
@@ -120,42 +69,19 @@ export default class Pxe {
120
69
  }
121
70
  /**
122
71
  * Ricerca delle ISOs
123
- */
124
- const isos = [];
125
- /*
126
- if (!Utils.isLive()) {
127
- const isos = fs.readdirSync(this.nest)
128
- for (const iso of isos) {
129
- if (path.extname(iso) === '.iso') {
130
- this.isos.push(iso)
131
- }
132
-
133
- this.isos = this.isos.sort()
134
- }
135
- }
136
- */
137
- /**
138
72
  * installed: /home/eggs/.mnt/iso/live
139
73
  * live: this.iso/live
140
74
  */
75
+ const isos = [];
141
76
  const pathFiles = this.eggRoot + 'live';
142
77
  const files = fs.readdirSync(pathFiles);
78
+ // rieva nome vmlinuz e initrdImg
143
79
  for (const file of files) {
144
- if (this.settings.distro.familyId === 'debian') {
145
- if (path.basename(file).slice(0, 7) === 'vmlinuz') {
146
- this.vmlinuz = path.basename(file);
147
- }
148
- if (path.basename(file).slice(0, 6) === 'initrd') {
149
- this.initrdImg = path.basename(file);
150
- }
80
+ if (path.basename(file).slice(0, 7) === 'vmlinuz') {
81
+ this.vmlinuz = path.basename(file);
151
82
  }
152
- else if (this.settings.distro.familyId === 'archlinux') {
153
- if (path.basename(file).slice(0, 7) === 'vmlinuz') {
154
- this.vmlinuz = path.basename(file);
155
- }
156
- if (path.basename(file).slice(0, 9) === 'initramfs') {
157
- this.initrdImg = path.basename(file);
158
- }
83
+ if (path.basename(file).slice(0, 4) === 'init') {
84
+ this.initrdImg = path.basename(file);
159
85
  }
160
86
  }
161
87
  /**
@@ -168,26 +94,67 @@ export default class Pxe {
168
94
  const c = b.slice(0, Math.max(0, b.indexOf(' ')));
169
95
  this.bootLabel = c.slice(Math.max(0, c.lastIndexOf('/') + 1));
170
96
  }
97
+ console.log(`eggRoot: ${this.eggRoot}`);
171
98
  console.log(`bootLabel: ${this.bootLabel}`);
172
99
  console.log(`vmlinuz: ${this.vmlinuz}`);
173
100
  console.log(`initrd: ${this.initrdImg}`);
174
101
  }
175
102
  /**
176
- * start http server for images
103
+ * build
104
+ */
105
+ async build() {
106
+ const echoYes = Utils.setEcho(true);
107
+ // pxeRoot erase
108
+ if (fs.existsSync(this.pxeRoot)) {
109
+ await exec(`rm ${this.pxeRoot} -rf`, this.echo);
110
+ }
111
+ // Struttura
112
+ await exec(`mkdir ${this.pxeRoot} -p`, this.echo);
113
+ await exec(`ln -s ${this.eggRoot}live ${this.pxeRoot}/live`, this.echo);
114
+ await exec(`ln -s ${this.nest}.disk ${this.pxeRoot}/.disk`, this.echo);
115
+ // Link supplementari distro
116
+ if (this.distro.familyId === 'archlinux') {
117
+ let filesystemName = `arch/x86_64/airootfs.sfs`;
118
+ if (Diversions.isManjaroBased(this.settings.distro.distroId)) {
119
+ filesystemName = `manjaro/x86_64/livefs.sfs`;
120
+ }
121
+ await exec(`mkdir ${this.pxeRoot}/${path.dirname(filesystemName)} -p`, this.echo);
122
+ await exec(`ln -s ${this.eggRoot}/live/filesystem.squashfs ${this.pxeRoot}/${filesystemName}`, this.echo);
123
+ }
124
+ // Firewall per fedora
125
+ if (this.distro.familyId === 'fedora' || this.distro.familyId === 'opensuse') {
126
+ await exec(`firewall-cmd --add-service=dhcp --permanent`, this.echo);
127
+ await exec(`firewall-cmd --add-service=tftp --permanent`, this.echo);
128
+ await exec(`firewall-cmd --add-service=http --permanent`, this.echo);
129
+ await exec(`firewall-cmd --reload`, this.echo);
130
+ }
131
+ await this.grubCfg();
132
+ await this.bios();
133
+ await this.uefi();
134
+ await this.http();
135
+ }
136
+ /**
177
137
  *
138
+ * @param dhcpOptions
139
+ */
140
+ dhcpdStart(dhcpOptions) {
141
+ startSimpleProxy(dhcpOptions);
142
+ }
143
+ /**
144
+ * start http server for images
178
145
  */
179
146
  async httpStart() {
180
147
  const port = 80;
181
148
  const httpRoot = this.pxeRoot + '/';
182
- console.log('http root: ' + httpRoot);
183
- console.log('http listening: 0.0.0.0:' + port);
184
- // const file = new nodeStatic.Server(httpRoot, { followSymlinks: true })
185
- const file = new nodeStatic.Server(httpRoot);
186
- http
187
- .createServer((req, res) => {
188
- file.serve(req, res);
189
- })
190
- .listen(port);
149
+ // 1. Crea un'applicazione Express
150
+ const app = express();
151
+ // 2. Usa il middleware di Express per servire i file statici.
152
+ app.use(express.static(httpRoot));
153
+ // 3. Avvia il server
154
+ app.listen(port, () => {
155
+ console.log(`HTTP server (Express) listening on 0.0.0.0:${port}`);
156
+ console.log(`Serving files from ${httpRoot}`);
157
+ });
191
158
  }
192
159
  /**
193
160
  * start tftp
@@ -209,90 +176,10 @@ export default class Pxe {
209
176
  });
210
177
  tftpServer.listen();
211
178
  }
212
- /**
213
- * Il resto PRIVATO
214
- */
215
- /**
216
- * configure PXE bios
217
- */
218
- async bios() {
219
- console.log('creating cuckoo configuration: BIOS');
220
- await this.tryCatch(`cp ${__dirname}/../../addons/eggs/theme/livecd/isolinux.theme.cfg ${this.pxeRoot}/isolinux.theme.cfg`);
221
- await this.tryCatch(`cp ${__dirname}/../../addons/eggs/theme/livecd/splash.png ${this.pxeRoot}/splash.png`);
222
- /**
223
- * ipxe.efi
224
- */
225
- await this.tryCatch(`ln -s ${__dirname}/../../ipxe/ipxe.efi ${this.pxeRoot}/ipxe.efi`);
226
- // pxe
227
- const distro = new Distro();
228
- await this.tryCatch(`ln -s ${distro.syslinuxPath}pxelinux.0 ${this.pxeRoot}/pxelinux.0`);
229
- await this.tryCatch(`ln -s ${distro.syslinuxPath}lpxelinux.0 ${this.pxeRoot}/lpxelinux.0`);
230
- // syslinux
231
- await this.tryCatch(`ln -s ${distro.syslinuxPath}ldlinux.c32 ${this.pxeRoot}/ldlinux.c32`);
232
- await this.tryCatch(`ln -s ${distro.syslinuxPath}vesamenu.c32 ${this.pxeRoot}/vesamenu.c32`);
233
- await this.tryCatch(`ln -s ${distro.syslinuxPath}libcom32.c32 ${this.pxeRoot}/libcom32.c32`);
234
- await this.tryCatch(`ln -s ${distro.syslinuxPath}libutil.c32 ${this.pxeRoot}/libutil.c32`);
235
- await this.tryCatch(`ln -s ${distro.syslinuxPath}memdisk ${this.pxeRoot}/memdisk`);
236
- await this.tryCatch(`mkdir ${this.pxeRoot}/pxelinux.cfg`);
237
- let content = '';
238
- content += '# eggs: pxelinux.cfg/default\n';
239
- content += '# search path for the c32 support libraries (libcom32, libutil etc.)\n';
240
- content += 'path\n';
241
- content += 'include isolinux.theme.cfg\n';
242
- content += 'UI vesamenu.c32\n';
243
- content += '\n';
244
- content += `menu title cuckoo: when you need a flying PXE server! ${Utils.address()}\n`;
245
- content += 'PROMPT 0\n';
246
- content += 'TIMEOUT 200\n';
247
- content += '\n';
248
- content += 'label egg\n';
249
- content += `menu label ${this.bootLabel.replace('.iso', '')}\n`;
250
- if (this.settings.distro.familyId === 'debian') {
251
- /**
252
- * DEBIAN
253
- */
254
- const clid = this.settings.distro.codenameLikeId;
255
- if (clid === 'bionic' || clid === 'stretch' || clid === 'jessie') {
256
- content += 'kernel vmlinuz\n';
257
- content += `append initrd=initrd boot=live config noswap noprompt fetch=http://${Utils.address()}/live/filesystem.squashfs\n`;
258
- }
259
- else {
260
- content += `kernel http://${Utils.address()}/vmlinuz\n`;
261
- content += `append initrd=http://${Utils.address()}/initrd boot=live config noswap noprompt fetch=http://${Utils.address()}/live/filesystem.squashfs\n`;
262
- }
263
- }
264
- else if (distro.familyId === 'archlinux') {
265
- /**
266
- * ARCH LINUX
267
- */
268
- let tool = 'archiso';
269
- if (distro.distroId === 'Manjarolinux') {
270
- tool = 'miso';
271
- }
272
- content += `kernel http://${Utils.address()}/vmlinuz\n`;
273
- content += `append initrd=http://${Utils.address()}/initrd boot=live config noswap noprompt ${tool}_http_srv=http://${Utils.address()}/\n`;
274
- content += 'sysappend 3\n';
275
- content += '\n';
276
- }
277
- if (this.isos.length > 0) {
278
- content += 'menu separator\n';
279
- for (const iso of this.isos) {
280
- content += '\n';
281
- content += `label ${iso}\n`;
282
- content += `menu label ${iso}\n`;
283
- content += `kernel http://${Utils.address()}/memdisk\n`;
284
- content += `initrd http://${Utils.address()}/${iso}\n`;
285
- content += 'append iso raw sysappend 3\n';
286
- }
287
- }
288
- const file = `${this.pxeRoot}/pxelinux.cfg/default`;
289
- fs.writeFileSync(file, content);
290
- }
291
179
  /**
292
180
  * configure PXE http server
293
181
  */
294
182
  async http() {
295
- console.log('creating cuckoo configuration: html');
296
183
  const file = `${this.pxeRoot}/index.html`;
297
184
  let content = '';
298
185
  content += "<html><title>Penguin's eggs PXE server</title>";
@@ -315,96 +202,142 @@ export default class Pxe {
315
202
  fs.writeFileSync(file, content);
316
203
  }
317
204
  /**
318
- *
205
+ * configure PXE bios
319
206
  */
320
- async ipxe() {
321
- console.log('creating cuckoo configuration: UEFI');
322
- let content = '#!ipxe\n';
323
- content += 'dhcp\n';
324
- content += 'set net0/ip=dhcp\n';
325
- content += `console --picture http://${Utils.address()}/splash.png -x 1024 -y 768\n`;
326
- content += 'goto start ||\n';
207
+ async bios() {
208
+ await exec(`cp ${__dirname}/../../addons/eggs/theme/livecd/isolinux.theme.cfg ${this.pxeRoot}/isolinux.theme.cfg`, this.echo);
209
+ await exec(`cp ${__dirname}/../../addons/eggs/theme/livecd/splash.png ${this.pxeRoot}/splash.png`, this.echo);
210
+ // ipxe.pxe
211
+ await exec(`ln -s ${__dirname}/../../ipxe/ipxe.pxe ${this.pxeRoot}/ipxe.pxe`, this.echo);
212
+ // pxe
213
+ await exec(`cp ${this.distro.syslinuxPath}/pxelinux.0 ${this.pxeRoot}/pxelinux.0`, this.echo);
214
+ await exec(`cp ${this.distro.syslinuxPath}/lpxelinux.0 ${this.pxeRoot}/lpxelinux.0`, this.echo);
215
+ // syslinux
216
+ await exec(`ln -s ${this.distro.syslinuxPath}/ldlinux.c32 ${this.pxeRoot}/ldlinux.c32`, this.echo);
217
+ await exec(`ln -s ${this.distro.syslinuxPath}/vesamenu.c32 ${this.pxeRoot}/vesamenu.c32`, this.echo);
218
+ await exec(`ln -s ${this.distro.syslinuxPath}/libcom32.c32 ${this.pxeRoot}/libcom32.c32`, this.echo);
219
+ await exec(`ln -s ${this.distro.syslinuxPath}/libutil.c32 ${this.pxeRoot}/libutil.c32`, this.echo);
220
+ await exec(`ln -s ${this.distro.syslinuxPath}/memdisk ${this.pxeRoot}/memdisk`, this.echo);
221
+ await exec(`mkdir ${this.pxeRoot}/pxelinux.cfg`, this.echo);
222
+ let content = '';
223
+ content += '# eggs: pxelinux.cfg/default\n';
224
+ content += '# search path for the c32 support libraries (libcom32, libutil etc.)\n';
225
+ content += `path /\n`;
226
+ content += 'include isolinux.theme.cfg\n';
227
+ content += 'UI vesamenu.c32\n';
327
228
  content += '\n';
328
- content += ':start\n';
329
- content += `set server_root http://${Utils.address()}:80/\n`;
330
- const serverRootVars = '${server_root}';
331
- content += `menu cuckoo: when you need a flying PXE server! ${Utils.address()}\n`;
332
- content += 'item --gap boot from ovarium\n';
333
- content += `item egg-menu \${space} ${this.bootLabel.replaceAll('.iso', '')}\n\n`;
334
- if (this.isos.length > 0) {
335
- content += 'item --gap boot iso images\n';
336
- for (const iso of this.isos) {
337
- const menu = iso;
338
- const label = menu;
339
- content += `item ${menu} \${space} ${label}\n\n`;
340
- }
341
- }
342
- content += 'item --gap boot from internet\n';
343
- content += 'item netboot ${space} netboot\n';
344
- content += 'choose target || goto start\n';
345
- content += 'goto ${target}\n';
229
+ content += `menu title cuckoo: when you need a flying PXE server! ${Utils.address()}\n`;
230
+ content += 'PROMPT 0\n';
231
+ content += 'TIMEOUT 200\n';
346
232
  content += '\n';
347
- content += ':egg-menu\n';
348
- content += `kernel http://${Utils.address()}/vmlinuz\n`;
349
- content += `initrd http://${Utils.address()}/initrd\n`;
350
- /**
351
- * CORRECT:
352
- * content += `imgargs vmlinuz fetch=http://${Utils.address()}/live/filesystem.squashfs boot=live dhcp initrd=initrd ro\n`
353
- */
354
- if (this.settings.distro.familyId === 'debian') {
355
- /**
356
- * DEBIAN
357
- */
358
- content += `imgargs vmlinuz fetch=http://${Utils.address()}/live/filesystem.squashfs boot=live dhcp initrd=initrd ro\n`;
359
- }
360
- else if (this.settings.distro.familyId === 'archlinux') {
361
- /**
362
- * ARCH LINUX
363
- */
364
- let tool = 'archiso';
365
- if (this.settings.distro.codenameId === 'Qonos' || this.settings.distro.codenameId === 'Ruah' || this.settings.distro.codenameId === 'Sikaris' || this.settings.distro.codenameId === 'UltimaThule') {
366
- tool = 'miso';
367
- }
368
- content += `imgargs vmlinuz ${tool}_http_srv=http://${Utils.address()}/ boot=live dhcp initrd=initrd ro\n`;
369
- // content += 'ipappend 3\n'
370
- }
371
- content += 'sleep 5\n';
372
- content += 'boot || goto start\n\n';
373
- if (this.isos.length > 0) {
374
- for (const iso of this.isos) {
375
- const menu = iso.replace('.iso', '');
376
- content += `:${menu}\n`;
377
- content += `sanboot ${serverRootVars}/${iso}\n`;
378
- content += 'boot || goto start\n\n';
379
- }
380
- }
381
- /**
382
- * netboot.xyz
383
- */
384
- content += ':netboot\n';
385
- content += 'ifopen net0\n';
386
- content += 'set conn_type https\n';
387
- content += 'chain --autofree https://boot.netboot.xyz/menu.ipxe || echo HTTPS failed... attempting HTTP...\n';
388
- content += 'set conn_type http\n';
389
- content += 'chain --autofree http://boot.netboot.xyz/menu.ipxe || echo HTTP failed, localbooting...\n';
390
- content += 'goto start\n\n';
233
+ content += `label ${this.distro.distroId}\n`;
234
+ content += `menu label ${this.bootLabel.replace('.iso', '')}\n`;
235
+ content += `kernel http://${Utils.address()}/live/${path.basename(this.vmlinuz)}\n`;
236
+ const kernelParams = this._getKernelParameters();
237
+ content += `append initrd=http://${Utils.address()}/live/${path.basename(this.initrdImg)} ${kernelParams}\n`;
238
+ const file = `${this.pxeRoot}/pxelinux.cfg/default`;
239
+ fs.writeFileSync(file, content);
240
+ }
241
+ /**
242
+ * uefi: uso ipxe solo per chainload di grub
243
+ */
244
+ async uefi() {
245
+ let content = '#!ipxe\n';
246
+ content += 'dhcp\n';
247
+ content += `chain http://${Utils.address()}/grub.efi\n`;
391
248
  const file = `${this.pxeRoot}/autoexec.ipxe`;
392
249
  fs.writeFileSync(file, content);
393
250
  }
394
251
  /**
395
- *
396
- * @param cmd
252
+ * grubCfg
253
+ * @param familyId
397
254
  */
398
- async tryCatch(cmd = '', echo = false) {
399
- try {
400
- if (echo) {
401
- console.log(cmd);
402
- }
403
- await exec(cmd, this.echo);
404
- }
405
- catch (error) {
406
- console.log(`Error: ${error}`);
407
- await Utils.pressKeyToExit(cmd);
255
+ async grubCfg() {
256
+ const echoYes = Utils.setEcho(true);
257
+ /**
258
+ * On Debian bookworm:
259
+ * cd ~/penguins-eggs
260
+ * cp /usr/lib/grub/x86_64-efi-signed/grubnetx64.efi.signed ./ipxe/
261
+ * cp -r /usr/lib/grub/x86_64-efi/ ./ipxe/grub
262
+ */
263
+ await exec(`mkdir -p ${this.pxeRoot}/grub`, this.echo);
264
+ await exec(`cp ${__dirname}/../../ipxe/grubnetx64.efi.signed ${this.pxeRoot}/grub.efi`);
265
+ await exec(`cp -r ${__dirname}/../../ipxe/grub/* ${this.pxeRoot}/grub`);
266
+ // dato che Alpine cerca i moduli in: /grub/x86_64-efi, la accontentiamo...
267
+ await exec(`ln -s ${__dirname}/../../ipxe/grub/ ${this.pxeRoot}/grub/x86_64-efi`);
268
+ // Genera il file grub.cfg
269
+ const grubName = `${this.pxeRoot}/grub/grub.cfg`; // Il file deve chiamarsi grub.cfg
270
+ let grubContent = '';
271
+ grubContent += `set timeout=10\n`;
272
+ grubContent += `set default=0\n\n`;
273
+ // Titolo del menu dinamico
274
+ grubContent += `menuentry "${this.bootLabel.replace('.iso', '')} via PXE" {\n`;
275
+ grubContent += ` echo "Booting ${this.bootLabel.replace('.iso', '')}..."\n`;
276
+ grubContent += ` echo "Loading Linux Kernel..."\n`;
277
+ const kernelParams = this._getKernelParameters();
278
+ grubContent += ` linux (http,${Utils.address()})/live/${path.basename(this.vmlinuz)} ${kernelParams}\n`;
279
+ grubContent += ` echo "Loading Initial Ramdisk..."\n`;
280
+ grubContent += ` initrd (http,${Utils.address()})/live/${path.basename(this.initrdImg)}\n`;
281
+ grubContent += `}\n`;
282
+ fs.writeFileSync(grubName, grubContent, 'utf-8');
283
+ }
284
+ /**
285
+ * Metodo helper per ottenere i parametri corretti per GRUB
286
+ * in base alla famiglia della distribuzione.
287
+ */
288
+ _getKernelParameters() {
289
+ let lp = '';
290
+ // .replaceAll(/\s\s+/g, ' ')
291
+ switch (this.distro.familyId) {
292
+ case 'alpine':
293
+ lp = `alpine_repo=http://${Utils.address()}/live/filesystem.squashfs \
294
+ modules=loop,squashfs,sd-mod,usb-storage,virtio-net,e1000e \
295
+ acpi=off \
296
+ ip=dhcp`;
297
+ break;
298
+ case 'archlinux':
299
+ let basedir = 'archisobasedir=arch';
300
+ let hook = 'archiso_http_srv';
301
+ if (Diversions.isManjaroBased(this.distro.distroId)) {
302
+ basedir = '';
303
+ hook = 'miso_http_srv';
304
+ }
305
+ lp = `${hook}=http://${Utils.address()}/ \
306
+ ${basedir} \
307
+ ip=dhcp \
308
+ copytoram=n`;
309
+ break;
310
+ case 'debian':
311
+ lp = `fetch=http://${Utils.address()}/live/filesystem.squashfs \
312
+ boot=live \
313
+ config \
314
+ noswap \
315
+ noprompt \
316
+ ip=dhcp`;
317
+ break;
318
+ case 'fedora':
319
+ lp = `initrd=http://${Utils.address()}/live/${path.basename(this.initrdImg)} \
320
+ root=live:http://${Utils.address()}/live/filesystem.squashfs \
321
+ rootfstype=auto \
322
+ ro \
323
+ rd.live.image \
324
+ rd.luks=0 \
325
+ rd.md=0 \
326
+ rd.dm=0\n`;
327
+ break;
328
+ case 'opensuse':
329
+ lp = `initrd=http://${Utils.address()}/live/${path.basename(this.initrdImg)} \
330
+ root=live:http://${Utils.address()}/live/filesystem.squashfs \
331
+ rootfstype=auto \
332
+ ro \
333
+ rd.live.image \
334
+ rd.luks=0 \
335
+ rd.md=0 \
336
+ rd.dm=0\n`;
337
+ break;
338
+ default:
339
+ console.warn(`Attenzione: famiglia distro '${this.distro.familyId}' non riconosciuta per GRUB.`);
408
340
  }
341
+ return lp.replaceAll(/\s\s+/g, ' ');
409
342
  }
410
343
  }