Bad edit of /dev/fstab -> non-rw mountable drive

Neil Hoggarth njh at kernighan.demon.co.uk
Mon Jul 1 20:56:30 BST 2002


Above all: don't panic, and don't do anything hasty. The system is almost
certainly recoverable.

On Mon, 1 Jul 2002, Rob King wrote:

> Then the following appears:
> Manual root filesystem specification:
> <fstype>:<device>  Mount <device> using filesystem <fstype> eg.
> ufs:/dev/da0s1a
>
> If I type: # ufs:/dev/ad0

ad0 would be the raw, unpartitioned disk device. I would expect that your
root device is actually something like "ufs:/dev/ad0s1a" (BSD "a"
partition of FDISK slice 1 on IDE disk 0) or (possibly) "ufs:/dev/ad0a"
(BSD "a" partition of a "dangerously dedicated" IDE disk 0).

> then I can mount the first drive with the OS on
> it. But this is of course only read only. It needs a shell to work from, so
> I click enter to accept /bin/sh. So I go to mount the drive as read and
> write with # mount /u / and it comes up with: WARNING: R/W mount of /denied.
> Filesystem is not clean - run fsck mount: /u: Operation not permitted.

I think you mean "mount -u /", rather than "mount /u /".

Try:

Specifying ufs:/dev/ad0s1a when prompted for the root device.

Running "fsck /dev/ad0s1a" to clean the root filesystem.

Running "mount -u /" to get a read-write root filesystem.

Manually mounting your /usr filesystem (and /var, if it is a seperate
partition).

Edit your /etc/fstab file to fix it.

Reboot to test your changes.

Hope this helps.

Regards,
-- 
Neil Hoggarth,
Oxford.





More information about the Ukfreebsd mailing list