How to reliably mount UDF partition with /etc/fstab












-1















My HDD



Disk /dev/sdb: 927.5 GiB, 995875618816 bytes, 1945069568 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xc4094bc2

Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 718847 716800 350M c W95 FAT32 (LBA)
/dev/sdb2 718848 269154303 268435456 128G 7 HPFS/NTFS/exFAT
/dev/sdb4 269156350 1945067519 1675911170 799.1G f W95 Ext'd (LBA)
/dev/sdb5 403374080 1945067519 1541693440 735.1G 6 FAT16
/dev/sdb6 269156352 403374079 134217728 64G 83 Linux


I have formatted /dev/sdb5 as udf with



mkfs.udf --utf8 -l UDFStore /dev/sdb5


on Gentoo. But blkid doesn't list /dev/sdb5. How can I reliably mount my UDF partition at startup in /etc/fstab when device enumeration changes due to additional connected USB devices at startup.










share|improve this question

























  • Does fdisk -l shows it

    – Tryna Learn Somethin
    Feb 4 at 18:51











  • I abandoned UDF.

    – neckTwi
    Feb 6 at 5:50











  • Apart from mounting issues, I faced with sticky files those won't delete and compiling the kernel on it failed.

    – neckTwi
    Feb 6 at 6:00


















-1















My HDD



Disk /dev/sdb: 927.5 GiB, 995875618816 bytes, 1945069568 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xc4094bc2

Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 718847 716800 350M c W95 FAT32 (LBA)
/dev/sdb2 718848 269154303 268435456 128G 7 HPFS/NTFS/exFAT
/dev/sdb4 269156350 1945067519 1675911170 799.1G f W95 Ext'd (LBA)
/dev/sdb5 403374080 1945067519 1541693440 735.1G 6 FAT16
/dev/sdb6 269156352 403374079 134217728 64G 83 Linux


I have formatted /dev/sdb5 as udf with



mkfs.udf --utf8 -l UDFStore /dev/sdb5


on Gentoo. But blkid doesn't list /dev/sdb5. How can I reliably mount my UDF partition at startup in /etc/fstab when device enumeration changes due to additional connected USB devices at startup.










share|improve this question

























  • Does fdisk -l shows it

    – Tryna Learn Somethin
    Feb 4 at 18:51











  • I abandoned UDF.

    – neckTwi
    Feb 6 at 5:50











  • Apart from mounting issues, I faced with sticky files those won't delete and compiling the kernel on it failed.

    – neckTwi
    Feb 6 at 6:00
















-1












-1








-1








My HDD



Disk /dev/sdb: 927.5 GiB, 995875618816 bytes, 1945069568 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xc4094bc2

Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 718847 716800 350M c W95 FAT32 (LBA)
/dev/sdb2 718848 269154303 268435456 128G 7 HPFS/NTFS/exFAT
/dev/sdb4 269156350 1945067519 1675911170 799.1G f W95 Ext'd (LBA)
/dev/sdb5 403374080 1945067519 1541693440 735.1G 6 FAT16
/dev/sdb6 269156352 403374079 134217728 64G 83 Linux


I have formatted /dev/sdb5 as udf with



mkfs.udf --utf8 -l UDFStore /dev/sdb5


on Gentoo. But blkid doesn't list /dev/sdb5. How can I reliably mount my UDF partition at startup in /etc/fstab when device enumeration changes due to additional connected USB devices at startup.










share|improve this question
















My HDD



Disk /dev/sdb: 927.5 GiB, 995875618816 bytes, 1945069568 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xc4094bc2

Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 718847 716800 350M c W95 FAT32 (LBA)
/dev/sdb2 718848 269154303 268435456 128G 7 HPFS/NTFS/exFAT
/dev/sdb4 269156350 1945067519 1675911170 799.1G f W95 Ext'd (LBA)
/dev/sdb5 403374080 1945067519 1541693440 735.1G 6 FAT16
/dev/sdb6 269156352 403374079 134217728 64G 83 Linux


