problem in fstab

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

problem in fstab

Huub van Niekerk
Hi,

Today I installed v.5.1 and all went nicely. I put my nfs server in fstab,
modified hosts and added a mountpoint in /mnt. All worked. Then I
rebooted and the boot halts with:

fsck: exec /usr/sbin/fsck_nfs for Kaapstad:/admin: No such file or
directory

THE FOLLOWING FILE SYSTEM HAD AN UNEXPECTED INCONSISTENCY:
nfs: Kaapstad:/admin (/mnt/Kaapstadadmin)
Unknown error: help!
Enter pathname of shell or RETURN for sh:


How can I solve this? Thank you..

Reply | Threaded
Open this post in threaded view
|

Re: problem in fstab

Otto Moerbeek
On Tue, Jul 24, 2012 at 04:44:36PM +0000, HvN wrote:

> Hi,
>
> Today I installed v.5.1 and all went nicely. I put my nfs server in fstab,
> modified hosts and added a mountpoint in /mnt. All worked. Then I
> rebooted and the boot halts with:
>
> fsck: exec /usr/sbin/fsck_nfs for Kaapstad:/admin: No such file or
> directory
>
> THE FOLLOWING FILE SYSTEM HAD AN UNEXPECTED INCONSISTENCY:
> nfs: Kaapstad:/admin (/mnt/Kaapstadadmin)
> Unknown error: help!
> Enter pathname of shell or RETURN for sh:
>
>
> How can I solve this? Thank you..

Go to single user mode, show the exact fstab line. Likely it does not
end with 0 0.

        -Otto

Reply | Threaded
Open this post in threaded view
|

Re: problem in fstab

Huub van Niekerk
On Tue, 24 Jul 2012 18:59:14 +0200, Otto Moerbeek wrote:

> On Tue, Jul 24, 2012 at 04:44:36PM +0000, HvN wrote:
>
>> Hi,
>>
>> Today I installed v.5.1 and all went nicely. I put my nfs server in
>> fstab,
>> modified hosts and added a mountpoint in /mnt. All worked. Then I
>> rebooted and the boot halts with:
>>
>> fsck: exec /usr/sbin/fsck_nfs for Kaapstad:/admin: No such file or
>> directory
>>
>> THE FOLLOWING FILE SYSTEM HAD AN UNEXPECTED INCONSISTENCY:
>> nfs: Kaapstad:/admin (/mnt/Kaapstadadmin)
>> Unknown error: help!
>> Enter pathname of shell or RETURN for sh:
>>
>>
>> How can I solve this? Thank you..
>
> Go to single user mode, show the exact fstab line. Likely it does not
> end with 0 0.
>
> -Otto

I booted into single user mode, mounted / and /usr according to FAQ 8.
However, when I try to use vi to change fstab, it says "unknown terminal
type". Any suggestions ?

Reply | Threaded
Open this post in threaded view
|

Re: problem in fstab

Vijay Sankar
Quoting HvN <[hidden email]>:

> On Tue, 24 Jul 2012 18:59:14 +0200, Otto Moerbeek wrote:
>
>> On Tue, Jul 24, 2012 at 04:44:36PM +0000, HvN wrote:
>>
>>> Hi,
>>>
>>> Today I installed v.5.1 and all went nicely. I put my nfs server in
>>> fstab,
>>> modified hosts and added a mountpoint in /mnt. All worked. Then I
>>> rebooted and the boot halts with:
>>>
>>> fsck: exec /usr/sbin/fsck_nfs for Kaapstad:/admin: No such file or
>>> directory
>>>
>>> THE FOLLOWING FILE SYSTEM HAD AN UNEXPECTED INCONSISTENCY:
>>> nfs: Kaapstad:/admin (/mnt/Kaapstadadmin)
>>> Unknown error: help!
>>> Enter pathname of shell or RETURN for sh:
>>>
>>>
>>> How can I solve this? Thank you..
>>
>> Go to single user mode, show the exact fstab line. Likely it does not
>> end with 0 0.
>>
>> -Otto
>
> I booted into single user mode, mounted / and /usr according to FAQ 8.
> However, when I try to use vi to change fstab, it says "unknown terminal
> type". Any suggestions ?
>
>

You have to type in

export TERM=vt220

or something like that

Vijay Sankar, M.Eng., P.Eng.
ForeTell Technologies Limited
[hidden email]

---------------------------------------------
This message was sent using ForeTell-POST 4.9

Reply | Threaded
Open this post in threaded view
|

Re: problem in fstab

Otto Moerbeek
In reply to this post by Huub van Niekerk
On Tue, Jul 24, 2012 at 05:16:27PM +0000, HvN wrote:

> On Tue, 24 Jul 2012 18:59:14 +0200, Otto Moerbeek wrote:
>
> > On Tue, Jul 24, 2012 at 04:44:36PM +0000, HvN wrote:
> >
> >> Hi,
> >>
> >> Today I installed v.5.1 and all went nicely. I put my nfs server in
> >> fstab,
> >> modified hosts and added a mountpoint in /mnt. All worked. Then I
> >> rebooted and the boot halts with:
> >>
> >> fsck: exec /usr/sbin/fsck_nfs for Kaapstad:/admin: No such file or
> >> directory
> >>
> >> THE FOLLOWING FILE SYSTEM HAD AN UNEXPECTED INCONSISTENCY:
> >> nfs: Kaapstad:/admin (/mnt/Kaapstadadmin)
> >> Unknown error: help!
> >> Enter pathname of shell or RETURN for sh:
> >>
> >>
> >> How can I solve this? Thank you..
> >
> > Go to single user mode, show the exact fstab line. Likely it does not
> > end with 0 0.
> >
> > -Otto
>
> I booted into single user mode, mounted / and /usr according to FAQ 8.
> However, when I try to use vi to change fstab, it says "unknown terminal
> type". Any suggestions ?

export TERM=vt220

        -Otto

Reply | Threaded
Open this post in threaded view
|

Re: problem in fstab

Huub van Niekerk
On Tue, Jul 24, 2012 at 7:25 PM, Otto Moerbeek <[hidden email]> wrote:

> On Tue, Jul 24, 2012 at 05:16:27PM +0000, HvN wrote:
>
> > On Tue, 24 Jul 2012 18:59:14 +0200, Otto Moerbeek wrote:
> >
> > > On Tue, Jul 24, 2012 at 04:44:36PM +0000, HvN wrote:
> > >
> > >> Hi,
> > >>
> > >> Today I installed v.5.1 and all went nicely. I put my nfs server in
> > >> fstab,
> > >> modified hosts and added a mountpoint in /mnt. All worked. Then I
> > >> rebooted and the boot halts with:
> > >>
> > >> fsck: exec /usr/sbin/fsck_nfs for Kaapstad:/admin: No such file or
> > >> directory
> > >>
> > >> THE FOLLOWING FILE SYSTEM HAD AN UNEXPECTED INCONSISTENCY:
> > >> nfs: Kaapstad:/admin (/mnt/Kaapstadadmin)
> > >> Unknown error: help!
> > >> Enter pathname of shell or RETURN for sh:
> > >>
> > >>
> > >> How can I solve this? Thank you..
> > >
> > > Go to single user mode, show the exact fstab line. Likely it does not
> > > end with 0 0.
> > >
> > >     -Otto
> >
> > I booted into single user mode, mounted / and /usr according to FAQ 8.
> > However, when I try to use vi to change fstab, it says "unknown terminal
> > type". Any suggestions ?
>
> export TERM=vt220
>
>         -Otto
>

Thank you Vijay and Otto. Problem solved.

Reply | Threaded
Open this post in threaded view
|

Re: problem in fstab

Michael H Lambert
In reply to this post by Huub van Niekerk
On 24 Jul 2012, at 13:16, HvN wrote:

