[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#299103: initrd-tools: mkinitrd tries to use devfs in 2.6 series kernel



Package: initrd-tools
Version: 0.1.77
Severity: important
Tags: patch

I use RAID disks, including the root partition. Thus I used and initrd image to boot correctly.

However, when I use mkinitrd from the initrd-tools, it fails to boot because it doesn't find the root partition,
because mkinitrd uses devfs (and obviusly, I don't have devfs in the 2.6 kernel).

I send a patch that works fine for me (and it should work for everybody). The patch could be better, concretaly
the part that detects other RAID partitions:

  - Don't copy /etc/mdadm/mdadm.conf, just generate it with some like:

	echo "DEVICES partitions" > $INITRD/$MDADMCONF
	mdadm -D --scan >> $INITRD/$MDADMCONF

  - Moreover, with the information generated with those commands, read the devices needed for
    "automatic" adition to the initrd (echoes them to >&4).


Thanks a lot and sorry about my poor english.


P.D.: The patch:

############################################

--- mkinitrd.orig       2005-03-11 18:00:47.000000000 +0100
+++ mkinitrd.new        2005-03-11 20:18:20.575264864 +0100
@@ -175,9 +175,17 @@
        )"
 
        printf '%s\n' $devices > getroot
-       echo mdadm -A /devfs/md/$minor -R -u $uuid $devices \
-               > md$minor-script
        echo /sbin/mdadm >&6
+       echo /dev/md$minor >&4
+       echo mdadm -A /dev/md$minor -R -u $uuid $devices \
+               >> md$minor-script
+
+       echo -e "\n # If other RAID disks (and its components) are explicity added in /etc/mkinitrd/files,\n"\
+               "# It is posible to detect and initiate them all:" \
+               >> md$minor-script
+       echo mdadm -A --scan \
+               >> md$minor-script
+       echo /etc/mdadm/mdadm.conf >&4
 }
 
 getraid_raidtools() {

############################################


-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.10
Locale: LANG=es_ES@euro, LC_CTYPE=es_ES@euro (charmap=ISO-8859-15) (ignored: LC_ALL set to es_ES@euro)

Versions of packages initrd-tools depends on:
ii  coreutils [fileutils]         5.2.1-2    The GNU core utilities
ii  cpio                          2.5-1.2    GNU cpio -- a program to manage ar
ii  cramfsprogs                   1.1-6      Tools for CramFs (Compressed ROM F
ii  dash                          0.5.2-1    The Debian Almquist Shell
ii  util-linux                    2.12-10    Miscellaneous system utilities

-- no debconf information
--- mkinitrd.orig	2005-03-11 18:00:47.000000000 +0100
+++ mkinitrd.new	2005-03-11 20:18:20.575264864 +0100
@@ -175,9 +175,17 @@
 	)"
 
 	printf '%s\n' $devices > getroot
-	echo mdadm -A /devfs/md/$minor -R -u $uuid $devices \
-		> md$minor-script
 	echo /sbin/mdadm >&6
+	echo /dev/md$minor >&4
+	echo mdadm -A /dev/md$minor -R -u $uuid $devices \
+		>> md$minor-script
+
+	echo -e "\n # If other RAID disks (and its components) are explicity added in /etc/mkinitrd/files,\n"\
+		"# It is posible to detect and initiate them all:" \
+		>> md$minor-script
+	echo mdadm -A --scan \
+		>> md$minor-script
+	echo /etc/mdadm/mdadm.conf >&4
 }
 
 getraid_raidtools() {

Reply to: