Bagaimana menjalankan fsck saat boot ketika menggunakan Pi 3 dan Raspberry Jessie? Saya telah membaca beberapa tutorial tetapi berbeda.
Saya sudah lari sudo touch /forcefsck
tetapi apa lagi yang harus saya lakukan? Saya tahu bahwa saya harus menetapkan FSCKFIX = ya tetapi apa file yang benar? Beberapa mengatakan yang /lib/init/vars.sh
lain /etc/default/rcS
.
Bagaimana saya bisa memverifikasi bahwa pengaturan saya berfungsi? Saya tidak memiliki visibilitas ke layar. Ada pemadaman listrik sehingga ada risiko tinggi bahwa sistem file rusak.
Edit:
Saya mencoba dua solusi yang disebutkan di bawah ini.
1) Dengan menggunakan sudo shutdown -rF now
/var/log/boot.log mengatakan:
[^[[32m OK ^[[0m] Started Load/Save Random Seed.
[^[[32m OK ^[[0m] Started Show Plymouth Boot Screen.
[ 3.679250] systemd-fsck[219]: fsck.fat 3.0.27 (2014-11-12)
[ 3.681320] systemd-fsck[219]: /dev/mmcblk0p1: 124 files, 2666/8057 clusters
[^[[32m OK ^[[0m] Started File System Check on /dev/mmcblk0p1.
Mounting /boot...
[^[[32m OK ^[[0m] Reached target Paths.
[^[[32m OK ^[[0m] Created slice system-systemd\x2drfkill.slice.
Starting Load/Save RF Kill Switch Status of rfkill0...
[^[[32m OK ^[[0m] Started Load/Save RF Kill Switch Status of rfkill0.
[^[[32m OK ^[[0m] Created slice system-ifup.slice.
[^[[32m OK ^[[0m] Mounted /boot.
[^[[32m OK ^[[0m] Reached target Local File Systems.
Starting Tell Plymouth To Write Out Runtime Data...
Starting Create Volatile Files and Directories...
Starting LSB: Raise network interfaces....
[^[[32m OK ^[[0m] Reached target Remote File Systems.
Starting Trigger Flushing of Journal to Persistent Storage...
Starting LSB: Prepare console...
Starting LSB: Switch to ondemand cpu governor (unless shift key is pressed)...
[^[[32m OK ^[[0m] Started Tell Plymouth To Write Out Runtime Data.
2) Dengan menggunakan fsck.mode=force
dan fsck.repair=yes
dalam /boot/cmdline.txt
bootlog mengatakan:
[^[[32m OK ^[[0m] Started Show Plymouth Boot Screen.
[^[[32m OK ^[[0m] Reached target Paths.
[^[[32m OK ^[[0m] Created slice system-systemd\x2drfkill.slice.
[^[[32m OK ^[[0m] Created slice system-ifup.slice.
[ 5.749367] systemd-fsck[112]: Pass 2: Checking directory structure
[ 8.673500] systemd-fsck[112]: Pass 3: Checking directory connectivity
[ 8.683831] systemd-fsck[112]: Pass 4: Checking reference counts
[ 9.318835] systemd-fsck[112]: Pass 5: Checking group summary information
[ 9.518754] systemd-fsck[112]: /dev/mmcblk0p2: 131321/956160 files (0.2% non-contiguous$
[^[[32m OK ^[[0m] Started File System Check on Root Device.
Starting File System Check on /dev/mmcblk0p1...
Starting Remount Root and Kernel File Systems...
[^[[32m OK ^[[0m] Started Remount Root and Kernel File Systems.
Starting Load/Save RF Kill Switch Status of rfkill0...
Starting Load/Save Random Seed...
[^[[32m OK ^[[0m] Reached target Local File Systems (Pre).
[ 9.639259] systemd-fsck[239]: fsck.fat 3.0.27 (2014-11-12)
[^[[32m OK ^[[0m] Started Load/Save RF Kill Switch Status of rfkill0.
[ 9.644216] systemd-fsck[239]: /dev/mmcblk0p1: 124 files, 2666/8057 clusters
[^[[32m OK ^[[0m] Started File System Check on /dev/mmcblk0p1.
[^[[32m OK ^[[0m] Started Load/Save Random Seed.
Mounting /boot...
[^[[32m OK ^[[0m] Mounted /boot.
Mengapa file log sama sekali berbeda dalam dua kasus ini?
sudo shutdown -rF now
? Boot.log terlihat sangat berbeda.