iPXE discussion forum
booting installed linux through iscsi - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: booting installed linux through iscsi (/showthread.php?tid=12654)



booting installed linux through iscsi - bip - 2018-07-31 15:17

Hello!
On think-client:
How I can boot from LUN (/dev/sdb, for example) (throught iSCSI) with installed linux?
I try execute sanboot command, but linux not started (I think because linux not supported iSCSI and not login into my target).
Can you help me?

I try repack initrd with open-iscsi, but it not good solution...(it is working).

On dhcp-server:
LUN: 1
Type: disk
SCSI ID: IET 00010001
SCSI SN: beaf11
Size: 10737 MB, Block size: 512
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
SWP: No
Thin-provisioning: No
Backing store type: rdwr
Backing store path: /dev/sdb
Backing store flags:


RE: booting installed linux through iscsi - NiKiZe - 2018-07-31 18:00

You should probably consult the documentation, or anyone, for the distribution that you are using.


RE: booting installed linux through iscsi - MultimediaMan - 2018-08-08 16:31

If you are wanting to move a running installation of Linux on a local hard disk to an iSCSI LUN, you are going to have to do some fairly extensive work to accomplish the task;

I assume your iSCSI LUN is identified on the running installation as /dev/sdb (although it could be anything).

General Compatibility Checklist:

a. EFI Secure Boot to iSCSI is not currently possible.
b. Most newer Linux Distributions require that SELinux be disabled for iSCSI/NFS boot.
c. iSCSI boot with iPXE doesn't use GRUB or GRUB2, typically.
d. Your Linux Distribution of choice will need the development kernel, dracut and dracut-network installed before attempting to perform the migration.
e. Your kernel will need to be configured to support iSCSI/NFS boot and your initrd/initramfs will need to be rebuilt with the modified settings (particularly cached /etc/fstab, iSCSI and network settings).
f. You will need to edit your /etc/fstab to reflect the new disk mount points. This operation may need to be done before "e." above.
g. You will need to DD /dev/sda to /dev/sdb at some point.
h. iPXE will essentially become your bootloader, and you will need some sort of a boot script to accomplish the boot. I highly recommend writing the script with robust checks and error handling.

Closing thoughts:

It is easier to install to iSCSI than move a running Distribition to iSCSI (needed to say that).

Thin and Thick Clients should not share a single iSCSI mount unless it is Read Only. For this reason (and many others), I recommend using NFS Roots boot for Thin/Thick Clients in most cases. iSCSI is pretty messy protocol, and while it does work well, there are easier ways to get the functionality without some other overhead.

Best,
M^3


RE: booting installed linux through iscsi - NiKiZe - 2018-08-08 18:19

(2018-08-08 16:31)MultimediaMan Wrote:  a. EFI Secure Boot to iSCSI is not currently possible.
It is supported for some time https://git.ipxe.org/ipxe.git/commit/fd95c780b6ad39ab55344c0e4b9c2125c2c2f5ad
Also: http://forum.ipxe.org/showthread.php?tid=6896&pid=13193#pid13193

(2018-08-08 16:31)MultimediaMan Wrote:  c. iSCSI boot with iPXE doesn't use GRUB or GRUB2, typically.
Since iPXE only does hand-of to the san disk, you do need a bootloader, Grub is typically used for Linux.

Otherwise nice checklist. Thanks!


RE: booting installed linux through iscsi - MultimediaMan - 2018-08-08 20:24

Please Read Michael's posting about EFI Secure boot and iSCSI. Yes, iSCSI in EFI is supported, but not if EFI Secure boot is being used (Secure Boot and Networking are almost mutually exclusive in the EFI/UEFI Standard).


RE: booting installed linux through iscsi - NiKiZe - 2018-08-08 21:19

(2018-08-08 20:24)MultimediaMan Wrote:  Please Read Michael's posting about EFI Secure boot and iSCSI. Yes, iSCSI in EFI is supported, but not if EFI Secure boot is being used (Secure Boot and Networking are almost mutually exclusive in the EFI/UEFI Standard).

Right missed the secure boot part, sorry.
Still tho, I'm assuming that works fine with the shim demo.
Do you have anything specific in mind? The only part that is disabled in -sb builds are NFS and Wifi stuff http://git.ipxe.org/ipxe.git/commitdiff/7428ab7

(2018-08-08 20:24)MultimediaMan Wrote:  Also, please check out how the iBFT works when it comes to iSCSI boot. GRUB or GRUB2 ~can~ be used with a local disk or when a HBA with a built-in iSCSI initiator is used, but in the case of PXE/iPXE-based SAN-Booting with a Software ISCSI initiator, GRUB is useless because it doesn't have the ability to mount an iSCSI LUN or have a network stack.

Not relevant since it doesn't need to know anything about it. All is done via EFI block interface which iPXE provides.
My memory might be failing me, but quite sure that http://lists.ipxe.org/pipermail/ipxe-devel/2016-December/005291.html was to be able to refer to grubx64.efi
Hmm grub.efi is also in the example: http://ipxe.org/cmd/sanboot