This is an old revision of the document!

A PCRE internal error occured. This might be caused by a faulty plugin

====== Ubuntu 9.04 (jaunty jackalope) ====== (this howto is based on the Debian Etch iSCSI howto with some major changes) ===== Introduction ===== If you are experienced with ubuntu and initramfs / initrd creation you can install ubuntu directly onto the iscsi target using the desktop (i386 or amd64) install CD (more on that later). The alternate install disk is not capable of installing additional packages at runtime, because of the limitations of the busybox environment. If you have the possibility it is more comfortable to install ubuntu onto a local HDD, USB stick or whatever and boot into the installed system after that. ===== Assumptions ===== This howto is based on the following assumptions: * An installation of ubuntu or one of its pendants in the latest (jaunty) version * the system is installed on a single harddrive, no matter how much partitions you have set up * there is an already done iscsi target on an iscsi server * there is a working dhcp server (although you will only need it for comfort, configuring gpxe manually does also work) ===== Preparations ===== The debian howto recommended to compile open-iscsi yourself as iscsistart and fwparam_ibft were not available in the debian packages that time. This is not necessary for ubuntu for some reasons: * fwparam_ibft is no longer a (fully featured) component of neither the open-iscsi semi-stable release (which does not even support kernel 2.6.28+) nor the development git source tree FIXME **Is there some kind of a replacement?** * iscsistart is available via [[|open-iscsi]] from the ubuntu repositories. * the initramfs scripts are even prepared for iscsi usage in some way But the initramfs / initrd has to be recreated to include the required iscsi stuff: (I use joe for some vintage reason, but you are of course free to use the editor of your choice) install required packages sudo aptitude install initramfs-tools open-iscsi change the initiatorname (of the client) to something unique if you are planning to set up many boxes sudo echo "" > /etc/iscsi/initiatorname.iscsi touch the indicatorfile, which is queried to determine, whether the daemons are to be copied into the new initrd sudo touch /etc/iscsi/iscsi.initramfs now we have to workaround a bug in the jaunty stable tree, so edit /usr/share/initramfs-tools/hooks/iscsi with your favourite editor: sudo joe /usr/share/initramfs-tools/hooks/iscsi and change line 25 from: copy_exec /usr/sbin/iscsistart /sbin to copy_exec /sbin/iscsistart /sbin generate the new initrd('s) sudo update-initramfs -u update-initramfs: Generating /boot/initrd.img-2.6.28-11-generic now we have to take care that neither /etc/init.d/networking nor the [[|Network Manager]] reconfigures the interface again during the init process or X11 startup so edit /etc/network/interfaces: sudo joe /etc/network/interfaces and change the appropiate entry for your primary NIC from: #iface eth0 inet dhcp to iface eth0 inet manual As we do not have fwparam_ibft we cannot read out the ibft contents that gpxe has left, so we have to specify vital iSCSI information via Kernel command line options. Use your favourite boot manager for this. I did use grub, because it is preinstalled and my no. 1 choice anyway, but it is most likely possible to use gpxe or a gpxe-script to pass these parameters. (**FIXME edit this if you have more detailed knowledge on this - as gpxe scripting is still on my to-do-list**) Make the boot process verbose if you want to be able to see potential problems immediately when they occur. This are the available options (which are parsed from /proc/cmdline): * ISCSI_INITIATOR * ISCSI_TARGET_NAME * ISCSI_TARGET_IP * ISCSI_TARGET_PORT * ISCSI_TARGET_GROUP * ISCSI_USERNAME * ISCSI_PASSWORD * ISCSI_IN_USERNAME * ISCSI_IN_PASSWORD It could look like this: title Ubuntu 9.04, kernel 2.6.28-11-generic iSCSI uuid f859db1e-39f8-4539-9f0e-8292f8f93cca kernel /vmlinuz-2.6.28-11-generic ISCSI_INITIATOR=iqn.2009-04.arbeitsgruppe:general ISCSI_TARGET_NAME=iqn.2009-04.Arbeitsgruppe.Commander1024:general.ubuntu ISCSI_TARGET_IP= ISCSI_TARGET_PORT=3260 root=UUID=021ebcfc-188a-41ba-9864-ee18cbf7af9f ro initrd /initrd.img-2.6.28-11-generic quiet ===== Doing the final cut ===== Now your installation is nearly ready to be booted from an iscsi storage, there are only three last minor fixes to do. After having tried a lot of things, spying into the nfs scripts showed, that even if the modules for the network cards are loaded early enough, udev still initializes too late to activate the NICs which will cause the iscsi script to fail. As long as there is not a much smarter solution, you will be fine to copy the udev script from /scripts/nfs-top to /scripts/local-top/early_udev **FIXME Perhaps it is smarter to copy it to /etc/initramfs-tools/scripts/local-top/** sudo cp /usr/share/initramfs-tools/scripts/nfs-top/udev /usr/share/initramfs-tools/scripts/local-top/early_udev ls -lha /usr/share/initramfs-tools/scripts/local-top/ insgesamt 12K drwxr-xr-x 2 root root 35 2009-04-28 23:12 . drwxr-xr-x 10 root root 4,0K 2009-04-28 22:59 .. -rwxr-xr-x 1 root root 430 2009-04-28 23:00 early_udev -rwxr-xr-x 1 root root 1,9K 2009-04-28 22:32 iscsi The following procedure will allow you to get your system up with 2 short commands, if something went wrong and you are dropped to a Busybox Shell: /scripts/local-top/iscsi (This will work now out-of-the-box as the networking modules are loaded now) exec switch-root (to continue the boot process) To keep ubuntu from crashing on system shutdown disable networking and openiscsi scripts for shutdown, because shutting down the network will cause loss of the root-device: sudo sysv-rc-conf before: ┌ SysV Runlevel Config -: stop service =/+: start service h: help q: quit ┐ │ │ │ service 1 2 3 4 5 0 6 S │ │ ---------------------------------------------------------------------------- │ │ networking [ ] [ ] [ ] [ ] [ ] [X] [X] [X] │ │ open-iscsi [X] [ ] [ ] [ ] [ ] [X] [X] [X] │ └──────────────────────────────────────────────────────────────────────────────┘ ┌──────────────────────────────────────────────────────────────────────────────┐ │ Use the arrow keys or mouse to move around. ^n: next pg ^p: prev pg │ │ space: toggle service on / off │ └──────────────────────────────────────────────────────────────────────────────┘ after: ┌ SysV Runlevel Config -: stop service =/+: start service h: help q: quit ┐ │ │ │ service 1 2 3 4 5 0 6 S │ │ ---------------------------------------------------------------------------- │ │ networking [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] │ │ open-iscsi [X] [ ] [ ] [ ] [ ] [ ] [ ] [ ] │ └──────────────────────────────────────────────────────────────────────────────┘ ┌──────────────────────────────────────────────────────────────────────────────┐ │ Use the arrow keys or mouse to move around. ^n: next pg ^p: prev pg │ │ space: toggle service on / off │ └──────────────────────────────────────────────────────────────────────────────┘ ===== Transfer your image to the iSCSI Target server ===== [[sanboot:transfer|transfer the disk image to your iSCSI target]] ===== Installing ubuntu directly onto the iSCSI SAN ===== WIP ===== FIXME: Notes from contributors =====

QR Code
QR Code sanboot:ubuntu_iscsi (generated for current page)