Solved Can't rename /usr/src to /usr/src-old...

Hello.

I'm not able to rename the src directory to src-old. What's the reason ? How can I do this ? (I'm using a FreeBSD 13.1 VM).

Code:
cd /usr
mv src src-old
Operation not supported

Screenshot_2023-01-04_19-10-02.jpg
 
Code:
root@marietto:/home/marietto # chflags -R noschg /usr/src
root@marietto:/home/marietto # mv /usr/src /usr/src-old
mv: rename /usr/src to /usr/src-old: Operation not supported
 
Are you running ZFS with a default setup?
In that case /usr/src is a ZFS dataset, you can't rename that. Been there, done that, scratched my head for a second.
 
Are you running ZFS with a default setup?
In that case /usr/src is a ZFS dataset, you can't rename that. Been there, done that, scratched my head for a second.
zfs list

I have this:
Code:
root@Silicium ~# zfs list /usr/src
NAME                        USED  AVAIL     REFER  MOUNTPOINT
flash/usr/src.releng.13.1   758M  45.9G      758M  /usr/src

And then
zfs set mountpoint=...

zfs-set(8)
 
Are you running ZFS with a default setup?
In that case /usr/src is a ZFS dataset, you can't rename that. Been there, done that, scratched my head for a second.

again with ZFS :rolleyes:

Code:
# zfs list

NAME                                           USED  AVAIL     REFER  MOUNTPOINT

zroot                                         39.6G   151G      768K  /zroot
zroot/ROOT                                    10.5G   151G      768K  none
zroot/ROOT/13.1-RELEASE-p4_2023-01-04_173043    64K   151G     9.24G  /
zroot/ROOT/13.1-RELEASE_2022-11-22_155448       64K   151G     2.05G  /
zroot/ROOT/default                            10.5G   151G     10.2G  /
zroot/tmp                                     1.25M   151G     1.25M  /tmp
zroot/usr                                     29.1G   151G      768K  /usr
zroot/usr/home                                20.0G   151G     20.0G  /usr/home
zroot/usr/ports                               5.86G   151G     5.86G  /usr/ports
zroot/usr/src                                 3.22G   151G     3.22G  /usr/src
zroot/var                                     5.66M   151G      768K  /var
zroot/var/audit                                768K   151G      768K  /var/audit
zroot/var/crash                                768K   151G      768K  /var/crash
zroot/var/log                                 1.62M   151G     1.62M  /var/log
zroot/var/mail                                1.03M   151G     1.03M  /var/mail
zroot/var/tmp                                  768K   151G      768K  /var/tmp

mkdir /mnt/src
zfs set mountpoint=/mnt/src zroot
cd /mnt/src 
ls
nothing here.
 
Code:
# zfs mount | grep /usr/src
zroot/usr/src                   /usr/src

# mount -v  | grep /usr/src
zroot/usr/src on /usr/src (zfs, local, noatime, nfsv4acls, fsid 04c8cd0cde70307d)
 
that's nice ! thanks.

Code:
# zfs rename zroot/usr/src zroot/usr/src-old

 # zfs list

NAME                                           USED  AVAIL     REFER  MOUNTPOINT
zroot                                         39.6G   151G      768K  /mnt/src
zroot/ROOT                                    10.5G   151G      768K  none
zroot/ROOT/13.1-RELEASE-p4_2023-01-04_173043    64K   151G     9.24G  /
zroot/ROOT/13.1-RELEASE_2022-11-22_155448       64K   151G     2.05G  /
zroot/ROOT/default                            10.5G   151G     10.2G  /
zroot/tmp                                     1.25M   151G     1.25M  /tmp
zroot/usr                                     29.1G   151G      768K  /usr
zroot/usr/home                                20.0G   151G     20.0G  /usr/home
zroot/usr/ports                               5.86G   151G     5.86G  /usr/ports
----> zroot/usr/src-old                             3.22G   151G     3.22G  /usr/src-old
zroot/var                                     5.66M   151G      768K  /var
zroot/var/audit                                768K   151G      768K  /var/audit
zroot/var/crash                                768K   151G      768K  /var/crash
zroot/var/log                                 1.62M   151G     1.62M  /var/log
zroot/var/mail                                1.03M   151G     1.03M  /var/mail
zroot/var/tmp                                  768K   151G      768K  /var/tmp
 
what happens now ? what to do ? I've downloaded a new snapshot of the source code and now,instead of the src directory,I see the "src?" directory.

Code:
git clone https://github.com/beckhoff/freebsd-src /usr/src

# ls /usr
bin     include lib32   libexec obj     sbin    src?    tests
home    lib     libdata local   ports   share   src-old

now the "src" directory is called "src?"

Code:
# cd src
src: No such file or directory.
# cd src?
/usr/src^M # ls

.arcconfig              MAINTAINERS             contrib                 secure
.arclint                Makefile                crypto                  share
.cirrus-ci              Makefile.inc1           etc                     stand
.cirrus.yml             Makefile.libcompat      gnu                     sys
.clang-format           Makefile.sys.inc        include                 targets
.git                    ObsoleteFiles.inc       kerberos5               tests
.gitattributes          README.md               lib                     tools
.github                 RELNOTES                libexec                 usr.bin
.gitignore              UPDATING                release                 usr.sbin
COPYRIGHT               bin                     rescue
LOCKS                   cddl                    sbin
 
Code:
# zfs mount | grep /usr/src
zroot/usr/src-old               /usr/src-old

# mount -v  | grep /usr/src
zroot/usr/src-old on /usr/src-old (zfs, local, noatime, nfsv4acls, fsid 04c8cd0cde70307d)

I don't see the src folder,but I have created it...
 
Looks like you created a directory with a Control-M in the name, somehow, maybe? From what you put above:
Code:
# cd src?
/usr/src^M # ls
So is the ^M really there? That is a carriage return (I think) control character.
 
Looks like you created a directory with a Control-M in the name, somehow, maybe? From what you put above:
Code:
# cd src?
/usr/src^M # ls
So is the ^M really there? That is a carriage return (I think) control character.
Good catch. I looked right past that.
 
Looks like you created a directory with a Control-M in the name, somehow, maybe? From what you put above:
Code:
# cd src?
/usr/src^M # ls
So is the ^M really there? That is a carriage return (I think) control character.

nope. I've renamed the dataset called "src" with "src-old" using this command :

Code:
zfs rename zroot/usr/src zroot/usr/src-old

at this point,I've created a new directory called src with the command :

Code:
mkdir /usr/src

because inside there I've downloaded the new source code got from the Corvin's Repo,but I've seen that the"final" name hasn't been "src",but "src?". It has been appended the "?" character. Its not me that I've added it.
 
Back
Top