• Re: [gentoo-user] format usb as ext4

    From Mitchell Dorrell@21:1/5 to syscon780@gmail.com on Thu Oct 24 04:20:01 2024
    On Wed, Oct 23, 2024, 20:35 syscon edm <syscon780@gmail.com> wrote:

    I format usb as ext4
    mkfs.ext4 /dev/sda1

    but XFCE does not automount the partition
    my other usb (ext4 as well) shows up automatically under /run/media/joseph/disk_name


    I think you're correct that if something is automounting your USB storage device, it's probably XFCE (or some part of it).

    I don't personally use XFCE, but I'm sure others here probably do. If you
    don't get any responses on this mailing list, then perhaps try the
    #gentoo-xfce IRC channel. If that's also quiet, you might try another venue that focuses specifically on XFCE, such as the official XFCE links at https://www.xfce.org/community .

    -Mitchell Dorrell



    <div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 23, 2024, 20:35 syscon edm &lt;<a href="mailto:syscon780@gmail.com">syscon780@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0
    0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I format usb as ext4<div>mkfs.ext4 /dev/sda1<br></div><div><br></div><div>but XFCE does not automount the partition </div><div>my other usb (ext4 as well) shows up automatically under</
    <div>/run/media/joseph/disk_name</div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><div dir="auto">I think you&#39;re correct that if something is automounting your USB storage device, it&#39;s probably XFCE (or some part
    of it).</div><div dir="auto"><br></div><div dir="auto">I don&#39;t personally use XFCE, but I&#39;m sure others here probably do. If you don&#39;t get any responses on this mailing list, then perhaps try the #gentoo-xfce IRC channel. If that&#39;s also
    quiet, you might try another venue that focuses specifically on XFCE, such as the official XFCE links at <a href="https://www.xfce.org/community">https://www.xfce.org/community</a> .</div><div dir="auto"><br></div><div dir="auto">-Mitchell Dorrell</div></
    <div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
    </blockquote></div></div></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mitchell Dorrell@21:1/5 to syscon780@gmail.com on Thu Oct 24 05:10:01 2024
    On Wed, Oct 23, 2024 at 10:35 PM syscon edm <syscon780@gmail.com> wrote:

    It was my error, the command should be:
    mkfs.ext4 /dev/sda
    The usb was auto-mounted as soon as the command finished.


    You can format the whole thing (/dev/sda) as one big ext4 volume, yes, but unless I'm very mistaken, that's not standard practice. USB storage devices usually have a partition table with one or more partitions defined. The
    first partition would be /dev/sda1, so the usual commands to format such a partition would use /dev/sda1, not /dev/sda.

    Since you're formatting it as ext4, I suppose you only intend to use this
    on Linux machines. I guess it's probably OK to format the whole device as
    ext4, without any partition table. However, I would definitely advise
    against it for any USB device you might use in a cross-platform
    environment. I have no idea whether you can skip the partition table and
    still be usable with computers running Windows or Mac OS or with embedded systems like home printers or commercial photo kiosks.

    -MD

    <div dir="ltr"><div dir="ltr"></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 23, 2024 at 10:35 PM syscon edm &lt;<a href="mailto:syscon780@gmail.com">syscon780@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_
    quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">It was my error, the command should be:<div>mkfs.ext4 /dev/sda<br></div><div>The usb was auto-mounted as soon as the command finished.</div></
    </blockquote><div><br></div><div>You can format the whole thing (/dev/sda) as one big ext4 volume, yes, but unless I&#39;m very mistaken, that&#39;s not standard practice. USB storage devices usually have a partition table with one or more partitions
    defined. The first partition would be /dev/sda1, so the usual commands to format such a partition would use /dev/sda1, not /dev/sda.<br></div><div><br></div><div>Since you&#39;re formatting it as ext4, I suppose you only intend to use this on Linux
    machines. I guess it&#39;s probably OK to format the whole device as ext4, without any partition table. However, I would definitely advise against it for any USB device you might use in a cross-platform environment. I have no idea whether you can skip
    the partition table and still be usable with computers running Windows or Mac OS or with embedded systems like home printers or commercial photo kiosks.</div><div><br></div><div>-MD</div></div></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jack Ostroff@21:1/5 to syscon edm on Thu Oct 24 04:50:01 2024
    This is a multi-part message in MIME format.
    [resent from my subscribed email]

    "mkfs.ext4 /dev/sda" will create/format an ext4 partition taking up the
    entire device, which will then easily be automounted.

    "mkfs.ext4 /dev/sda1" can work, but only if you have already created a partition table on /dev/sda and created at least one partition in it. 
    It probably won't automount because the system doesn't know which of the possibly several partitions on the device should be mounted, but I
    haven't tested.

    On 10/23/24 10:34 PM, syscon edm wrote:
    It was my error, the command should be:
    mkfs.ext4 /dev/sda
    The usb was auto-mounted as soon as the command finished.

    It has been some time since I run it, but looking at some
    documentation on-line a lot of instructions show to run:
    sudo mkfs.ext4 /dev/sdX1

    eg: https://unix.stackexchange.com/questions/422656/how-to-make-an-ext4-formatted-usb-drive-with-full-rw-permissions-for-any-linux-m
    Even Google AI if one search: "gentoo format usb as ext4"
    it shows to run:
    sudo mkfs -t ext4 /dev/sdb1

    this will work but the disk will not automount in XFCE,
    it should be:
    sudo mkfs.ext4 /dev/sdX



    On Wed, Oct 23, 2024 at 8:20 PM Mitchell Dorrell <mwd@psc.edu> wrote:

    On Wed, Oct 23, 2024, 20:35 syscon edm <syscon780@gmail.com> wrote:

    I format usb as ext4
    mkfs.ext4 /dev/sda1

    but XFCE does not automount the partition
    my other usb (ext4 as well) shows up automatically under
    /run/media/joseph/disk_name


    I think you're correct that if something is automounting your USB
    storage device, it's probably XFCE (or some part of it).

    I don't personally use XFCE, but I'm sure others here probably do.
    If you don't get any responses on this mailing list, then perhaps
    try the #gentoo-xfce IRC channel. If that's also quiet, you might
    try another venue that focuses specifically on XFCE, such as the
    official XFCE links at https://www.xfce.org/community .

    -Mitchell Dorrell

    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
    <p>[resent from my subscribed email]<br>
    </p>
    <p>"mkfs.ext4 /dev/sda" will create/format an ext4 partition taking
    up the entire device, which will then easily be automounted.</p>
    <p>"mkfs.ext4 /dev/sda1" can work, but only if you have already
    created a partition table on /dev/sda and created at least one
    partition in it.  It probably won't automount because the system
    doesn't know which of the possibly several partitions on the
    device should be mounted, but I haven't tested.</p>
    <p></p>
    <div class="moz-cite-prefix">On 10/23/24 10:34 PM, syscon edm wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:CAEVFJ_D+V2_7-VZ6NQp04eQT1RiFUNTpLkwXZU6441k-d18pMA@mail.gmail.com">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <div dir="ltr">It was my error, the command should be:
    <div>mkfs.ext4 /dev/sda<br>
    </div>
    <div>The usb was auto-mounted as soon as the command finished.</div>
    <div><br>
    </div>
    <div>It has been some time since I run it, but looking at some
    documentation on-line a lot of instructions show to run:</div>
    <div>sudo mkfs.ext4 /dev/sdX1<br>
    </div>
    <div><br>
    </div>
    <div>eg:</div>
    <div><a href="https://unix.stackexchange.com/questions/422656/how-to-make-an-ext4-formatted-usb-drive-with-full-rw-permissions-for-any-linux-m"
    moz-do-not-send="true" class="moz-txt-link-freetext">https://unix.stackexchange.com/questions/422656/how-to-make-an-ext4-formatted-usb-drive-with-full-rw-permissions-for-any-linux-m</a><br>
    </div>
    <div>Even Google AI if one search: "gentoo format usb as ext4"</div>
    <div>it shows to run:</div>
    <div>sudo mkfs -t ext4 /dev/sdb1<br>
    </div>
    <div><br>
    </div>
    <div>this will work but the disk will not automount in XFCE, <br>
    </div>
    <div>it should be:</div>
    <div>sudo mkfs.ext4 /dev/sdX<br>
    </div>
    <div><br>
    </div>
    <div><br>
    </div>
    </div>
    <br>
    <div class="gmail_quote">
    <div dir="ltr" class="gmail_attr">On Wed, Oct 23, 2024 at
    8:20 PM Mitchell Dorrell &lt;<a href="mailto:mwd@psc.edu"
    moz-do-not-send="true" class="moz-txt-link-freetext">mwd@psc.edu</a>&gt;
    wrote:<br>
    </div>
    <blockquote class="gmail_quote"
    style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
    <div dir="auto">
    <div>
    <div class="gmail_quote">
    <div dir="ltr" class="gmail_attr">On Wed, Oct 23, 2024,
    20:35 syscon edm &lt;<a
    href="mailto:syscon780@gmail.com" target="_blank"
    moz-do-not-send="true" class="moz-txt-link-freetext">syscon780@gmail.com</a>&gt;
    wrote:<br>
    </div>
    <blockquote class="gmail_quote"
    style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
    <div dir="ltr">I format usb as ext4
    <div>mkfs.ext4 /dev/sda1<br>
    </div>
    <div><br>
    </div>
    <div>but XFCE does not automount the partition </div>
    <div>my other usb (ext4 as well) shows up
    automatically under</div>
    <div>/run/media/joseph/disk_name</div>
    </div>
    </blockquote>
    </div>
    </div>
    <div dir="auto"><br>
    </div>
    <div dir="auto">
    <div dir="auto">I think you're correct that if something
    is automounting your USB storage device, it's probably
    XFCE (or some part of it).</div>
    <div dir="auto"><br>
    </div>
    <div dir="auto">I don't personally use XFCE, but I'm sure
    others here probably do. If you don't get any responses
    on this mailing list, then perhaps try the #gentoo-xfce
    IRC channel. If that's also quiet, you might try another
    venue that focuses specifically on XFCE, such as the
    official XFCE links at <a
    href="https://www.xfce.org/community" target="_blank"
    moz-do-not-send="true" class="moz-txt-link-freetext">https://www.xfce.org/community</a>
    .</div>
    <div dir="auto"><br>
    </div>
    <div dir="auto">-Mitchell Dorrell</div>
    </div>
    <div dir="auto">
    <div class="gmail_quote">
    <blockquote class="gmail_quote"
    style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
    </blockquote>
    </div>
    </div>
    </div>
    </blockquote>
    </div>
    </blockquote>
    </body>
    </html>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael@21:1/5 to All on Thu Oct 24 14:16:55 2024
    On Thursday 24 October 2024 14:11:12 BST syscon edm wrote:
    Yes, you are right.
    doing "mkfs.ext4 /dev/sda1" worked, but I could only manually mount,
    for automount it has to be entire partition "mkfs.ext4 /dev/sda"

    If you want to run "mkfs.ext4 /dev/sda1" then first you must create a
    partition label (e.g DOS, GPT) and add a partition on the device using fdisk, parted, etc. The mkfs command will error out complaining about /dev/sda1 not found or something like that.

    If the device has no partitions on it, then "mkfs.ext4 /dev/sda" is what you have to run. It will format an ext4 fs on the whole device, like a floppy disk.

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmcaSMcACgkQseqq9sKV Zxn3hg/+LSnjQpbwJCD31sLq+jc+DZeIYDx0WGCMNcUgeyTGv8jZ3ABB9IXNirMw Ug86COFKDQzcOBoDns91HAtIRBSxgoubvqs6+XWmz2O6Cl2qCdrD4vhT2DW+xeLI 03oi3KBveKu7gqY2Qc5iek1a4yCqAmui3Yo2GB4sR4HNyug8YUZN62JGlyc+7CJX NTdDiudGV9HVwhLP36t5drL2ZrYQNYw6DCVeHvTNuJZTzQfZa59uoWm268g33/+4 g4IoHYTfmJwp7AlX1gvRM4BuYrIMAwqj9Vhi715/BTuKdlNwLhrxw2tJMLYWbL0s nk7eA8PCftyn5WmFyju7H/fyNI+9eszaOenrafrbtYx5emNPRCToRdItbazvFgpR atNCf+dZkyPVgz1+5lpzjxlNwT9ZsDudORplpnfBG2DuygYwoCi4z9zBY0nJ3R46 kQMtbsWNcS9IqrGNybuLJgiPlMO4eUoPj/XHKfo8A/zgP2YyO37jZiIYxWyu+QMV nx1nKTxmbhD3EJM60rQQ/oBUHa4Yc0v5YiDanSkWM1fPy4xD81g7dNwd5kf2AWoW MvyDsCla6GpHpYJrXHlwQ5IWQAZtGn0H4W8axPoXBxy9zeSspKxBFkl0dIN0cBIX TOg8wvWnQe79GxPzuMfFXMi/amf/nezHr7kAToBMLdrxBrlp2f8=
    =atFn
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wol@21:1/5 to Mitchell Dorrell on Mon Nov 4 00:40:01 2024
    On 24/10/2024 04:01, Mitchell Dorrell wrote:
    I have no idea whether you can skip the partition table and still be
    usable with computers running Windows or Mac OS or with embedded systems
    like home printers or commercial photo kiosks.

    Seeing as it's removable media I would expect most of those to have
    problems if you DID have a partition table. It's linux that's unusual in
    being happy with a partition table on removable media.

    Cheers,
    Wol

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Matt Jolly@21:1/5 to Wol on Mon Nov 4 03:20:01 2024
    Hi,

    On 4/11/24 09:35, Wol wrote:

    Seeing as it's removable media I would expect most of those to have
    problems if you DID have a partition table. It's linux that's unusual in being happy with a partition table on removable media.


    That is not the case at all. Without a partition table how would other
    OSes handle, say, a USB thumbdrive with multiple partitions?

    Various *nixes are the systems that don't mind if you just bang a
    filesystem directly onto a storage device. Windows would (and does)
    have a conniption if this is attempted.

    Regards,

    Matt

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wols Lists@21:1/5 to Matt Jolly on Mon Nov 4 08:40:01 2024
    On 04/11/2024 02:11, Matt Jolly wrote:
    Hi,

    On 4/11/24 09:35, Wol wrote:

    Seeing as it's removable media I would expect most of those to have
    problems if you DID have a partition table. It's linux that's unusual
    in being happy with a partition table on removable media.


    That is not the case at all. Without a partition table how would other
    OSes handle, say, a USB thumbdrive with multiple partitions?

    I wasn't aware they could...

    Various *nixes are the systems that don't mind if you just bang a
    filesystem directly onto a storage device. Windows would (and does)
    have a conniption if this is attempted.

    I know linux doesn't care - has never cared, but historically you did
    NOT have partition tables on removable media. Floppy disks didn't have partition tables. I'm not aware of early SD cards or USB sticks having partition tables. It's only relatively recently with "huge" media sticks
    that partition tables on removable media have become a thing.

    If you wanted to boot a Windows install from a USB stick, I'm used to
    just dd'ing the CD iso (shows how long ago that was) to the stick.

    Certainly in the early days, istr Windows being unable to find a
    partition table on a USB stick.

    Cheers,
    Wol

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Viorel Munteanu@21:1/5 to All on Mon Nov 4 09:40:02 2024
    La 04.11.2024 09:35, Wols Lists a scris:
    I know linux doesn't care - has never cared, but historically you did
    NOT have partition tables on removable media. Floppy disks didn't have partition tables. I'm not aware of early SD cards or USB sticks having partition tables. It's only relatively recently with "huge" media
    sticks that partition tables on removable media have become a thing.

    Actually they did.  USB sticks had a partition table, and Windows would
    would only see the first partition.  It did not show you the partition
    table, but it was there.

    I think the last floppy without a partition table was the 1.44 MB one
    (ok, the 2.88 MB too, but I never saw one).  Even ZIP drives had a
    partition table.


    Viorel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)