You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-machines/troubleshooting/linux-virtual-machine-cannot-start-fstab-errors.md
+42-6Lines changed: 42 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ The following are examples of possible errors.
33
33
[[1;33mDEPEND[0m] Dependency failed for /data.
34
34
[[1;33mDEPEND[0m] Dependency failed for Local File Systems.
35
35
…
36
-
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.
36
+
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.
37
37
Give root password for maintenance
38
38
(or type Control-D to continue)
39
39
```
@@ -44,9 +44,9 @@ Give root password for maintenance
44
44
Checking file systems…
45
45
fsck from util-linux 2.19.1
46
46
Checking all file systems.
47
-
/dev/sdc1: nonexistent device (“nofail” fstab option may be used to skip this device)
48
-
/dev/sdd1: nonexistent device (“nofail” fstab option may be used to skip this device)
49
-
/dev/sde1: nonexistent device (“nofail” fstab option may be used to skip this device)
47
+
/dev/sdc1: nonexistent device ("nofail" fstab option may be used to skip this device)
48
+
/dev/sdd1: nonexistent device ("nofail" fstab option may be used to skip this device)
49
+
/dev/sde1: nonexistent device ("nofail" fstab option may be used to skip this device)
50
50
51
51
[/sbin/fsck.ext3 (1) — /CODE] sck.ext3 -a /dev/sdc1
52
52
fsck.ext3: No such file or directory while trying to open /dev/sdc1
@@ -87,7 +87,7 @@ fsck.ext4: Unable to resolve UUID="<UUID>"
87
87
*** when you leave the shell.
88
88
*** Warning — SELinux is active
89
89
*** Disabling security enforcement for system recovery.
@@ -101,6 +101,42 @@ To resolve this problem, start the VM in emergency mode by using the serial cons
101
101
102
102
## Use the serial console
103
103
104
+
### Using Single User Mode
105
+
106
+
1. Connect to [the serial console](https://docs.microsoft.com/azure/virtual-machines/troubleshooting/serial-console-linux).
107
+
2. Use serial console to take single user mode [single user mode](https://docs.microsoft.com/archive/blogs/linuxonazure/why-proactively-ensuring-you-have-access-to-grub-and-sysrq-in-your-linux-vm-could-save-you-lots-of-down-time#RH6x)
108
+
3. Once the vm has booted into single user mode. Use your favorite text editor to open the fstab file.
109
+
110
+
```
111
+
# nano /etc/fstab
112
+
```
113
+
114
+
4. Review the listed file systems. Each line in the fstab file indicates a file system that is mounted when the VM starts. For more information about the syntax of the fstab file, run the man fstab command. To troubleshoot a start failure, review each line to make sure that it's correct in both structure and content.
115
+
116
+
> [!Note]
117
+
> * Fields on each line are separated by tabs or spaces. Blank lines are ignored. Lines that have a number sign (#) as the first character are comments. Commented lines can remain in the fstab file, but they won't be processed. We recommend that you comment fstab lines that you're unsure about instead of removing the lines.
118
+
> * For the VM to recover and start, the file system partitions should be the only required partitions. The VM may experience application errors about additional commented partitions. However, the VM should start without the additional partitions. You can later uncomment any commented lines.
119
+
> * We recommend that you mount data disks on Azure VMs by using the UUID of the file system partition. For example, run the following command: ``/dev/sdc1: LABEL="cloudimg-rootfs" UUID="<UUID>" TYPE="ext4" PARTUUID="<PartUUID>"``
120
+
> * To determine the UUID of the file system, run the blkid command. For more information about the syntax, run the man blkid command.
121
+
> * The nofail option helps make sure that the VM starts even if the file system is corrupted or the file system doesn't exist at startup. We recommend that you use the nofail option in the fstab file to enable startup to continue after errors occur in partitions that are not required for the VM to start.
122
+
123
+
5. Change or comment out any incorrect or unnecessary lines in the fstab file to enable the VM to start correctly.
124
+
125
+
6. Save the changes to the fstab file.
126
+
127
+
7. Reboot the vm using the below command.
128
+
129
+
```
130
+
# reboot -f
131
+
```
132
+
> [!Note]
133
+
> You can also use "ctrl+x" command which would also reboot the vm.
134
+
135
+
136
+
8. If the entries comment or fix was successful, the system should reach a bash prompt in the portal. Check whether you can connect to the VM.
137
+
138
+
### Using Root Password
139
+
104
140
1. Connect to [the serial console](https://docs.microsoft.com/azure/virtual-machines/troubleshooting/serial-console-linux).
105
141
2. Sign-in to the system by using a local user and password.
106
142
@@ -153,7 +189,7 @@ To resolve this problem, start the VM in emergency mode by using the serial cons
153
189
154
190
2. After you mount the system disk as a data disk on the recovery VM, back up the fstab file before you make changes, and then follow the next steps to correct the fstab file.
155
191
156
-
3.Look for the error that indicates the disk wasn't mounted. In the following example, the system was trying to attach a disk that was no longer present:
192
+
3.Look for the error that indicates the disk wasn't mounted. In the following example, the system was trying to attach a disk that was no longer present:
0 commit comments