On 01/11/13 16:38, Paolo Aglialoro wrote:
sparc64 machine, a neglected typo in fstab while changing a disk mountpoint
and boom! - no boot :(
ed(1) isn't hard to use, but if you haven't used it in a while, as
espie@ said, having another machine handy to hit the man page is
useful. Go play with ed(1) now when you aren't in "panic mode" to get a
feel for it.
However, if you really feel the need to use vi, then do something like this:
1) use disklabel(8) to see what partition on your HDD contains the /usr
partition. vi(1) lives in /usr/bin, so I'm assuming you don't have
/usr/bin/ mounted somewhere other than /usr.
Pretend it's on partition 'f' of sd0. Let's also pretend your root
partition is on 'a'.
2) #mount /dev/sd0a /
#mount /dev/sd0f /usr
If you run vi now, it'll bitch about your terminal type not being set, so:
3) #export TERM=vt220 (or whatever is applicable to you)
4) #vi /etc/fstab (fix your mistake(s))
5) #reboot
and you should be good.
Keep in mind, my "workaround" above won't always be there for you, so
I'll say it again: Go play with ed(1) now on a "dummy" file when you
aren't in "panic mode" to get a feel for it.
--
Scott McEachern
https://www.blackstaff.ca