You are not logged in.

#1 2017-12-24 02:46:46

gilmoreja
Member
From: Florida
Registered: 2012-05-28
Posts: 74

[solved] Updating kernel from 4.12.1-1 causes dmraid trouble

I haven't booted my Linux partition in a while, and after updating the computer today it is unable to boot without intervention. It seems like dmraid is getting tripped up by the updated kernel.

Since updating the computer gets this far and dumps me into emergency shell:

SxrVm2Xm.png

I can continue booting with no problem by manually telling dmraid to assemble the array and then mounting it:

[rootfs ]# dmraid -ay
[rootfs ]# mount /dev/disk/by-uuid/734. . . new_root
[rootfs ]# exit

After that, Arch boots with no further issues and the computer is perfectly usable (until reboot).

I narrowed it down to being an issue with the kernel, because downgrading linux and linux-headers to 4.12.1-1 will allow the computer to boot normally. Updating kernel again to 4.14.8-1 (current) will bring this issue back.

Has anyone else run into this? Is there a way that I can fix it, or is it a bug in the kernel that needs a fix? My computer is still usable, but it is a pain to babysit it while booting..

Last edited by gilmoreja (2017-12-24 03:43:46)


Time you enjoy wasting isn't wasted time.

Offline

#2 2017-12-24 02:50:02

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [solved] Updating kernel from 4.12.1-1 causes dmraid trouble

I have experienced no issues at all, and am currently on 4.14.7

Include more details of your setup; bootloader, mdadm.conf, mkinitcpio.conf etc


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2017-12-24 03:05:12

gilmoreja
Member
From: Florida
Registered: 2012-05-28
Posts: 74

Re: [solved] Updating kernel from 4.12.1-1 causes dmraid trouble

I'm using GRUB 2, here's my /boot/grub/grub.cfg:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="${saved_entry}"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

set menu_color_normal=light-blue/black
set menu_color_highlight=light-cyan/blue

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  734e1fe6-e50a-46e3-8c16-4925c0902bf8
else
  search --no-floppy --fs-uuid --set=root 734e1fe6-e50a-46e3-8c16-4925c0902bf8
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=1920x1200x32
  load_video
  insmod gfxterm
fi
terminal_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=3
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=3
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-734e1fe6-e50a-46e3-8c16-4925c0902bf8' {
	savedefault
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_msdos
	insmod ext2
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root  4363bd00-4b43-4c97-91c8-a96f3029c4f7
	else
	  search --no-floppy --fs-uuid --set=root 4363bd00-4b43-4c97-91c8-a96f3029c4f7
	fi
	echo	'Loading Linux linux ...'
	linux	/vmlinuz-linux root=UUID=734e1fe6-e50a-46e3-8c16-4925c0902bf8 rw  
	echo	'Loading initial ramdisk ...'
	initrd  /initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-734e1fe6-e50a-46e3-8c16-4925c0902bf8' {
	menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-734e1fe6-e50a-46e3-8c16-4925c0902bf8' {
	savedefault
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_msdos
		insmod ext2
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root  4363bd00-4b43-4c97-91c8-a96f3029c4f7
		else
		  search --no-floppy --fs-uuid --set=root 4363bd00-4b43-4c97-91c8-a96f3029c4f7
		fi
		echo	'Loading Linux linux ...'
		linux	/vmlinuz-linux root=UUID=734e1fe6-e50a-46e3-8c16-4925c0902bf8 rw  
		echo	'Loading initial ramdisk ...'
		initrd  /initramfs-linux.img
	}
	menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-734e1fe6-e50a-46e3-8c16-4925c0902bf8' {
	savedefault
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_msdos
		insmod ext2
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root  4363bd00-4b43-4c97-91c8-a96f3029c4f7
		else
		  search --no-floppy --fs-uuid --set=root 4363bd00-4b43-4c97-91c8-a96f3029c4f7
		fi
		echo	'Loading Linux linux ...'
		linux	/vmlinuz-linux root=UUID=734e1fe6-e50a-46e3-8c16-4925c0902bf8 rw  
		echo	'Loading initial ramdisk ...'
		initrd  /initramfs-linux-fallback.img
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 10 (on /dev/sdc1)' --class windows --class os $menuentry_id_option 'osprober-chain-3242C16242C12C03' {
	savedefault
	insmod part_msdos
	insmod ntfs
	set root='hd2,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos1 --hint-efi=hd2,msdos1 --hint-baremetal=ahci2,msdos1  3242C16242C12C03
	else
	  search --no-floppy --fs-uuid --set=root 3242C16242C12C03
	fi
	parttool ${root} hidden-
	drivemap -s (hd0) ${root}
	chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

