PXE network boot
BIOS
Please note, if you create an image from a legacy BIOS, it can only be started by this type of hardware; UEFI ditto. so create a LUN per BIOS mode.
Boot from media until installer starts.
F2 for console
iscsiadm -m discovery -t st -p <host>
Find the right target on:
Connect
iscsiadm -m node --targetname <target> --portal <host:3260> --login
Disconnect
iscsiadm -m node --targetname <target> --portal <host:3260> --logout
type [Q][H]! exit[Q] to return to the installation shell.
After this, go through the setup and install the OS to the linked ISCSI LUN.
After installation, return to the shell with F2
sudo su
mkdir /mnt/newsystem
mount /dev/sda1 /mnt/newsystem
mkdir /mnt/newsystem/dev
mkdir /mnt/newsystem/proc
mkdir /mnt/newsystem/sys
mount --bind /dev /mnt/newsystem/dev
mount -t proc proc /mnt/newsystem/proc
mount -t sysfs sys /mnt/newsystem/sys
chroot /mnt/newsystem
mount -t proc none /proc
hostname -F /etc/hostname
apt-get install initramfs-tools open-iscsi sysv-rc-conf
echo "iscsi" >> /etc/initramfs-tools/modules
initiator
echo "InitiatorName=iqn.nl.willemloeven:ubnt-srvr01" > /etc/iscsi/initiatorname.iscsi
touch /etc/iscsi/iscsi.initramfs
NIC
nano /etc/networking/interfaces
car eth0 iface eth0 inet manual
nano /etc/default/grub
ip=dhcp ISCSI_INITIATOR=INITIATOR IQN ISCSI_TARGET_NAME=ISCSI TARGET ISCSI_TARGET_IP=1.2.3.4 ISCSI_TARGET_PORT=3260 ISCSI_USERNAME=username ISCSI_PASSWORD=password
update-grub
exit
Reboot
PXE boot
Boot the volume via pxe, configure the following items per "node" (if you are going to clone the lun of course)
Configuration can be done by booting live media on the node, and then adjusting the configurations.
Change GRUB to new lun → target and initiator name
Mount new iscsi lun via a working Linux installation
Change hostname (can be done after booting)
extra
Check mounted volume
fdisk -l
Noteer het diskid /dev/sd<>
mkdir /mnt/iscsitarget mount /dev/sd<> /mnt/iscsitarget