> I booted into single user mode, mounted / and /usr according to FAQ 8.
> However, when I try to use vi to change fstab, it says "unknown terminal
> type". Any suggestions ?

Use ed(1) to edit?

Reply | Threaded
Open this post in threaded view
|

Re: problem in fstab

Alexander Polakov-2
In reply to this post by Huub van Niekerk
* HvN <[hidden email]> [120724 17:17]:
> I booted into single user mode, mounted / and /usr according to FAQ 8.
> However, when I try to use vi to change fstab, it says "unknown terminal
> type". Any suggestions ?
>

export TERM=vt220

--
Alexander Polakov | plhk.ru

Reply | Threaded
Open this post in threaded view
|

Re: problem in fstab

Chris Bennett-11
In reply to this post by Michael H Lambert
On Tue, Jul 24, 2012 at 01:30:48PM -0400, Michael Lambert wrote:
> On 24 Jul 2012, at 13:16, HvN wrote:
>
> > I booted into single user mode, mounted / and /usr according to FAQ 8.
> > However, when I try to use vi to change fstab, it says "unknown terminal
> > type". Any suggestions ?
>
> Use ed(1) to edit?
>

Using ed is a little bit more difficult (Is anyone really too lazy to use an editor locate in root?),
but when everything is fracked to hell and back, ed always works just fine.
No need to deal with other partitions at all.
I suggest learning to use ed for all of these single user mode problems.
I do and I don't regret it at all. ;)

Chris Bennett

Reply | Threaded
Open this post in threaded view
|

Re[2]: problem in fstab

Mo Libden
In reply to this post by Alexander Polakov-2
Tue, 24 Jul 2012 18:46:55 +0000 от Alexander Polakov <[hidden email]>:
> * HvN <[hidden email]> [120724 17:17]:
> > I booted into single user mode, mounted / and /usr according to FAQ 8.
> > However, when I try to use vi to change fstab, it says "unknown terminal
> > type". Any suggestions ?
>
> export TERM=vt220

may be vi can be modified to ask for terminal type if it is not defined, something like the following:

vi: unknown terminal type, please enter the type of the terminal [vt220]: _

Reply | Threaded
Open this post in threaded view
|

Re: problem in fstab

Andres Perera-4
the problem with this logic is that there are numerous curses
programs: less, top, systat, vi; just to name the ones i recall from
base.

surely retrofitting them with prompts isn't an option, specially when
having TERM unset isn't the norm

On Thu, Jul 26, 2012 at 4:33 AM, Mo Libden <[hidden email]> wrote:
> Tue, 24 Jul 2012 18:46:55 +0000 от Alexander Polakov
<[hidden email]>:
>> * HvN <[hidden email]> [120724 17:17]:
>> > I booted into single user mode, mounted / and /usr according to FAQ 8.
>> > However, when I try to use vi to change fstab, it says "unknown terminal
>> > type". Any suggestions ?
>>
>> export TERM=vt220
>
> may be vi can be modified to ask for terminal type if it is not defined,
something like the following:
>
> vi: unknown terminal type, please enter the type of the terminal [vt220]: _

Reply | Threaded
Open this post in threaded view
|

Re[4]: problem in fstab

Mo Libden
Thu, 26 Jul 2012 07:06:02 -0430 от Andres Perera <[hidden email]>:
> the problem with this logic is that there are numerous curses
> programs: less, top, systat, vi; just to name the ones i recall from
> base.

since you top-posted, I will too.
what's the problem with top? will it bomb out if there is no TERM?
i think rather than hurrying to answer, you'd better do you homework.
yes, you lose the interactiveness, but all your mentioned programs
do work with dumb terminal no problem!

$ echo $TERM
xterm
$ unset TERM
$ top
load averages:  0.44,  0.12,  0.04    v1.my.domain 05:46:41
18 processes:  17 idle, 1 on processor
CPU states:  0.5% user,  0.0% nice,  7.4% system,  0.4% interrupt, 91.7% idle
Memory: Real: 7944K/35M act/tot Free: 206M Cache: 16M Swap: 0K/280M

  PID USERNAME PRI NICE  SIZE   RES STATE     WAIT      TIME    CPU COMMAND
    1 root      10    0  452K  352K idle      wait      0:01  0.00% init
