Skip to content

Instantly share code, notes, and snippets.

@ymmt2005
Created April 25, 2015 01:14
Show Gist options
  • Save ymmt2005/c623af4c1f6914e70f1e to your computer and use it in GitHub Desktop.
Save ymmt2005/c623af4c1f6914e70f1e to your computer and use it in GitHub Desktop.
Add OMSA to netboot initrd image.
diff -ruN debian-installer-20101020ubuntu318.15.orig/build/boot/x86/syslinux.cfg debian-installer-20101020ubuntu318.15/build/boot/x86/syslinux.cfg
--- debian-installer-20101020ubuntu318.15.orig/build/boot/x86/syslinux.cfg 2014-06-03 23:02:21.000000000 +0000
+++ debian-installer-20101020ubuntu318.15/build/boot/x86/syslinux.cfg 2015-04-06 02:21:48.031746385 +0000
@@ -1,5 +1,10 @@
# D-I config version 2.0
include ${SYSDIR}menu.cfg
-default ${SYSDIR}vesamenu.c32
+#default ${SYSDIR}vesamenu.c32
+# Cybozu: auto start PXE
+default auto
+label auto
+ kernel ubuntu-installer/amd64/linux
+ append auto=true priority=critical interface=em1 netcfg/dhcp_timeout=30 locale=en_US initrd=ubuntu-installer/amd64/initrd.gz ramdisk_size=4096000 DEBCONF_DEBUG=5 --
prompt 0
-timeout 0
+timeout 1
diff -ruN debian-installer-20101020ubuntu318.15.orig/build/config/local debian-installer-20101020ubuntu318.15/build/config/local
--- debian-installer-20101020ubuntu318.15.orig/build/config/local 1970-01-01 00:00:00.000000000 +0000
+++ debian-installer-20101020ubuntu318.15/build/config/local 2015-03-27 13:39:39.782072721 +0000
@@ -0,0 +1 @@
+TARGET = $(NETBOOT_DIR) $(NETBOOT_TAR)
diff -ruN debian-installer-20101020ubuntu318.15.orig/build/Makefile debian-installer-20101020ubuntu318.15/build/Makefile
+++ debian-installer-20101020ubuntu318.15/build/Makefile 2015-04-02 07:19:04.019118177 +0000
@@ -312,6 +312,20 @@
mkdir -p $(DPKGDIR)/updates/
touch $(DPKGDIR)/available
+ # Cybozu
+ mkdir -p $(TREE)/omsa
+ debootstrap $(DEBIAN_RELEASE) $(TREE)/omsa
+ echo "deb http://us.archive.ubuntu.com/ubuntu/ $(DEBIAN_RELEASE) main restricted universe" >$(TREE)/omsa/etc/apt/sources.list
+ echo "deb http://us.archive.ubuntu.com/ubuntu/ $(DEBIAN_RELEASE)-updates main restricted universe" >>$(TREE)/omsa/etc/apt/sources.list
+ echo "deb [ trusted=yes ] http://linux.dell.com/repo/community/ubuntu $(DEBIAN_RELEASE) openmanage" >>$(TREE)/omsa/etc/apt/sources.list
+ chroot $(TREE)/omsa apt-get update
+ chroot $(TREE)/omsa apt-get -y install --no-install-recommends srvadmin-omcommon srvadmin-server-cli srvadmin-storageservices-cli srvadmin-idrac7
+ mount -t proc proc $(TREE)/omsa/proc
+ chroot $(TREE)/omsa apt-get -y install --no-install-recommends linux-image-extra-$(KERNELVERSION) dmidecode
+ umount $(TREE)/omsa/proc
+ cp $(OMSA_RAID) $(TREE)/omsa/tmp/omsa-raid.py && chmod a+x $(TREE)/omsa/tmp/omsa-raid.py
+ cp $(OMSA_BOOT) $(TREE)/omsa/tmp/omsa-boot.py && chmod a+x $(TREE)/omsa/tmp/omsa-boot.py
+
ifdef TRANSSTATUS
# Include translation status file; warn if older than 2 weeks.
# Do this first to make possible warnings more visible.
@@ -502,12 +516,13 @@
mkdir -p $(TREE)/lib
# HACK ALERT: X.Org modules are excluded from the scan as mklibs
# is unable to find symbols provided by the /usr/bin/Xorg binary
+ # Cybozu: prune "omsa" directory.
$(MKLIBS) -L $(TREE)/usr/lib/$(DEB_HOST_MULTIARCH) -L $(TREE)/usr/lib \
-L $(TREE)/lib/$(DEB_HOST_MULTIARCH) \
-L $(TEMP)/udeblibs -v -d $(TREE)/lib --root=$(TREE) \
-L $(TREE)/usr/lib/cdebconf/frontend \
$(addprefix -l,$(notdir $(wildcard $(TREE)/usr/lib/cdebconf/frontend/*.so))) \
- `find $(TEMP) -type f -a \( -perm +0111 -o -name '*.so' -o -name '*.so.*' \) | \
+ `find $(TEMP) -name omsa -prune -o \( -type f -a \( -perm +0111 -o -name '*.so' -o -name '*.so.*' \) -print \) | \
grep -v udeblibs | grep -v 'usr/lib/xorg/modules/.*\.so'`
ifeq ($(DEB_HOST_ARCH),armhf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment