• UUID Configuration Check
Ensures that the /boot and /boot/efi partitions have valid UUID entries in the
/etc/fstab file.
o
If any UUIDs are missing, the
script automatically generates and updates them to maintain proper system
mapping.
• Space Assessment
Evaluates the current size and available free space of the /boot partition.
o
If the total size is less than
300 MB or free space is below 115 MB, the script initiates the migration
process.
o
If both thresholds are met, the
script exits gracefully, indicating no action is required.
2. Scenario 1: Migration to an Unlabelled 1 GB Disk
• SCSI Bus Scan - Performs a scan to detect newly attached disks.
• Disk Identification - Searches for an available 1 GB unlabelled and unpartitioned disk suitable for migration.
• Automated Migration Process
If a suitable disk is found, the script:
o Partitions and prepares the disk for use.
o Labels the new partition and configures it as the /boot partition.
o Updates the /etc/fstab file with the new partition’s UUID.
o Updates GRUB and regenerates the GRUB configuration.
• Post-Migration - After migration, details of the /boot/efi partition may temporarily disappear. These changes will be fully visible after a system reboot.
• A manual reboot is necessary to finalize the migration and verify all changes.
3. Scenario 2: Migration to an Existing
Disk with More Than 1 GB Free Space