17516 root       2    0 3344K 2580K sleep     poll      0:00  0.00% sshd
31665 _syslogd   2    0  412K  712K sleep     poll      0:00  0.00% syslogd
15719 user      2    0 3312K 2112K sleep     select    0:00  0.00% sshd
  665 root       2    0  640K  476K idle      netio     0:00  0.00% pflogd
  597 root       2    0 1608K 2052K idle      netcon2   0:00  0.00% sendmail
15280 user     18    0  740K  520K sleep     pause     0:00  0.00% ksh
28645 root       2    0  396K  752K idle      netio     0:00  0.00% syslogd
 4803 root       2    0 1452K 1632K sleep     select    0:00  0.00% sendmail
 1977 root       3    0  456K  792K idle      ttyin     0:00  0.00% getty
10310 root       3    0  492K  800K idle      ttyin     0:00  0.00% getty
   44 root       2    0  304K  796K idle      select    0:00  0.00% inetd
13251 root       2    0  868K 1216K sleep     select    0:00  0.00% sshd
18652 root       2    0  308K  656K sleep     kqread    0:00  0.00% apmd
 9421 root       2    0  692K  880K idle      select    0:00  0.00% cron
 3016 _pflogd    4    0  704K  312K sleep     bpf       0:00  0.00% pflogd
 9936 user     28    0  348K  768K onproc    -         0:00  0.00% top
24414 _sndio     2  -20  488K  428K idle      poll      0:00  0.00% sndiod


$ less /etc/motd
WARNING: terminal is not fully functional
/etc/motd  (press RETURN)

^OpenBSD 5.2 (GENERIC) #0: Sat Jul 14 11:58:37 EEST 2012

Welcome to OpenBSD: The proactively secure Unix-like operating system.

Please use the sendbug(1) utility to report bugs in the system.
Before reporting a bug, please try to reproduce it with the latest
version of the code.  With bug reports, please try to ensure that
enough information to reproduce the problem is enclosed, and if a
known fix for it exists, include that as well.
~
~
$
$ systat


    1 users    Load 0.38 0.13 0.05                     Fri Jul 20 05:47:04 2012


$

> surely retrofitting them with prompts isn't an option, specially when
> having TERM unset isn't the norm
>
> On Thu, Jul 26, 2012 at 4:33 AM, Mo Libden <[hidden email]> wrote:
> > Tue, 24 Jul 2012 18:46:55 +0000 от Alexander Polakov <[hidden email]>:
> >> * HvN <[hidden email]> [120724 17:17]:
> >> > I booted into single user mode, mounted / and /usr according to FAQ 8.
> >> > However, when I try to use vi to change fstab, it says "unknown terminal
> >> > type". Any suggestions ?
> >>
> >> export TERM=vt220
> >
> > may be vi can be modified to ask for terminal type if it is not defined, something like the following:
> >
> > vi: unknown terminal type, please enter the type of the terminal [vt220]: _

Reply | Threaded
Open this post in threaded view
|

Re: problem in fstab

Andres Perera-4
no.

the equivalent to the top/systat behaviour would be to make vi spawn
less and ed when 'v' is pressed, not prompt you "are you sure?"

less does not work with a dumb terminal as you said. the output
eventually gets garbled.

if you really want that functionality, look at /.profile. every 120
moons or so, when you actually need to be single user, just source
that file. that way vi and mg can be used without duplicating logic in
both of them.

On Thu, Jul 26, 2012 at 10:20 AM, Mo Libden <[hidden email]> wrote:

