Perl saving my ass

ethan on 2003-01-27T16:02:29

I had some remarkable progress with FreeBSD today, which included compiling my first kernel (after which I was eventually able to mount my linux partition) and making my DSL run. The latter was a particular pleasure since it only took two minutes and thus beats the same procedure on Linux (where I still don't quite know why my DSL works).

Automating the dialing-up however through rc.conf led into a fiasco. I was left in a sort of primitive single user mode with none of the two available text editors (ee and vim) working any longer. So you tell me how to reverse changes to a text file without an editor.

But of course, Perl was still working and I was able to repair rc.conf with a one-liner (typing it took me a while since I only had the American layout on my German keyboard...hard to find characters such as ', ! and /).

Btw, this journal entry here is my first contribution to the www backed by FreeBSD.


Single User Mode

Dom2 on 2003-01-27T16:23:01

You can usually get ee or vim working by doing
mount -u /
mount /usr
mount /var

Alternatively, you could have used ed(1). It's not pretty, but not impossible either. It's saved my bacon a number of times...

-Dom

Re:Single User Mode

ethan on 2003-01-27T19:36:53

I don't think this was actually single user mode (I wasn't able to find out really). It looked as though booting was incomplete: it tried to dial with the message PPP started as root and that was it then. No login, it simply dropped to a shell.

I am not yet fully grokking FreeBSD, I am afraid. After my succesful compilation of the kernel I had to learn that it no longer asked for the password when logging in as root so I had to re-set the password using /stand/sysinstall. Very weird.

But still, it appears to be an extremely solid and well laid-out operating system. Now that I have access to my Linux partition it should be possible to steal a bit of the configuration from their. And since I have a working internet-connection as well, google can assist me with resolving things. Before that I had to boot into Linux to look something up, reboot BSD to realize that it didn't quite work that way and so forth. :-/

Yes, /bin/ed

merlyn on 2003-01-27T17:01:09

Every admin should take the 15 minutes that it takes to read ed(1), and play with it for another 15 minutes, for those fateful days when nothing is working right and you need to edit a file.