Differences

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

Link to this comparison view

Both sides previous revision Previous revision
aoebootprepdebianetch [2007/08/24 11:34]
bengen mention copying a working installation...
aoebootprepdebianetch [2007/09/30 04:21]
bengen
Line 1: Line 1:
-====== Booting Debian from an ATA over Ethernet (AoE) target ====== 
  
-These instructions assume that the client machine can already access 
-an AoE target upon boot using INT13 (i.e. using gPXE) so that GRUB's stage2 can be 
-loaded from the AoE target. 
- 
-   - Copy the contents of a physical hard drive on which Debian is installed ​ to the AoE target((Working in a ''​chroot''​ environment created with ''​debootstrap''​ might work, but I have not tested that)). Mount the copy of the root partition, and ''​chroot(8)''​ to that copy. 
-   - Install the ''​aoetools''​ package and a kernel image that includes the ''​aoe''​ driver, ​ ''​linux-image-2.6.18-5-*''​ from Debian/etch will do fine. 
-   - Create ''/​etc/​initramfs-tools/​hooks/​aoetools''​ and ''/​etc/​initramfs-tools/​scripts/​local-top/​aoetools''​ scripts as shown below.\\ The ''​hooks/​aoetools''​ script makes sure that the ''​aoe''​ kernel module and ''/​sbin/​aoe-discover''​ get added to the initial ramdisk. The ''​scripts/​local-top/​aoetools''​ script will be copied to the ramdisk and be 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 Ethernet interfaces that have been recognized by the kernel and sends the `aoe' driver looking for targets. 
-   - Make sure that /​etc/​initramfs-tools/​initramfs.conf contains ''​BUSYBOX=y''​ so that Busybox is included in the initrd. 
-   - Create or update ''/​etc/​fstab''​ and ''/​boot/​grub/​menu.lst'':​ Replace ''/​dev/​hd*''​ or ''/​dev/​sd*''​ entries in ''/​etc/​fstab''​ with entries of the form ''/​dev/​etherd/​eX.YpZ''​ where X is the AoE shelf number, Y is the disk number, and Z is the partition number. Grub should pass something like ''​root=/​dev/​etherd/​eX.YpZ''​ to the Linux kernel via its command line. 
-   - Update the initial ramdisks: ''#​ update-initramfs -u -k all''​ 
-   - Disconnect the physical hard drive in the client machine and boot.\\ If the system should hang 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. 
- 
- 
-===== 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>​ 
- 
- 
- 
-===== scripts/​local-top/​aoetools ===== 
-<code bash> 
-#!/bin/sh 
- 
-set -e 
- 
-PREREQ=""​ 
- 
-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` 
- for i in $INTERFACES;​ do 
- echo Bringing up interface $i for AoE 
- ifconfig $i up 
- done 
- sleep 5 
- modprobe aoe 
- aoe-discover 
- ;; 
-esac 
- 
-</​code>​ 
- 
- --- //​[[bengen+etherboot@hilluzination.de|Hilko Bengen]] 2007/08/24 11:04// 

QR Code
QR Code aoebootprepdebianetch (generated for current page)