> Thu, 26 Jul 2012 07:06:02 -0430 от Andres Perera <[hidden email]>:
>> the problem with this logic is that there are numerous curses
>> programs: less, top, systat, vi; just to name the ones i recall from
>> base.
>
> since you top-posted, I will too.
> what's the problem with top? will it bomb out if there is no TERM?
> i think rather than hurrying to answer, you'd better do you homework.
> yes, you lose the interactiveness, but all your mentioned programs
> do work with dumb terminal no problem!
>
> $ echo $TERM
> xterm
> $ unset TERM
> $ top
> load averages:  0.44,  0.12,  0.04    v1.my.domain 05:46:41
> 18 processes:  17 idle, 1 on processor
> CPU states:  0.5% user,  0.0% nice,  7.4% system,  0.4% interrupt, 91.7%
idle
> Memory: Real: 7944K/35M act/tot Free: 206M Cache: 16M Swap: 0K/280M
>
>   PID USERNAME PRI NICE  SIZE   RES STATE     WAIT      TIME    CPU COMMAND
>     1 root      10    0  452K  352K idle      wait      0:01  0.00% init
> 17516 root       2    0 3344K 2580K sleep     poll      0:00  0.00% sshd
> 31665 _syslogd   2    0  412K  712K sleep     poll      0:00  0.00% syslogd
> 15719 user      2    0 3312K 2112K sleep     select    0:00  0.00% sshd
>   665 root       2    0  640K  476K idle      netio     0:00  0.00% pflogd
>   597 root       2    0 1608K 2052K idle      netcon2   0:00  0.00%
sendmail
> 15280 user     18    0  740K  520K sleep     pause     0:00  0.00% ksh
> 28645 root       2    0  396K  752K idle      netio     0:00  0.00% syslogd
>  4803 root       2    0 1452K 1632K sleep     select    0:00  0.00%
sendmail

>  1977 root       3    0  456K  792K idle      ttyin     0:00  0.00% getty
> 10310 root       3    0  492K  800K idle      ttyin     0:00  0.00% getty
>    44 root       2    0  304K  796K idle      select    0:00  0.00% inetd
> 13251 root       2    0  868K 1216K sleep     select    0:00  0.00% sshd
> 18652 root       2    0  308K  656K sleep     kqread    0:00  0.00% apmd
>  9421 root       2    0  692K  880K idle      select    0:00  0.00% cron
>  3016 _pflogd    4    0  704K  312K sleep     bpf       0:00  0.00% pflogd
>  9936 user     28    0  348K  768K onproc    -         0:00  0.00% top
> 24414 _sndio     2  -20  488K  428K idle      poll      0:00  0.00% sndiod
>
>
> $ less /etc/motd
> WARNING: terminal is not fully functional
> /etc/motd  (press RETURN)
>
> ^OpenBSD 5.2 (GENERIC) #0: Sat Jul 14 11:58:37 EEST 2012
>
> Welcome to OpenBSD: The proactively secure Unix-like operating system.
>
> Please use the sendbug(1) utility to report bugs in the system.
> Before reporting a bug, please try to reproduce it with the latest
> version of the code.  With bug reports, please try to ensure that
> enough information to reproduce the problem is enclosed, and if a
> known fix for it exists, include that as well.
> ~
> ~
> $
> $ systat
>
>
>     1 users    Load 0.38 0.13 0.05                     Fri Jul 20 05:47:04
2012
>
>
> $
>
>> surely retrofitting them with prompts isn't an option, specially when
>> having TERM unset isn't the norm
>>
>> On Thu, Jul 26, 2012 at 4:33 AM, Mo Libden <[hidden email]> wrote:
>> > Tue, 24 Jul 2012 18:46:55 +0000 от Alexander Polakov
<[hidden email]>:
>> >> * HvN <[hidden email]> [120724 17:17]:
>> >> > I booted into single user mode, mounted / and /usr according to FAQ
8.
>> >> > However, when I try to use vi to change fstab, it says "unknown
terminal
>> >> > type". Any suggestions ?
>> >>
>> >> export TERM=vt220
>> >
>> > may be vi can be modified to ask for terminal type if it is not defined,
something like the following:
>> >
>> > vi: unknown terminal type, please enter the type of the terminal [vt220]:
_