PDA

View Full Version : misconfigured fstab file


darkstar
November 24th, 2008, 09:43
Dear All,

I was misconfigure in fstab file and after reboot, my freebsd cannot boot. because wrong configure.

ufs: /dev/ad4s1e.noatime (/usr)
unknown error; help

so, how can i edit fstab file or change dot character with comma character ??

thank you

kamikaze
November 24th, 2008, 09:55
You can boot into single user mode, run mount -a and edit it with vi.

darkstar
November 24th, 2008, 10:04
You can boot into single user mode, run mount -a and edit it with vi.

I got error after execute vi

# vi
vi: not found

My /usr slice cannot boot,. :(

# mount -a
mount: /dev/ad4s1e.noatime : No such file or directory

SirDice
November 24th, 2008, 10:25
Boot to single usermode

Then:


# fsck -y
# mount -u /
# /rescue/vi /etc/fstab
# mount -a
# exit

darkstar
November 24th, 2008, 10:43
Boot to single usermode

Then:


# fsck -y
# mount -u /
# /rescue/vi /etc/fstab
# mount -a
# exit



when i execute fsck -y, i got error can't stat /dev/ad4s1e.noatime: No such file or directory

when i execute /rescue/vi /etc/fstab i got error vi: No terminal database found

kamikaze
November 24th, 2008, 10:57
You have to mount /usr manually, because the terminal-db is in /usr/share (makes /rescue/vi quite useless sometimes).

# /rescue/mount /dev/ad4s1f /usr
# /rescue/vi /etc/fstab

danger@
November 24th, 2008, 11:40
maybe `ee' would work (not sure though)...

darkstar
November 24th, 2008, 12:00
Thank you For kamikaze, SirDice and danger.

My problem is solve.
First, i boot freebsd in single user mode then i renamed fstab file with another name, then i maked new fstab file and type manually contains of fstab file with echo.
echo '/dev/ad4s1e /usr ufs rw 2 2' >> /etc/fstab
and what the result?
i got new fstab file. I reboot my FreeBSD, and my FreeBSD boot normally.

Thank You