several way to do this: (in no particular order)
1. cheatcode: edit the APPEND line(of your chosen boot option) of /boot/syslinux/porteus.cfg with
cliexe=/path/to/script.sh eg. /dev/sdb1/porteus/scripts/script.sh (name it whatever you want and make sure it's executable( chmod +x script.sh) on POSIX)
2.make a module:
Code: Select all
(as root):
mkdir -p /tmp/mod/{etc/rc.d,usr/local/bin}
cp script.sh /tmp/mod/usr/local/bin
chmod +x /tmp/mod/usr/local/bin/script.sh
echo "/usr/local/bin/script.sh" >> /tmp/mod/etc/rc.d/rc.local
dir2xzm /tmp/mod /tmp/xmrig_hugepage.xzm
mv /tmp/xmrig_hugepage.xzm /to/your/device/porteus/modules/
3. if your usb install is POSIX(ext*) not fat or ntfs you can use rootcopy:
Code: Select all
(as root)
mkdir -p /path/to/your/usb/porteus/rootcopy/{etc/rc.d,usr/local/bin}
cp script.sh /path/to/your/usb/porteus/rootcopy/usr/local/bin
chmod +x /path/to/your/usb/porteus/rootcopy/usr/local/bin/script.sh
echo "/usr/local/bin/script.sh" >> /path/to/your/usb/porteus/rootcopyetc/rc.d/rc.local
presuming that this is early enough in the boot process .. and that the kernel is built with this capability ...
just skimming your link:
would simply adding boot parameters:
hugepagesz=1GB default_hugepagesz=1GB hugepages=6 to the APPEND line work?