I have formatted /dev/sdb5 as udf with



mkfs.udf --utf8 -l UDFStore /dev/sdb5


on Gentoo. But blkid doesn't list /dev/sdb5. How can I reliably mount my UDF partition at startup in /etc/fstab when device enumeration changes due to additional connected USB devices at startup.







fstab udf






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 8 '18 at 7:46







neckTwi

















asked Sep 8 '18 at 6:45









neckTwineckTwi

3413615




3413615













  • Does fdisk -l shows it

    – Tryna Learn Somethin
    Feb 4 at 18:51











  • I abandoned UDF.

    – neckTwi
    Feb 6 at 5:50











  • Apart from mounting issues, I faced with sticky files those won't delete and compiling the kernel on it failed.

    – neckTwi
    Feb 6 at 6:00





















  • Does fdisk -l shows it

    – Tryna Learn Somethin
    Feb 4 at 18:51











  • I abandoned UDF.

    – neckTwi
    Feb 6 at 5:50











  • Apart from mounting issues, I faced with sticky files those won't delete and compiling the kernel on it failed.

    – neckTwi
    Feb 6 at 6:00



















Does fdisk -l shows it

– Tryna Learn Somethin
Feb 4 at 18:51





Does fdisk -l shows it

– Tryna Learn Somethin
Feb 4 at 18:51













I abandoned UDF.

– neckTwi
Feb 6 at 5:50





I abandoned UDF.

– neckTwi
Feb 6 at 5:50













Apart from mounting issues, I faced with sticky files those won't delete and compiling the kernel on it failed.

– neckTwi
Feb 6 at 6:00







Apart from mounting issues, I faced with sticky files those won't delete and compiling the kernel on it failed.

– neckTwi
Feb 6 at 6:00












2 Answers
2






active

oldest

votes


















1














Aside from device names, you can mount filesystems using their UUID or label.



For example, if when you created the filesystem you labeled it UDFStore, you can add an /etc/fstab entry like this: LABEL=UDFStore /data udf defaults 0 0






share|improve this answer
























  • that didn't work. lsblk shows no label for /dev/sdb5. Stupid of me for voting up without testing. Ur answer felt very obvious! huh!

    – neckTwi
    Sep 8 '18 at 16:41













  • Plug in the device, then, run find /dev/disk. You'll see paths corresponding to your disks and partitions. Look through the directories by-label, by-partlabel, and by-id. Those are reliable paths, one of which may correspond to the UDF partition. To use filesystem or partition ID's, you can run lsblk -o NAME,FSTYPE,LABEL,PARTLABEL,PARTUUID and match those ID's with the appropriate path from the find command above, by looking for device files in the by-uid and by-uuid directories. Then in /etc/fstab` substitute /dev/sdb5 with the reliable path of your choice.

    – Emmanuel Rosa
    Sep 9 '18 at 3:20











  • lsblk for my udf partition reports no FSTYPE,LABEL,PARTLABEL and PARTUUID

    – neckTwi
    Sep 9 '18 at 3:40











  • See if this helps: unix.stackexchange.com/questions/35973/…

    – Emmanuel Rosa
    Sep 9 '18 at 6:35











  • Though the solution mentioned there is for entire hard disk, can I still mkudffs --media-type=hd --vid=UDFStore /dev/sdb5? Does it destroy data?

    – neckTwi
    Sep 9 '18 at 6:55



















0















But blkid doesn't list /dev/sdb5.




That is probably because of blkid cache. Use -p to bypass cache and specify also block device. E.g.



$ blkid -p /dev/sdb5


It should print something like this:



VOLUME_ID="UDFStore" UUID="5c587177a6c9eba4" VOLUME_SET_ID="5c587177a6c9eba4LinuxUDF" LABEL="UDFStore" LOGICAL_VOLUME_ID="UDFStore" VERSION="2.01" TYPE="udf" USAGE="filesystem"


