起動に関する問題については、Linux VM のシリアル コンソールでブートログを確認することを強くおすすめします。VM が緊急モードになり、fstab に問題があることを示すエラー メッセージが表示されます。
[K[[1;31m TIME [0m] Timed out waiting for device dev-incorrect.device.
[[1;33mDEPEND[0m] Dependency failed for /distribution.
[[1;33mDEPEND[0m] Dependency failed for Local File Systems.
...
Welcome to emergency mode! After logging in, type "journalctl -xb" to viewsystem logs, "systemctl reboot" to reboot, "systemctl default" to try again to boot into default mode.
Give root password for maintenance
(or type Control-D to continue)
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-21 UTC。"],[[["\u003cp\u003eFstab is a configuration file in Linux VMs that defines how disk partitions, file systems, and file shares persist across reboots, and misconfigurations can lead to boot problems.\u003c/p\u003e\n"],["\u003cp\u003eCommon fstab issues include syntax errors, incorrect UUIDs, entries for unavailable devices, and deprecated mount options, which can cause the VM to enter emergency mode.\u003c/p\u003e\n"],["\u003cp\u003eTroubleshooting fstab errors can be achieved through the serial console by logging into the VM in emergency mode with the root password or by using single-user mode if the root password is not set.\u003c/p\u003e\n"],["\u003cp\u003eThe preferred method for resolving fstab issues is typically using the serial console to edit and correct the /etc/fstab file directly, as this is often faster than manual methods.\u003c/p\u003e\n"],["\u003cp\u003eIn cases where neither emergency mode nor single-user mode are viable, rescuing the VM as a last resort is an option to recover from fstab related issues.\u003c/p\u003e\n"]]],[],null,["# Troubleshoot Linux VM boot issues due to fstab errors\n\n*** ** * ** ***\n\nFstab (file system table) is a configuration file that is used to define how\ndisk partition, file system, and file share mounts in your Linux VM persist\nacross system reboots.\n\nThis document outlines multiple conditions where an incorrect fstab\nconfiguration may result in a boot problem and offers troubleshooting\nadvice to fix the issue.\n\nA few of the common issues with fstab misconfiguration are listed below:\n\n- Syntax error in `fstab` configuration file\n- An incorrect UUID\n- An entry exists for an unattached/unavailable device\n- Deprecated mount options like `nobarrier` for the xfs file system type in [SUSE](https://www.suse.com/c/xfs-nobarrier-option-is-now-more-than-deprecated) or [RHEL](https://access.redhat.com/solutions/5315771) images.\n\nBefore you begin\n----------------\n\n- If you want to log serial port output in Cloud Logging, familiarize yourself with [Cloud Logging](/logging).\n- If you haven't already, set up [authentication](/compute/docs/authentication). Authentication verifies your identity for access to Google Cloud services and APIs. To run code or samples from a local development environment, you can authenticate to Compute Engine by selecting one of the following options:\n\n Select the tab for how you plan to use the samples on this page: \n\n ### Console\n\n\n When you use the Google Cloud console to access Google Cloud services and\n APIs, you don't need to set up authentication.\n\n ### gcloud\n\n 1.\n [Install](/sdk/docs/install) the Google Cloud CLI.\n\n After installation,\n [initialize](/sdk/docs/initializing) the Google Cloud CLI by running the following command:\n\n ```bash\n gcloud init\n ```\n\n\n If you're using an external identity provider (IdP), you must first\n [sign in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n | **Note:** If you installed the gcloud CLI previously, make sure you have the latest version by running `gcloud components update`.\n 2. [Set a default region and zone](/compute/docs/gcloud-compute#set_default_zone_and_region_in_your_local_client).\n\n ### REST\n\n\n To use the REST API samples on this page in a local development environment, you use the\n credentials you provide to the gcloud CLI.\n 1. [Install](/sdk/docs/install) the Google Cloud CLI. After installation, [initialize](/sdk/docs/initializing) the Google Cloud CLI by running the following command: \n\n ```bash\n gcloud init\n ```\n 2. If you're using an external identity provider (IdP), you must first [sign in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n\n\n For more information, see\n [Authenticate for using REST](/docs/authentication/rest)\n in the Google Cloud authentication documentation.\n\nIdentify fstab issues\n---------------------\n\nFor boot issues, Google highly recommendeds that you check the boot logs\nin the Serial Console of the Linux VM. The VM goes into emergency mode\nwith an error message hinting that the issue is with fstab.\n\n\u003cbr /\u003e\n\n```\n [K[[1;31m TIME [0m] Timed out waiting for device dev-incorrect.device.\n [[1;33mDEPEND[0m] Dependency failed for /distribution.\n [[1;33mDEPEND[0m] Dependency failed for Local File Systems.\n ...\n Welcome to emergency mode! After logging in, type \"journalctl -xb\" to viewsystem logs, \"systemctl reboot\" to reboot, \"systemctl default\" to try again to boot into default mode.\n Give root password for maintenance\n (or type Control-D to continue)\n \n```\n\n\u003cbr /\u003e\n\nAs per the error message, there is dependency failure for the `/distribution`\nfile system. The dependency failure for a file system mount point will differ\nbased on the file system names used.\n\nResolution\n----------\n\nUse the following options to solve the `fstab` error in Linux VMs hosted\nin Google Cloud. You can resolve the issue faster using the serial console\nthan using the manual method.\n| **Note:** To fix the issue from emergency mode, you must have the root password. By default, a root password is not set on Google provided Linux images. If you didn't set a root password, use [Option 2](#option2) instead.\n\nTo use the following methods to resolve the fstab issue, you must\n[enable serial port access for your VM](/compute/docs/troubleshooting/troubleshooting-using-serial-console#enable_instance_access).\n\n### Option 1: Use the serial console to log into the VM in emergency mode\n\n1. Log into the serial console of the VM from Google Cloud console.\n\n2. In the current emergency mode, enter the root password to access your VM.\n\n3. Use your favorite text editor to open the `fstab` file. Make the\n necessary changes and save the changes to the `fstab` file. In the\n following example, the `vi` editor is used.\n\n ```\n vi /etc/fstab\n ```\n\n In the previous example, the device for `/distribution` is detached from\n the VM. Comment the line that references the file system or remove the\n fstab entry for `/distribution` mount point.\n\n Use `man fstab` for more\n details about the fstab configuration and syntax.\n4. Save the file and exit the editor. If you are using the `vi` editor, use\n `ESC` + `:wq!` to save and exit the editor.\n\n5. Resume the boot process by entering **reboot** at the prompt.\n\n6. After successfully fixing the issue, the VM boot process should complete\n and the login prompt appears in the serial console.\n\n7. Verify you can log in to the VM again using SSH.\n\n### Option 2 - Using Single User mode in Serial Console\n\nThis option can be used if the root password is not set.\n\nPrerequisite: The `GRUB_TIMEOUT` parameter in the grub configuration file\nmust be set to a non-zero value. Usually this file is at\n`/etc/default/grub`, but on some earlier distributions, it might be located\nin a non-standard directory.\n\n1. Go to the VM instances page in the Google Cloud console.\n\n [Go to VM instances](https://console.cloud.google.com/compute/instances)\n\n2. Log into the serial console of the Virtual Machine from the\n Google Cloud console.\n\n3. Click **RESET** for virtual machine from Google Cloud Console.\n\n4. In the serial console window, interrupt the boot process by clicking the\n arrow key to pause in the grub screen or menu.\n\n5. In the list of kernels in the grub boot loader screen, choose the kernel\n and press `e` on the keyboard.\n\n6. Add the `rd.break` parameter at the end of the kernel line and press\n `ctrl`+`x`. This helps in booting the VM into single user mode.\n\n | **Note:** The `rd.break` parameter works for RHEL, CENTOS, Oracle Linux, SUSE Operating Systems. This parameter isn't a persistent entry so no changes are required after boot. For Ubuntu 18.04, 20.04 and 22.04 LTS, you can add `systemd.unit=rescue.target` to boot into rescue mode which is similar to single user mode.\n7. Mount the root file system in read write mode.\n\n8. Analyze, make necessary change and save `fstab` file. Use `man fstab` for more\n details about configuration and syntax. Use your favorite text editor to\n open the `fstab` file. In the below example, the vi editor is used.\n\n ```\n vi /etc/fstab\n ```\n\n In this example, the device for `/distribution` is detached from the VM,\n so comment the line or remove the fstab entry for the `/distribution`\n mount point.\n9. Save the file and exit from the editor. If you are using the vi editor, then use\n `ESC` + `:wq!` to save and exit from fstab.\n\n10. Resume the boot process by entering `reboot` at the prompt.\n\n11. After successfully fixing the issue, the VM boot process should complete and\n you should see the login prompt in the serial console.\n\n12. Verify you can log in to the VM using SSH.\n\n### Option 3 - Rescue the VM\n\nThis option can be used if the root password is not set or if you can't use\nsingle user mode.\n\nFor more information, see\n[Rescue an inaccessible VM](/compute/docs/troubleshooting/rescue-vm)."]]