Added support for eMMC storage and changes to SATA/NVME

This commit is contained in:
2024-12-12 21:42:56 -05:00
parent dfa19271d0
commit 4f8c5f1bc9

View File

@ -118,21 +118,37 @@ get_drive_info() {
}
# Show NVMe Drives with enhanced info
echo -e "\n=== NVMe Drives ==="
echo -e "\n=== NVMe Drives ===\n"
printf "%-15s %-10s %-10s %-20s\n" "DEVICE" "SIZE" "TYPE" "MODEL"
echo "------------------------------------------------------------"
nvme_drives=$(sudo nvme list | grep "^/dev")
echo "$nvme_drives"
for drive in $(echo "$nvme_drives" | awk '{print $1}'); do
get_drive_info "$drive"
done
if [ -n "$nvme_drives" ]; then
echo "$nvme_drives" | awk '{printf "%-15s %-10s %-10s %-20s\n", $1, $6, "NVMe", $3}'
else
echo "No NVMe drives found"
fi
# Show SATA Drives with enhanced info
echo -e "\n=== SATA Drives ==="
lsblk -o NAME,SIZE,TYPE,MOUNTPOINT,MODEL | grep disk
for drive in $(lsblk -dnp -o NAME); do
get_drive_info "$drive"
done
# Show MMC Drives
echo -e "\n=== MMC Drives ===\n"
printf "%-15s %-10s %-10s %-20s\n" "DEVICE" "SIZE" "TYPE" "MOUNTPOINT"
echo "------------------------------------------------------------"
mmc_output=$(lsblk -o NAME,SIZE,TYPE,MOUNTPOINT | grep "mmcblk")
if [ -n "$mmc_output" ]; then
echo "$mmc_output"
else
echo "No MMC drives found"
fi
# [Previous PCI BDF and disk ID sections remain the same...]
# Show SATA/Other Drives
echo -e "\n=== SATA/Block Drives ===\n"
printf "%-15s %-10s %-10s %-20s\n" "DEVICE" "SIZE" "TYPE" "MOUNTPOINT"
echo "------------------------------------------------------------"
sata_output=$(lsblk -o NAME,SIZE,TYPE,MOUNTPOINT | grep "disk" | grep -v "mmcblk")
if [ -n "$sata_output" ]; then
echo "$sata_output"
else
echo "No SATA drives found"
fi
# Add RAID Detection
echo -e "\n=== RAID Configuration ==="