Re: editors in floppy44.fs (OpenBSD 4.4.) - newbee help

2008-11-02 Thread William Boshuck
On Sun, Nov 02, 2008 at 07:31:04AM +0530, Girish Venkatachalam wrote:
 On 13:36:22 Nov 01, Chris Kuethe wrote:
  As long as your filesystems are still readable, you can use a more
  comfortable tool:
  
  mount /dev/wd0a /mnt
  mount /dev/wd0d /mnt/var
  mount /dev/wd0e /mnt/usr
  /mnt/usr/sbin/chroot /mnt
  vi (or mg) /etc/fstab
  
  you could possibly even just copy your fstab from your freshly mounted
  /var (/var/backups/etc_fstab.*)
  
 
 This is what I was also wondering Chris. I always vi in single user
 mode. Or since I have an NFS mount on my network I mount it thro' NFS
 after assigning a static IP (DHCP does not work) and work.
 
 I have never had to use ed either in single user mode or for scripting.

While that may be true, it does not take much imaginination
to see that another's circumstances may create such a need,
or a desire.

That said, I do not (and did not) want to denigrate the use
of vi(m), mg, emacs or whatever, if someone feels the need
for a screen editor, just like I would not want to denigrate
the use of Ted, KWord, or whatever, if someone feels the need
for a word processor.  These appear to me as personal choices.

cheers,
-wb



editors in floppy44.fs (OpenBSD 4.4.) - newbee help

2008-11-01 Thread soko.tica
Hello list,

I did manage to scr... err, mess up partitioning scheme through
disklabel, so I've booted from floppy, mounted partitions to /tmp/a/,
tmp/d/, /tmp/e/, but when I attempt to edit etc/fstab by ed I get:

#chmod 766 /etc/fstab
# ed /etc/fstab
215
q
#

I've arrived there by adding new partition for /var and editing
/etc/fstab without executing newfs on new partition. When I then
attempted to clean the mess up by running disklabel again, I mixed up
/usr and old /var, so I guess I'm stuck to floppy now.

Any help (obviously written for dummies) is greatly appreciated. I've
never used ed.

Other than that, 4.4. is great (as far as I saw until now...which
isn't much as you can guess). Song rocks, too.



Re: editors in floppy44.fs (OpenBSD 4.4.) - newbee help

2008-11-01 Thread Edd Barrett
On Sat, Nov 1, 2008 at 7:33 PM, soko.tica [EMAIL PROTECTED] wrote:
 Hello list,

 I did manage to scr... err, mess up partitioning scheme through
 disklabel, so I've booted from floppy, mounted partitions to /tmp/a/,
 tmp/d/, /tmp/e/, but when I attempt to edit etc/fstab by ed I get:

 #chmod 766 /etc/fstab
 # ed /etc/fstab
 215
 q
 #


That is ed doing its job :)

Go to the OpenBSD web siite and find the manual page section. You
should be able to get the man page for ed, even without an OpenBSD
system.

-- 

Best Regards

Edd

http://students.dec.bournemouth.ac.uk/ebarrett



Re: editors in floppy44.fs (OpenBSD 4.4.) - newbee help

2008-11-01 Thread Chris Kuethe
As long as your filesystems are still readable, you can use a more
comfortable tool:

mount /dev/wd0a /mnt
mount /dev/wd0d /mnt/var
mount /dev/wd0e /mnt/usr
/mnt/usr/sbin/chroot /mnt
vi (or mg) /etc/fstab

you could possibly even just copy your fstab from your freshly mounted
/var (/var/backups/etc_fstab.*)

CK

On Sat, Nov 1, 2008 at 1:27 PM, Edd Barrett [EMAIL PROTECTED] wrote:
 On Sat, Nov 1, 2008 at 7:33 PM, soko.tica [EMAIL PROTECTED] wrote:
 Hello list,

 I did manage to scr... err, mess up partitioning scheme through
 disklabel, so I've booted from floppy, mounted partitions to /tmp/a/,
 tmp/d/, /tmp/e/, but when I attempt to edit etc/fstab by ed I get:

 #chmod 766 /etc/fstab
 # ed /etc/fstab
 215
 q
 #


 That is ed doing its job :)

 Go to the OpenBSD web siite and find the manual page section. You
 should be able to get the man page for ed, even without an OpenBSD
 system.

 --

 Best Regards

 Edd

 http://students.dec.bournemouth.ac.uk/ebarrett





-- 
GDB has a 'break' feature; why doesn't it have 'fix' too?



Re: editors in floppy44.fs (OpenBSD 4.4.) - newbee help

2008-11-01 Thread William Boshuck
On Sat, Nov 01, 2008 at 08:33:44PM +0100, soko.tica wrote:
 Hello list,
 
 I did manage to scr... err, mess up partitioning scheme through
 disklabel, so I've booted from floppy, mounted partitions to /tmp/a/,
 tmp/d/, /tmp/e/, but when I attempt to edit etc/fstab by ed I get:
 
 #chmod 766 /etc/fstab
 # ed /etc/fstab
 215
 q
 #
 
 I've arrived there by adding new partition for /var and editing
 /etc/fstab without executing newfs on new partition. When I then
 attempted to clean the mess up by running disklabel again, I mixed up
 /usr and old /var, so I guess I'm stuck to floppy now.
 
 Any help (obviously written for dummies) is greatly appreciated. I've
 never used ed.

If you have a running system, try 'man ed';
otherwise, point any browser at

http://www.openbsd.org/cgi-bin/man.cgi?query=ed

It may not be everyone's first choice for a big
interactive editing task, but ed is small, fast
on any machine, easy to script and always there.

cheers,
-wb



Re: editors in floppy44.fs (OpenBSD 4.4.) - newbee help

2008-11-01 Thread soko . tica
On 11/1/08, Edd Barrett [EMAIL PROTECTED] wrote:
 On Sat, Nov 1, 2008 at 7:33 PM, soko.tica [EMAIL PROTECTED] wrote:

 #chmod 766 /tmp/a/etc/fstab
 # ed /tmp/a/etc/fstab
 215
 q
 #


 That is ed doing its job :)

Many thanks!

I did figure it out myself meanwhile, but since I already started
bombing the list with stupid questions, I wanted to put proper path in
my initial question in the hope someone might search for it in future.

The most obvious superior feature of OpenBSD to us newcomers is
systematic and logically connected documentation that would make you
learn and understand. That's unlike Linuces I had a chance to use
before.

After I collect myself in one piece after this experience, I'm back
again to play with unpartitioned part of my HDD and adjust the
partitions to my imagination/needs.

Now I'll remember disklabel + newfs and then to edit /etc/fstab.



Re: editors in floppy44.fs (OpenBSD 4.4.) - newbee help

2008-11-01 Thread Girish Venkatachalam
On 13:36:22 Nov 01, Chris Kuethe wrote:
 As long as your filesystems are still readable, you can use a more
 comfortable tool:
 
 mount /dev/wd0a /mnt
 mount /dev/wd0d /mnt/var
 mount /dev/wd0e /mnt/usr
 /mnt/usr/sbin/chroot /mnt
 vi (or mg) /etc/fstab
 
 you could possibly even just copy your fstab from your freshly mounted
 /var (/var/backups/etc_fstab.*)
 

This is what I was also wondering Chris. I always vi in single user
mode. Or since I have an NFS mount on my network I mount it thro' NFS
after assigning a static IP (DHCP does not work) and work.

I have never had to use ed either in single user mode or for scripting.

I use vim all the time. He he. 

-Girish



Re: editors in floppy44.fs (OpenBSD 4.4.) - newbee help

2008-11-01 Thread Edd Barrett
On Sun, Nov 2, 2008 at 2:01 AM, Girish Venkatachalam
[EMAIL PROTECTED] wrote:
 I use vim all the time. He he.

As much as i love vi/vim/nvi, these are not available in ramdisk kernels.


-- 

Best Regards

Edd

http://students.dec.bournemouth.ac.uk/ebarrett



Re: editors in floppy44.fs (OpenBSD 4.4.) - newbee help

2008-11-01 Thread Girish Venkatachalam
On 02:39:06 Nov 02, Edd Barrett wrote:
 
 As much as i love vi/vim/nvi, these are not available in ramdisk kernels.
 

vi is certainly there. You have to mount /usr.

-Girish



Re: editors in floppy44.fs (OpenBSD 4.4.) - newbee help

2008-11-01 Thread Girish Venkatachalam
On 10:01:54 Nov 02, Girish Venkatachalam wrote:
 
 vi is certainly there. You have to mount /usr.
 

Which means it is not part of RAMDISK kernel. Sorry Edd is right and I
was wrong.

I end up using vi from somewhere I don't remember whenever I boot in
single user mode.

I guess it needs /tmp and /usr mounted or something. Once again I need
to check this.

But the fact that NFS mount is available in base install and ramdisks is
quite cool...

-Girish