Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Dec 2018 20:20:48 +0100
From:      Polytropon <freebsd@edvax.de>
To:        Paul Schmehl <pschmehl_lists@tx.rr.com>
Cc:        Michael Schuster <michaelsprivate@gmail.com>, freeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: Files in /
Message-ID:  <20181204202048.4fa1086e.freebsd@edvax.de>
In-Reply-To: <FC672515FD75505BC3980937@Pauls-MacBook-Pro.local>
References:  <66B63BE11669F00AA754FE87@Pauls-MacBook-Pro.local> <CADqw_gKxm9x9t6KJSJ4AA8nZ8SdJt8D72D8jHoyNqnPZb9WA0g@mail.gmail.com> <FC672515FD75505BC3980937@Pauls-MacBook-Pro.local>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Tue, 04 Dec 2018 12:25:23 -0600, Paul Schmehl wrote:
> --On December 4, 2018 at 9:43:06 AM +0100 Michael Schuster=20
> <michaelsprivate@gmail.com> wrote:
>=20
> >
> >
> > Paul,
> >
> >
> > first, you show 'df' output of "/", whereas later on you only work with
> > "/root" - there's probably other stuff in "/" that's not in "/root" -
> > /etc comes to mind, /sbin ...=A0
> >
>=20
> That's helpful. When I run ls on / I get this:
>=20
>  ls / .cshrc	 COPYRIGHT cdrom dist home media rescue sys	 var .profile bi=
n=20
> compat entropy lib mnt root tmp .snap boot dev etc libexec proc sbin usr

Except for formatting, this looks completely valid.



> Since I have separate partitions for /var, /tmp, and /usr, that would mea=
n=20
> everything not included under those would be part of the / partition?

Correct. You can easily check with the command

	# mount

which directories serve as a mountpoint for partitions.
Everything else is on /.



> I'm not sure I understand entropy.

This file is part of the system's random number generator.
See "man 4 random" as well as /etc/rc.d/initrandom and
/etc/rc.d/random.



> Using file, I can see that /home and=20
> /compat are symlinks, [...]

That's usually true, but _can_ be different depending
on installation. For example, on my home system, /home
is an (initially empty) directory serving as a mountpoint
for a second disk that contains the home directories.

In your case, /home would also be on the /usr partition.



> [...] but what is entropy? File says it's data.

Correct. This file is being maintained by system scripts
as mentioned above.



> If I use find to get the directories directly under root, it returns this:
>=20
> # find / -type d -maxdepth 1
> /
> /.snap
> /dev
> /tmp
> /usr
> /var
> /etc
> /cdrom
> /dist
> /bin
> /boot
> /lib
> /libexec
> /media
> /mnt
> /proc
> /rescue
> /root
> /sbin
>=20
> So, I can eliminate /tmp, /usr, and /var, and the rest is in the root=20
> partition, correct?

If they aren't mounted somewhere else (which would be the
typical state, and can be verified with the "mount" or the
"df" command), that's correct.

You can use the following sh one-liner to check which
directories at / serve as a mountpoint:

	$ for DIR in `find / -type d -maxdepth 1`; do mount -v | grep " on ${DIR} =
" | cut -d '(' -f 1; done

YOu should then only see the directories which are currently
used as mountpoints.



> It seems the most disk consumption is in /boot/
>=20
> # du -h /boot/
>  28K	/boot/defaults
> 2.0K	/boot/firmware
> 497M	/boot/kernel
> 2.0K	/boot/modules
> 2.0K	/boot/zfs
> 2.0K	/boot/dtb
>  91M	/boot/kernel.old
> 591M	/boot/
>=20
> I can remove /boot/kernel.old, right? (I'm not sure I will. Just asking.)

Basically yes, but then you won't be able to boot kernel.old.

The kernel and the modules have grown in size over the years.
The times where a 512 MB (or 256 MB) / partition would be
sufficiently big are long gone. :-)



--=20
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20181204202048.4fa1086e.freebsd>