messed up fstab - can't mount /usr

messed up fstab - can't mount /usr

Post by Coli » Mon, 08 Jul 2002 16:50:18



Hi

I was editing /etc/fstab on a FresBSD 4.6 box trying to set up user
quotas and must have messed it up.  Now when I boot I get:

init: can't exec getty '/usr/libexec/getty' for port /dev/ttyvx

I've booted int single user mode and tried to mount /usr so I could
edit fstab but had no luck.
When I try to mount /usr I get:

mount: /usr: unknown special file or file system.

How can I edit /etc/fstab is I can't mount /usr (this is the partition
where vi, etc.. live)

Thanks in advance

Colin

 
 
 

messed up fstab - can't mount /usr

Post by Henrik Motake » Mon, 08 Jul 2002 17:22:09



> How can I edit /etc/fstab is I can't mount /usr (this is the partition
> where vi, etc.. live)

Sounds like a good time to learn using /bin/ed :-)

Of course, you could also boot from some floppy or CDROM, then mount
your root partition and edit fstab with a more comfortable editor. I
guess a bootable FreeBSD install CD will let you do this, but I didn't
use one recently.

hth
Henrik

 
 
 

messed up fstab - can't mount /usr

Post by Reinoud van Leeuwe » Mon, 08 Jul 2002 17:49:48



Quote:>Hi

>I was editing /etc/fstab on a FresBSD 4.6 box trying to set up user
>quotas and must have messed it up.  Now when I boot I get:

>init: can't exec getty '/usr/libexec/getty' for port /dev/ttyvx

>I've booted int single user mode and tried to mount /usr so I could
>edit fstab but had no luck.
>When I try to mount /usr I get:

>mount: /usr: unknown special file or file system.

>How can I edit /etc/fstab is I can't mount /usr (this is the partition
>where vi, etc.. live)

Do you have a CD set? if so, you can use CD 2, the "live filesystem",
mount that and have access to all your tools
--
__________________________________________________
"Nothing is as subjective as reality"

http://www.xs4all.nl/~reinoud
 
 
 

messed up fstab - can't mount /usr

Post by Jason Bourn » Mon, 08 Jul 2002 20:55:59


[snip]

Quote:

> Do you have a CD set? if so, you can use CD 2, the "live filesystem",
> mount that and have access to all your tools

        This is what I have done in the past, and while it is kind of tricky
it has gotten me out of the bind. Boot from cd2, make a new temporary fstab in
the /etc directory of the "live filesystem" and then mount what you need -rw
to some point in the live filesystem such as /mnt. Then change down into
where you need to be, do your editing and reboot. Essentially you are
"grafting" your non-mountable partition(s) to a point in the livefilesystem.
Since it's read/write you can correct what you fudged. It's tricky but it
works great for this kind of thing, especially if you're comfortable with vi.
 
 
 

messed up fstab - can't mount /usr

Post by dan.. » Tue, 09 Jul 2002 00:13:25


Quote:>I was editing /etc/fstab on a FresBSD 4.6 box trying to set up user
>quotas and must have messed it up.  Now when I boot I get:

>init: can't exec getty '/usr/libexec/getty' for port /dev/ttyvx

>I've booted int single user mode and tried to mount /usr so I could
>edit fstab but had no luck.
>When I try to mount /usr I get:

>mount: /usr: unknown special file or file system.

>How can I edit /etc/fstab is I can't mount /usr (this is the partition
>where vi, etc.. live)

1) Mount /usr "manually":

        mount /dev/ad0s1g /usr               # specify the correct partition

2) or use /bin/ed to edit /etc/fstab, but you probably also need to
remount / as read/write:

        mount /
        ed /etc/fstab
        /usr/s/ad0s1f/ad0s1g/
        wq

 
 
 

messed up fstab - can't mount /usr

Post by Coli » Tue, 09 Jul 2002 08:55:05


Thanks Dantso, I  was able to mount /usr and edit /etc/fstab with vi.

Colin


> >I was editing /etc/fstab on a FresBSD 4.6 box trying to set up user
> >quotas and must have messed it up.  Now when I boot I get:

> >init: can't exec getty '/usr/libexec/getty' for port /dev/ttyvx

> >I've booted int single user mode and tried to mount /usr so I could
> >edit fstab but had no luck.
> >When I try to mount /usr I get:

> >mount: /usr: unknown special file or file system.

> >How can I edit /etc/fstab is I can't mount /usr (this is the partition
> >where vi, etc.. live)

> 1) Mount /usr "manually":

>         mount /dev/ad0s1g /usr               # specify the correct partition

> 2) or use /bin/ed to edit /etc/fstab, but you probably also need to
> remount / as read/write:

>         mount /
>         ed /etc/fstab
>         /usr/s/ad0s1f/ad0s1g/
>         wq