Skip to content

Commit

Permalink
Update lvm-test.sh
Browse files Browse the repository at this point in the history
feat: Add partition table validation and repair option before disk setup

- Prompt the user to fix invalid GPT/MBR structures before proceeding with disk setup
- Added an option to reset and clean partition tables in case of disk issues
- Improved reliability for installations on disks with existing corrupted partition tables
  • Loading branch information
yuceltoluyag committed Aug 17, 2024
1 parent 5760ef0 commit 68c400c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lvm-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ lsblk -o NAME,SIZE,TYPE,MOUNTPOINT
echo "Kurulum diskinizi belirleyin (örneğin /dev/sda):"
read -r DISK

# Diskte geçersiz GPT veya MBR hataları varsa düzeltme adımları
echo "Diskteki geçersiz partition tablolarını düzeltmek ister misiniz? (y/n)"
read -r FIX_PARTITIONS
if [ "$FIX_PARTITIONS" == "y" ]; then
sgdisk -Z "$DISK"
echo "Geçersiz GPT ve MBR tabloları temizlendi. Yeni bir GPT tablosu oluşturuluyor..."
gdisk "$DISK"
fi

# Disk bölümlendirme ve formatlama (UEFI)
sgdisk -Z "$DISK"
gdisk "$DISK"
Expand Down

0 comments on commit 68c400c

Please sign in to comment.