[sf-lug] df(1) Re: NEED INFO ABOUT BOOT SPACE LIMITS

Michael Paoli Michael.Paoli at cal.berkeley.edu
Wed Aug 2 06:20:13 PDT 2017


Well, one very handy bit with df(1)

SYNOPSIS
        df [OPTION]... [FILE]...
DESCRIPTION
        This  manual  page  documents  the  GNU version of df.  df displays the
        amount of disk space available on the file system containing each  file
        name  argument.

One needn't "know" upon what filesystem the file (of any type -
directory is also just a type of file on Linux/Unix/BSD),
so, e.g.:
$ df -h /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       228M   36M  180M  17% /boot
$
I can see from that that there's a (non-root) filesystem
mounted on mountpoint /boot.  Were the contents of /boot on the
root (/) filesystem, I would have instead seen:
$ df -h /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/dm-66      768M  583M  148M  80% /
$
And even quite handy, e.g.:
$ df -h .
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       228M   36M  180M  17% /boot
$

So ... Linux ... customary location - typical default, for the
boot stuff, beyond the boot sector, and possibly some blocks around
start of filesystem, is /boot ... but that may be on the root (/)
filesystem, or a separate filesystem.  In any case, presuming also
that if it's separate, it's mounted, if it's in fact using /boot
(separate or not),
$ df -h /boot
would let us know about the filesystem space of whatever filesystem
currently contains the /boot "file" (directory).

One can also tell df(1) filesystem type or types:
$ df -h -t ext2
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       228M   36M  180M  17% /boot
$ df -h -t ext2 -t iso9660
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       228M   36M  180M  17% /boot
/dev/loop3      647M  647M     0 100% /media/cdrom8
/dev/loop1      655M  655M     0 100% /srv/tftp/ubuntu-installer
/dev/loop0      630M  630M     0 100% /media/cdrom9
$

Using such option(s) can also be much more concise.  :-)
$ df -h | wc -l
29
$

> From: "Rick Moen" <rick at linuxmafia.com>
> Subject: Re: [sf-lug] NEED INFO ABOUT BOOT SPACE LIMITS
> Date: Mon, 31 Jul 2017 10:18:45 -0700

> Quoting Michael Paoli (Michael.Paoli at cal.berkeley.edu):
>
>> And for that boot space ... yeah, not sector.
>> in addition to output of:
>> df -h
>> boot filesystem is likely/generally mounted on /boot,...
>
> All we know for certain is this something GNOME refers to as 'The volume
> "boot"', and strictly speaking, we don't know what's in GNOME's tiny
> little brain.  I'd guess it's picking up a volume label, and it would be
> perverse to assign such a label to a filesystem used for anything other
> than mounting at /boot, but doing otherwise is within the range of
> possibility, which is why 'df -h' output would be orders of magnitude
> more useful.
>
> But yeah, I'm guessing that it probably is the /boot filesystem and  
> that Mikki
> simply has a bunch of stuff in there that shouldn't be there at all.
> Similar story:  https://ubuntuforums.org/showthread.php?t=2225971




More information about the sf-lug mailing list