免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2173 | 回复: 3
打印 上一主题 下一主题

PXE boot to an iSCSI root using freely available Linux clien [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-06-06 18:20 |只看该作者 |倒序浏览
iSCSI Linux diskless booting
Created by cclausen. Last edited by cclausen, 7 days ago. Viewed 573 times.
PXE boot to an iSCSI root using freely available Linux clients
As a reference, I suggest you read through the iSCSI-Root mini-HOWTO. I tried to use that mkinitrd script, but it did not work on a RedHat 7.3 system using the Linux-iSCSI 3.6.2 driver. I think it will work fine with other versions but I have not tested it, as the iscsi-init module works very well and I'm just going to use it from now on.
I used WinTarget as the iSCSI target (I do realize its not free.) Works great! I was told they would have educational pricing very soon. As I test other iSCSI target software, I'll list them here. I'll note that I could not get the UNH iscsi target software to work with a 2.4.26 kernel on Debian unstable, but its probably my fault. I'll eventually get around to testing out iSCSI Enterprise Target but I haven't done it yet, mostly b/c of non-iSCSI related issues when using the 2.6 kernel.

To get this all working, you pretty much just compile and install linux-iscsi and iscsi-init by following the instructions and create a initrd to load the drivers. You could build everything into the kernel, but that probably isn't a good idea if you need to support a lot of different machines with different hardware.

I'll post my config files for using the Debian mkinitrd very soon. (I need to fix some stuff..)

Compile iscsi-init and follow its instructions to mount the initrd image and add the config files, iscsi_sfnet and iscsi_init modules to it.

You can follow the iSCSI-Root mini-HOWTO to setup PXE booting. Those instructions work just fine.

If you are lazy (and I certainly am) you can just use my kernel and RAM disk. The following Debian packages are available for download: (Note that can use this RAM disk and kernel on a non-Debian system, you'd just need to make sure that the modules needed locally on the client match.)

kernel-image-2.4.30-iscsi.deb Debian kernel package based on linux-2.4.30 from kernel.org
vmlinuz-2.4.30-iscsi kernel based on the kernel.org 2.4.30 source with linux-iscsi 3.6.2
openafs-modules-2.4.30-iscsi_1.3.81.deb OpenAFS kernel module for this kernel, if you need it.
nvidia-kernel-2.4.30-iscsi_1.0.7174.deb if you need the nvidia driver.
initrd-2.4.30-iscsi.gz initrd with support for most network cards (tested with for Intel PRO 100 NICs), others to follow
pxelinux.0 PXELinux "kernel"
Follow these steps:

Install Debian to a hard drive for now on the machine you want to boot over iSCSI. I suggest using a single large root partition the first time. You do not need swap, as you probably don't want memory access to incur network latency.
You probably want to run sarge or sid and NOT woody (something was broken; I don't remember what.)
apt-get dist-upgrade
download my kernel-image package.
dpkg -i kernel-image-*.deb as root.
OPTIONAL Install the openafs module package if you want to access AFS space. (If you have no idea what I am talking about you can safely ignore this step.)
make sure a DHCP / PXE / TFTP server is available on your network. If you are using some version of ISC DHCP (and its very likely that you are) you can use the following steps to set this up:
Install ISC DHCP. This is OS specific and shouldn't be too hard.
edit the dhcpd.conf file (usually in /etc)
#You will of course need to modify this for your environment
shared-network ISCSI {
        option  domain-name "internal.domain.org";
        option  domain-name-servers 10.0.0.1

        allow booting;
        allow bootp;

        default-lease-time 900;
        max-lease-time 21600;

        host pdu {
                hardware ethernet 00:08:C7:8A:39:08;
                fixed-address 10.0.8.10
                next-server 10.0.0.1;
                filename "pxelinux.0";
                option root-path "10.0.8.100:/iqn.2003-05.com.stringbeansoftware:target.internal.domain.org/iqn.1987-05.com.cisco:pdu.internal.domain.org/1";
        }
}
place vmlinuz-2.4.30-iscsi in /tftpboot/
place initrd-2.4.30-iscsi.gz in /tftpboot/
place pxelinux.0 in /tftpboot/
copy the following text to /tftpboot/pxelinux.cfg/IP.cfg
TIMEOUT 50
PROMPT 1
DEFAULT  linux_iscsi_root
LABEL linux_iscsi_root
        KERNEL vmlinuz-2.4.30-iscsi
        APPEND root=/dev/sda1 initrd=initrd-2.4.30-iscsi.gz ether=0,0,0x30,0,eth0
        IPAPPEND 1
LABEL disk
        LOCALBOOT 0
rename IP.cfg as per the PXElinux instructions or you can simply name it default if you are too lazy to fingure out the file naming scheme.
edit IP.cfg and customize it for the initrd and kernel that you are using. (The default should work if you are using the one on this page.)
enable your system's tftp daemon by editing /etc/inetd.conf and running
/etc/init.d/inetd reload
or a similar command on your system.
set your computer to boot to LAN and try it out. It will probably fail after the kernel loads, as there is no file system on the iSCSI volume yet. I'd recomend running the iscsi_sfnet software on a machine with a disk to create the root partition for the other machine. You should be able to follow the instructions to do this. If not, I can send you a tarball or a dd image of a base Debian sarge install.
you will need to partition the iSCSI volume:
cfdisk /dev/sda
create a filesystem:
mkfs -t ext3 /dev/sda
(You can try other filesystems, but I have only tested ext3.)
and mount it
mount /dev/sda /mnt
copy the OS from your HD to the iSCSI partition.
tar -C / -cpSf - | tar -xvpf -
If something isn't working let cclausen know about it and I might be able to help you out.


我使用as3 按照上面的步骤做了,可是在启动的时候出现这样的错误

请大侠指教

论坛徽章:
0
2 [报告]
发表于 2005-06-07 20:09 |只看该作者

PXE boot to an iSCSI root using freely available Linux clien

已经有了相关的硬件解决方案,难道软件就不行吗》

论坛徽章:
0
3 [报告]
发表于 2005-06-07 21:51 |只看该作者

PXE boot to an iSCSI root using freely available Linux clien

linux下也有iSCSI target, 前年就比较不错了,除了做双机热备不是很支持以外,没有什么问题

论坛徽章:
0
4 [报告]
发表于 2005-06-09 19:29 |只看该作者

PXE boot to an iSCSI root using freely available Linux clien

linux iscsi target 的fileio 和diskio 怎么设置
例如diskio怎么设置成使用第二个硬盘,我用unh-iscsi1.6。使用diskio后两个硬盘就都可用客户端连接到
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP