Arch-Linux
systemd - 啟動到緊急模式並出現錯誤 - /home 的依賴失敗
最近,我更新了我的 Arch Linux 安裝。我試著每兩週做一次。完成後,我重新啟動並收到一個錯誤,即 /home(我的主分區)的依賴項失敗。啟動過程立即進入緊急模式。我發現我的主分區根本沒有安裝。奇怪的是,我可以進入緊急模式,然後退出。之後,主分區掛載並且系統載入正常。
我應該提一下,我的主分區是btrfs,而我的根分區是**ext4。**我的
/etc/mkinitcpio.conf
文件中有一個 HOOK,可以在啟動時掃描 btrfs。它正在工作,因為我可以看到它輸出正在掃描 btrfs。它確實告訴我檢查輸出,
journalctl -xb
但是看不到為什麼我的主分區沒有安裝。我讀過類似的文章,說要檢查我
/etc/fstab
文件中主分區的 UUID。我的 fstab 文件中的所有內容看起來都不錯,但我決定放入一個拱形安裝 USB 並重新生成文件。那並沒有解決問題。這是我的 journalctl -xb 輸出的一部分:
-- Unit systemd-fsck@dev-disk-by\x2duuid-8244\x2d4C7C.service has begun starting up. Jul 20 01:46:35 aurora systemd[1]: home.mount: Bound to unit dev-disk-by\x2duuid-9f171b93\x2ddd7d\x2d4353\x2d84f8\x2d79c6f673f47f.device, but unit isn't active. Jul 20 01:46:35 aurora systemd[1]: Dependency failed for /home. -- Subject: Unit home.mount has failed -- Defined-By: systemd -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit home.mount has failed. -- -- The result is RESULT. Jul 20 01:46:35 aurora systemd[1]: Dependency failed for Local File Systems. -- Subject: Unit local-fs.target has failed -- Defined-By: systemd -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit local-fs.target has failed. -- -- The result is RESULT. Jul 20 01:46:35 aurora systemd[1]: local-fs.target: Job local-fs.target/start failed with result 'dependency'. Jul 20 01:46:35 aurora systemd[1]: local-fs.target: Triggering OnFailure= dependencies. Jul 20 01:46:35 aurora systemd[1]: home.mount: Job home.mount/start failed with result 'dependency'. Jul 20 01:46:35 aurora systemd[1]: Reached target Network. -- Subject: Unit network.target has finished start-up -- Defined-By: systemd -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit network.target has finished starting up. -- -- The start-up result is RESULT. Jul 20 01:46:35 aurora systemd[1]: Reached target Sockets. -- Subject: Unit sockets.target has finished start-up -- Defined-By: systemd -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit sockets.target has finished starting up. -- -- The start-up result is RESULT. Jul 20 01:46:35 aurora systemd[1]: Starting Create Volatile Files and Directories... -- Subject: Unit systemd-tmpfiles-setup.service has begun start-up -- Defined-By: systemd -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit systemd-tmpfiles-setup.service has begun starting up. Jul 20 01:46:35 aurora systemd[1]: Started Emergency Shell. -- Subject: Unit emergency.service has finished start-up -- Defined-By: systemd -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit emergency.service has finished starting up. -- -- The start-up result is RESULT. Jul 20 01:46:35 aurora systemd[1]: Reached target Emergency Mode. -- Subject: Unit emergency.target has finished start-up -- Defined-By: systemd -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit emergency.target has finished starting up. -- -- The start-up result is RESULT. Jul 20 01:46:35 aurora systemd[1]: Reached target Timers. -- Subject: Unit timers.target has finished start-up -- Defined-By: systemd -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit timers.target has finished starting up. -- -- The start-up result is RESULT. Jul 20 01:46:35 aurora systemd[1]: Mounting /home... -- Subject: Unit home.mount has begun start-up -- Defined-By: systemd -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit home.mount has begun starting up. Jul 20 01:46:35 aurora kernel: BTRFS info (device sdb3): disk space caching is enabled Jul 20 01:46:35 aurora kernel: BTRFS info (device sdb3): has skinny extents Jul 20 01:46:35 aurora systemd-fsck[305]: fsck.fat 4.1 (2017-01-24) Jul 20 01:46:35 aurora systemd-fsck[305]: /dev/sda6: 349 files, 3156/127746 clusters Jul 20 01:46:35 aurora systemd[1]: Started File System Check on /dev/disk/by-uuid/8244-4C7C. -- Subject: Unit systemd-fsck@dev-disk-by\x2duuid-8244\x2d4C7C.service has finished start-up -- Defined-By: systemd -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit systemd-fsck@dev-disk-by\x2duuid-8244\x2d4C7C.service has finished starting up.
這是我的
/etc/fstab
文件(出於安全原因,我故意刪除了其他 UUID):# /dev/sda5 UUID=XXXX-XXXX-XX / ext4 rw,relatime,data=ordered 0 1 # /dev/sda6 UUID=XXXX-XXXX-XX /boot/efi vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 2 # /dev/sdb3 UUID=9f171b93-dd7d-4353-84f8-79c6f673f47f /home btrfs rw,relatime,space_cache,subvolid=5,subvol=/ 0 0 # /dev/sda7 UUID=XXXX-XXXX-XX none swap defaults,pri=-2 0 0
這是
lsblk -f
(再次,出於安全原因,我故意刪除了我的其他 UUID)的輸出sda ├─sda1 vfat XXXX-XXXX-XX ├─sda2 ├─sda3 ntfs XXXX-XXXX-XX ├─sda4 ntfs XXXX-XXXX-XX ├─sda5 ext4 XXXX-XXXX-XX / ├─sda6 vfat XXXX-XXXX-XX /boot/efi └─sda7 swap XXXX-XXXX-XX [SWAP] sdb ├─sdb1 ├─sdb2 ntfs Games XXXX-XXXX-XX └─sdb3 btrfs 9f171b93-dd7d-4353-84f8-79c6f673f47f /home
如下所示,我檢查
dmesg
了其中的一部分:[ 2.055164] Btrfs loaded, crc32c=crc32c-intel [ 2.055509] BTRFS: device fsid 9f171b93-dd7d-4353-84f8-79c6f673f47f devid 1 transid 83839 /de v/sdb3 [ 2.086828] PM: Image not found (code -22) [ 2.340606] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null) [ 2.457135] systemd[1]: systemd 239 running in system mode. (+PAM -AUDIT -SELINUX -IMA -APPAR MOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTIL S +KMOD -IDN2 +IDN +PCRE2 default-hierarchy=hybrid) [ 2.473611] systemd[1]: Detected architecture x86-64. [ 2.478035] systemd[1]: Set hostname to <aurora>. [ 2.557974] systemd[1]: local-fs-pre.target: Wants dependency dropin /etc/systemd/system/loca l-fs-pre.target.wants/btrfs-dev-scan.service is not a symlink, ignoring. [ 2.567559] random: systemd: uninitialized urandom read (16 bytes read) [ 2.567629] systemd[1]: Started Dispatch Password Requests to Console Directory Watch. [ 2.567665] random: systemd: uninitialized urandom read (16 bytes read) [ 2.569028] systemd[1]: Created slice system-systemd\x2dfsck.slice. [ 2.569041] random: systemd: uninitialized urandom read (16 bytes read) [ 2.569246] systemd[1]: Created slice system-getty.slice. [ 2.569352] systemd[1]: Listening on udev Control Socket. [ 2.569422] systemd[1]: Listening on udev Kernel Socket. [ 2.569518] systemd[1]: Listening on Journal Socket (/dev/log). [ 2.583473] EXT4-fs (sda5): re-mounted. Opts: data=ordered [ 2.643252] systemd-journald[236]: Received request to flush runtime journal from PID 1 [ 2.729364] systemd-journald[236]: File /var/log/journal/cabc2f34b30c47f09c201422dfa880bd/sys tem.journal corrupted or uncleanly shut down, renaming and replacing. [ 3.001682] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4 [ 3.027930] rtc_cmos 00:02: RTC can wake from S4 [ 3.029174] rtc_cmos 00:02: registered as rtc0 [ 3.029191] rtc_cmos 00:02: alarms up to one month, y3k, 114 bytes nvram, hpet irqs [ 3.029493] i801_smbus 0000:00:1f.3: enabling device (0001 -> 0003) [ 3.029623] i801_smbus 0000:00:1f.3: SMBus using PCI interrupt [ 3.066003] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k [ 3.066005] e1000e: Copyright(c) 1999 - 2015 Intel Corporation. [ 3.066898] e1000e 0000:00:19.0: Interrupt Throttling Rate (ints/sec) set to dynamic conserva tive mode [ 3.084156] mousedev: PS/2 mouse device common for all mice [ 3.086094] input: PC Speaker as /devices/platform/pcspkr/input/input7 [ 3.092504] RAPL PMU: API unit is 2^-32 Joules, 3 fixed counters, 163840 ms ovfl timer [ 3.092506] RAPL PMU: hw unit of domain pp0-core 2^-16 Joules [ 3.092506] RAPL PMU: hw unit of domain package 2^-16 Joules [ 3.092507] RAPL PMU: hw unit of domain pp1-gpu 2^-16 Joules [ 3.094356] ipmi message handler version 39.2 [ 3.097517] ipmi device interface [ 3.102120] Linux agpgart interface v0.103 [ 3.145910] iTCO_vendor_support: vendor-support=0 [ 3.150461] iTCO_wdt: Intel TCO WatchDog Timer Driver v1.11 [ 3.150494] gpio_ich: GPIO from 436 to 511 on gpio_ich [ 3.150597] iTCO_wdt: Found a Cougar Point TCO device (Version=2, TCOBASE=0x0460) [ 3.153467] iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0) [ 3.189732] Adding 3288640k swap on /dev/sda7. Priority:-2 extents:1 across:3288640k SSFS [ 3.232407] e1000e 0000:00:19.0 0000:00:19.0 (uninitialized): registered PHC clock [ 3.235465] sdb: sdb1 sdb2 sdb3 [ 3.301961] BTRFS info (device sdb3): disk space caching is enabled [ 3.301964] BTRFS info (device sdb3): has skinny extents
我想永久的解決方案是從 BTRFS 分區複製所有內容,將其重新格式化為 EXT4,然後將文件放回上面。我不一定想這樣做,因為這需要很多時間,但這可能是需要做的。
任何幫助將不勝感激,我覺得我已經嘗試了我所知道的一切。
如果您需要任何其他輸出或日誌,請告訴我。
將
-netdev
選項添加到fstab
“/home”的條目中。看來掛載的依賴是網路管理堆棧。