Then you can use printed UUID to specify your entry in /etc/fstab.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f467671%2fhow-to-reliably-mount-udf-partition-with-etc-fstab%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Aside from device names, you can mount filesystems using their UUID or label.



    For example, if when you created the filesystem you labeled it UDFStore, you can add an /etc/fstab entry like this: LABEL=UDFStore /data udf defaults 0 0






    share|improve this answer
























    • that didn't work. lsblk shows no label for /dev/sdb5. Stupid of me for voting up without testing. Ur answer felt very obvious! huh!

      – neckTwi
      Sep 8 '18 at 16:41













    • Plug in the device, then, run find /dev/disk. You'll see paths corresponding to your disks and partitions. Look through the directories by-label, by-partlabel, and by-id. Those are reliable paths, one of which may correspond to the UDF partition. To use filesystem or partition ID's, you can run lsblk -o NAME,FSTYPE,LABEL,PARTLABEL,PARTUUID and match those ID's with the appropriate path from the find command above, by looking for device files in the by-uid and by-uuid directories. Then in /etc/fstab` substitute /dev/sdb5 with the reliable path of your choice.

      – Emmanuel Rosa
      Sep 9 '18 at 3:20











    • lsblk for my udf partition reports no FSTYPE,LABEL,PARTLABEL and PARTUUID

      – neckTwi
      Sep 9 '18 at 3:40











    • See if this helps: unix.stackexchange.com/questions/35973/…

      – Emmanuel Rosa
      Sep 9 '18 at 6:35











    • Though the solution mentioned there is for entire hard disk, can I still mkudffs --media-type=hd --vid=UDFStore /dev/sdb5? Does it destroy data?

      – neckTwi
      Sep 9 '18 at 6:55
















    1














    Aside from device names, you can mount filesystems using their UUID or label.



    For example, if when you created the filesystem you labeled it UDFStore, you can add an /etc/fstab entry like this: LABEL=UDFStore /data udf defaults 0 0






    share|improve this answer
























    • that didn't work. lsblk shows no label for /dev/sdb5. Stupid of me for voting up without testing. Ur answer felt very obvious! huh!

      – neckTwi
      Sep 8 '18 at 16:41













    • Plug in the device, then, run find /dev/disk. You'll see paths corresponding to your disks and partitions. Look through the directories by-label, by-partlabel, and by-id. Those are reliable paths, one of which may correspond to the UDF partition. To use filesystem or partition ID's, you can run lsblk -o NAME,FSTYPE,LABEL,PARTLABEL,PARTUUID and match those ID's with the appropriate path from the find command above, by looking for device files in the by-uid and by-uuid directories. Then in /etc/fstab` substitute /dev/sdb5 with the reliable path of your choice.

      – Emmanuel Rosa
      Sep 9 '18 at 3:20











    • lsblk for my udf partition reports no FSTYPE,LABEL,PARTLABEL and PARTUUID

      – neckTwi
      Sep 9 '18 at 3:40











    • See if this helps: unix.stackexchange.com/questions/35973/…

      – Emmanuel Rosa
      Sep 9 '18 at 6:35











    • Though the solution mentioned there is for entire hard disk, can I still mkudffs --media-type=hd --vid=UDFStore /dev/sdb5? Does it destroy data?

      – neckTwi
      Sep 9 '18 at 6:55














    1












    1








    1







    Aside from device names, you can mount filesystems using their UUID or label.



    For example, if when you created the filesystem you labeled it UDFStore, you can add an /etc/fstab entry like this: LABEL=UDFStore /data udf defaults 0 0






    share|improve this answer













    Aside from device names, you can mount filesystems using their UUID or label.



    For example, if when you created the filesystem you labeled it UDFStore, you can add an /etc/fstab entry like this: LABEL=UDFStore /data udf defaults 0 0







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Sep 8 '18 at 10:27









    Emmanuel RosaEmmanuel Rosa

    3,1651612




    3,1651612













    • that didn't work. lsblk shows no label for /dev/sdb5. Stupid of me for voting up without testing. Ur answer felt very obvious! huh!

      – neckTwi
      Sep 8 '18 at 16:41













    • Plug in the device, then, run find /dev/disk. You'll see paths corresponding to your disks and partitions. Look through the directories by-label, by-partlabel, and by-id. Those are reliable paths, one of which may correspond to the UDF partition. To use filesystem or partition ID's, you can run lsblk -o NAME,FSTYPE,LABEL,PARTLABEL,PARTUUID and match those ID's with the appropriate path from the find command above, by looking for device files in the by-uid and by-uuid directories. Then in /etc/fstab` substitute /dev/sdb5 with the reliable path of your choice.

      – Emmanuel Rosa
      Sep 9 '18 at 3:20











    • lsblk for my udf partition reports no FSTYPE,LABEL,PARTLABEL and PARTUUID

      – neckTwi
      Sep 9 '18 at 3:40











    • See if this helps: unix.stackexchange.com/questions/35973/…

      – Emmanuel Rosa
      Sep 9 '18 at 6:35











    • Though the solution mentioned there is for entire hard disk, can I still mkudffs --media-type=hd --vid=UDFStore /dev/sdb5? Does it destroy data?

      – neckTwi
      Sep 9 '18 at 6:55



















    • that didn't work. lsblk shows no label for /dev/sdb5. Stupid of me for voting up without testing. Ur answer felt very obvious! huh!

      – neckTwi
      Sep 8 '18 at 16:41













    • Plug in the device, then, run find /dev/disk. You'll see paths corresponding to your disks and partitions. Look through the directories by-label, by-partlabel, and by-id. Those are reliable paths, one of which may correspond to the UDF partition. To use filesystem or partition ID's, you can run lsblk -o NAME,FSTYPE,LABEL,PARTLABEL,PARTUUID and match those ID's with the appropriate path from the find command above, by looking for device files in the by-uid and by-uuid directories. Then in /etc/fstab` substitute /dev/sdb5 with the reliable path of your choice.

      – Emmanuel Rosa
      Sep 9 '18 at 3:20











    • lsblk for my udf partition reports no FSTYPE,LABEL,PARTLABEL and PARTUUID

      – neckTwi
      Sep 9 '18 at 3:40











    • See if this helps: unix.stackexchange.com/questions/35973/…

      – Emmanuel Rosa
      Sep 9 '18 at 6:35











    • Though the solution mentioned there is for entire hard disk, can I still mkudffs --media-type=hd --vid=UDFStore /dev/sdb5? Does it destroy data?

      – neckTwi
      Sep 9 '18 at 6:55

















    that didn't work. lsblk shows no label for /dev/sdb5. Stupid of me for voting up without testing. Ur answer felt very obvious! huh!

    – neckTwi
    Sep 8 '18 at 16:41







    that didn't work. lsblk shows no label for /dev/sdb5. Stupid of me for voting up without testing. Ur answer felt very obvious! huh!

    – neckTwi
    Sep 8 '18 at 16:41















    Plug in the device, then, run find /dev/disk. You'll see paths corresponding to your disks and partitions. Look through the directories by-label, by-partlabel, and by-id. Those are reliable paths, one of which may correspond to the UDF partition. To use filesystem or partition ID's, you can run lsblk -o NAME,FSTYPE,LABEL,PARTLABEL,PARTUUID and match those ID's with the appropriate path from the find command above, by looking for device files in the by-uid and by-uuid directories. Then in /etc/fstab` substitute /dev/sdb5 with the reliable path of your choice.

    – Emmanuel Rosa
    Sep 9 '18 at 3:20





    Plug in the device, then, run find /dev/disk. You'll see paths corresponding to your disks and partitions. Look through the directories by-label, by-partlabel, and by-id. Those are reliable paths, one of which may correspond to the UDF partition. To use filesystem or partition ID's, you can run lsblk -o NAME,FSTYPE,LABEL,PARTLABEL,PARTUUID and match those ID's with the appropriate path from the find command above, by looking for device files in the by-uid and by-uuid directories. Then in /etc/fstab` substitute /dev/sdb5 with the reliable path of your choice.

    – Emmanuel Rosa
    Sep 9 '18 at 3:20













    lsblk for my udf partition reports no FSTYPE,LABEL,PARTLABEL and PARTUUID

    – neckTwi
    Sep 9 '18 at 3:40





    lsblk for my udf partition reports no FSTYPE,LABEL,PARTLABEL and PARTUUID

    – neckTwi
    Sep 9 '18 at 3:40













    See if this helps: unix.stackexchange.com/questions/35973/…

    – Emmanuel Rosa
    Sep 9 '18 at 6:35





    See if this helps: unix.stackexchange.com/questions/35973/…

    – Emmanuel Rosa
    Sep 9 '18 at 6:35













    Though the solution mentioned there is for entire hard disk, can I still mkudffs --media-type=hd --vid=UDFStore /dev/sdb5? Does it destroy data?

    – neckTwi
    Sep 9 '18 at 6:55





    Though the solution mentioned there is for entire hard disk, can I still mkudffs --media-type=hd --vid=UDFStore /dev/sdb5? Does it destroy data?

    – neckTwi
    Sep 9 '18 at 6:55













    0















    But blkid doesn't list /dev/sdb5.




    That is probably because of blkid cache. Use -p to bypass cache and specify also block device. E.g.



    $ blkid -p /dev/sdb5


    It should print something like this:



    VOLUME_ID="UDFStore" UUID="5c587177a6c9eba4" VOLUME_SET_ID="5c587177a6c9eba4LinuxUDF" LABEL="UDFStore" LOGICAL_VOLUME_ID="UDFStore" VERSION="2.01" TYPE="udf" USAGE="filesystem"


    Then you can use printed UUID to specify your entry in /etc/fstab.






    share|improve this answer




























      0















      But blkid doesn't list /dev/sdb5.




      That is probably because of blkid cache. Use -p to bypass cache and specify also block device. E.g.



      $ blkid -p /dev/sdb5


      It should print something like this:



      VOLUME_ID="UDFStore" UUID="5c587177a6c9eba4" VOLUME_SET_ID="5c587177a6c9eba4LinuxUDF" LABEL="UDFStore" LOGICAL_VOLUME_ID="UDFStore" VERSION="2.01" TYPE="udf" USAGE="filesystem"


      Then you can use printed UUID to specify your entry in /etc/fstab.






      share|improve this answer


























        0












        0








        0








        But blkid doesn't list /dev/sdb5.




        That is probably because of blkid cache. Use -p to bypass cache and specify also block device. E.g.



        $ blkid -p /dev/sdb5


        It should print something like this:



        VOLUME_ID="UDFStore" UUID="5c587177a6c9eba4" VOLUME_SET_ID="5c587177a6c9eba4LinuxUDF" LABEL="UDFStore" LOGICAL_VOLUME_ID="UDFStore" VERSION="2.01" TYPE="udf" USAGE="filesystem"


        Then you can use printed UUID to specify your entry in /etc/fstab.






        share|improve this answer














        But blkid doesn't list /dev/sdb5.




        That is probably because of blkid cache. Use -p to bypass cache and specify also block device. E.g.



        $ blkid -p /dev/sdb5


        It should print something like this:



        VOLUME_ID="UDFStore" UUID="5c587177a6c9eba4" VOLUME_SET_ID="5c587177a6c9eba4LinuxUDF" LABEL="UDFStore" LOGICAL_VOLUME_ID="UDFStore" VERSION="2.01" TYPE="udf" USAGE="filesystem"


        Then you can use printed UUID to specify your entry in /etc/fstab.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 4 at 17:11









        PaliPali

        362




        362






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f467671%2fhow-to-reliably-mount-udf-partition-with-etc-fstab%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

            is 'sed' thread safe

            How to make a Squid Proxy server?