diff -Nru boot-repair-4ppa64/debian/changelog boot-repair-4ppa65/debian/changelog --- boot-repair-4ppa64/debian/changelog 2017-10-04 13:14:14.000000000 +0000 +++ boot-repair-4ppa65/debian/changelog 2017-10-04 13:14:14.000000000 +0000 @@ -1,4 +1,4 @@ -boot-repair (4ppa64) xenial; urgency=low +boot-repair (4ppa65) artful; urgency=low * created source diff -Nru boot-repair-4ppa64/usr/share/boot-sav/bs-cmd_terminal.sh boot-repair-4ppa65/usr/share/boot-sav/bs-cmd_terminal.sh --- boot-repair-4ppa64/usr/share/boot-sav/bs-cmd_terminal.sh 2017-10-04 13:14:14.000000000 +0000 +++ boot-repair-4ppa65/usr/share/boot-sav/bs-cmd_terminal.sh 2017-10-04 13:14:14.000000000 +0000 @@ -175,10 +175,10 @@ sb_var2="$efi_vars/SecureBoot-a8be4df61-93ca-11d2-aa0d-00e098032b8c/data" if [[ ! -d $efi_vars ]];then SECUREBOOT=disabled - elif [ -e "$sb_var" ];then - [ "$(printf %x \'"$(cat "$sb_var")")" = 1 ] && SECUREBOOT=enabled || SECUREBOOT=disabled - elif [ -e "$sb_var2" ];then #http://paste.ubuntu.com/1643471 - [ "$(printf %x \'"$(cat "$sb_var2")")" = 1 ] && SECUREBOOT=enabled || SECUREBOOT=disabled + elif [[ -e "$sb_var" ]];then + [[ "$(printf %x \'"$(cat "$sb_var")")" = 1 ]] && SECUREBOOT=enabled || SECUREBOOT=disabled + elif [[ -e "$sb_var2" ]];then #http://paste.ubuntu.com/1643471 + [[ "$(printf %x \'"$(cat "$sb_var2")")" = 1 ]] && SECUREBOOT=enabled || SECUREBOOT=disabled else [[ -f "$sb_var" ]] || [[ -f "$sb_var2" ]] && echo "Warning: sbvar. $PLEASECONTACT" tst="$(ls $efi_vars | grep SecureBoot )" diff -Nru boot-repair-4ppa64/usr/share/boot-sav/bs-common.sh boot-repair-4ppa65/usr/share/boot-sav/bs-common.sh --- boot-repair-4ppa64/usr/share/boot-sav/bs-common.sh 2017-10-04 13:14:14.000000000 +0000 +++ boot-repair-4ppa65/usr/share/boot-sav/bs-common.sh 2017-10-04 13:14:14.000000000 +0000 @@ -59,6 +59,9 @@ [[ "$DEBBUG" ]] && echo "[debug] $part is RAID_member" #http://paste.ubuntu.com/1074972 (md0 on sdb & sdc) determine_disk_from_part add_disk $1 $2 + elif [[ "$part" =~ nvme ]] && [[ ! "$(grep "p[0-9]" <<< $part )" ]];then + disk="$part" #eg nvme0n1 + add_disk $1 $2 elif [[ "$part" = sd[a-z] ]] || [[ "$part" = hd[a-z] ]] || [[ "$part" = sd[a-z][a-z] ]];then echo "$part may have broken partition table." #sda http://paste.ubuntu.com/1059957 elif [[ "$line" =~ swap ]] || [[ "$(grep swap <<< "$line" )" ]];then @@ -158,14 +161,16 @@ [[ "${LISTOFPARTITIONS[$b]}" = "$part" ]] && ADD_PART="" done if [[ "$ADD_PART" ]] && [[ "$part" ]];then - (( NBOFPARTITIONS += 1 )) - LISTOFPARTITIONS[$NBOFPARTITIONS]="$part" #sda1 - DISK_PART[$NBOFPARTITIONS]="$disk" #sda - for ((b=1;b<=NBOFDISKS;b++)); do - [[ "${LISTOFDISKS[$b]}" = "$disk" ]] && DISKNB_PART[$NBOFPARTITIONS]="$b" - done - #echo "[debug]Partition $NBOFPARTITIONS is $part ($disk)" - mkdir -p "$LOGREP/$part" + if [[ ! "$part" =~ nvme ]] || [[ "$(grep "p[0-9]" <<< $part )" ]];then #blkid can contain /dev/nvme0n1 which is not partition https://forum.ubuntu-fr.org/viewtopic.php?pid=21827617#p21827617 + (( NBOFPARTITIONS += 1 )) + LISTOFPARTITIONS[$NBOFPARTITIONS]="$part" #sda1 + DISK_PART[$NBOFPARTITIONS]="$disk" #sda + for ((b=1;b<=NBOFDISKS;b++)); do + [[ "${LISTOFDISKS[$b]}" = "$disk" ]] && DISKNB_PART[$NBOFPARTITIONS]="$b" + done + #echo "[debug]Partition $NBOFPARTITIONS is $part ($disk)" + mkdir -p "$LOGREP/$part" + fi fi fi }