X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=config%2Fxen-image%2Fxen-image-maker.sh;h=ae20f295a12470da2b639db53bdaef369b876d94;hb=08cf4d21540c4fe185db1f17ae365f7ab6adae27;hp=28f005d5d9c874b34f516b02c3de4fe3c98911c9;hpb=188c4ba444b31343c29b311fcb2d0c0ba84e80ee;p=people%2Fpmueller%2Fipfire-2.x.git diff --git a/config/xen-image/xen-image-maker.sh b/config/xen-image/xen-image-maker.sh index 28f005d5d9..ae20f295a1 100644 --- a/config/xen-image/xen-image-maker.sh +++ b/config/xen-image/xen-image-maker.sh @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2014 Arne Fitzenreiter # +# Copyright (C) 2007-2018 Arne Fitzenreiter # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -29,16 +29,15 @@ KERN_PACK=xxxKERN_PACKxxx KRNDOWN=http://mirror0.ipfire.org/pakfire2/$VERSION/paks CONSOLE=hvc0 -SIZEboot=64 +SIZEboot=128 SIZEswap=512 -SIZEroot=1024 -SIZEvar=1024 +SIZEroot=3072 FSTYPE=ext3 ############################################################################## SOURCEISO=$SNAME-$VERSION.i586-full-core$CORE.iso -HTTPDIR=http://download.ipfire.org/releases/ipfire-2.x/$VERSION-core$CORE +HTTPDIR=https://downloads.ipfire.org/releases/ipfire-2.x/$VERSION-core$CORE TMPDIR=./ipfire-tmp ISODIR=$TMPDIR/iso @@ -47,27 +46,24 @@ MNThdd=$TMPDIR/harddisk IMGboot=./$SNAME-boot.img IMGswap=./$SNAME-swap.img IMGroot=./$SNAME-root.img -IMGvar=./$SNAME-var.img KERNEL=linux-$KERN_TYPE-$KVER-$KERN_PACK.ipfire if [ "$XEN_IMG_TYPE" == "xva" ]; then # download xva.py if it not exist. if [ ! -e xva.py ]; then - wget http://source.ipfire.org/source-2.x/xva.py + wget https://source.ipfire.org/source-2.x/xva.py fi # XenCenter use other devicenames and # xvdd seems to be reserved (converter bug?). P1=xvda P2=xvdb P3=xvdc - P4=xvde else # old style xen image partition names P1=xvda1 P2=xvda2 P3=xvda3 - P4=xvda4 fi rm -rf $TMPDIR && mkdir -p $MNThdd && mkdir -p $ISODIR @@ -99,12 +95,8 @@ mkswap $IMGswap dd bs=1M if=/dev/zero of=$IMGroot count=$SIZEroot mkfs.$FSTYPE -F $IMGroot -#Create varimage -dd bs=1M if=/dev/zero of=$IMGvar count=$SIZEvar -mkfs.$FSTYPE -F $IMGvar - echo -------------------------------------------------------- -echo - Intall IPFire to the Images ... +echo - Install IPFire to the images ... echo -------------------------------------------------------- # Mount Images @@ -113,7 +105,6 @@ mkdir $MNThdd/boot mkdir $MNThdd/var mkdir $MNThdd/var/log mount -o loop $IMGboot $MNThdd/boot -mount -o loop $IMGvar $MNThdd/var # Install IPFire without kernel modules xz -d < $ISODIR/distro.img > $TMPDIR/$SNAME-$VERSION.tar @@ -121,15 +112,19 @@ tar -C $MNThdd/ -xvf $TMPDIR/$SNAME-$VERSION.tar \ --exclude=lib/modules* --exclude=boot* --numeric-owner #Install Kernel +mkdir $MNThdd/proc +mkdir $MNThdd/boot/grub +echo "flags : pae " > $MNThdd/proc/cpuinfo # fake pae detection tar -C $MNThdd/opt/pakfire/tmp -xvf $TMPDIR/$KERNEL --numeric-owner chroot $MNThdd /opt/pakfire/tmp/install.sh rm -rf $MNThdd/opt/pakfire/tmp/* +rm -rf $MNThdd/proc/cpuinfo #Create grub menuentry for pygrub -mkdir $MNThdd/boot/grub echo "timeout 10" > $MNThdd/boot/grub/grub.conf echo "default 0" >> $MNThdd/boot/grub/grub.conf echo "title IPFire ($KERN_TYPE-kernel)" >> $MNThdd/boot/grub/grub.conf +echo " root (hd0)" >> $MNThdd/boot/grub/grub.conf echo " kernel /vmlinuz-$KVER-ipfire-$KERN_TYPE root=/dev/$P3 rootdelay=10 panic=10 console=$CONSOLE" \ >> $MNThdd/boot/grub/grub.conf echo " initrd /initramfs-$KVER-ipfire-$KERN_TYPE.img" >> $MNThdd/boot/grub/grub.conf @@ -154,7 +149,6 @@ echo "LANGUAGE=en" >> $MNThdd/var/ipfire/main/settings echo "HOSTNAME=$SNAME" >> $MNThdd/var/ipfire/main/settings echo "THEME=ipfire" >> $MNThdd/var/ipfire/main/settings touch $MNThdd/lib/modules/$KVER-ipfire-$KERN_TYPE/modules.dep -mkdir $MNThdd/proc mount --bind /proc $MNThdd/proc mount --bind /dev $MNThdd/dev mount --bind /sys $MNThdd/sys @@ -164,7 +158,6 @@ chroot $MNThdd /usr/bin/perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCach echo "/dev/$P1 /boot auto defaults 1 3" > $MNThdd/etc/fstab echo "/dev/$P2 swap swap defaults 0 0" >> $MNThdd/etc/fstab echo "/dev/$P3 / auto defaults 1 1" >> $MNThdd/etc/fstab -echo "/dev/$P4 /var auto defaults 1 2" >> $MNThdd/etc/fstab #Remove root / fstab check @@ -196,7 +189,6 @@ sed -i -e "s|^video|#video|g" $MNThdd/etc/sysconfig/modules umount $MNThdd/proc umount $MNThdd/dev umount $MNThdd/sys -umount $MNThdd/var umount $MNThdd/boot umount $MNThdd