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
cp -f $(MNThdd)/etc/mkinitcpio.conf $(MNThdd)/etc/mkinitcpio.conf.org
sed -i -e "s| autodetect | |g" $(MNThdd)/etc/mkinitcpio.conf
- #Remove File System modules because they are included to kernel
- sed -i -e "s|reiser4 reiserfs ext3| |g" $(MNThdd)/etc/mkinitcpio.conf
+ #Remove reiser4 because it is not work with xen-kernel
+ sed -i -e "s|reiser4 | |g" $(MNThdd)/etc/mkinitcpio.conf
chroot $(MNThdd) /sbin/mkinitcpio -g /boot/ipfirerd-$(KVER)-xen.img -k $(KVER)-ipfire-xen
cp -f $(MNThdd)/etc/mkinitcpio.conf.org $(MNThdd)/etc/mkinitcpio.conf
#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 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
+ sed -i -e "s|^processor|#processor|g" $(MNThdd)/etc/sysconfig/modules
+ sed -i -e "s|^thermal|#thermal|g" $(MNThdd)/etc/sysconfig/modules
+ sed -i -e "s|^video|#video|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