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.
- package/.oclif.manifest.json +1 -1
- package/README.md +55 -60
- package/assets/calamares/install-system.sh +2 -1
- package/conf/derivatives.yaml +5 -1
- package/conf/distros/alpine/calamares/modules/packages.yml +1 -1
- package/conf/distros/alpine/calamares/settings.yml +16 -29
- package/conf/distros/buster/calamares/modules/fstab.yml +1 -1
- package/conf/distros/buster/calamares/modules/mount.yml +4 -12
- package/conf/distros/fedora/calamares/modules/bootloader.yml +46 -17
- package/conf/distros/fedora/calamares/modules/fstab.yml +36 -11
- package/conf/distros/fedora/calamares/modules/mount.yml +101 -39
- package/conf/distros/fedora/calamares/modules/partition.yml +173 -23
- package/conf/distros/fedora/calamares/modules/users.yml +7 -9
- package/conf/distros/openmamba/calamares/settings.yml +0 -2
- package/conf/distros/opensuse/calamares/modules/bootloader.yml +46 -17
- package/conf/distros/opensuse/calamares/modules/displaymanager.yml +9 -5
- package/conf/distros/opensuse/calamares/modules/finished.yml +1 -1
- package/conf/distros/opensuse/calamares/modules/fstab.yml +36 -11
- package/conf/distros/opensuse/calamares/modules/grubcfg.yml +51 -0
- package/conf/distros/opensuse/calamares/modules/mount.yml +104 -39
- package/conf/distros/opensuse/calamares/modules/packages.yml +3 -3
- package/conf/distros/opensuse/calamares/modules/partition.yml +30 -237
- package/conf/distros/opensuse/calamares/modules/removeuser.yml +1 -14
- package/conf/distros/opensuse/calamares/modules/unpackfs.yml +0 -1
- package/conf/distros/opensuse/calamares/modules/users.yml +296 -16
- package/conf/distros/opensuse/calamares/modules/welcome.yml +91 -16
- package/conf/distros/opensuse/calamares/settings.yml +34 -120
- package/conf/distros/opensuse/calamares/zstd2lzo.sh +2 -0
- package/conf/distros/rolling/calamares/modules/shellprocess_sync.yml +5 -0
- package/conf/distros/rolling/calamares/settings.yml +4 -5
- package/dist/classes/bleach.d.ts +5 -0
- package/dist/classes/bleach.js +13 -0
- package/dist/classes/cli-autologin.js +14 -9
- package/dist/classes/daddy.js +9 -1
- package/dist/classes/distro.js +0 -9
- package/dist/classes/incubation/incubator.d/fedora.d.ts +32 -0
- package/dist/classes/incubation/incubator.d/fedora.js +79 -0
- package/dist/classes/incubation/incubator.d/opensuse.js +4 -6
- package/dist/classes/incubation/incubator.d/rolling.js +1 -3
- package/dist/classes/incubation/incubator.js +6 -11
- package/dist/classes/ovary.d/initrd.js +40 -11
- package/dist/classes/ovary.d/make-dot-disk.js +21 -11
- package/dist/classes/ovary.d/make-efi.js +13 -11
- package/dist/classes/ovary.d/merged.d.ts +1 -1
- package/dist/classes/ovary.d/merged.js +3 -2
- package/dist/classes/ovary.d/produce.js +7 -6
- package/dist/classes/ovary.d/user-create-live.js +15 -11
- package/dist/classes/ovary.d.ts +1 -1
- package/dist/classes/ovary.js +1 -1
- package/dist/classes/pacman.d/alpine.js +12 -7
- package/dist/classes/pacman.d/opensuse.js +4 -3
- package/dist/classes/pacman.js +3 -12
- package/dist/classes/pxe.d.ts +21 -18
- package/dist/classes/pxe.js +192 -259
- package/dist/classes/tailor.js +69 -33
- package/dist/classes/utils.d/filesystem.js +2 -0
- package/dist/classes/utils.d/kernel.js +12 -2
- package/dist/classes/utils.d/snapshot.js +1 -1
- package/dist/classes/utils.d/system.js +2 -2
- package/dist/commands/cuckoo.js +4 -6
- package/dist/commands/export/pkg.js +28 -12
- package/dist/commands/wardrobe/wear.js +1 -1
- package/dist/dhcpd-proxy/classes/packet.d.ts +36 -0
- package/dist/dhcpd-proxy/classes/packet.js +124 -0
- package/dist/dhcpd-proxy/index.d.ts +4 -0
- package/dist/dhcpd-proxy/index.js +4 -0
- package/dist/dhcpd-proxy/interfaces/i-pxe.d.ts +45 -0
- package/dist/dhcpd-proxy/interfaces/i-pxe.js +1 -0
- package/dist/dhcpd-proxy/lib/packet/converters.d.ts +11 -0
- package/dist/dhcpd-proxy/lib/packet/converters.js +395 -0
- package/dist/dhcpd-proxy/lib/packet/message-types.d.ts +10 -0
- package/dist/dhcpd-proxy/lib/packet/message-types.js +12 -0
- package/dist/dhcpd-proxy/lib/packet/options.d.ts +8 -0
- package/dist/dhcpd-proxy/lib/packet/options.js +264 -0
- package/dist/dhcpd-proxy/lib/sprintf.d.ts +6 -0
- package/dist/dhcpd-proxy/lib/sprintf.js +130 -0
- package/dist/dhcpd-proxy/lib/utils.d.ts +126 -0
- package/dist/dhcpd-proxy/lib/utils.js +255 -0
- package/dist/dhcpd-proxy/simple-proxy.d.ts +11 -0
- package/dist/dhcpd-proxy/simple-proxy.js +118 -0
- package/dist/interfaces/i-pxe.d.ts +16 -16
- package/dist/krill/classes/sequence.d/add_user.d.ts +3 -3
- package/dist/krill/classes/sequence.d/add_user.js +34 -29
- package/dist/krill/classes/sequence.d/bootloader_config.js +3 -26
- package/dist/krill/classes/sequence.d/fstab.js +10 -22
- package/dist/krill/classes/sequence.d/grubcfg.js +5 -3
- package/dist/krill/classes/sequence.d/mkfs.d.ts +1 -1
- package/dist/krill/classes/sequence.d/mkfs.js +10 -11
- package/dist/krill/classes/sequence.d/partition.d/bios_standard.d.ts +3 -4
- package/dist/krill/classes/sequence.d/partition.d/bios_standard.js +31 -16
- package/dist/krill/classes/sequence.d/partition.d/uefi_standard.js +0 -1
- package/dist/krill/lib/select_filesystem_type.js +2 -1
- package/dist/lib/utils.d.ts +2 -25
- package/dist/lib/utils.js +4 -27
- package/dist/{penguins-eggs_10.1.1-0_amd64.deb → penguins-eggs_25.7.7-1_amd64.deb} +0 -0
- package/dist/penguins-eggs_25.7.7-1_amd64.deb.sha256 +1 -0
- package/dracut/README.md +14 -0
- package/dracut/dracut.conf +3 -3
- package/dracut/dracut.conf.d/10-persistent_policy.conf +1 -0
- package/dracut/dracut.conf.d/{01-live.conf → 50-live.conf} +3 -2
- package/ipxe/grub/acpi.mod +0 -0
- package/ipxe/grub/adler32.mod +0 -0
- package/ipxe/grub/affs.mod +0 -0
- package/ipxe/grub/afs.mod +0 -0
- package/ipxe/grub/afsplitter.mod +0 -0
- package/ipxe/grub/ahci.mod +0 -0
- package/ipxe/grub/all_video.mod +0 -0
- package/ipxe/grub/aout.mod +0 -0
- package/ipxe/grub/appleldr.mod +0 -0
- package/ipxe/grub/archelp.mod +0 -0
- package/ipxe/grub/at_keyboard.mod +0 -0
- package/ipxe/grub/ata.mod +0 -0
- package/ipxe/grub/backtrace.mod +0 -0
- package/ipxe/grub/bfs.mod +0 -0
- package/ipxe/grub/bitmap.mod +0 -0
- package/ipxe/grub/bitmap_scale.mod +0 -0
- package/ipxe/grub/blocklist.mod +0 -0
- package/ipxe/grub/boot.mod +0 -0
- package/ipxe/grub/bsd.mod +0 -0
- package/ipxe/grub/bswap_test.mod +0 -0
- package/ipxe/grub/btrfs.mod +0 -0
- package/ipxe/grub/bufio.mod +0 -0
- package/ipxe/grub/cat.mod +0 -0
- package/ipxe/grub/cbfs.mod +0 -0
- package/ipxe/grub/cbls.mod +0 -0
- package/ipxe/grub/cbmemc.mod +0 -0
- package/ipxe/grub/cbtable.mod +0 -0
- package/ipxe/grub/cbtime.mod +0 -0
- package/ipxe/grub/chain.mod +0 -0
- package/ipxe/grub/cmdline_cat_test.mod +0 -0
- package/ipxe/grub/cmp.mod +0 -0
- package/ipxe/grub/cmp_test.mod +0 -0
- package/ipxe/grub/command.lst +194 -0
- package/ipxe/grub/config.h +69 -0
- package/ipxe/grub/configfile.mod +0 -0
- package/ipxe/grub/cpio.mod +0 -0
- package/ipxe/grub/cpio_be.mod +0 -0
- package/ipxe/grub/cpuid.mod +0 -0
- package/ipxe/grub/crc64.mod +0 -0
- package/ipxe/grub/crypto.lst +45 -0
- package/ipxe/grub/crypto.mod +0 -0
- package/ipxe/grub/cryptodisk.mod +0 -0
- package/ipxe/grub/cs5536.mod +0 -0
- package/ipxe/grub/ctz_test.mod +0 -0
- package/ipxe/grub/date.mod +0 -0
- package/ipxe/grub/datehook.mod +0 -0
- package/ipxe/grub/datetime.mod +0 -0
- package/ipxe/grub/disk.mod +0 -0
- package/ipxe/grub/diskfilter.mod +0 -0
- package/ipxe/grub/div.mod +0 -0
- package/ipxe/grub/div_test.mod +0 -0
- package/ipxe/grub/dm_nv.mod +0 -0
- package/ipxe/grub/echo.mod +0 -0
- package/ipxe/grub/efi_gop.mod +0 -0
- package/ipxe/grub/efi_uga.mod +0 -0
- package/ipxe/grub/efifwsetup.mod +0 -0
- package/ipxe/grub/efinet.mod +0 -0
- package/ipxe/grub/ehci.mod +0 -0
- package/ipxe/grub/elf.mod +0 -0
- package/ipxe/grub/eval.mod +0 -0
- package/ipxe/grub/exfat.mod +0 -0
- package/ipxe/grub/exfctest.mod +0 -0
- package/ipxe/grub/ext2.mod +0 -0
- package/ipxe/grub/extcmd.mod +0 -0
- package/ipxe/grub/f2fs.mod +0 -0
- package/ipxe/grub/fat.mod +0 -0
- package/ipxe/grub/fdt.lst +0 -0
- package/ipxe/grub/file.mod +0 -0
- package/ipxe/grub/fixvideo.mod +0 -0
- package/ipxe/grub/font.mod +0 -0
- package/ipxe/grub/fs.lst +37 -0
- package/ipxe/grub/fshelp.mod +0 -0
- package/ipxe/grub/functional_test.mod +0 -0
- package/ipxe/grub/gcry_arcfour.mod +0 -0
- package/ipxe/grub/gcry_blowfish.mod +0 -0
- package/ipxe/grub/gcry_camellia.mod +0 -0
- package/ipxe/grub/gcry_cast5.mod +0 -0
- package/ipxe/grub/gcry_crc.mod +0 -0
- package/ipxe/grub/gcry_des.mod +0 -0
- package/ipxe/grub/gcry_dsa.mod +0 -0
- package/ipxe/grub/gcry_idea.mod +0 -0
- package/ipxe/grub/gcry_md4.mod +0 -0
- package/ipxe/grub/gcry_md5.mod +0 -0
- package/ipxe/grub/gcry_rfc2268.mod +0 -0
- package/ipxe/grub/gcry_rijndael.mod +0 -0
- package/ipxe/grub/gcry_rmd160.mod +0 -0
- package/ipxe/grub/gcry_rsa.mod +0 -0
- package/ipxe/grub/gcry_seed.mod +0 -0
- package/ipxe/grub/gcry_serpent.mod +0 -0
- package/ipxe/grub/gcry_sha1.mod +0 -0
- package/ipxe/grub/gcry_sha256.mod +0 -0
- package/ipxe/grub/gcry_sha512.mod +0 -0
- package/ipxe/grub/gcry_tiger.mod +0 -0
- package/ipxe/grub/gcry_twofish.mod +0 -0
- package/ipxe/grub/gcry_whirlpool.mod +0 -0
- package/ipxe/grub/geli.mod +0 -0
- package/ipxe/grub/gettext.mod +0 -0
- package/ipxe/grub/gfxmenu.mod +0 -0
- package/ipxe/grub/gfxterm.mod +0 -0
- package/ipxe/grub/gfxterm_background.mod +0 -0
- package/ipxe/grub/gfxterm_menu.mod +0 -0
- package/ipxe/grub/gptsync.mod +0 -0
- package/ipxe/grub/gzio.mod +0 -0
- package/ipxe/grub/halt.mod +0 -0
- package/ipxe/grub/hashsum.mod +0 -0
- package/ipxe/grub/hdparm.mod +0 -0
- package/ipxe/grub/hello.mod +0 -0
- package/ipxe/grub/help.mod +0 -0
- package/ipxe/grub/hexdump.mod +0 -0
- package/ipxe/grub/hfs.mod +0 -0
- package/ipxe/grub/hfsplus.mod +0 -0
- package/ipxe/grub/hfspluscomp.mod +0 -0
- package/ipxe/grub/http.mod +0 -0
- package/ipxe/grub/iorw.mod +0 -0
- package/ipxe/grub/iso9660.mod +0 -0
- package/ipxe/grub/jfs.mod +0 -0
- package/ipxe/grub/jpeg.mod +0 -0
- package/ipxe/grub/json.mod +0 -0
- package/ipxe/grub/kernel.img +0 -0
- package/ipxe/grub/keylayouts.mod +0 -0
- package/ipxe/grub/keystatus.mod +0 -0
- package/ipxe/grub/ldm.mod +0 -0
- package/ipxe/grub/legacy_password_test.mod +0 -0
- package/ipxe/grub/legacycfg.mod +0 -0
- package/ipxe/grub/linux.mod +0 -0
- package/ipxe/grub/linux16.mod +0 -0
- package/ipxe/grub/linuxefi.mod +0 -0
- package/ipxe/grub/loadbios.mod +0 -0
- package/ipxe/grub/loadenv.mod +0 -0
- package/ipxe/grub/loopback.mod +0 -0
- package/ipxe/grub/ls.mod +0 -0
- package/ipxe/grub/lsacpi.mod +0 -0
- package/ipxe/grub/lsefi.mod +0 -0
- package/ipxe/grub/lsefimmap.mod +0 -0
- package/ipxe/grub/lsefisystab.mod +0 -0
- package/ipxe/grub/lsmmap.mod +0 -0
- package/ipxe/grub/lspci.mod +0 -0
- package/ipxe/grub/lssal.mod +0 -0
- package/ipxe/grub/luks.mod +0 -0
- package/ipxe/grub/luks2.mod +0 -0
- package/ipxe/grub/lvm.mod +0 -0
- package/ipxe/grub/lzopio.mod +0 -0
- package/ipxe/grub/macbless.mod +0 -0
- package/ipxe/grub/macho.mod +0 -0
- package/ipxe/grub/mdraid09.mod +0 -0
- package/ipxe/grub/mdraid09_be.mod +0 -0
- package/ipxe/grub/mdraid1x.mod +0 -0
- package/ipxe/grub/memdisk.mod +0 -0
- package/ipxe/grub/memrw.mod +0 -0
- package/ipxe/grub/minicmd.mod +0 -0
- package/ipxe/grub/minix.mod +0 -0
- package/ipxe/grub/minix2.mod +0 -0
- package/ipxe/grub/minix2_be.mod +0 -0
- package/ipxe/grub/minix3.mod +0 -0
- package/ipxe/grub/minix3_be.mod +0 -0
- package/ipxe/grub/minix_be.mod +0 -0
- package/ipxe/grub/mmap.mod +0 -0
- package/ipxe/grub/moddep.lst +267 -0
- package/ipxe/grub/modinfo.sh +40 -0
- package/ipxe/grub/monolithic/gcdx64.efi +0 -0
- package/ipxe/grub/monolithic/grubnetx64-installer.efi +0 -0
- package/ipxe/grub/monolithic/grubnetx64.efi +0 -0
- package/ipxe/grub/monolithic/grubx64.efi +0 -0
- package/ipxe/grub/morse.mod +0 -0
- package/ipxe/grub/mpi.mod +0 -0
- package/ipxe/grub/msdospart.mod +0 -0
- package/ipxe/grub/mul_test.mod +0 -0
- package/ipxe/grub/multiboot.mod +0 -0
- package/ipxe/grub/multiboot2.mod +0 -0
- package/ipxe/grub/nativedisk.mod +0 -0
- package/ipxe/grub/net.mod +0 -0
- package/ipxe/grub/newc.mod +0 -0
- package/ipxe/grub/nilfs2.mod +0 -0
- package/ipxe/grub/normal.mod +0 -0
- package/ipxe/grub/ntfs.mod +0 -0
- package/ipxe/grub/ntfscomp.mod +0 -0
- package/ipxe/grub/odc.mod +0 -0
- package/ipxe/grub/offsetio.mod +0 -0
- package/ipxe/grub/ohci.mod +0 -0
- package/ipxe/grub/part_acorn.mod +0 -0
- package/ipxe/grub/part_amiga.mod +0 -0
- package/ipxe/grub/part_apple.mod +0 -0
- package/ipxe/grub/part_bsd.mod +0 -0
- package/ipxe/grub/part_dfly.mod +0 -0
- package/ipxe/grub/part_dvh.mod +0 -0
- package/ipxe/grub/part_gpt.mod +0 -0
- package/ipxe/grub/part_msdos.mod +0 -0
- package/ipxe/grub/part_plan.mod +0 -0
- package/ipxe/grub/part_sun.mod +0 -0
- package/ipxe/grub/part_sunpc.mod +0 -0
- package/ipxe/grub/partmap.lst +11 -0
- package/ipxe/grub/parttool.lst +1 -0
- package/ipxe/grub/parttool.mod +0 -0
- package/ipxe/grub/password.mod +0 -0
- package/ipxe/grub/password_pbkdf2.mod +0 -0
- package/ipxe/grub/pata.mod +0 -0
- package/ipxe/grub/pbkdf2.mod +0 -0
- package/ipxe/grub/pbkdf2_test.mod +0 -0
- package/ipxe/grub/pcidump.mod +0 -0
- package/ipxe/grub/pgp.mod +0 -0
- package/ipxe/grub/play.mod +0 -0
- package/ipxe/grub/png.mod +0 -0
- package/ipxe/grub/priority_queue.mod +0 -0
- package/ipxe/grub/probe.mod +0 -0
- package/ipxe/grub/procfs.mod +0 -0
- package/ipxe/grub/progress.mod +0 -0
- package/ipxe/grub/raid5rec.mod +0 -0
- package/ipxe/grub/raid6rec.mod +0 -0
- package/ipxe/grub/random.mod +0 -0
- package/ipxe/grub/rdmsr.mod +0 -0
- package/ipxe/grub/read.mod +0 -0
- package/ipxe/grub/reboot.mod +0 -0
- package/ipxe/grub/regexp.mod +0 -0
- package/ipxe/grub/reiserfs.mod +0 -0
- package/ipxe/grub/relocator.mod +0 -0
- package/ipxe/grub/romfs.mod +0 -0
- package/ipxe/grub/scsi.mod +0 -0
- package/ipxe/grub/search.mod +0 -0
- package/ipxe/grub/search_fs_file.mod +0 -0
- package/ipxe/grub/search_fs_uuid.mod +0 -0
- package/ipxe/grub/search_label.mod +0 -0
- package/ipxe/grub/serial.mod +0 -0
- package/ipxe/grub/setjmp.mod +0 -0
- package/ipxe/grub/setjmp_test.mod +0 -0
- package/ipxe/grub/setpci.mod +0 -0
- package/ipxe/grub/sfs.mod +0 -0
- package/ipxe/grub/shift_test.mod +0 -0
- package/ipxe/grub/signature_test.mod +0 -0
- package/ipxe/grub/sleep.mod +0 -0
- package/ipxe/grub/sleep_test.mod +0 -0
- package/ipxe/grub/smbios.mod +0 -0
- package/ipxe/grub/spkmodem.mod +0 -0
- package/ipxe/grub/squash4.mod +0 -0
- package/ipxe/grub/strtoull_test.mod +0 -0
- package/ipxe/grub/syslinuxcfg.mod +0 -0
- package/ipxe/grub/tar.mod +0 -0
- package/ipxe/grub/terminal.lst +9 -0
- package/ipxe/grub/terminal.mod +0 -0
- package/ipxe/grub/terminfo.mod +0 -0
- package/ipxe/grub/test.mod +0 -0
- package/ipxe/grub/test_blockarg.mod +0 -0
- package/ipxe/grub/testload.mod +0 -0
- package/ipxe/grub/testspeed.mod +0 -0
- package/ipxe/grub/tftp.mod +0 -0
- package/ipxe/grub/tga.mod +0 -0
- package/ipxe/grub/time.mod +0 -0
- package/ipxe/grub/tpm.mod +0 -0
- package/ipxe/grub/tr.mod +0 -0
- package/ipxe/grub/trig.mod +0 -0
- package/ipxe/grub/true.mod +0 -0
- package/ipxe/grub/udf.mod +0 -0
- package/ipxe/grub/ufs1.mod +0 -0
- package/ipxe/grub/ufs1_be.mod +0 -0
- package/ipxe/grub/ufs2.mod +0 -0
- package/ipxe/grub/uhci.mod +0 -0
- package/ipxe/grub/usb.mod +0 -0
- package/ipxe/grub/usb_keyboard.mod +0 -0
- package/ipxe/grub/usbms.mod +0 -0
- package/ipxe/grub/usbserial_common.mod +0 -0
- package/ipxe/grub/usbserial_ftdi.mod +0 -0
- package/ipxe/grub/usbserial_pl2303.mod +0 -0
- package/ipxe/grub/usbserial_usbdebug.mod +0 -0
- package/ipxe/grub/usbtest.mod +0 -0
- package/ipxe/grub/video.lst +4 -0
- package/ipxe/grub/video.mod +0 -0
- package/ipxe/grub/video_bochs.mod +0 -0
- package/ipxe/grub/video_cirrus.mod +0 -0
- package/ipxe/grub/video_colors.mod +0 -0
- package/ipxe/grub/video_fb.mod +0 -0
- package/ipxe/grub/videoinfo.mod +0 -0
- package/ipxe/grub/videotest.mod +0 -0
- package/ipxe/grub/videotest_checksum.mod +0 -0
- package/ipxe/grub/wrmsr.mod +0 -0
- package/ipxe/grub/xfs.mod +0 -0
- package/ipxe/grub/xnu.mod +0 -0
- package/ipxe/grub/xnu_uuid.mod +0 -0
- package/ipxe/grub/xnu_uuid_test.mod +0 -0
- package/ipxe/grub/xzio.mod +0 -0
- package/ipxe/grub/zfs.mod +0 -0
- package/ipxe/grub/zfscrypt.mod +0 -0
- package/ipxe/grub/zfsinfo.mod +0 -0
- package/ipxe/grub/zstd.mod +0 -0
- package/ipxe/grubnetx64.efi.signed +0 -0
- package/ipxe/ipxe.pxe +0 -0
- package/ipxe/undionly.kpxe +0 -0
- package/mkinitcpio/arch/live.conf +3 -2
- package/mkinitcpio/manjaro/live.conf +1 -1
- package/mkinitfs/README.md +10 -49
- package/mkinitfs/live.conf +2 -0
- package/package.json +27 -24
- package/pods/ci/minimal/opensuse-container2host.sh +1 -1
- package/scripts/99clean +42 -0
- package/conf/distros/aldos/calamares/modules/bootloader.yml +0 -85
- package/conf/distros/aldos/calamares/modules/displaymanager.yml +0 -22
- package/conf/distros/aldos/calamares/modules/finished.yml +0 -5
- package/conf/distros/aldos/calamares/modules/fstab.yml +0 -12
- package/conf/distros/aldos/calamares/modules/locale.yml +0 -97
- package/conf/distros/aldos/calamares/modules/luksopenswaphookcfg.yml +0 -5
- package/conf/distros/aldos/calamares/modules/machineid.yml +0 -17
- package/conf/distros/aldos/calamares/modules/mount.yml +0 -56
- package/conf/distros/aldos/calamares/modules/packages.yml +0 -6
- package/conf/distros/aldos/calamares/modules/partition.yml +0 -242
- package/conf/distros/aldos/calamares/modules/removeuser.yml +0 -15
- package/conf/distros/aldos/calamares/modules/unpackfs.yml +0 -6
- package/conf/distros/aldos/calamares/modules/users.yml +0 -19
- package/conf/distros/aldos/calamares/modules/welcome.yml +0 -19
- package/conf/distros/aldos/calamares/settings.yml +0 -124
- package/conf/distros/fedora/calamares/modules/bootloader.conf +0 -85
- package/conf/distros/opensuse/calamares/modules/bootloader.conf +0 -86
- package/conf/distros/opensuse/calamares/modules/locale.yml +0 -98
- package/conf/distros/opensuse/calamares/modules/luksopenswaphookcfg.yml +0 -5
- package/conf/distros/opensuse/calamares/modules/machineid.yml +0 -17
- package/conf/distros/rolling/calamares/modules/shellprocess_removelink.yml +0 -8
- package/dist/index_old.d.ts +0 -8
- package/dist/index_old.js +0 -8
- package/dist/penguins-eggs_10.1.1-0_amd64.deb.sha256 +0 -1
- package/dracut/sidecar.sh +0 -19
- package/ipxe/ipxe.efi +0 -0
- package/mkinitfs/initramfs-init.in +0 -1051
- package/mkinitfs/sidecar.sh +0 -52
- /package/dist/classes/ovary.d/{xorriso-commend.d.ts → xorriso-command.d.ts} +0 -0
- /package/dist/classes/ovary.d/{xorriso-commend.js → xorriso-command.js} +0 -0
package/dist/classes/pxe.js
CHANGED
|
@@ -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 {
|
|
12
|
-
import
|
|
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
|
-
|
|
52
|
+
this.settings.load();
|
|
53
|
+
this.distro = new Distro();
|
|
90
54
|
if (Utils.isLive()) {
|
|
91
|
-
this.eggRoot = this.
|
|
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 (
|
|
145
|
-
|
|
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
|
-
|
|
153
|
-
|
|
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
|
-
*
|
|
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
|
-
|
|
183
|
-
|
|
184
|
-
//
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
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
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
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 +=
|
|
329
|
-
content +=
|
|
330
|
-
|
|
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 +=
|
|
348
|
-
content += `
|
|
349
|
-
content += `
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
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
|
|
252
|
+
* grubCfg
|
|
253
|
+
* @param familyId
|
|
397
254
|
*/
|
|
398
|
-
async
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
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
|
}
|