+++ /dev/null
-/dev/ram0 / squashfs
-/proc /proc proc
-none /sys sysfs
-none /tmp tmpfs
-none /dev tmpfs
+++ /dev/null
-root:x:0:root
-tty:x:5:
-disk:x:6:
-uucp:x:14:
+++ /dev/null
-#!/bin/sh
-# Clear screen
-/usr/bin/clear
-echo "Shutting down..."
-echo "Sending all processes the TERM signal..."
-/sbin/killall5 -15
-sleep 3
-echo "Sending all processes the KILL signal..."
-/sbin/killall5 -9
-sleep 3
-echo "Unmounting filesystems..."
-/bin/umount -a > /dev/null 2>&1
-echo "Unmounting root..."
-/bin/mount -n -o remount,ro /
-echo "Rebooting..."
-/sbin/reboot -f
+++ /dev/null
-localhost 127.0.0.1
+++ /dev/null
-passwd: files
-shadow: files
-group: files
-hosts: files
-services: files
-networks: files
-protocols: files
-rpc: files
-ethers: files
-netmasks: files
-bootparams: files
-automount: files
-aliases: files
-netgroup: files
-publickey: files
+++ /dev/null
-root::0:0:root:/:/bin/ash
+++ /dev/null
-#!/bin/ash
-
-TERM=linux
-LANG=en_US.UTF-8
-export TERM LANG
-
-/usr/bin/unicode_start
+++ /dev/null
-../common/coreutils
\ No newline at end of file
+++ /dev/null
-../common/dhcpcd
\ No newline at end of file
+++ /dev/null
-../common/e2fsprogs
\ No newline at end of file
+++ /dev/null
-etc/host.conf
-etc/hosts
-etc/protocols
-
+++ /dev/null
-../common/findutils
\ No newline at end of file
+++ /dev/null
-../common/gawk
\ No newline at end of file
+++ /dev/null
-../common/i586/glibc
\ No newline at end of file
+++ /dev/null
-../common/grep
\ No newline at end of file
+++ /dev/null
-../common/gzip
\ No newline at end of file
+++ /dev/null
-../common/hwdata
\ No newline at end of file
+++ /dev/null
-../common/iproute2
\ No newline at end of file
+++ /dev/null
-../common/kbd
\ No newline at end of file
+++ /dev/null
-../common/libidn
\ No newline at end of file
+++ /dev/null
-../common/libusb
\ No newline at end of file
+++ /dev/null
-bin/ping
-usr/local/bin/iowrap
+++ /dev/null
-../common/ncurses
\ No newline at end of file
+++ /dev/null
-../common/newt
\ No newline at end of file
+++ /dev/null
-../common/openssl
\ No newline at end of file
+++ /dev/null
-../common/parted
\ No newline at end of file
+++ /dev/null
-../common/pciutils
\ No newline at end of file
+++ /dev/null
-../common/pcmciautils
\ No newline at end of file
+++ /dev/null
-../common/pcre
\ No newline at end of file
+++ /dev/null
-../common/popt
\ No newline at end of file
+++ /dev/null
-sbin/reboot
-sbin/halt
+++ /dev/null
-../common/reiserfsprogs
\ No newline at end of file
+++ /dev/null
-../common/sed
\ No newline at end of file
+++ /dev/null
-../common/slang
\ No newline at end of file
+++ /dev/null
-../common/sysfsutils
\ No newline at end of file
+++ /dev/null
-../common/tar
\ No newline at end of file
+++ /dev/null
-../common/udev
\ No newline at end of file
+++ /dev/null
-../common/usbutils
\ No newline at end of file
+++ /dev/null
-../common/i586/util-linux
\ No newline at end of file
+++ /dev/null
-../common/vim
\ No newline at end of file
+++ /dev/null
-../common/wget
\ No newline at end of file
+++ /dev/null
-../common/xz
\ No newline at end of file
+++ /dev/null
-../common/zlib
\ No newline at end of file
dd if=/dev/zero bs=1k count=2 > /install/cdrom/boot/isolinux/boot.catalog
ifneq "$(MACHINE_TYPE)" "arm"
cp /boot/vmlinuz-$(KVER)-ipfire /install/cdrom/boot/isolinux/vmlinuz
- cp /install/images/initrd /install/cdrom/boot/isolinux/instroot
+ dracut --force -a "installer" --xz /install/cdrom/boot/isolinux/instroot $(KVER)-ipfire
cp $(DIR_SRC)/config/syslinux/boot.png /install/cdrom/boot/isolinux/boot.png
cp /usr/lib/memtest86+/memtest.bin /install/cdrom/boot/isolinux/memtest
cp /usr/share/ipfire-netboot/ipxe.lkrn /install/cdrom/boot/isolinux/netboot
+++ /dev/null
-###############################################################################
-# #
-# IPFire.org - A linux based firewall #
-# Copyright (C) 2007-2014 IPFire Team <info@ipfire.org> #
-# #
-# 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 #
-# the Free Software Foundation, either version 3 of the License, or #
-# (at your option) any later version. #
-# #
-# This program is distributed in the hope that it will be useful, #
-# but WITHOUT ANY WARRANTY; without even the implied warranty of #
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
-# GNU General Public License for more details. #
-# #
-# You should have received a copy of the GNU General Public License #
-# along with this program. If not, see <http://www.gnu.org/licenses/>. #
-# #
-###############################################################################
-
-###############################################################################
-# Definitions
-###############################################################################
-
-include Config
-
-VER = ipfire
-
-THISAPP = initrd
-DIR_APP = $(DIR_SRC)/$(THISAPP)
-TARGET = $(DIR_INFO)/$(THISAPP)
-
-SUP_ARCH = i586
-
-###############################################################################
-# Top-level Rules
-###############################################################################
-
-install : $(TARGET)
-
-check :
-
-download :
-
-md5 :
-
-###############################################################################
-# Installation Details
-###############################################################################
-
-$(TARGET) :
- @$(PREBUILD)
- rm -f /install/images/initrd
-
- # Finish up initrd directory
- -mkdir -p /install/initrd/{dev,etc,mnt,root,lib/modules/$(KVER)-ipfire/kernel/drivers,cdrom,dev,harddisk,proc,tmp,usr/share/terminfo/l,var/run,sys}
- cd /install/initrd && lzma -d -c /boot/initramfs-$(KVER)-ipfire.img | cpio -i
-
- # Copy Files packages for installer
- find $(DIR_SRC)/config/rootfiles/installer/* -maxdepth 1 | xargs cat | grep -v "^#" > /tmp/ROOTFILES
-
- # Patch Kernel Version to rootfiles
- sed -e "s/KVER/$(KVER)/g" -i /tmp/ROOTFILES
-
- -cd / && cpio -d -p /install/initrd < /tmp/ROOTFILES
-
- # Copy hid and network modules (and deps)
- cp -aRf /lib/modules/$(KVER)-ipfire/kernel/drivers/hid \
- /install/initrd/lib/modules/$(KVER)-ipfire/kernel/drivers/
- cp -aRf /lib/modules/$(KVER)-ipfire/kernel/drivers/net \
- /install/initrd/lib/modules/$(KVER)-ipfire/kernel/drivers/
- cp -aRf /lib/modules/$(KVER)-ipfire/kernel/drivers/pcmcia \
- /install/initrd/lib/modules/$(KVER)-ipfire/kernel/drivers/
- cp -aRf /lib/modules/$(KVER)-ipfire/kernel/drivers/ssb \
- /install/initrd/lib/modules/$(KVER)-ipfire/kernel/drivers/
- cp -aRf /lib/modules/$(KVER)-ipfire/kernel/drivers/uio \
- /install/initrd/lib/modules/$(KVER)-ipfire/kernel/drivers/
- cp -aRf /lib/modules/$(KVER)-ipfire/kernel/drivers/ptp \
- /install/initrd/lib/modules/$(KVER)-ipfire/kernel/drivers/
- cp -aRf /lib/modules/$(KVER)-ipfire/kernel/drivers/dca \
- /install/initrd/lib/modules/$(KVER)-ipfire/kernel/drivers/
- cp -aRf /lib/modules/$(KVER)-ipfire/kernel/drivers/pps \
- /install/initrd/lib/modules/$(KVER)-ipfire/kernel/drivers/
- # Remove wireless modules
- rm -rf /install/initrd/lib/modules/$(KVER)-ipfire/kernel/drivers/net/wireless
-
- cd /install/initrd/etc && rm -f fstab
- cp -aRf $(DIR_SRC)/config/install/* /install/initrd/etc/
- rm -rf /install/initrd/usr/share/man
- chmod 755 /install/initrd/etc/halt /install/initrd/etc/rc_installer
-
- cd /install/initrd/ && patch -Np0 < $(DIR_SRC)/src/patches/dracut-init_start_ipfireinstaller.patch
-
- # Hide udev messages
- sed -i -e "s|err|none|g" /install/initrd/etc/udev/udev.conf
-
- # make new dependencies
- depmod -a -F /boot/System.map-$(KVER)-ipfire $(KVER)-ipfire
-
- -mkdir -p /install/{images,mnt}
- rm -rf /install/mnt/*
-
- #Build Module deps for installer.
- depmod -a -b /install/initrd/ -F /boot/System.map-$(KVER)-ipfire $(KVER)-ipfire
-
- #Name service from dhcpcd
- cp -f /etc/nsswitch.conf /install/initrd/etc/
- cp -f $(DIR_SRC)/config/initrd/dhcpc/* /install/initrd/var/ipfire/dhcpc/dhcpcd-hooks/
-
- # Install needed locales.
- -mkdir -pv /install/initrd/usr/lib/locale
- for lang in $(DIR_SRC)/langs/*; do \
- for path in /usr/lib/locale/$${lang##*/}*; do \
- [ -d "$${path}" ] && cp -lrvf "$${path}" /install/initrd/usr/lib/locale/; \
- done; \
- done
-
- cd /install/initrd && find . | cpio -o -H newc | lzma > /install/images/initrd
- cd /install/initrd && find ./ -ls > $(DIR_INFO)/_build.initrd.log
-
- @$(POSTBUILD)
cd $(DIR_APP)/install && make CFLAGS="-Os -std=gnu99 -fomit-frame-pointer -Wall \
-DNAME='\"$(NAME)\"' -DSNAME='\"$(SNAME)\"' -DVERSION='\"$(VERSION)\"' \
-DSLOGAN='\"$(SLOGAN)\"' -DCONFIG_ROOT='\"$(CONFIG_ROOT)\"' -DKERNEL_VERSION='\"$(KVER)\"'"
- cd $(DIR_APP)/install && install -v -m 0755 install probenic.sh \
- downloadsource.sh mountdest.sh /install/initrd/bin
+ cd $(DIR_APP)/install && install -v -m 0755 installer probenic.sh \
+ downloadsource.sh mountdest.sh /usr/bin
+ rm -rvf /usr/lib/dracut/modules.d/99installer
+ cd $(DIR_APP)/install && cp -rvf dracut-module /usr/lib/dracut/modules.d/99installer
+
#Patch ISO Name for download ...
sed -i -e "s|ipfire.iso|download.ipfire.org/releases/ipfire-2.x/$(VERSION)-core$(CORE)/$(SNAME)-$(VERSION).$(MACHINE)-full-core$(CORE).iso|g" \
- /install/initrd/bin/downloadsource.sh
+ /usr/bin/downloadsource.sh
#Patch version for mediacheck ...
@rm -rf $(DIR_APP)
@$(POSTBUILD)
ipfiremake memtest
ipfiremake installer
installmake strip
- ipfiremake initrd
}
buildpackages() {
all : programs
-programs : install
+programs : installer
clean :
-rm -f *.o install core
OBJS=main.o config.o ../libsmooth/libsmooth.o unattended.o hw.o
-install: $(OBJS)
+installer: $(OBJS)
$(LINK) $(OBJS) -o $@ $(LIBS)
%.o : %.c
--- /dev/null
+#/bin/bash
+########################################################################
+# Begin
+#
+# Description : DHCP Client Script (initrd version)
+#
+# Authors : Arne Fitzenreiter - arne_f@ipfire.org
+#
+# Version : 02.00
+#
+# Notes :
+#
+########################################################################
+
+dhcpcd_up()
+{
+ set | grep "^new_" | sed "s|^new_||g" | \
+ sed "s|'||g" | \
+ sort > /var/ipfire/dhcpc/dhcpcd-$interface.info
+
+ DNS=`grep "domain_name_servers" /var/ipfire/dhcpc/dhcpcd-$interface.info | cut -d"=" -f2`
+ DNS1=`echo $DNS | cut -d" " -f1`
+ DNS2=`echo $DNS | cut -d" " -f2`
+
+ echo "nameserver $DNS1" > /etc/resolv.conf
+ echo "nameserver $DNS2" >> /etc/resolv.conf
+
+}
+
+case "$reason" in
+BOUND|INFORM|REBIND|REBOOT|RENEW|TIMEOUT|STATIC) dhcpcd_up;;
+esac
--- /dev/null
+#!/bin/sh
+
+# Fake root so dracut will start our installer
+root="installer"
+rootok=1
--- /dev/null
+#!/bin/bash
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+# called by dracut
+check() {
+ return 255
+}
+
+# called by dracut
+depends() {
+ echo base bash mdraid shutdown
+ return 0
+}
+
+# called by dracut
+install() {
+ inst /usr/bin/installer
+ inst /usr/bin/downloadsource.sh
+ inst /usr/local/bin/iowrap
+
+ # Kernel drivers
+ instmods =drivers/hid
+
+ # Network drivers
+ instmods =drivers/net/ethernet =drivers/net/usb
+ instmods virtio_net hv_netvsc vmxnet3
+
+ # Filesystem support
+ inst_multiple parted mkswap mke2fs mkreiserfs
+ instmods ext4 iso9660 reiserfs vfat
+
+ # Extraction
+ inst_multiple tar gzip lzma xz
+
+ # DHCP Client
+ inst dhcpcd
+ inst /var/ipfire/dhcpc/dhcpcd-run-hooks
+ inst /var/ipfire/dhcpc/dhcpcd.conf
+ for file in /var/ipfire/dhcpc/dhcpcd-hooks/*; do
+ inst "${file}"
+ done
+ inst "$moddir/70-dhcpcd.exe" "/var/ipfire/dhcpc/dhcpcd-hooks/70-dhcpcd.exe"
+
+ # Misc. tools
+ inst_multiple eject ping wget
+ inst_multiple -o fdisk cfdisk
+
+ # Hardware IDs
+ inst /usr/share/hwdata/pci.ids /usr/share/hwdata/usb.ids
+
+ # Locales
+ for locale in de en es fr nl pl ru tr; do
+ for file in $(find /usr/lib/locale/${locale}*); do
+ inst "${file}"
+ done
+ done
+
+ inst_hook cmdline 99 "$moddir/fake-root.sh"
+ inst_hook pre-mount 99 "$moddir/run-installer.sh"
+
+ return 0
+}
+#!/bin/sh
#
# IPFire Installer RC
#
+# Silence the kernel
echo >/proc/sys/kernel/printk "1 4 1 7"
echo -n -e "\033[9;0]"
-ln -snf /proc/self/fd/0 /dev/stdin
-ln -snf /proc/self/fd/1 /dev/stdout
-ln -snf /proc/self/fd/2 /dev/stderr
-ln -s /proc/kcore /dev/core
-mount tmpfs -t tmpfs /tmp
-
echo "Starting shells on tty2 and tty3 ..."
/usr/local/bin/iowrap /dev/tty2 /bin/bash &
/usr/local/bin/iowrap /dev/tty3 /bin/bash &
echo "Loading Installer..."
-/bin/bash --login -c "/bin/install /dev/tty2"
+/bin/bash --login -c "/usr/bin/installer /dev/tty2"
+
+sleep 60
-/etc/halt
+# Reboot the system
+/shutdown reboot