about summary refs log tree commit diff
path: root/installer.sh.in
diff options
context:
space:
mode:
authorJuan RP <xtraeme@voidlinux.eu>2015-10-10 10:19:43 +0200
committerJuan RP <xtraeme@voidlinux.eu>2015-10-10 10:19:43 +0200
commit8261f90a2aaee2d16d0d719d8656a82e7239beb0 (patch)
tree598e7d9345832e5e03f21b4285682d750454a4ed /installer.sh.in
parentcb2510b3791091fb54681cee451eb7ec24e0b266 (diff)
downloadhrmpf-8261f90a2aaee2d16d0d719d8656a82e7239beb0.tar.gz
hrmpf-8261f90a2aaee2d16d0d719d8656a82e7239beb0.tar.xz
hrmpf-8261f90a2aaee2d16d0d719d8656a82e7239beb0.zip
installer: detect ciss(4) devices/partitions correctly (#44).
Diffstat (limited to 'installer.sh.in')
-rw-r--r--installer.sh.in17
1 files changed, 17 insertions, 0 deletions
diff --git a/installer.sh.in b/installer.sh.in
index 84dbcb0..ee1a243 100644
--- a/installer.sh.in
+++ b/installer.sh.in
@@ -141,6 +141,14 @@ show_disks() {
         gbytes="$(($size * $sectorsize / 1024 / 1024 / 1024))"
         echo "size:${gbytes}GB;sector_size:$sectorsize"
     done
+    # cciss(4) devices
+    for dev in $(ls /dev/cciss|grep -E 'c[0-9]d[0-9]$'); do
+        echo "/dev/cciss/$dev"
+        size=$(cat /sys/block/cciss\!$dev/size)
+        sectorsize=$(cat /sys/block/cciss\!$dev/queue/hw_sector_size)
+        gbytes="$(($size * $sectorsize / 1024 / 1024 / 1024))"
+        echo "size:${gbytes}GB;sector_size:$sectorsize"
+    done
 }
 
 show_partitions() {
@@ -176,6 +184,15 @@ show_partitions() {
             echo "size:${fssize:-unknown};fstype:${fstype:-none}"
         fi
     done
+    # cciss(4) devices
+    for part in $(ls /dev/cciss|grep -E 'c[0-9]d[0-9]p[0-9]+'); do
+        fstype=$(lsblk -nfr /dev/cciss/$part|awk '{print $2}')
+        [ "$fstype" = "crypto_LUKS" ] && continue
+        [ "$fstype" = "LVM2_member" ] && continue
+        fssize=$(lsblk -nr /dev/cciss/$part|awk '{print $4}')
+        echo "$part"
+        echo "size:${fssize:-unknown};fstype:${fstype:-none}"
+    done
     if [ -e /sbin/lvs ]; then
         # LVM
         lvs --noheadings|while read lvname vgname perms size; do