One-Click DD System Network Reinstallation
AutoReinstall Script
1 | wget --no-check-certificate -O AutoReinstall.sh https://git.io/AutoReinstall.sh && bash AutoReinstall.sh |
Disk Expansion After Reinstallation
Use partitioning tools: Use fdisk or parted tools to delete and recreate the /dev/vda1 partition to utilize the entire disk space. For disks using a DOS partition table, here is an example using fdisk:
- Run
sudo fdisk /dev/vdato start thefdisktool. - Enter
pto display the current partition table and confirm the partition number of/dev/vda1. - Enter
dto delete a partition, then select the/dev/vda1partition. - Enter
nto create a new partition, select primary partition, partition number 1, use the default starting sector, and select default for the last sector to use all remaining space. - Enter
tto change the partition type, then select83(Linux). - Enter
ato make the partition bootable, if/dev/vda1is the boot partition. - Enter
wto write the changes and exitfdisk.
Important: These operations will delete all data on the /dev/vda1 partition. Make sure you have backed up your data.
Based on the disk information you provided, the total size of /dev/vda is approximately 42.9 GB, but the /dev/vda1 partition only uses about 1.5 GB of space, from sector 2048 to sector 3145727. To expand /dev/vda1 to use the remaining disk space, you need to perform several steps. Please note that these operations involve high risk, so be sure to back up all important data before proceeding.
Step 1: Delete and Recreate the /dev/vda1 Partition
Backup data: Before making any modifications, ensure all data on
/dev/vda1is backed up.Use partitioning tools: Use
fdiskorpartedtools to delete and recreate the/dev/vda1partition to utilize the entire disk space. For disks using a DOS partition table, here is an example usingfdisk:- Run
sudo fdisk /dev/vdato start thefdisktool. - Enter
pto display the current partition table and confirm the partition number of/dev/vda1. - Enter
dto delete a partition, then select the/dev/vda1partition. - Enter
nto create a new partition, select primary partition, partition number 1, use the default starting sector, and select default for the last sector to use all remaining space. - Enter
tto change the partition type, then select83(Linux). - Enter
ato make the partition bootable, if/dev/vda1is the boot partition. - Enter
wto write the changes and exitfdisk.
Important: These operations will delete all data on the
/dev/vda1partition. Make sure you have backed up your data.- Run
Step 2: Expand the File System
After recreating the partition and restarting the system (if necessary), you need to expand the file system to use the new partition size.
If the file system is ext4, use
resize2fs:sudo resize2fs /dev/vda1If the file system is XFS, use
xfs_growfs:sudo xfs_growfs /dev/vda1
Step 3: Verify
Use df -h or lsblk to verify that the size of the /dev/vda1 partition has been expanded as expected.
Supported Systems for Reinstallation
- Ubuntu 18.04/16.04
- Debian 9/10
- CentOS 6
- CentOS 7 (DD method) (password Pwd@CentOS)
- Custom DD Image
1 | # Windows 7 32-bit Chinese (Windows Thin PC): |
Features / Optimizations
- Automatically obtain IP address, gateway, and subnet mask
- Automatically detect network environment and select domestic or international mirrors to solve speed issues
- One-click for lazy users, no complex commands needed
- Resolve some issues in the Moe Club script that cause installation errors
- CentOS 7 image abandons LVM and returns to ext4 to reduce instability factors
Notes
- System passwords after reinstallation are provided in the script; please change the password as soon as possible after installation, the default password is provided by the script during installation, so pay attention to it. For Linux systems, key-based login is recommended.
- OpenVZ / LXC architecture systems are not applicable








