From ArchWiki
Jump to navigation Jump to search

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:ISCSI/Boot#)

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: The actual boot will use an extra drive / usb drive or pxe boot? (Discuss in Talk:ISCSI/Boot#)

You can install Arch on an iSCSI Target. This howto will guide you through the process.

Server / Target Setup

You can set up an iSCSI target with any hosting server OS. Follow the procedure outlined in iSCSI Target if you use Arch Linux as the hosting server OS.

Client / Initiator Setup


1. install open-iscsi package in installer system

2. connect to iSCSI target and create partitions on logical drive of target.

3. install Arch Linux system in usual way

4. install open-iscsi package in installed system

5. create initial RAM disk image containing open-iscsi modules.

Install over iSCSI

Download Arch Linux ISO image [1] and boot Arch Linux using the ISO image. After Arch Linux is booted, either use net as the install source or manually ifconfig and dhcp.

1. Unfortunately ISO install image does not include modules for iSCSI, you have to install and setup them at first.

Before you continue to "Partition the disks", install the open-iscsi package from the official repositories and connect to target.

In the following, server's(target's) IP address is, client's(initiator's) IP address is, iSCSI initiator name is "iSCSI.Initiator.Name" and target name is "iSCSI.Target.Name". You should, of course, be sure to your network configration and so on.

pacman -Sy
pacman -S open-iscsi
modprobe iscsi_tcp

2. Connect to iSCSI target.

iscsistart -i iSCSI.Initiator.Name -t iSCSI.Target.Name -g 1 -a

Now your local host connects to the drive of target host (see dmesg output).

(Optional) If you want to make sure that your iSCSI target is up and running, you may start "iscsid" and check whether the iSCSI target is available.

# iscsid
# iscsiadm -m discovery -t sendtargets -p
Note: It is recommended that you NOT include swap on the iSCSI drive when creating the partitions, you can just ignore the warning.

3. You can create a partition table and partitions in the same way as a local drive. And continue to install Arch Linux in the usual way.

4. Install the open-iscsi package in the "future" root file system.

pacman -Sy
pacman -S open-iscsi

5. Before doing mkinitcpio in the "future" root file system, you have to prepare the following two files and have to install open-iscsi package.

i) /mnt/usr/lib/initcpio/install/iscsi

build ()
    local mod
    for mod in iscsi_tcp libiscsi libiscsi_tcp scsi_transport_iscsi crc32c; do
        add_module "$mod"

    add_checked_modules "/drivers/net"
    add_binary "/usr/bin/iscsistart"

help ()
  This hook allows you to boot from an iSCSI target.

ii) /mnt/usr/lib/initcpio/hooks/iscsi

run_hook ()
    modprobe iscsi_tcp
    ifconfig eth0 netmask broadcast
    sleep 10
    iscsistart -i iSCSI.Initiator.Name -t iSCSI.Target.Name -g 1 -a

If you want to use dhcp for the above script, you may try to replace the "ifconfig" line with "dhcpcd eth0", but make sure that dhcpcd is installed.

Add "iscsi" to the HOOKS line in /etc/mkinitcpio.conf.

Then run "mkinitcpio -p linux" and new /boot/initramfs-linux.img and /boot/initramfs-linux-fallback.img will be generated.

Note: If you plan on booting this installation of Arch on machines with nic cards that require different modules, remove "autodetect" from HOOKS
Note: Rebuilding the initial ramdisk will take some time if autodetect is removed from HOOKS

Now your new system can mount the file systems from iSCSI target drive after reboot.


Device not found

If you are having problems with detecting your eth0 interface, simply install mkinitcpio-nfs-utils package from the official repositories and dhcpcd on your iSCSI drive and add net HOOK to /etc/mkinitcpio.conf.

Also add ip=::::::dhcp to your kernel parameters and now you can use dhcpcd eth0 as described before.

For more informations, please refer to [2].