mirror of
https://github.com/dracutdevs/dracut.git
synced 2024-10-27 17:55:47 +03:00
f17c5fa573
In the kernel comments PARTUUID is shown using uppercase A-F: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/init/do_mounts.c?id=HEAD#n183 However, dracut tries to use the value of PARTUUID directly in /dev/disks/by-partuuid/ which expects the hex to be lowercase. This will cause root to never be found, oops! Fix dracut so it can, like the Kernel, accept either casing. Untested but I added a hack on my local system that was similar.
42 lines
1.2 KiB
Bash
Executable File
42 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
|
|
check() {
|
|
rootopts="defaults"
|
|
while read dev mp fs opts dump fsck; do
|
|
# skip comments
|
|
[ "${dev%%#*}" != "$dev" ] && continue
|
|
|
|
if [ "$mp" = "/" ]; then
|
|
# sanity - determine/fix fstype
|
|
rootfs=$(find_mp_fstype /)
|
|
rootfs=${rootfs:-$fs}
|
|
rootopts=$opts
|
|
break
|
|
fi
|
|
done < /etc/fstab
|
|
|
|
[ "$rootfs" = "reiserfs" ] && journaldev=$(fs_get_option $rootopts "jdev")
|
|
[ "$rootfs" = "xfs" ] && journaldev=$(fs_get_option $rootopts "logdev")
|
|
if [ -n "$journaldev" ]; then
|
|
echo "root.journaldev=$journaldev" >> "${initdir}/etc/cmdline.d/95root-jurnaldev.conf"
|
|
fi
|
|
return 0
|
|
}
|
|
|
|
depends() {
|
|
echo fs-lib
|
|
}
|
|
|
|
install() {
|
|
dracut_install umount
|
|
dracut_install tr
|
|
if ! dracut_module_included "systemd"; then
|
|
inst_hook cmdline 95 "$moddir/parse-block.sh"
|
|
inst_hook pre-udev 30 "$moddir/block-genrules.sh"
|
|
inst_hook mount 99 "$moddir/mount-root.sh"
|
|
fi
|
|
}
|
|
|