modify vfstab without vi?

twikoff

Member
May 16, 2001
122
0
0
ugh
so, I was setting up my disk mirroring.. and edited the vfstab with vi
but it seems I accidently put /dev/ms instead of /dev/md for the mounting of the /var partition

so of course it cant mount var, so it wont let me boot normally
i have to log in into maintenance (single user) mode.
I can cat /etc/vfstab and see my error

but I cant run vi, because vi seems to need /var/tmp to run

so I need a way to modify that line in the vfstab without vi

any suggestions?


edit... This is a complete install of solaris 9
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
You can try ed. I've never used it, but it looked like a PITA.

You should be able to mount /var manually and use vi. ;)
 

twikoff

Member
May 16, 2001
122
0
0
ed seems to be a pain in the butt.. but Ill read up on him if I cant find a better way

what would be the syntax to manually mount var, assuming its on c2t0d0s4?
 

twikoff

Member
May 16, 2001
122
0
0
dude, your my hero!

its been such a long frustrating day, there was no way I was going to think clearly enough to work through it

and i was working it backwards.. rather than taking the easier way out that was right in front of my face

that worked like a charm

thanks again
 

oog

Golden Member
Feb 14, 2002
1,721
0
0
ed wouldn't have been that bad... you just find the line you need (let's say it's line 7) and type a command like 7s/ms/md hit enter and then w to write the file and q to quit.