md device renamed into md126 [solved]

Post there if you plan to contribute to this SystemCd
Post Reply
Posts: 1
Joined: 18 Apr 2012, 07:21

md device renamed into md126 [solved]

Post by m47730 » 18 Apr 2012, 07:44

In my opinion, the most annoying things in sysrescue are two:

1) you cannot choose your shell with command parameters
2) auto detection of md array is causing renaming of md to number starting from 126 (md0 -> md126, md1 -> md127, etc) and so on.

For first problem i haven't yet write a line of code, but i isolate the second one.
The problem is md is trying to name md with hostname (ex: sysrescue:0) and give number md126; and it will not be a such problem if md preferred super-minor will not be override. Istead it is, and it gives boot problems after reboot in normal system without sysrescue.
The "patch" is not very refined, but is a point of start.

in the ramdisk (initram.igz) in the init file:

Code: Select all

--- init.orig	2012-04-18 09:38:34.000000000 +0200
+++ init	2012-04-13 18:43:14.000000000 +0200
@@ -556,8 +556,8 @@
             /sbin/modprobe -b ${mod}
         good_msg "Starting mdadm (linux software raid)"
-        /sbin/mdadm -Es > /etc/mdadm.conf
-        /sbin/mdadm -As
+        /sbin/mdadm -Es | awk '{ for (i=1; i<=NF;i++) { if ($i !~ /^name=/) printf("%s ", $i) } print("") }' > /etc/mdadm.conf
+        /sbin/mdadm -As -c /etc/mdadm.conf
     # Setup the Logical Volume Manager

Some users complained like me in the forum for this behaviour, then think about inclusion.


Posts: 1131
Joined: 07 Apr 2010, 16:19

Re: md device renamed into md126

Post by gernot » 21 Apr 2012, 07:31

Thank you,
your patch is in systemrescuecd-x86-2.6.0-beta004


Post Reply