Codebase list debootstick / 6d24f6e
installer-mode: generic disk detection with lsblk (was major:minor) Etienne Dublé 3 years ago
2 changed file(s) with 6 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
00 debootstick (2.6) unpublished; urgency=medium
11
22 * Fix support for migrating to NVMe devices (thanks to F.Lavratti)
3 * Installer-mode: generic disk detection with lsblk
34
45 debootstick (2.5) unstable; urgency=medium
56
8686 get_higher_capacity_devices()
8787 {
8888 threshold=$1
89 cat /proc/partitions | while read major minor size name
90 do
91 if [ "$major" = "8" ] || [ "$major" = "259" ]
89 lsblk -lno PATH,TYPE | grep -w disk | while read device type
90 do
91 device_size=$(get_device_capacity "$device")
92 if [ $device_size -gt $threshold ]
9293 then
93 if [ "$((minor % 16))" -eq 0 -a $((size*1024)) -gt $threshold ]
94 then
95 echo /dev/$name
96 fi
94 echo $device
9795 fi
9896 done
9997 }