From 294ea175065bd8f42056094c2f2c2d5b538d8f18 Mon Sep 17 00:00:00 2001 From: Peter Hjalmarsson Date: Wed, 19 Jan 2011 23:49:24 +0100 Subject: [PATCH 01/16] Use devtpmfs when avaible --- defaults/initrd.scripts | 9 +++++++-- defaults/linuxrc | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index cfe3abd..034696b 100755 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -307,8 +307,13 @@ run_shell() { } runmdev() { - # busybox udev replacement - mdev -s + # Use devtmpfs if enabled in kernel, + # else busybox udev replacement + if grep -qs devtmpfs /proc/filesystems ; then + mount -t devtmpfs devtmpfs /dev + else + mdev -s + fi } test_success() { diff --git a/defaults/linuxrc b/defaults/linuxrc index ecfb546..bbe397e 100755 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -724,6 +724,8 @@ fi cd "${CHROOT}" mkdir "${CHROOT}/proc" "${CHROOT}/sys" 2>/dev/null echo -ne "${BOLD}.${NORMAL}" +# If devtmpfs is mounted assume genkernel mounted it at /dev and try unmounting it +grep -qs devtmpfs /proc/mounts && ( umount /dev || echo '*: Failed to unmount the devtmpfs /dev!' ) umount /sys || echo '*: Failed to unmount the ramdisk /sys!' umount /proc || echo '*: Failed to unmount the ramdisk /proc!' echo -e "${BOLD}.${NORMAL}" From c202dbe67d57af630c2bf7dc5b521d1f6bae8c5f Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Mon, 31 Jan 2011 13:44:24 +0100 Subject: [PATCH 02/16] Resolve unneeded subshell --- defaults/linuxrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/defaults/linuxrc b/defaults/linuxrc index bbe397e..ee33a35 100755 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -724,8 +724,13 @@ fi cd "${CHROOT}" mkdir "${CHROOT}/proc" "${CHROOT}/sys" 2>/dev/null echo -ne "${BOLD}.${NORMAL}" + # If devtmpfs is mounted assume genkernel mounted it at /dev and try unmounting it -grep -qs devtmpfs /proc/mounts && ( umount /dev || echo '*: Failed to unmount the devtmpfs /dev!' ) +if grep -qs devtmpfs /proc/mounts +then + umount /dev || echo '*: Failed to unmount the devtmpfs /dev!' +fi + umount /sys || echo '*: Failed to unmount the ramdisk /sys!' umount /proc || echo '*: Failed to unmount the ramdisk /proc!' echo -e "${BOLD}.${NORMAL}" From b0c6daf110f68cec1c47a7e023b69b1a816a773c Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Mon, 31 Jan 2011 13:46:23 +0100 Subject: [PATCH 03/16] Extend change log --- ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 60c2845..da25459 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,12 @@ # Distributed under the GPL v2 # $Id$ + 31 Jan 2011; Sebastian Pipping ChangeLog: + Use devtmpfs if available (bug #353024) + + Special thanks: + - Peter Hjalmarsson + 31 Jan 2011; Sebastian Pipping genkernel: Bump version to 3.4.12.6 From e8ffab000021c9934be3af9f6ee29057aca7462a Mon Sep 17 00:00:00 2001 From: Peter Hjalmarsson Date: Tue, 1 Feb 2011 19:33:57 +0100 Subject: [PATCH 04/16] Update options for devtmpfs Options copied from /etc/init.d/udev-mount as that script does not sanitize or even tuch the options. --- defaults/initrd.scripts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 034696b..ee26918 100755 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -310,7 +310,8 @@ runmdev() { # Use devtmpfs if enabled in kernel, # else busybox udev replacement if grep -qs devtmpfs /proc/filesystems ; then - mount -t devtmpfs devtmpfs /dev + # Options copied from /etc/init.d/udev-mount, should probably be kept in sync + mount -t devtmpfs -o "exec,nosuid,mode=0755,size=10M" udev /dev else mdev -s fi From cb24bedd073f23ac518bc1c0b79aec4593db2817 Mon Sep 17 00:00:00 2001 From: Peter Hjalmarsson Date: Tue, 1 Feb 2011 19:34:54 +0100 Subject: [PATCH 05/16] Move dev to chroot This can be considered good practice, likely less chance that nodes created in the ramdisk disapperes when switching root. Some applications (mostly debugging/benchmarking) also needs this to survive the switch_root. --- defaults/linuxrc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/defaults/linuxrc b/defaults/linuxrc index ee33a35..88eed00 100755 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -725,10 +725,14 @@ cd "${CHROOT}" mkdir "${CHROOT}/proc" "${CHROOT}/sys" 2>/dev/null echo -ne "${BOLD}.${NORMAL}" -# If devtmpfs is mounted assume genkernel mounted it at /dev and try unmounting it +# If devtmpfs is mounted, try move it to the new root +# If that fails, try to unmount all possible mounts of devtmpfs as stuff breaks otherwise if grep -qs devtmpfs /proc/mounts then - umount /dev || echo '*: Failed to unmount the devtmpfs /dev!' + if ! mount --move /dev "${CHROOT}"/dev + then + umount -a -t devtmpfs || echo '*: Failed to move and unmount the devtmpfs /dev!' + fi fi umount /sys || echo '*: Failed to unmount the ramdisk /sys!' From 763fd09bacda81255d1244c767e921cfc48b9032 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Mon, 7 Feb 2011 04:09:25 +0100 Subject: [PATCH 06/16] Remove "-a" from call to umount --- defaults/linuxrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/linuxrc b/defaults/linuxrc index 88eed00..b42070c 100755 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -731,7 +731,7 @@ if grep -qs devtmpfs /proc/mounts then if ! mount --move /dev "${CHROOT}"/dev then - umount -a -t devtmpfs || echo '*: Failed to move and unmount the devtmpfs /dev!' + umount -t devtmpfs || echo '*: Failed to move and unmount the devtmpfs /dev!' fi fi From a9d1575e3c085876d0e18d0f94993a9ae3f901aa Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Mon, 7 Feb 2011 04:20:14 +0100 Subject: [PATCH 07/16] Extend change log --- ChangeLog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index da25459..c85f69a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,8 +5,9 @@ # Distributed under the GPL v2 # $Id$ - 31 Jan 2011; Sebastian Pipping ChangeLog: + 7 Feb 2011; Sebastian Pipping ChangeLog: Use devtmpfs if available (bug #353024) + Rescue devtmpfs /dev over to chroot (bug #353024, bug #344407) Special thanks: - Peter Hjalmarsson From 398d7ba5acf5ca5d3c9777aff108b3897649822c Mon Sep 17 00:00:00 2001 From: Peter Hjalmarsson Date: Mon, 7 Feb 2011 16:02:41 +0100 Subject: [PATCH 08/16] Use tmpfs if devtmpfs is not available This makes the ramdisk always mount some kind of /dev, and then try to move it to the new root. This unbreaks handling of nodes created pre-udev likefor example lvm does. --- defaults/initrd.scripts | 12 +++++++----- defaults/linuxrc | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index ee26918..1fda57d 100755 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -308,13 +308,15 @@ run_shell() { runmdev() { # Use devtmpfs if enabled in kernel, - # else busybox udev replacement + # else tmpfs. Always run mdev just in case + devfs=tmpfs if grep -qs devtmpfs /proc/filesystems ; then - # Options copied from /etc/init.d/udev-mount, should probably be kept in sync - mount -t devtmpfs -o "exec,nosuid,mode=0755,size=10M" udev /dev - else - mdev -s + devfs=devtmpfs fi + + # Options copied from /etc/init.d/udev-mount, should probably be kept in sync + mount -t $devfs -o "exec,nosuid,mode=0755,size=10M" udev /dev + mdev -s } test_success() { diff --git a/defaults/linuxrc b/defaults/linuxrc index b42070c..f1e124b 100755 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -727,11 +727,11 @@ echo -ne "${BOLD}.${NORMAL}" # If devtmpfs is mounted, try move it to the new root # If that fails, try to unmount all possible mounts of devtmpfs as stuff breaks otherwise -if grep -qs devtmpfs /proc/mounts +if grep -qs "/dev " /proc/mounts then if ! mount --move /dev "${CHROOT}"/dev then - umount -t devtmpfs || echo '*: Failed to move and unmount the devtmpfs /dev!' + umount /dev || echo '*: Failed to move and unmount the ramdisk /dev!' fi fi From c3165cd02f00a2e27656acb93df26e7b4276d8d2 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Mon, 7 Feb 2011 19:47:10 +0100 Subject: [PATCH 09/16] Apply mdev primer of busybox --- defaults/initrd.scripts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 1fda57d..6bfdc05 100755 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -316,6 +316,10 @@ runmdev() { # Options copied from /etc/init.d/udev-mount, should probably be kept in sync mount -t $devfs -o "exec,nosuid,mode=0755,size=10M" udev /dev + + # http://git.busybox.net/busybox/plain/docs/mdev.txt + mkdir /dev/pts + mount -t devpts devpts /dev/pts mdev -s } From 2deeaba70b67b54f7bff26d74df35a6730ca047f Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Mon, 7 Feb 2011 19:49:36 +0100 Subject: [PATCH 10/16] Add error message output --- defaults/initrd.scripts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 6bfdc05..d630869 100755 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -315,12 +315,13 @@ runmdev() { fi # Options copied from /etc/init.d/udev-mount, should probably be kept in sync - mount -t $devfs -o "exec,nosuid,mode=0755,size=10M" udev /dev + mount -t $devfs -o "exec,nosuid,mode=0755,size=10M" udev /dev \ + || bad_msg "Failed to mount /dev as ${devfs}" # http://git.busybox.net/busybox/plain/docs/mdev.txt mkdir /dev/pts - mount -t devpts devpts /dev/pts - mdev -s + mount -t devpts devpts /dev/pts || bad_msg "Failed to mount /dev/pts" + mdev -s || bad_msg "Failed recive dynamic updates from mdev" } test_success() { From 15b8898c97f4858826f463d37df9f4d4bb1f9f23 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Mon, 7 Feb 2011 20:13:16 +0100 Subject: [PATCH 11/16] Extend change log --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c85f69a..53d5124 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,7 +6,7 @@ # $Id$ 7 Feb 2011; Sebastian Pipping ChangeLog: - Use devtmpfs if available (bug #353024) + Use devtmpfs/tmpfs for /dev (bug #353024) Rescue devtmpfs /dev over to chroot (bug #353024, bug #344407) Special thanks: From 23fd924325de6c9ffd0fbfbbff8da67bbf68a0ea Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Mon, 7 Feb 2011 20:20:49 +0100 Subject: [PATCH 12/16] Fix error message --- defaults/initrd.scripts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index d630869..249b721 100755 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -321,7 +321,7 @@ runmdev() { # http://git.busybox.net/busybox/plain/docs/mdev.txt mkdir /dev/pts mount -t devpts devpts /dev/pts || bad_msg "Failed to mount /dev/pts" - mdev -s || bad_msg "Failed recive dynamic updates from mdev" + mdev -s || bad_msg "Failed to receive dynamic updates from mdev" } test_success() { From d9f46bb5131266f979734895feaaf921f49d30af Mon Sep 17 00:00:00 2001 From: craig Date: Mon, 11 Oct 2010 00:21:05 +0200 Subject: [PATCH 13/16] Add iBFT support for iSCSI --- defaults/initrd.scripts | 8 +++++++- defaults/linuxrc | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 249b721..f7f01de 100755 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -689,10 +689,16 @@ startVolumes() { } startiscsi() { + + if [ ! -n "${ISCSI_NOIBFT}" ] + then + good_msg "Activating iSCSI via iBFT" + iscsistart -b + fi if [ -n "${ISCSI_INITIATORNAME}" ] && [ -n "${ISCSI_TARGET}" ] && [ -n "${ISCSI_ADDRESS}" ] then - good_msg "Activating iSCSI" + good_msg "Activating iSCSI via cmdline" if [ "${ISCSI_TGPT}" ] then diff --git a/defaults/linuxrc b/defaults/linuxrc index f1e124b..ae0535b 100755 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -294,7 +294,10 @@ start_dev_mgr [ "${DO_slowusb}" ] && sleep 10 # Start iSCSI -startiscsi +if [ -e /bin/iscsistart ] +then + startiscsi +fi # Setup btrfs, see bug 303529 setup_btrfsctl From 5e07592a758954bc72ce3f955fda1160794f46a2 Mon Sep 17 00:00:00 2001 From: craig Date: Mon, 11 Oct 2010 00:49:12 +0200 Subject: [PATCH 14/16] iBFT: fix iscsi_noibft --- defaults/linuxrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/defaults/linuxrc b/defaults/linuxrc index ae0535b..61efc95 100755 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -178,6 +178,9 @@ do iscsi_debug\=*) ISCSI_DEBUG=`parse_opt "${x}"` ;; + iscsi_noibft) + ISCSI_NOIBFT=1 + ;; # Crypto crypt_root\=*) CRYPT_ROOT=`parse_opt "${x}"` From 79f6c2533d9719063acb8e217beb91237f7279bb Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Tue, 8 Feb 2011 17:59:22 +0100 Subject: [PATCH 15/16] Extend change log --- ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 53d5124..34d0695 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,12 @@ # Distributed under the GPL v2 # $Id$ + 08 Feb 2011; Sebastian Pipping ChangeLog: + Add iBFT support for iSCSI (bug #314575) + + Special thanks: + - Stefan Behte + 7 Feb 2011; Sebastian Pipping ChangeLog: Use devtmpfs/tmpfs for /dev (bug #353024) Rescue devtmpfs /dev over to chroot (bug #353024, bug #344407) From 107049cad2ad3ebbd4b60556e3bbe85b16b1c13c Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Wed, 9 Feb 2011 17:17:24 +0100 Subject: [PATCH 16/16] .conf: Add SPLASH and SPLASH_THEME (bug #268468) --- ChangeLog | 6 ++++++ genkernel.conf | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 34d0695..4bec97b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,12 @@ # Distributed under the GPL v2 # $Id$ + 09 Feb 2011; Sebastian Pipping genkernel.conf: + Add SPLASH and SPLASH_THEME to genkernel.conf (bug #268468) + + Special thanks: + - PhobosK + 08 Feb 2011; Sebastian Pipping ChangeLog: Add iBFT support for iSCSI (bug #314575) diff --git a/genkernel.conf b/genkernel.conf index 3f52a32..779d71f 100644 --- a/genkernel.conf +++ b/genkernel.conf @@ -93,6 +93,14 @@ DISKLABEL="yes" # Add new kernel to grub? # BOOTLOADER="grub" +# Enable splashutils in early space (initrd). Default is "no". +# SPLASH="yes" + +# Use this splash theme. If commented out - the "default" name theme is used. +# Also, SPLASH="yes" needs to be enabled for this one to one work. +# This supersedes the "SPLASH_THEME" option of /etc/conf.d/splash (in early space). +# SPLASH_THEME="gentoo" + # =========Low Level Compile Settings========= # # GNU Make to use for kernel. See also the --kernel-make command line option.