[pacman-dev] [mkinitcpio][PATCH 1/5] dsdt: remove hook. this has been defunct for years
Refer to commit 9a9e0d68555 in the kernel where Linus removes this and says "to be revisited later". The only option (currently) is to built this into your kernel image. Suggested by FS#27906. Signed-off-by: Dave Reisner <dreisner@archlinux.org> --- install/dsdt | 14 -------------- 1 files changed, 0 insertions(+), 14 deletions(-) delete mode 100644 install/dsdt diff --git a/install/dsdt b/install/dsdt deleted file mode 100644 index b38c66c..0000000 --- a/install/dsdt +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -build() { - add_file "/lib/initcpio/custom.dsdt" "DSDT.aml" -} - -help() { - cat <<HELPEOF -This hook loads a custom acpi dsdt file during boot. Place your custom dsdt -file for inclusion here: /lib/initcpio/custom.dsdt -HELPEOF -} - -# vim: set ft=sh ts=4 sw=4 et: -- 1.7.8.3
- firmware handling is now a udevd builtin - udevadm may move -- let a path lookup find it Signed-off-by: Dave Reisner <dreisner@archlinux.org> --- PKGBUILD | 2 +- install/udev | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index a6a083f..fc6b398 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -9,7 +9,7 @@ groups=('base') conflicts=('mkinitcpio') provides=("mkinitcpio=$pkgver") depends=('mkinitcpio-busybox>=1.16.1-2' 'module-init-tools' 'util-linux>=2.19' 'libarchive' 'coreutils' - 'bash' 'findutils' 'sed' 'grep' 'filesystem>=2011.10-1' 'udev>=174-1' 'file' 'gzip') + 'bash' 'findutils' 'sed' 'grep' 'filesystem>=2011.10-1' 'udev>=177-1' 'file' 'gzip') makedepends=('asciidoc' 'git') optdepends=('xz: Use lzma or xz compression for the initramfs image' 'bzip2: Use bzip2 compression for the initramfs image' diff --git a/install/udev b/install/udev index 9275501..e7cb901 100644 --- a/install/udev +++ b/install/udev @@ -7,10 +7,10 @@ build() { add_binary /lib/udev/udevd add_binary /sbin/udevadm - for rules in 50-{firmware,udev-default}.rules 60-persistent-storage.rules 80-drivers.rules; do + for rules in 50-udev-default.rules 60-persistent-storage.rules 80-drivers.rules; do add_file "/lib/udev/rules.d/$rules" done - for tool in firmware {ata,scsi}_id; do + for tool in ata_id scsi_id; do add_file "/lib/udev/$tool" done } -- 1.7.8.3
This is required for mounting a separate /usr. While the shutdown hook is essentially a soft requirement for a separate /usr, we shouldn't break init. Signed-off-by: Dave Reisner <dreisner@archlinux.org> --- install/base | 1 + install/shutdown | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/install/base b/install/base index 3366c38..4df02e5 100644 --- a/install/base +++ b/install/base @@ -19,6 +19,7 @@ build() { add_binary /sbin/blkid add_binary /bin/mount add_binary /sbin/switch_root + add_binary /bin/findmnt add_symlink "/etc/mtab" "/proc/self/mounts" diff --git a/install/shutdown b/install/shutdown index 2c533b6..7c6b7bc 100644 --- a/install/shutdown +++ b/install/shutdown @@ -1,7 +1,7 @@ #!/bin/bash build() { - BINARIES='cp findmnt' + BINARIES='cp' SCRIPT='shutdown' add_file "/lib/initcpio/shutdown" "/shutdown" -- 1.7.8.3
Use findmnt to detect the existance of a separate /usr partition existing in the real root. If it does exist, fetch the options for it and mount it. This currently makes a lot of assumptions and won't be very friendly towards something such as a dm-crypt device. Signed-off-by: Dave Reisner <dreisner@archlinux.org> --- Yes, 2.20.1-2 is techincally the requirement, but vercmp doesn't care. PKGBUILD | 2 +- init | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index fc6b398..c596a69 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -8,7 +8,7 @@ license=('GPL') groups=('base') conflicts=('mkinitcpio') provides=("mkinitcpio=$pkgver") -depends=('mkinitcpio-busybox>=1.16.1-2' 'module-init-tools' 'util-linux>=2.19' 'libarchive' 'coreutils' +depends=('mkinitcpio-busybox>=1.16.1-2' 'module-init-tools' 'util-linux>=2.20.1' 'libarchive' 'coreutils' 'bash' 'findutils' 'sed' 'grep' 'filesystem>=2011.10-1' 'udev>=177-1' 'file' 'gzip') makedepends=('asciidoc' 'git') optdepends=('xz: Use lzma or xz compression for the initramfs image' diff --git a/init b/init index 571a11a..8cf90b1 100644 --- a/init +++ b/init @@ -98,6 +98,15 @@ elif [ ! -x "/new_root${init}" ]; then launch_interactive_shell --exec fi +# mount /usr if it exists +if [ -f /new_root/etc/fstab ]; then + if usr_source=$(findmnt -nero source -s/new_root/etc/fstab /usr); then + mountopts=$(findmnt -nero options -s/new_root/etc/fstab /usr) + fsck_device "$usr_source" + mount "$usr_source" /new_root/usr -o "$mountopts" + fi +fi + if [ "${break}" = "postmount" ]; then echo ":: Post-mount break requested, type 'exit' to resume operation" launch_interactive_shell -- 1.7.8.3
On Thu, Jan 12, 2012 at 5:12 PM, Dave Reisner <d@falconindy.com> wrote:
Use findmnt to detect the existance of a separate /usr partition existence existing in the real root. If it does exist, fetch the options for it and mount it. This currently makes a lot of assumptions and won't be very friendly towards something such as a dm-crypt device.
Signed-off-by: Dave Reisner <dreisner@archlinux.org> --- Yes, 2.20.1-2 is techincally the requirement, but vercmp doesn't care. It cares...you were just not reading the rules it abides by. If one version or the other is missing a pkgrel, it ignores it.
$ vercmp 2.20.1-2 2.20.1-1 1 $ vercmp 2.20.1-2 2.20.1-2 0 $ vercmp 2.20.1-2 2.20.1-3 -1 $ vercmp 2.20.1-2 2.20.1 0 $ vercmp 2.20.1 2.20.1-2 0
PKGBUILD | 2 +- init | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/PKGBUILD b/PKGBUILD index fc6b398..c596a69 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -8,7 +8,7 @@ license=('GPL') groups=('base') conflicts=('mkinitcpio') provides=("mkinitcpio=$pkgver") -depends=('mkinitcpio-busybox>=1.16.1-2' 'module-init-tools' 'util-linux>=2.19' 'libarchive' 'coreutils' +depends=('mkinitcpio-busybox>=1.16.1-2' 'module-init-tools' 'util-linux>=2.20.1' 'libarchive' 'coreutils' 'bash' 'findutils' 'sed' 'grep' 'filesystem>=2011.10-1' 'udev>=177-1' 'file' 'gzip') makedepends=('asciidoc' 'git') optdepends=('xz: Use lzma or xz compression for the initramfs image' diff --git a/init b/init index 571a11a..8cf90b1 100644 --- a/init +++ b/init @@ -98,6 +98,15 @@ elif [ ! -x "/new_root${init}" ]; then launch_interactive_shell --exec fi
+# mount /usr if it exists +if [ -f /new_root/etc/fstab ]; then + if usr_source=$(findmnt -nero source -s/new_root/etc/fstab /usr); then + mountopts=$(findmnt -nero options -s/new_root/etc/fstab /usr) + fsck_device "$usr_source" + mount "$usr_source" /new_root/usr -o "$mountopts" + fi +fi + if [ "${break}" = "postmount" ]; then echo ":: Post-mount break requested, type 'exit' to resume operation" launch_interactive_shell -- 1.7.8.3
Signed-off-by: Dave Reisner <dreisner@archlinux.org> --- install/autodetect | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/install/autodetect b/install/autodetect index abc0fa0..7f40b9c 100644 --- a/install/autodetect +++ b/install/autodetect @@ -3,6 +3,12 @@ build() { MODULE_FILE=$workdir/autodetect_modules + add_if_avail() { + if modinfo -k "$KERNELVERSION" "$1" &>/dev/null; then + printf '%s\n' "$1" >>"$MODULE_FILE" + fi + } + if [[ ! -d /sys/devices ]]; then error "/sys does not appear to be mounted. Unable to use autodetection" return 1 @@ -16,8 +22,11 @@ build() { fi # filesystem module might be a builtin - if modinfo -k "$KERNELVERSION" "$rootfstype" &>/dev/null; then - printf '%s\n' "$rootfstype" >>"$MODULE_FILE" + add_if_avail "$rootfstype" + + # detect separate /usr + if usrfstype=$(findmnt -nero fstype -s"$BASEDIR/etc/fstab" /usr); then + add_if_avail "$usrfstype" fi if (( UID == 0 )) || in_array 'disk' $(groups); then -- 1.7.8.3
participants (2)
-
Dan McGee
-
Dave Reisner