mmc

Marc SCHAEFER alphanet-linux-fai at alphanet.ch
Thu Sep 6 10:30:17 CEST 2018


Hello,

On Thu, Dec 10, 2015 at 08:54:06PM +0100, linux service wrote:
> seems like making a partition on a mmc would be :mmcblk0p1, second partition: mmcblk0p2
> 
> ok, no go with fai for these pc's

it is a bit old, but I just made it work with 4.3.1+deb8u on Debian jessie LTS
with those changes:

--- /usr/lib/fai/fai-disk-info.distrib  2015-05-22 09:21:36.000000000 +0000
+++ /usr/lib/fai/fai-disk-info  2018-09-06 08:10:01.072705644 +0000
@@ -19,6 +19,6 @@
 }
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 # echo a space separated list of devices and their block size
-egrep ' etherd/e[[:digit:]]+\.[[:digit:]]+\b| i2o/hd.+\b| cciss/c.+d.+\b| ida/c.+d.+\b| rd/c.+d.+\b| hd.\b| sd[a-z]{1,2}\b|/disc\b| vd.\b| xvd.\b' /proc/partitions | checkdisk
+egrep ' etherd/e[[:digit:]]+\.[[:digit:]]+\b| i2o/hd.+\b| cciss/c.+d.+\b| ida/c.+d.+\b| rd/c.+d.+\b| hd.\b| sd[a-z]{1,2}\b| mmcblk[0-9]|/disc\b|/disc\b| vd.\b| xvd.\b' /proc/partitions | checkdisk

--- /usr/share/fai/setup-storage/Init.pm.distrib        2015-05-22 09:21:36.000000000 +0000
+++ /usr/share/fai/setup-storage/Init.pm        2018-09-06 07:49:14.188740143 +0000
@@ -219,7 +219,7 @@
     return (1, "/dev/$1", $2);
   }
   elsif ($dev =~
-    m{^/dev/(cciss/c\d+d\d+|ida/c\d+d\d+|rd/c\d+d\d+|ataraid/d\d+|etherd/e\d+\.\d+)(p(\d+))?$})
+    m{^/dev/(mmcblk\d+|cciss/c\d+d\d+|ida/c\d+d\d+|rd/c\d+d\d+|ataraid/d\d+|etherd/e\d+\.\d+)(p(\d+))?$})
   {
     defined($2) or return (1, "/dev/$1", -1);
     return (1, "/dev/$1", $3);
@@ -306,7 +306,7 @@
 sub make_device_name {
   my ($dev, $p) = @_;
   $dev .= "p" if ($dev =~
-    m{^/dev/(cciss/c\d+d\d+|ida/c\d+d\d+|rd/c\d+d\d+|ataraid/d\d+|etherd/e\d+\.\d+)$});
+    m{^/dev/(cciss/c\d+d\d+|ida/c\d+d\d+|rd/c\d+d\d+|ataraid/d\d+|etherd/e\d+\.\d+|mmcblk\d+)$});
   if ((&FAI::loopback_dev($dev))[0])
   {
     $p += (&FAI::loopback_dev($dev))[1];

You need to regenerate your nfsroot or just copy the files over.

NB: maybe this was already integrated in FAI 5.

Thank you for writing FAI, it's amazing: I am installing
workstations, servers and embedded system with it for the
last 15 years or so.


More information about the linux-fai mailing list