LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-15-2012, 03:52 AM   #1
polch
LQ Newbie
 
Registered: Sep 2010
Posts: 22

Rep: Reputation: 0
[PATCH] initrd.img : probe md devices with dynamic minor number.


Hi.

The raid arrays with dynamic minor number will be hardly identified for installation. For instance if we create the raid array with
Code:
mdadm --create /dev/md/home --level 1 --raid-devices 2 /dev/sda2 /dev/sdb2
the devices won't be visible in the installer.

I don't know if i'm on the right track, but here is a suggestion for the probe script of the initrd.img.

Code:
--- sbin/probe.bak      2012-10-15 10:24:50.058021543 +0200
+++ sbin/probe  2012-10-15 10:15:26.972019923 +0200
@@ -142,7 +142,13 @@
 
 list_md() {
   if ( is_swap "/dev/$2" ); then TYPE="Linux swap"; else TYPE="Linux"; fi
-  echo "/dev/$2  1 2 $1 kk $TYPE" >> $TMP/SeTfdisk
+  ARRAY_NAME=`mdadm --detail /dev/$2 | grep "Name : " | sed -e "s/ *Name : //"`
+  if [ "$ARRAY_NAME" = "" ]; then
+    ARRAY_NAME="$2"
+  else
+    ARRAY_NAME="md/$ARRAY_NAME"
+  fi
+  echo "/dev/$ARRAY_NAME  1 2 $1 kk $TYPE" >> $TMP/SeTfdisk
 }
 
 list_lvm() {
P.S. : The purpose of these messages is not so much to solve a personal problem, but try to find an official way of doing an "out of the box working" raid installation. The history of messages for this problem :
Install on raid setup and /dev/md127
http://www.linuxquestions.org/questi...ab-4175431267/
RAID howto discussion on the slackdocs ml

Last edited by polch; 10-15-2012 at 06:45 AM. Reason: Error in patch /dev/$ARRAY_NAME -> /dev/md/$ARRAY_NAME
 
Old 10-18-2012, 02:46 PM   #2
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 231Reputation: 231Reputation: 231
Thanks polch.

Noted and added to my Todo list.
 
Old 10-19-2012, 01:25 AM   #3
polch
LQ Newbie
 
Registered: Sep 2010
Posts: 22

Original Poster
Rep: Reputation: 0
I thank you for dealing with this problem.

However, I'm not sure about my solution.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Identify and explain the major number, minor number, and revision number in Linux... turbomen Linux - Newbie 1 11-16-2010 02:48 AM
How do I pack stage2.img into initrd.img for a PXE linux rescue? real1elmo Red Hat 12 10-14-2009 06:29 PM
How to create new initrd.gz (or initrd.img) file? kkpal Programming 2 12-10-2007 08:38 AM
Add new cciss driver module to initrd.img ,stage2.img kunalroy2002 Linux - Software 4 09-25-2007 12:09 AM
Failed to symbolic-link boot/initrd.img-2.6.18-4-486 to initrd.img Scotteh Linux - Software 8 06-01-2007 11:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration