Some work on xen-image

This commit is contained in:
Arne Fitzenreiter
2009-08-08 17:52:54 +02:00
parent bada0832c1
commit 9df6d70f3d
4 changed files with 26 additions and 9 deletions

View File

@@ -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!!!!)

View File

@@ -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'

View File

@@ -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

View File

@@ -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