remove old and unmaintained dmraid support

This commit is contained in:
Tobias Powalowski 2023-01-12 19:35:49 +01:00
parent 49850d4c1a
commit 526425886e
11 changed files with 11 additions and 87 deletions

View file

@ -13,7 +13,7 @@ FILES=()
HOOKS=(archboot_cache archboot_cache_cleanup archboot_firmware archboot_firmware_cleanup \ HOOKS=(archboot_cache archboot_cache_cleanup archboot_firmware archboot_firmware_cleanup \
archboot_base_common archboot_base_common_cleanup archboot_base archboot_base_cleanup \ archboot_base_common archboot_base_common_cleanup archboot_base archboot_base_cleanup \
archboot_filesystems archboot_filesystems_cleanup archboot_net archboot_net_cleanup \ archboot_filesystems archboot_filesystems_cleanup archboot_net archboot_net_cleanup \
block dmraid lvm2 encrypt btrfs keyboard archboot_acpi kms udev archboot_cpufreq \ block lvm2 encrypt btrfs keyboard archboot_acpi kms udev archboot_cpufreq \
archboot_devicemapper archboot_hypervisor archboot_net_common archboot_platform archboot_wireless \ archboot_devicemapper archboot_hypervisor archboot_net_common archboot_platform archboot_wireless \
archboot_wireless_staging archboot_installer_common archboot_installer archboot_installer_cleanup \ archboot_wireless_staging archboot_installer_common archboot_installer archboot_installer_cleanup \
archboot_tz archboot_keymap archboot_motd archboot_hwdetect archboot_mdadm mdadm_udev \ archboot_tz archboot_keymap archboot_motd archboot_hwdetect archboot_mdadm mdadm_udev \

View file

@ -12,7 +12,7 @@ FILES=()
# Please change the hooks only if you know what you are doing. # Please change the hooks only if you know what you are doing.
HOOKS=(kms udev archboot_base_common archboot_base archboot_installer_common \ HOOKS=(kms udev archboot_base_common archboot_base archboot_installer_common \
archboot_installer archboot_tz archboot_keymap archboot_acpi archboot_motd archboot_hwdetect \ archboot_installer archboot_tz archboot_keymap archboot_acpi archboot_motd archboot_hwdetect \
block archboot_net_common archboot_net keyboard dmraid archboot_devicemapper archboot_mdadm \ block archboot_net_common archboot_net keyboard archboot_devicemapper archboot_mdadm \
mdadm_udev lvm2 archboot_lvm2 encrypt btrfs archboot_filesystems archboot_remote archboot_cpufreq \ mdadm_udev lvm2 archboot_lvm2 encrypt btrfs archboot_filesystems archboot_remote archboot_cpufreq \
archboot_kexec archboot_grub archboot_efibootmgr archboot_pciutils archboot_usbutils \ archboot_kexec archboot_grub archboot_efibootmgr archboot_pciutils archboot_usbutils \
archboot_smartmontools archboot_licenses archboot_wireless archboot_wireless_staging \ archboot_smartmontools archboot_licenses archboot_wireless archboot_wireless_staging \

View file

@ -13,7 +13,7 @@ FILES=()
HOOKS=(archboot_cache archboot_cache_cleanup archboot_firmware archboot_firmware_cleanup \ HOOKS=(archboot_cache archboot_cache_cleanup archboot_firmware archboot_firmware_cleanup \
archboot_base_common archboot_base_common_cleanup archboot_base archboot_base_cleanup \ archboot_base_common archboot_base_common_cleanup archboot_base archboot_base_cleanup \
archboot_filesystems archboot_filesystems_cleanup archboot_net archboot_net_cleanup \ archboot_filesystems archboot_filesystems_cleanup archboot_net archboot_net_cleanup \
block dmraid lvm2 encrypt btrfs keyboard archboot_acpi kms udev archboot_devicemapper \ block lvm2 encrypt btrfs keyboard archboot_acpi kms udev archboot_devicemapper \
archboot_hypervisor archboot_net_common archboot_platform archboot_wireless \ archboot_hypervisor archboot_net_common archboot_platform archboot_wireless \
archboot_wireless_staging archboot_installer_common archboot_installer archboot_installer_cleanup \ archboot_wireless_staging archboot_installer_common archboot_installer archboot_installer_cleanup \
archboot_tz archboot_keymap archboot_motd archboot_hwdetect archboot_mdadm mdadm_udev \ archboot_tz archboot_keymap archboot_motd archboot_hwdetect archboot_mdadm mdadm_udev \

View file

@ -12,7 +12,7 @@ FILES=()
# Please change the hooks only if you know what you are doing. # Please change the hooks only if you know what you are doing.
HOOKS=(kms udev archboot_base_common archboot_base archboot_installer_common \ HOOKS=(kms udev archboot_base_common archboot_base archboot_installer_common \
archboot_installer archboot_tz archboot_keymap archboot_acpi archboot_motd archboot_hwdetect \ archboot_installer archboot_tz archboot_keymap archboot_acpi archboot_motd archboot_hwdetect \
block archboot_net_common archboot_net keyboard dmraid archboot_devicemapper archboot_mdadm \ block archboot_net_common archboot_net keyboard archboot_devicemapper archboot_mdadm \
mdadm_udev lvm2 archboot_lvm2 encrypt btrfs archboot_filesystems archboot_remote \ mdadm_udev lvm2 archboot_lvm2 encrypt btrfs archboot_filesystems archboot_remote \
archboot_kexec archboot_grub archboot_efibootmgr archboot_pciutils archboot_usbutils \ archboot_kexec archboot_grub archboot_efibootmgr archboot_pciutils archboot_usbutils \
archboot_smartmontools archboot_licenses archboot_wireless archboot_wireless_staging \ archboot_smartmontools archboot_licenses archboot_wireless archboot_wireless_staging \

View file

@ -13,7 +13,7 @@ FILES=()
HOOKS=(archboot_cache archboot_cache_cleanup archboot_firmware archboot_firmware_cleanup \ HOOKS=(archboot_cache archboot_cache_cleanup archboot_firmware archboot_firmware_cleanup \
archboot_base_common archboot_base_common_cleanup archboot_base archboot_base_cleanup \ archboot_base_common archboot_base_common_cleanup archboot_base archboot_base_cleanup \
archboot_filesystems archboot_filesystems_cleanup archboot_net archboot_net_cleanup block \ archboot_filesystems archboot_filesystems_cleanup archboot_net archboot_net_cleanup block \
dmraid lvm2 encrypt btrfs keyboard archboot_acpi kms udev archboot_cpufreq \ lvm2 encrypt btrfs keyboard archboot_acpi kms udev archboot_cpufreq \
archboot_devicemapper archboot_pcspkr archboot_hypervisor archboot_net_common \ archboot_devicemapper archboot_pcspkr archboot_hypervisor archboot_net_common \
archboot_dmidecode archboot_platform archboot_wireless archboot_wireless_staging \ archboot_dmidecode archboot_platform archboot_wireless archboot_wireless_staging \
archboot_installer_common archboot_installer archboot_installer_cleanup archboot_tz \ archboot_installer_common archboot_installer archboot_installer_cleanup archboot_tz \

View file

@ -13,7 +13,7 @@ FILES=()
HOOKS=(kms udev archboot_base_common archboot_base archboot_installer_common \ HOOKS=(kms udev archboot_base_common archboot_base archboot_installer_common \
archboot_installer archboot_tz archboot_keymap archboot_acpi archboot_motd \ archboot_installer archboot_tz archboot_keymap archboot_acpi archboot_motd \
archboot_hwdetect block archboot_pcspkr archboot_net_common archboot_net keyboard \ archboot_hwdetect block archboot_pcspkr archboot_net_common archboot_net keyboard \
dmraid archboot_devicemapper archboot_mdadm mdadm_udev lvm2 archboot_lvm2 encrypt \ archboot_devicemapper archboot_mdadm mdadm_udev lvm2 archboot_lvm2 encrypt \
btrfs archboot_filesystems archboot_remote archboot_cpufreq archboot_kexec \ btrfs archboot_filesystems archboot_remote archboot_cpufreq archboot_kexec \
archboot_grub archboot_refind archboot_efibootmgr archboot_pciutils archboot_usbutils \ archboot_grub archboot_refind archboot_efibootmgr archboot_pciutils archboot_usbutils \
archboot_smartmontools archboot_licenses archboot_wireless archboot_wireless_staging \ archboot_smartmontools archboot_licenses archboot_wireless archboot_wireless_staging \

View file

@ -127,15 +127,9 @@ _auto_mkinitcpio() {
grep -q "^amdgpu" /proc/modules && _FBPARAMETER="--amd-kms" grep -q "^amdgpu" /proc/modules && _FBPARAMETER="--amd-kms"
grep -q "^i915" /proc/modules && _FBPARAMETER="--intel-kms" grep -q "^i915" /proc/modules && _FBPARAMETER="--intel-kms"
grep -q "^nouveau" /proc/modules && _FBPARAMETER="--nvidia-kms" grep -q "^nouveau" /proc/modules && _FBPARAMETER="--nvidia-kms"
# check on nfs,dmraid and keymap HWPARAMETER # check on nfs and keymap HWPARAMETER
# check on used keymap, if not us keyboard layout # check on used keymap, if not us keyboard layout
! grep -q '^KEYMAP="us"' "${_DESTDIR}"/etc/vconsole.conf && _HWPARAMETER="${_HWPARAMETER} --keymap" ! grep -q '^KEYMAP="us"' "${_DESTDIR}"/etc/vconsole.conf && _HWPARAMETER="${_HWPARAMETER} --keymap"
# check on dmraid
if [[ -e ${_DESTDIR}/lib/initcpio/hooks/dmraid ]]; then
if ! dmraid -r | grep ^no; then
_HWPARAMETER="${_HWPARAMETER} --dmraid"
fi
fi
# get kernel version # get kernel version
if [[ "${_RUNNING_ARCH}" == "x86_64" ]]; then if [[ "${_RUNNING_ARCH}" == "x86_64" ]]; then
offset=$(hexdump -s 526 -n 2 -e '"%0d"' "${_DESTDIR}/boot/${_VMLINUZ}") offset=$(hexdump -s 526 -n 2 -e '"%0d"' "${_DESTDIR}/boot/${_VMLINUZ}")

View file

@ -41,8 +41,6 @@ _blockdevices() {
# all available block disk devices # all available block disk devices
for dev in $(${_LSBLK} NAME,TYPE | grep "disk$" | cut -d' ' -f1); do for dev in $(${_LSBLK} NAME,TYPE | grep "disk$" | cut -d' ' -f1); do
# exclude checks: # exclude checks:
#- dmraid_devices
# ${_LSBLK} TYPE ${dev} | grep "dmraid"
#- iso9660 devices #- iso9660 devices
# (${_LSBLK} FSTYPE ${dev} | grep "iso9660" # (${_LSBLK} FSTYPE ${dev} | grep "iso9660"
#- fakeraid isw devices #- fakeraid isw devices
@ -51,7 +49,7 @@ _blockdevices() {
# ${_LSBLK} FSTYPE ${dev} | grep "ddf_raid_member" # ${_LSBLK} FSTYPE ${dev} | grep "ddf_raid_member"
# - zram devices # - zram devices
# echo "${dev}" | grep -q 'zram' # echo "${dev}" | grep -q 'zram'
if ! ${_LSBLK} TYPE "${dev}" 2>/dev/null | grep -q "dmraid" && ! ${_LSBLK} FSTYPE "${dev}" 2>/dev/null | grep -q "iso9660" && ! ${_LSBLK} FSTYPE "${dev}" 2>/dev/null | grep -q "isw_raid_member" && ! ${_LSBLK} FSTYPE "${dev}" 2>/dev/null | grep -q "ddf_raid_member" && ! echo "${dev}" | grep -q 'zram'; then if ! ${_LSBLK} FSTYPE "${dev}" 2>/dev/null | grep -q "iso9660" && ! ${_LSBLK} FSTYPE "${dev}" 2>/dev/null | grep -q "isw_raid_member" && ! ${_LSBLK} FSTYPE "${dev}" 2>/dev/null | grep -q "ddf_raid_member" && ! echo "${dev}" | grep -q 'zram'; then
echo "${dev}" echo "${dev}"
[[ "${1}" ]] && echo "${1}" [[ "${1}" ]] && echo "${1}"
fi fi
@ -131,10 +129,6 @@ _partitionable_raid_devices_partitions() {
# lists dmraid devices # lists dmraid devices
_dmraid_devices() { _dmraid_devices() {
for dev in $(${_LSBLK} NAME,TYPE 2>/dev/null | grep "dmraid$" | cut -d' ' -f 1 | grep -v "_.*p.*$" | sort -u); do
echo "${dev}"
[[ "${1}" ]] && echo "${1}"
done
# isw_raid_member, managed by mdadm # isw_raid_member, managed by mdadm
for dev in $(${_LSBLK} NAME,TYPE 2>/dev/null | grep " raid.*$" | cut -d' ' -f 1 | sort -u); do for dev in $(${_LSBLK} NAME,TYPE 2>/dev/null | grep " raid.*$" | cut -d' ' -f 1 | sort -u); do
if ${_LSBLK} NAME,FSTYPE -s "${dev}" | grep "isw_raid_member$"; then if ${_LSBLK} NAME,FSTYPE -s "${dev}" | grep "isw_raid_member$"; then
@ -154,23 +148,6 @@ _dmraid_devices() {
# dmraid_partitions # dmraid_partitions
# - show dmraid partitions # - show dmraid partitions
_dmraid_partitions() { _dmraid_partitions() {
for part in $(${_LSBLK} NAME,TYPE | grep "dmraid$" | cut -d' ' -f 1 | grep "_.*p.*$" | sort -u); do
# exclude checks:
# - part of lvm2 device
# ${_LSBLK} FSTYPE ${dev} | grep "LVM2_member"
# - part of luks device
# ${_LSBLK} FSTYPE ${dev} | grep "crypto_LUKS"
# - part of raid device
# ${_LSBLK} FSTYPE ${dev} | grep "linux_raid_member$"
# - extended partition
# $(sfdisk -l 2>/dev/null | grep "${part}" | grep "Extended$"
# - extended partition (LBA)
# sfdisk -l 2>/dev/null | grep "${part}" | grep "(LBA)$")
if ! ${_LSBLK} FSTYPE "${part}" 2>/dev/null | grep -q "crypto_LUKS$" && ! ${_LSBLK} FSTYPE "${part}" 2>/dev/null | grep -q "LVM2_member$" && ! ${_LSBLK} FSTYPE "${part}" 2>/dev/null | grep -q "linux_raid_member$" && ! sfdisk -l 2>/dev/null | grep "${part}" | grep -q "Extended$"&& ! sfdisk -l 2>/dev/null | grep "${part}" | grep -q "(LBA)$"; then
echo "${part}"
[[ "${1}" ]] && echo "${1}"
fi
done
# isw_raid_member, managed by mdadm # isw_raid_member, managed by mdadm
for dev in $(${_LSBLK} NAME,TYPE | grep " md$" | cut -d' ' -f 1 | sort -u); do for dev in $(${_LSBLK} NAME,TYPE | grep " md$" | cut -d' ' -f 1 | sort -u); do
if ${_LSBLK} NAME,FSTYPE -s "${dev}" 2>/dev/null | grep "isw_raid_member$" | cut -d' ' -f 1; then if ${_LSBLK} NAME,FSTYPE -s "${dev}" 2>/dev/null | grep "isw_raid_member$" | cut -d' ' -f 1; then
@ -230,16 +207,6 @@ _findbootloaderdisks() {
fi fi
} }
# activate_dmraid()
# activate dmraid devices
_activate_dmraid()
{
if [[ -e /usr/bin/dmraid ]]; then
_dialog --infobox "Activating dmraid arrays..." 0 0
dmraid -ay -I -Z >/dev/null 2>&1
fi
}
# activate_lvm2 # activate_lvm2
# activate lvm2 devices # activate lvm2 devices
_activate_lvm2() _activate_lvm2()
@ -296,14 +263,13 @@ _activate_luks()
# _activate_special_devices() # _activate_special_devices()
# activate special devices: # activate special devices:
# activate dmraid, lvm2 and raid devices, if not already activated during bootup! # activate lvm2 and raid devices, if not already activated during bootup!
# run it more times if needed, it can be hidden by each other! # run it more times if needed, it can be hidden by each other!
_activate_special_devices() _activate_special_devices()
{ {
_RAID_READY="" _RAID_READY=""
_LUKS_READY="" _LUKS_READY=""
_LVM2_READY="" _LVM2_READY=""
_activate_dmraid
while [[ -n "${_LVM2_READY}" && -n "${_RAID_READY}" && -n "${_LUKS_READY}" ]]; do while [[ -n "${_LVM2_READY}" && -n "${_RAID_READY}" && -n "${_LUKS_READY}" ]]; do
_activate_raid _activate_raid
_activate_lvm2 _activate_lvm2
@ -475,27 +441,6 @@ _stopluks()
[[ -e /tmp/.crypttab ]] && rm /tmp/.crypttab [[ -e /tmp/.crypttab ]] && rm /tmp/.crypttab
} }
#_dmraid_update
_dmraid_update()
{
_printk off
_dialog --infobox "Deactivating dmraid devices ..." 0 0
dmraid -an >/dev/null 2>&1
if [[ -n "${_DETECTED_LVM}" || -n "${_DETECTED_LUKS}" ]]; then
_dialog --defaultno --yesno "Setup detected running dmraid devices and/or running lvm2, luks encrypted devices. If you reduced/deleted partitions on your dmraid device a complete reset of devicemapper devices is needed. This will reset also your created lvm2 or encrypted devices. Are you sure you want to do this?" 0 0 && _RESETDM=1
if [[ -n "${_RESETDM}" ]]; then
_dialog --infobox "Resetting devicemapper devices ..." 0 0
dmsetup remove_all >/dev/null 2>&1
fi
else
_dialog --infobox "Resetting devicemapper devices ..." 0 0
dmsetup remove_all >/dev/null 2>&1
fi
_dialog --infobox "Reactivating dmraid devices ..." 0 0
dmraid -ay -I -Z >/dev/null 2>&1
_printk on
}
#helpbox for raid #helpbox for raid
_helpraid() _helpraid()
{ {

View file

@ -25,7 +25,6 @@ _getraidarrays() {
_getcryptsetup() { _getcryptsetup() {
_CRYPTSETUP="" _CRYPTSETUP=""
if ! cryptsetup status "$(basename "${_PART_ROOT}")" | grep -q inactive; then if ! cryptsetup status "$(basename "${_PART_ROOT}")" | grep -q inactive; then
#avoid clash with dmraid here
if cryptsetup status "$(basename "${_PART_ROOT}")"; then if cryptsetup status "$(basename "${_PART_ROOT}")"; then
if [[ "${_NAME_SCHEME_PARAMETER}" == "FSUUID" ]]; then if [[ "${_NAME_SCHEME_PARAMETER}" == "FSUUID" ]]; then
_CRYPTDEVICE="UUID=$(${_LSBLK} UUID "$(cryptsetup status "$(basename "${_PART_ROOT}")" | grep device: | sed -e 's#device:##g')")" _CRYPTDEVICE="UUID=$(${_LSBLK} UUID "$(cryptsetup status "$(basename "${_PART_ROOT}")" | grep device: | sed -e 's#device:##g')")"
@ -314,7 +313,6 @@ EOF
_do_efistub_parameters() { _do_efistub_parameters() {
_BOOTDEV="" _BOOTDEV=""
_FAIL_COMPLEX="" _FAIL_COMPLEX=""
_USE_DMRAID=""
_RAID_ON_LVM="" _RAID_ON_LVM=""
_UEFISYS_PATH="EFI/archlinux" _UEFISYS_PATH="EFI/archlinux"
_BOOTDEV="$(findmnt -vno SOURCE "${_DESTDIR}/boot")" _BOOTDEV="$(findmnt -vno SOURCE "${_DESTDIR}/boot")"
@ -519,13 +517,9 @@ _do_grub_common_before() {
## - Encryption is not recommended for grub(2) /boot! ## - Encryption is not recommended for grub(2) /boot!
_BOOTDEV="" _BOOTDEV=""
_FAIL_COMPLEX="" _FAIL_COMPLEX=""
_USE_DMRAID=""
_RAID_ON_LVM="" _RAID_ON_LVM=""
_common_bootloader_checks _common_bootloader_checks
_abort_f2fs_bootpart || return 1 _abort_f2fs_bootpart || return 1
if ! dmraid -r | grep -q ^no; then
_dialog --yesno "Setup detected dmraid device.\nDo you want to install grub on this device?" 6 50 && _USE_DMRAID=1
fi
if [[ ! -d "${_DESTDIR}/usr/lib/grub" ]]; then if [[ ! -d "${_DESTDIR}/usr/lib/grub" ]]; then
_dialog --infobox "Installing grub ..." 0 0 _dialog --infobox "Installing grub ..." 0 0
_PACKAGES="grub" _PACKAGES="grub"
@ -765,9 +759,9 @@ _do_grub_bios() {
_do_grub_common_before _do_grub_common_before
# try to auto-configure GRUB(2)... # try to auto-configure GRUB(2)...
_check_bootpart _check_bootpart
# check if raid, raid partition, dmraid or device devicemapper is used # check if raid, raid partition, or device devicemapper is used
if echo "${_BOOTDEV}" | grep -q /dev/md || echo "${_BOOTDEV}" | grep /dev/mapper; then if echo "${_BOOTDEV}" | grep -q /dev/md || echo "${_BOOTDEV}" | grep /dev/mapper; then
# boot from lvm, raid, partitioned raid and dmraid devices is supported # boot from lvm, raid, partitioned and raid devices is supported
_FAIL_COMPLEX="" _FAIL_COMPLEX=""
if cryptsetup status "${_BOOTDEV}"; then if cryptsetup status "${_BOOTDEV}"; then
# encryption devices are not supported # encryption devices are not supported

View file

@ -109,9 +109,6 @@ _auto_packages() {
if lsblk -rnpo FSTYPE | grep -q vfat; then if lsblk -rnpo FSTYPE | grep -q vfat; then
! echo "${_PACKAGES}" | grep -qw dosfstools && _PACKAGES="${_PACKAGES} dosfstools" ! echo "${_PACKAGES}" | grep -qw dosfstools && _PACKAGES="${_PACKAGES} dosfstools"
fi fi
if [[ -n "$(_dmraid_devices)" ]]; then
! echo "${_PACKAGES}" | grep -qw dmraid && _PACKAGES="${_PACKAGES} dmraid"
fi
if lsmod | grep -qw wl; then if lsmod | grep -qw wl; then
! echo "${_PACKAGES}" | grep -qw broadcom-wl && _PACKAGES="${_PACKAGES} broadcom-wl" ! echo "${_PACKAGES}" | grep -qw broadcom-wl && _PACKAGES="${_PACKAGES} broadcom-wl"
fi fi

View file

@ -108,16 +108,12 @@ _check_efisys_part() {
_partition() { _partition() {
# disable swap and all mounted partitions, umount / last! # disable swap and all mounted partitions, umount / last!
_umountall _umountall
# activate dmraid
_activate_dmraid
# check on encrypted devices, else weird things can happen! # check on encrypted devices, else weird things can happen!
_stopluks _stopluks
# check on raid devices, else weird things can happen during partitioning! # check on raid devices, else weird things can happen during partitioning!
_stopmd _stopmd
# check on lvm devices, else weird things can happen during partitioning! # check on lvm devices, else weird things can happen during partitioning!
_stoplvm _stoplvm
# update dmraid
[[ -n "$(_dmraid_devices)" ]] && _dmraid_update
# switch for mbr usage # switch for mbr usage
_set_guid _set_guid
# Select disk to partition # Select disk to partition
@ -162,7 +158,5 @@ _partition() {
fi fi
fi fi
done done
# update dmraid
_dmraid_update
_NEXTITEM="3" _NEXTITEM="3"
} }