Sun Jun 25 10:37:26 2017 UTC

Produce a customised ISO

[NOTE IMPORTANTE]All the commands should be entered as root

Installation of a NuTyX system

The "LFS" variable MUST be defined

In this demonstration the chroot will be in the "/ISO-NuTyX" directory, but you may choose a different name

export LFS=/ISO-NuTyX

The "NUTYX_TMP" variable SHOULD be defined

It is a directory where you want to clone a temporary NuTyX repository. Here it is "/mnt/nutyx_tmp" but you may choose a different directory.

export NUTYX_TMP=/mnt/nutyx_tmp

Make sure you have all the tools installed

If you are running a NuTyX system you can use:

cards install git cdrkit syslinux libisoburn grub-efi dosfstools

Clone the "NuTyX" git repository

Change to the directory where you want to download a temporary NuTyX repository: e.g. `cd /mnt`

git clone git:// $NUTYX_TMP

Install the NuTyX base system


Copy necessary files for the iso

cp -av $NUTYX_TMP/iso $LFS/ISO

Generate the ISO

Enter the chroot

install-nutyx -ec

Put the kernel and the initrd in the right place

mkinitramfs `basename /lib/modules/*` -nf
cp -v /boot/kernel-* /ISO/isolinux/kernel
cp -v /boot/initrd-* /ISO/isolinux/initrd

Flush the binary archives

cards purge

Generate the squashfs files

mkdir -p /ISO/isolinux/boot/
cd /
for dir in opt bin etc lib lib64 root run sbin usr var home
  [ -f ISO/isolinux/boot/$dir.squashfs ] && rm ISO/isolinux/boot/$dir.squashfs
  mksquashfs $dir ISO/isolinux/boot/$dir.squashfs

Quit the NuTyX chroot


Generate the ISO

bash $NUTYX_TMP/scripts/mkiso


The size should not be greater than 300 MB if you didn't add any optional packages. You will find the iso image in the $LFS directory.

ls $LFS
bin etc lib NuTyX_x86_64-20160917.iso root srv usr boot 
home lib64 NuTyX_x86_64-20160917.md5sum
run sys var dev ISO mnt proc sbin tmp

Create a bootable USB-Stick

Insert your USB-Stick and check the disk. Run:

fdisk -l
Disk /dev/sdb: 960.8 MiB ......

Create a bootable USB-Stick specifying the correct filename and disk (replace sdX with your USB disk)

[Important]Following command will remove all existing data on the USB key.
dd if=$LFS/NuTyX_x86_64-20160917.iso of=/dev/sdX bs=4M; sync