leitbogioro / Tools

Something about tools
3.06k stars 472 forks source link

GCP DD 失败。 #39

Closed jackjieYYY closed 1 year ago

jackjieYYY commented 1 year ago

根据这两个issues,已关闭vtpm和安全启动。 https://github.com/leitbogioro/Tools/issues/34 https://github.com/leitbogioro/Tools/issues/24

以下是创建机器的命令已经相关截图 gcloud compute instances create instance-2 \ --project=wide-hulling-397305 \ --zone=asia-east2-c \ --machine-type=e2-medium \ --network-interface=network-tier=PREMIUM,stack-type=IPV4_ONLY,subnet=default \ --maintenance-policy=MIGRATE \ --provisioning-model=STANDARD \ --service-account=1036741348920-compute@developer.gserviceaccount.com \ --scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/trace.append \ --enable-display-device \ --tags=http-server,https-server \ --create-disk=auto-delete=yes,boot=yes,device-name=instance-2,image=projects/ubuntu-os-cloud/global/images/ubuntu-2004-focal-v20230817,mode=rw,size=30,type=projects/wide-hulling-397305/zones/us-west4-b/diskTypes/pd-balanced \ --no-shielded-secure-boot \ --no-shielded-vtpm \ --no-shielded-integrity-monitoring \ --labels=goog-ec-src=vm_add-gcloud \ --reservation-affinity=any

ND1~AM J F{A_X`{YL7R0(5 $0%I}KAG88BACSGKF78_G9F

具体操作: sudo -i wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh bash InstallNET.sh -debian reboot

失败后的screenshot

3%AHO$ZOM$3%O`}AOT%@D7U

jackjieYYY commented 1 year ago

知道原因了, 要用相同的系统进行DD,gcp创建vps的时候要选Debian,才能dd到debian

leitbogioro commented 1 year ago

GCP重装时还有一点需要注意,虽然读取原系统中网络配置文件,发现是以动态方法配置的网络,但重装时必须要附带 --network "static" ,来强制让安装程序静态配置网络,这点对某些OVH机型也一样