#menuentry "Windows 7" {
#	set root="(hd0,4)"
#	chainloader +1
#}
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

### BEGIN /etc/grub.d/60_memtest86+ ###
if [ "${grub_platform}" == "pc" ]; then
    menuentry "Memory Tester (memtest86+)" --class memtest86 --class gnu --class tool {
        search --fs-uuid --no-floppy --set=root  4363bd00-4b43-4c97-91c8-a96f3029c4f7
        linux16 /memtest86+/memtest.bin 
    }
fi
### END /etc/grub.d/60_memtest86+ ###

Here's mkinitcpio.conf:

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(piix ide_disk reiserfs)
MODULES=()

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=()

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No raid, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect block filesystems)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev block filesystems)
#
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS=(base udev block mdadm encrypt filesystems)
#
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS=(base udev block lvm2 filesystems)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.
HOOKS=(base udev autodetect modconf block keyboard consolefont dmraid filesystems fsck)

# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

I don't use mdadm, so I haven't edited that config file at all:

# mdadm configuration file
#
# mdadm will function properly without the use of a configuration file,
# but this file is useful for keeping track of arrays and member disks.
# In general, a mdadm.conf file is created, and updated, after arrays
# are created. This is the opposite behavior of /etc/raidtab which is
# created prior to array construction.
#
#
# the config file takes two types of lines:
#
#	DEVICE lines specify a list of devices of where to look for
#	  potential member disks
#
#	ARRAY lines specify information about how to identify arrays so
#	  so that they can be activated
#


# You can have more than one device line and use wild cards. The first 
# example includes SCSI the first partition of SCSI disks /dev/sdb,
# /dev/sdc, /dev/sdd, /dev/sdj, /dev/sdk, and /dev/sdl. The second 
# line looks for array slices on IDE disks.
#
#DEVICE /dev/sd[bcdjkl]1
#DEVICE /dev/hda1 /dev/hdb1
#
# The designation "partitions" will scan all partitions found in
# /proc/partitions
DEVICE partitions


# ARRAY lines specify an array to assemble and a method of identification.
# Arrays can currently be identified by using a UUID, superblock minor number,
# or a listing of devices.
#
#	super-minor is usually the minor number of the metadevice
#	UUID is the Universally Unique Identifier for the array
# Each can be obtained using
#
# 	mdadm -D <md>
#
# To capture the UUIDs for all your RAID arrays to this file, run these:
#    to get a list of running arrays:
#    # mdadm -D --scan >>/etc/mdadm.conf
#    to get a list from superblocks:
#    # mdadm -E --scan >>/etc/mdadm.conf
#
#ARRAY /dev/md0 UUID=3aaa0122:29827cfa:5331ad66:ca767371
#ARRAY /dev/md1 super-minor=1
#ARRAY /dev/md2 devices=/dev/hda1,/dev/hdb1
#
# ARRAY lines can also specify a "spare-group" for each array.  mdadm --monitor
# will then move a spare between arrays in a spare-group if one array has a
# failed drive but no spare
#ARRAY /dev/md4 uuid=b23f3c6d:aec43a9f:fd65db85:369432df spare-group=group1
#ARRAY /dev/md5 uuid=19464854:03f71b1b:e0df2edd:246cc977 spare-group=group1
#


# When used in --follow (aka --monitor) mode, mdadm needs a
# mail address and/or a program.  To start mdadm's monitor mode, enable
# mdadm.service in systemd.
#
# If the lines are not found, mdadm will exit quietly
#MAILADDR root@mydomain.tld
#PROGRAM /usr/sbin/handle-mdadm-events

I tried moving /lib/udev/rules.d/64-md-raid-assembly.rules after reading that mdadm can sometimes interfere by attempting to set up the array first, but doing that didn't solve anything.


Time you enjoy wasting isn't wasted time.

Offline

#4 2017-12-24 03:17:10

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [solved] Updating kernel from 4.12.1-1 causes dmraid trouble

Add your raid module to the modules array in mkinitcpio.conf and regenerate your initrd.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2017-12-24 03:43:25

gilmoreja
Member
From: Florida
Registered: 2012-05-28
Posts: 74

Re: [solved] Updating kernel from 4.12.1-1 causes dmraid trouble

Thank you, adding ahci to my modules section solved the problem.


Time you enjoy wasting isn't wasted time.

Offline

Board footer

Powered by FluxBB