From 9df6d70f3d1ec28d8c06a1822f8d338f7d075a6e Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Sat, 8 Aug 2009 17:52:54 +0200 Subject: [PATCH] Some work on xen-image --- config/xen-image/README | 9 +++------ config/xen-image/ipfire.cfg | 2 +- lfs/cdrom | 3 +++ lfs/xen-image | 21 +++++++++++++++++++-- 4 files changed, 26 insertions(+), 9 deletions(-) diff --git a/config/xen-image/README b/config/xen-image/README index 9a9c2f5e91..9394c5cf55 100644 --- a/config/xen-image/README +++ b/config/xen-image/README @@ -3,8 +3,8 @@ Howto install Ipfire as a paravirtualized DomU: - download image - extract the downloaded file, be careful, you need at least 4gb - edit the file ipfire.cfg -- start ipfire: "xm create -c ipfire.cfg" -- go to console: "xm console ipfire-xen" +- start ipfire: "xm create ipfire.cfg" +- if you get no errormessage go to console: "xm console ipfire-xen" - after booting, the setup will started to do basic settings and reboot This setup is for 2 interfaces (green and red). if you want more, like orange and blue, edit the ipfire.cfg and execute "setup" to adjust yout config. @@ -19,7 +19,4 @@ other usefull commands from the Dom0: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Todo: -- prevent loading some modules like ac, battery and so on -- remove setclock initscript -- remove keymap initscript -- add hvc0 to /etc/securetty +- check Xen Kernel config (filesystems should not included to kernel!!!!) diff --git a/config/xen-image/ipfire.cfg b/config/xen-image/ipfire.cfg index cc1ac446d2..1854737635 100644 --- a/config/xen-image/ipfire.cfg +++ b/config/xen-image/ipfire.cfg @@ -22,4 +22,4 @@ disk = [ ] #### Change path root = "/dev/xvda1" -extra = 'xencons=tty console=hvc0 clocksource=jiffies' +extra = 'xencons=tty console=hvc0 clocksource=jiffies ro' diff --git a/lfs/cdrom b/lfs/cdrom index 0773547ae4..5fa6730f22 100644 --- a/lfs/cdrom +++ b/lfs/cdrom @@ -48,6 +48,9 @@ md5 : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) rm -rf /install/cdrom /tmp/* + #Clear mtab (prevents .journal problems) + echo > /etc/mtab + # Compress root filesystem # Reason for this tar+untar+tar is removing of entries listed two or more in src/ROOTFILES mkdir -p /install/cdrom/doc diff --git a/lfs/xen-image b/lfs/xen-image index 4da844c653..ec824d0ae6 100644 --- a/lfs/xen-image +++ b/lfs/xen-image @@ -64,8 +64,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) dd bs=1M if=/dev/zero of=$(IMGroot) count=$(SIZEroot) mkfs.ext3 -F $(IMGroot) - # Mount Images (ext3 mount create a inaccessible ".journal" - mount -o loop -t ext2 $(IMGroot) $(MNThdd) + # Mount Images + mount -o loop $(IMGroot) $(MNThdd) mkdir $(MNThdd)/boot mkdir $(MNThdd)/var mkdir $(MNThdd)/var/log @@ -115,6 +115,23 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) #Remove root / fstab check rm -rf $(MNThdd)/etc/rc.d/rcsysinit.d/S19checkfstab + #Add xvc0 to securetty + echo xvc0 >> $(MNThdd)/etc/securetty + + #Disable some initskripts + echo "#!/bin/sh" > $(MNThdd)/etc/rc.d/init.d/setclock + echo "#!/bin/sh" > $(MNThdd)/etc/rc.d/init.d/keymap + + #Remove autoload of some acpi modules + sed -i -e "s|^ac|#ac|g" $(MNThdd)/etc/sysconfig/modules + sed -i -e "s|^battery|#battery|g" $(MNThdd)/etc/sysconfig/modules + sed -i -e "s|^button|#button|g" $(MNThdd)/etc/sysconfig/modules + sed -i -e "s|^fan|#fan|g" $(MNThdd)/etc/sysconfig/modules + + #Change pakfire trunk + sed -i -e "s|$(VERSION)|$(VERSION)-xen|g" \ + $(MNThdd)/opt/pakfire/etc/pakfire.conf + #Copy initramdisk, kernel and config cp -f $(MNThdd)/boot/ipfirerd-$(KVER)-xen.img \ /install/images/$(SNAME)/boot -- 2.39.2