On June 19, 2023 8:57:34 PM GMT+02:00, "Pau A.S." 
<lamarededeusen...@googlemail.com> wrote:
>Hello,
>
>I would like to newfs /usr/local
>
>I have copied the contents to a different partition as root.
>
>My guess is that I would have to bring up the system in single user mode.
>
>My problem is that when I do that, /usr/local does not exist because it has
>not been mounted.

Well, that's kind of the point with going into single user mode. You wouldn't 
want the filesystem mounted while newfs'ing the underlying device.

> I can however identify the UIID with fstab:
>
>afafa9bd7395733b.b none swap sw
>afafa9bd7395733b.a / ffs rw 1 1
>afafa9bd7395733b.h /home ffs rw,nodev,nosuid 1 2
>afafa9bd7395733b.d /tmp ffs rw,nodev,nosuid 1 2
>afafa9bd7395733b.f /usr ffs rw,nodev 1 2
>afafa9bd7395733b.l /usr/X11R6 ffs rw,nodev 1 2
>afafa9bd7395733b.g /usr/local ffs rw,wxallowed,nodev 1 2
>afafa9bd7395733b.e /var ffs rw,nodev,nosuid 1 2
>
>I can also see the name of the dev with df,
>
>Filesystem     Size    Used   Avail Capacity  Mounted on
>/dev/sd1a      988M    787M    152M    84%    /
>/dev/sd1h      393G    349G   24.9G    94%    /home
>/dev/sd1d      989M   51.9M    888M     6%    /tmp
>/dev/sd1f      3.9G    1.3G    2.4G    36%    /usr
>/dev/sd1l      497M    429M   43.2M    91%    /usr/X11R6
>/dev/sd1g     12.6G   10.7G    1.3G    90%    /usr/local
>/dev/sd1e      249M    118M    119M    50%    /var
>
>My question is: Do I run this upon rebooting as single user?
>
>$ newfs afafa9bd7395733b.g

#, but yes. ;⁠)

>
>and then reboot and, as root,
>
>$ cp -pR /path-to-backup-copy/* /usr/local
>
>?

Assuming your paths are correct, that looks like it, yes.

However since you probably want to copy in single user mode, you could just

# newfs ...
# fsck -p
# mount -a
# <copy the files back>
# reboot (or just exit to go multiuser)

/Alexander

>
>Thanks

Reply via email to