1 頁 (共 1 頁)

DigitalOcean System Recovery

發表於 : 2015-08-10 14:03:02
yehlu
系統不能起動
出現在錯誤的 swapfile
通知DigitalOcean
他們會放入 Recovery ISO
讓您進救援模式來修護

代碼: 選擇全部

root@do1:/home/yehlu# sudo dd if=/dev/zero of=/swapfile bs=1024 count=250000
250000+0 records in
250000+0 records out
256000000 bytes (256 MB) copied, 2.34085 s, 109 MB/s
root@do1:/home/yehlu# ls -lh /swapfile
-rw-r--r-- 1 root root 245M Aug 10 13:57 /swapfile
root@do1:/home/yehlu# sudo chmod 600 /swapfile
root@do1:/home/yehlu# ls -lh /swapfile
-rw------- 1 root root 245M Aug 10 13:57 /swapfile
root@do1:/home/yehlu# sudo mkswap /swapfile
Setting up swapspace version 1, size = 249996 KiB
no label, UUID=3f1fe489-06d1-438f-b73e-cbc00d5311c7
root@do1:/home/yehlu# sudo swapon /swapfile
root@do1:/home/yehlu# sudo swapon -s
Filename				Type		Size	Used	Priority
/swapfile                               file		249996	0	-1