AutoReinstall Script

1
2
3
4
wget --no-check-certificate -O AutoReinstall.sh https://git.io/AutoReinstall.sh && bash AutoReinstall.sh

#Version available in China
bash <(wget --no-check-certificate -qO- https://cdn.jsdelivr.net/gh/hiCasper/Shell@master/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/vda to start the fdisk tool.
  • Enter p to display the current partition table and confirm the partition number of /dev/vda1.
  • Enter d to delete a partition, then select the /dev/vda1 partition.
  • Enter n to 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 t to change the partition type, then select 83 (Linux).
  • Enter a to make the partition bootable, if /dev/vda1 is the boot partition.
  • Enter w to write the changes and exit fdisk.

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

  1. Backup data: Before making any modifications, ensure all data on /dev/vda1 is backed up.

  2. 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/vda to start the fdisk tool.
    • Enter p to display the current partition table and confirm the partition number of /dev/vda1.
    • Enter d to delete a partition, then select the /dev/vda1 partition.
    • Enter n to 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 t to change the partition type, then select 83 (Linux).
    • Enter a to make the partition bootable, if /dev/vda1 is the boot partition.
    • Enter w to write the changes and exit fdisk.

    Important: These operations will delete all data on the /dev/vda1 partition. Make sure you have backed up your data.

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/vda1

  • If 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
2
3
4
5
6
7
8
9
10
11
12
13
14
# Windows 7 32-bit Chinese (Windows Thin PC):
https://image.moeclub.org/GoogleDrive/1srhylymTjYS-Ky8uLw4R6LCWfAo1F3s7
https://moeclub.org/onedrive/IMAGE/Windows/win7emb_x86.tar.gz

# Windows 8.1 SP1 64-bit Chinese (Embedded):
https://image.moeclub.org/GoogleDrive/1cqVl2wSGx92UTdhOxU9pW3wJgmvZMT_J
https://moeclub.org/onedrive/IMAGE/Windows/win8.1emb_x64.tar.gz

# Windows 10 ltsc 64-bit Chinese:
https://image.moeclub.org/GoogleDrive/1OVA3t-ZI2arkM4E4gKvofcBN9aoVdneh
https://moeclub.org/onedrive/IMAGE/Windows/win10ltsc_x64.tar.gz
Default username: Administrator

Default password: Vicer

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