How to fix boot failure due to incorrect fstab?
Clash Royale CLAN TAG#URR8PPP
up vote
19
down vote
favorite
It seems that I have added incorrect record to /etc/fstab
:
//servername/share /mnt/share cifs defaults,username=myuser 0 0
When I did mount -a
, it asked user password to mount network share. It seems that it cannot proceed without password on boot, so it is just hung.
How can I fix fstab to prevent boot failure?
rhel boot mount fstab
add a comment |Â
up vote
19
down vote
favorite
It seems that I have added incorrect record to /etc/fstab
:
//servername/share /mnt/share cifs defaults,username=myuser 0 0
When I did mount -a
, it asked user password to mount network share. It seems that it cannot proceed without password on boot, so it is just hung.
How can I fix fstab to prevent boot failure?
rhel boot mount fstab
add a comment |Â
up vote
19
down vote
favorite
up vote
19
down vote
favorite
It seems that I have added incorrect record to /etc/fstab
:
//servername/share /mnt/share cifs defaults,username=myuser 0 0
When I did mount -a
, it asked user password to mount network share. It seems that it cannot proceed without password on boot, so it is just hung.
How can I fix fstab to prevent boot failure?
rhel boot mount fstab
It seems that I have added incorrect record to /etc/fstab
:
//servername/share /mnt/share cifs defaults,username=myuser 0 0
When I did mount -a
, it asked user password to mount network share. It seems that it cannot proceed without password on boot, so it is just hung.
How can I fix fstab to prevent boot failure?
rhel boot mount fstab
edited Feb 10 '14 at 15:07
Pro Backup
1,91452853
1,91452853
asked Jul 26 '12 at 13:10
altern
78731120
78731120
add a comment |Â
add a comment |Â
5 Answers
5
active
oldest
votes
up vote
25
down vote
accepted
It seems that I've found a solution:
- at the grub prompt, hit a to append options
- add
init=/bin/bash
to the end of the kernel command line and press enter
The system will boot to a prompt like 'bash-3.2#' enter the following commands at the prompt
mount -o remount,rw /
vim /etc/fstab
edit the fstab file commenting the errors by adding a # at the begining of each problematic line, save the file
- reboot by pressing CTRL+ALT+DEL
2
I had to usemount -o remount,rw / --target /
to succesfully remount in rw mode. Elsecase mount was picking the bad values from/etc/fstab
, see theman mount
for details.
â laconbass
Oct 18 '16 at 12:14
@laconbass you are damn right,--target /
is the key!
â sempasha
Jul 28 '17 at 16:46
add a comment |Â
up vote
2
down vote
How about removing the entry, creating a snapshot and then trying to change your /etc/fstab so you have a working snapshot you can roll back to?
According to the manpage mount.cifs
you can also specify a password via password=arg
. Also, according to that manpage there is no argument username=arg
but instead user=arg
. But it might be different on your system, better check your manpage for the correct argument names.
man
for the win.
â Tim
Jul 26 '12 at 13:22
I was about to create snapshot, but while I was experimenting withfstab
, vm instance went off for some reason. Apparently, I wouldn't ask the question if I could fix it myself.
â altern
Jul 26 '12 at 13:31
2
Your problem description is a little bit unclear. Can't you boot in single user / recovery mode? It should only try to mount the root fs and leave the fstab alone.
â scai
Jul 26 '12 at 13:54
add a comment |Â
up vote
0
down vote
The other easy way is booting to live-cd mode and mount the right partition. Then you can fix anything you want!
add a comment |Â
up vote
0
down vote
I found a solution to systems error kernel not loading
Use live cd to gain access to your existing installation. Once in reinstall Linux kernel :
pacman -S Linux
Then delete the fstab file from etc/fstab :
rm /etc/fstab
Now reinstall systemd:
pacman -S systemd
When reinstalling systemd it will automatically generate a new fstab file
Now reinstall the bootloader
in this case I use grub:
pacman -S grub os-prober
(os probe is useful if you have more than 1 os installed on your hdd/ssd)
Then
grub-install --target=i386-pc /dev/sda
Once finished make the configuration files:
grub-mkconfig -o /boot/grub/grub.cfg
Then unmount the partitions in use and reboot
umount /dev/sdX
reboot
This should fix the problem, it worked for me.
add a comment |Â
up vote
0
down vote
May be I am too late. But this is FYI. In this situation you can use nano to load fstab and you can restart after editing the fstab.
sudo nano /etc/fstab
add a comment |Â
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
25
down vote
accepted
It seems that I've found a solution:
- at the grub prompt, hit a to append options
- add
init=/bin/bash
to the end of the kernel command line and press enter
The system will boot to a prompt like 'bash-3.2#' enter the following commands at the prompt
mount -o remount,rw /
vim /etc/fstab
edit the fstab file commenting the errors by adding a # at the begining of each problematic line, save the file
- reboot by pressing CTRL+ALT+DEL
2
I had to usemount -o remount,rw / --target /
to succesfully remount in rw mode. Elsecase mount was picking the bad values from/etc/fstab
, see theman mount
for details.
â laconbass
Oct 18 '16 at 12:14
@laconbass you are damn right,--target /
is the key!
â sempasha
Jul 28 '17 at 16:46
add a comment |Â
up vote
25
down vote
accepted
It seems that I've found a solution:
- at the grub prompt, hit a to append options
- add
init=/bin/bash
to the end of the kernel command line and press enter
The system will boot to a prompt like 'bash-3.2#' enter the following commands at the prompt
mount -o remount,rw /
vim /etc/fstab
edit the fstab file commenting the errors by adding a # at the begining of each problematic line, save the file
- reboot by pressing CTRL+ALT+DEL
2
I had to usemount -o remount,rw / --target /
to succesfully remount in rw mode. Elsecase mount was picking the bad values from/etc/fstab
, see theman mount
for details.
â laconbass
Oct 18 '16 at 12:14
@laconbass you are damn right,--target /
is the key!
â sempasha
Jul 28 '17 at 16:46
add a comment |Â
up vote
25
down vote
accepted
up vote
25
down vote
accepted
It seems that I've found a solution:
- at the grub prompt, hit a to append options
- add
init=/bin/bash
to the end of the kernel command line and press enter
The system will boot to a prompt like 'bash-3.2#' enter the following commands at the prompt
mount -o remount,rw /
vim /etc/fstab
edit the fstab file commenting the errors by adding a # at the begining of each problematic line, save the file
- reboot by pressing CTRL+ALT+DEL
It seems that I've found a solution:
- at the grub prompt, hit a to append options
- add
init=/bin/bash
to the end of the kernel command line and press enter
The system will boot to a prompt like 'bash-3.2#' enter the following commands at the prompt
mount -o remount,rw /
vim /etc/fstab
edit the fstab file commenting the errors by adding a # at the begining of each problematic line, save the file
- reboot by pressing CTRL+ALT+DEL
edited Jul 2 '15 at 11:51
elijahbee
34
34
answered Jul 26 '12 at 14:20
altern
78731120
78731120
2
I had to usemount -o remount,rw / --target /
to succesfully remount in rw mode. Elsecase mount was picking the bad values from/etc/fstab
, see theman mount
for details.
â laconbass
Oct 18 '16 at 12:14
@laconbass you are damn right,--target /
is the key!
â sempasha
Jul 28 '17 at 16:46
add a comment |Â
2
I had to usemount -o remount,rw / --target /
to succesfully remount in rw mode. Elsecase mount was picking the bad values from/etc/fstab
, see theman mount
for details.
â laconbass
Oct 18 '16 at 12:14
@laconbass you are damn right,--target /
is the key!
â sempasha
Jul 28 '17 at 16:46
2
2
I had to use
mount -o remount,rw / --target /
to succesfully remount in rw mode. Elsecase mount was picking the bad values from /etc/fstab
, see the man mount
for details.â laconbass
Oct 18 '16 at 12:14
I had to use
mount -o remount,rw / --target /
to succesfully remount in rw mode. Elsecase mount was picking the bad values from /etc/fstab
, see the man mount
for details.â laconbass
Oct 18 '16 at 12:14
@laconbass you are damn right,
--target /
is the key!â sempasha
Jul 28 '17 at 16:46
@laconbass you are damn right,
--target /
is the key!â sempasha
Jul 28 '17 at 16:46
add a comment |Â
up vote
2
down vote
How about removing the entry, creating a snapshot and then trying to change your /etc/fstab so you have a working snapshot you can roll back to?
According to the manpage mount.cifs
you can also specify a password via password=arg
. Also, according to that manpage there is no argument username=arg
but instead user=arg
. But it might be different on your system, better check your manpage for the correct argument names.
man
for the win.
â Tim
Jul 26 '12 at 13:22
I was about to create snapshot, but while I was experimenting withfstab
, vm instance went off for some reason. Apparently, I wouldn't ask the question if I could fix it myself.
â altern
Jul 26 '12 at 13:31
2
Your problem description is a little bit unclear. Can't you boot in single user / recovery mode? It should only try to mount the root fs and leave the fstab alone.
â scai
Jul 26 '12 at 13:54
add a comment |Â
up vote
2
down vote
How about removing the entry, creating a snapshot and then trying to change your /etc/fstab so you have a working snapshot you can roll back to?
According to the manpage mount.cifs
you can also specify a password via password=arg
. Also, according to that manpage there is no argument username=arg
but instead user=arg
. But it might be different on your system, better check your manpage for the correct argument names.
man
for the win.
â Tim
Jul 26 '12 at 13:22
I was about to create snapshot, but while I was experimenting withfstab
, vm instance went off for some reason. Apparently, I wouldn't ask the question if I could fix it myself.
â altern
Jul 26 '12 at 13:31
2
Your problem description is a little bit unclear. Can't you boot in single user / recovery mode? It should only try to mount the root fs and leave the fstab alone.
â scai
Jul 26 '12 at 13:54
add a comment |Â
up vote
2
down vote
up vote
2
down vote
How about removing the entry, creating a snapshot and then trying to change your /etc/fstab so you have a working snapshot you can roll back to?
According to the manpage mount.cifs
you can also specify a password via password=arg
. Also, according to that manpage there is no argument username=arg
but instead user=arg
. But it might be different on your system, better check your manpage for the correct argument names.
How about removing the entry, creating a snapshot and then trying to change your /etc/fstab so you have a working snapshot you can roll back to?
According to the manpage mount.cifs
you can also specify a password via password=arg
. Also, according to that manpage there is no argument username=arg
but instead user=arg
. But it might be different on your system, better check your manpage for the correct argument names.
answered Jul 26 '12 at 13:21
scai
6,09221734
6,09221734
man
for the win.
â Tim
Jul 26 '12 at 13:22
I was about to create snapshot, but while I was experimenting withfstab
, vm instance went off for some reason. Apparently, I wouldn't ask the question if I could fix it myself.
â altern
Jul 26 '12 at 13:31
2
Your problem description is a little bit unclear. Can't you boot in single user / recovery mode? It should only try to mount the root fs and leave the fstab alone.
â scai
Jul 26 '12 at 13:54
add a comment |Â
man
for the win.
â Tim
Jul 26 '12 at 13:22
I was about to create snapshot, but while I was experimenting withfstab
, vm instance went off for some reason. Apparently, I wouldn't ask the question if I could fix it myself.
â altern
Jul 26 '12 at 13:31
2
Your problem description is a little bit unclear. Can't you boot in single user / recovery mode? It should only try to mount the root fs and leave the fstab alone.
â scai
Jul 26 '12 at 13:54
man
for the win.â Tim
Jul 26 '12 at 13:22
man
for the win.â Tim
Jul 26 '12 at 13:22
I was about to create snapshot, but while I was experimenting with
fstab
, vm instance went off for some reason. Apparently, I wouldn't ask the question if I could fix it myself.â altern
Jul 26 '12 at 13:31
I was about to create snapshot, but while I was experimenting with
fstab
, vm instance went off for some reason. Apparently, I wouldn't ask the question if I could fix it myself.â altern
Jul 26 '12 at 13:31
2
2
Your problem description is a little bit unclear. Can't you boot in single user / recovery mode? It should only try to mount the root fs and leave the fstab alone.
â scai
Jul 26 '12 at 13:54
Your problem description is a little bit unclear. Can't you boot in single user / recovery mode? It should only try to mount the root fs and leave the fstab alone.
â scai
Jul 26 '12 at 13:54
add a comment |Â
up vote
0
down vote
The other easy way is booting to live-cd mode and mount the right partition. Then you can fix anything you want!
add a comment |Â
up vote
0
down vote
The other easy way is booting to live-cd mode and mount the right partition. Then you can fix anything you want!
add a comment |Â
up vote
0
down vote
up vote
0
down vote
The other easy way is booting to live-cd mode and mount the right partition. Then you can fix anything you want!
The other easy way is booting to live-cd mode and mount the right partition. Then you can fix anything you want!
answered Sep 3 '15 at 0:37
user3435653
11
11
add a comment |Â
add a comment |Â
up vote
0
down vote
I found a solution to systems error kernel not loading
Use live cd to gain access to your existing installation. Once in reinstall Linux kernel :
pacman -S Linux
Then delete the fstab file from etc/fstab :
rm /etc/fstab
Now reinstall systemd:
pacman -S systemd
When reinstalling systemd it will automatically generate a new fstab file
Now reinstall the bootloader
in this case I use grub:
pacman -S grub os-prober
(os probe is useful if you have more than 1 os installed on your hdd/ssd)
Then
grub-install --target=i386-pc /dev/sda
Once finished make the configuration files:
grub-mkconfig -o /boot/grub/grub.cfg
Then unmount the partitions in use and reboot
umount /dev/sdX
reboot
This should fix the problem, it worked for me.
add a comment |Â
up vote
0
down vote
I found a solution to systems error kernel not loading
Use live cd to gain access to your existing installation. Once in reinstall Linux kernel :
pacman -S Linux
Then delete the fstab file from etc/fstab :
rm /etc/fstab
Now reinstall systemd:
pacman -S systemd
When reinstalling systemd it will automatically generate a new fstab file
Now reinstall the bootloader
in this case I use grub:
pacman -S grub os-prober
(os probe is useful if you have more than 1 os installed on your hdd/ssd)
Then
grub-install --target=i386-pc /dev/sda
Once finished make the configuration files:
grub-mkconfig -o /boot/grub/grub.cfg
Then unmount the partitions in use and reboot
umount /dev/sdX
reboot
This should fix the problem, it worked for me.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
I found a solution to systems error kernel not loading
Use live cd to gain access to your existing installation. Once in reinstall Linux kernel :
pacman -S Linux
Then delete the fstab file from etc/fstab :
rm /etc/fstab
Now reinstall systemd:
pacman -S systemd
When reinstalling systemd it will automatically generate a new fstab file
Now reinstall the bootloader
in this case I use grub:
pacman -S grub os-prober
(os probe is useful if you have more than 1 os installed on your hdd/ssd)
Then
grub-install --target=i386-pc /dev/sda
Once finished make the configuration files:
grub-mkconfig -o /boot/grub/grub.cfg
Then unmount the partitions in use and reboot
umount /dev/sdX
reboot
This should fix the problem, it worked for me.
I found a solution to systems error kernel not loading
Use live cd to gain access to your existing installation. Once in reinstall Linux kernel :
pacman -S Linux
Then delete the fstab file from etc/fstab :
rm /etc/fstab
Now reinstall systemd:
pacman -S systemd
When reinstalling systemd it will automatically generate a new fstab file
Now reinstall the bootloader
in this case I use grub:
pacman -S grub os-prober
(os probe is useful if you have more than 1 os installed on your hdd/ssd)
Then
grub-install --target=i386-pc /dev/sda
Once finished make the configuration files:
grub-mkconfig -o /boot/grub/grub.cfg
Then unmount the partitions in use and reboot
umount /dev/sdX
reboot
This should fix the problem, it worked for me.
edited Jun 24 '16 at 14:52
Archemar
18.9k93366
18.9k93366
answered Jun 24 '16 at 14:43
Jp---
11
11
add a comment |Â
add a comment |Â
up vote
0
down vote
May be I am too late. But this is FYI. In this situation you can use nano to load fstab and you can restart after editing the fstab.
sudo nano /etc/fstab
add a comment |Â
up vote
0
down vote
May be I am too late. But this is FYI. In this situation you can use nano to load fstab and you can restart after editing the fstab.
sudo nano /etc/fstab
add a comment |Â
up vote
0
down vote
up vote
0
down vote
May be I am too late. But this is FYI. In this situation you can use nano to load fstab and you can restart after editing the fstab.
sudo nano /etc/fstab
May be I am too late. But this is FYI. In this situation you can use nano to load fstab and you can restart after editing the fstab.
sudo nano /etc/fstab
answered Apr 2 '17 at 10:35
Choxmi
1012
1012
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f44027%2fhow-to-fix-boot-failure-due-to-incorrect-fstab%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password