Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
sanboot:debian_and_ubuntu [2007/10/04 15:45]
bengen udev must be started before the aoe stuff
sanboot:debian_and_ubuntu [2007/12/12 06:11]
bengen typo
Line 1: Line 1:
-====== ​ Debian or Ubuntu ​ ====== 
- 
- 
- 
-===== Preparing an existing installation for AoE ===== 
- 
-You can either work with an installation on 
-   - a physical disk on a client machine or 
-   - a ''​chroot(8)''​ environment operating on a loopback-mounted disk image 
- 
-Install the ''​aoetools''​ package. For Ubuntu, you need to put the 
-''​universe''​ part of the distribution into ''/​etc/​apt/​sources.list'',​ 
-for example: 
- 
-   deb http://​archive.ubuntu.com/​ubuntu feisty main universe 
- 
-Install a kernel image that includes the ''​aoe''​ driver, i.e. the 
-stock ''​linux-image-2.6.18-*''​ images included with Debian 4.0 and the 
-''​linux-image-2.6.20-*''​ images included with Ubuntu "​Feisty Fawn". 
- 
-Create two scripts shown below. These scripts have to be executable. 
-   * ''/​etc/​initramfs-tools/​hooks/​aoetools''​ will copy the ''​aoe''​ kernel module and ''/​sbin/​aoe-discover''​ to the initial ramdisk. 
-   * ''/​etc/​initramfs-tools/​scripts/​local-top/​aoetools''​ is copied to the ram disk and run at boot-time, just before the root filesystem is mounted. If the root device string looks like an AoE target, it brings up all recognized Ethernet interfaces and activates the AoE driver. 
- 
-After you have made sure that ''/​etc/​initramfs-tools/​initramfs.conf''​ 
-contains the line 
-   ​BUSYBOX=y 
-you can update the initial ramdisk: 
-   # update-initramfs -u -k all 
- 
-Update your ''/​etc/​fstab''​ (or create a new one) as shown in the 
-example below. The Linux AoE driver puts all device files into 
-''/​etc/​etherd/''​. Entire virtual disks are assigned names ''​eX.Y''​ 
-where **(X Y)** is a unique AoE shelf:slot number within the local 
-network. Individual partitions on those disks are assigned names 
-''​eX.YpZ''​ 
-<​code>​ 
-# file system ​     mount point   ​type ​   options ​                 dump pass 
-/​dev/​etherd/​e0.0p1 /             ​ext3 ​   defaults ​                ​0 ​   1 
-/​dev/​etherd/​e0.0p2 none          swap    sw                       ​0 ​   0 
-proc               /​proc ​        ​proc ​   defaults ​                ​0 ​   0 
-</​code>​ 
- 
-Update ''/​boot/​grub/​menu.lst''​ (or create a new one) so that the root 
-device is passed to the kernel (in this example via the parameter 
-''​root=/​dev/​etherd/​e0.0p1''​). 
- 
-If the modifications were applied to a physical disk on the client 
-machine, you can now [[sanboot:​transfer|transfer the contents of your 
-physical disk to the SAN target]]. 
- 
-If the image you wish to export to client systems was modified directly,, 
-you can now [[sanboot:​aoe|make the contents of that image available 
-via AoE]]. 
- 
-FIXME Test booting from chroot-generated image 
- 
-==== Hint ==== 
-   * If the system hangs before the root device has been mounted, passing ''​break=mount''​ on the command line will spawn a shell before ''​scripts/​local-top/​aoetools''​ is run. This should allow for further debugging. 
- 
- 
- 
-==== Scripts ==== 
-=== /​etc/​initramfs-tools/​hooks/​aoetools === 
-<code bash> 
-#!/bin/sh 
- 
-set  -e 
- 
-PREREQ=""​ 
- 
-prereqs() 
-{ 
- echo "​$PREREQ"​ 
-} 
- 
-case $1 in 
-prereqs) 
- prereqs 
- exit 0 
- ;; 
-esac 
- 
-. /​usr/​share/​initramfs-tools/​hook-functions 
- 
-[ -x /​sbin/​aoe-discover ] && copy_exec /​sbin/​aoe-discover /sbin 
-manual_add_modules aoe 
-</​code>​ 
- 
-=== /​etc/​initramfs-tools/​scripts/​local-top/​aoetools === 
-<code bash> 
-#!/bin/sh 
- 
-set -e 
- 
-PREREQ="​udev"​ 
- 
-prereqs() 
-{ 
- echo "​$PREREQ"​ 
-} 
- 
-case $1 in 
-prereqs) 
- prereqs 
- exit 0 
- ;; 
-esac 
- 
-case $ROOT in 
-/​dev/​etherd/​e*) 
- # INTERFACES=`awk -F: '/​eth[0-9]*:/​ { print $1 }' < /​proc/​net/​dev` 
- INTERFACES=`sed -ne '/​eth.*:/​{s/:​.*$//;​p;​}'​ < /​proc/​net/​dev` 
- for i in $INTERFACES;​ do 
- echo Bringing up interface $i for AoE 
- ifconfig $i up 
- done 
- sleep 5 
- modprobe aoe 
- aoe-discover 
- ;; 
-esac 
-</​code>​ 
- 
-===== Preparing an existing installation for iSCSI ===== 
-TBD 
  

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