From: Michael Tremer Date: Sat, 8 Sep 2012 09:04:39 +0000 (+0200) Subject: Fix installation with HP SmartArray RAID controllers. X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=commitdiff_plain;h=9a3d3d9558b36ebb0a283e878a3be39e10fdab72 Fix installation with HP SmartArray RAID controllers. --- diff --git a/src/install+setup/install/main.c b/src/install+setup/install/main.c index ea47593cd..319dfded7 100644 --- a/src/install+setup/install/main.c +++ b/src/install+setup/install/main.c @@ -375,7 +375,7 @@ int main(int argc, char *argv[]) errorbox(ctr[TR_UNABLE_TO_PARTITION]); goto EXIT; } - + if (fstype == EXT2) { // mysystem("/sbin/modprobe ext2"); sprintf(mkfscommand, "/sbin/mke2fs -T ext2"); @@ -517,7 +517,7 @@ int main(int argc, char *argv[]) */ FILE *f = NULL; if (f = fopen("/harddisk/boot/grub/device.map", "w")) { - fprintf(f, "(hd0) %s\n", hdparams.devnode_part); + fprintf(f, "(hd0) %s\n", hdparams.devnode_disk); fclose(f); } diff --git a/src/install+setup/install/mountdest.sh b/src/install+setup/install/mountdest.sh index 8e2b600cc..749d4fa5e 100644 --- a/src/install+setup/install/mountdest.sh +++ b/src/install+setup/install/mountdest.sh @@ -18,6 +18,10 @@ # # ############################################################################### +# Set histchars to an empty string so we are able to replace an +# exclamation mark. +histchars= + echo "Scanning for possible destination drives" function _mount() { @@ -70,6 +74,9 @@ for path in /sys/block/*; do ;; esac + # Replace any exclamation marks (e.g. cciss!c0d0). + device=${device//!/\/} + # Guess if this could be a raid device. for dev in ${device} ${device}p1; do if [ -e "/dev/${dev}" ]; then @@ -93,7 +100,7 @@ for path in /sys/block/*; do # 2: RAID # 10: nothing found case "${device}" in - *p1) + *p1|*c0d0) exit 2 ;; *)