How to automout USB-Drive via autofs and udev? Magic Mismatch Error

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I'm trying to automount USB-drives that are being attached to a Raspberry Pi on either port to the same directory each time. For now I'm ignoring the fact that a second USB-drive might cause issues, because I'm even struggling to get the first one working properly, so bear that in mind.



Udev-Rule Configuration (10-custom.rules):



ACTION=="add",KERNEL=="sd?", SYMLINK+="usbstick"
ACTION=="remove",KERNEL=="sd?", SYMLINK+="usbstick"


And autofs is configured like this:



auto.master:
/- /etc/auto.usb --timeout=5,defaults,user,exec,uid=1000,gid=1000
auto.usb:
/media/usbhd -fstype=auto :/dev/usbstick


Here's some log output from /var/log when I attempt to access the autofs folder /media/usbhd OR when trying to mount /dev/usbstick /media/usbhd:



F2FS-fs (sda): Magic Mismatch, valid(0xf2f52010) - read(0x0)
F2FS-fs (sda): Can't find valid F2FS filesystem in 1th superblock
F2FS-fs (sda): Magic Mismatch, valid(0xf2f52010) - read(0x0)
F2FS-fs (sda): Can't find valid F2FS filesystem in 2th superblock
F2FS-fs (sda): Magic Mismatch, valid(0xf2f52010) - read(0x0)
F2FS-fs (sda): Can't find valid F2FS filesystem in 1th superblock
F2FS-fs (sda): Magic Mismatch, valid(0xf2f52010) - read(0x0)
F2FS-fs (sda): Can't find valid F2FS filesystem in 2th superblock


Also visible from that log is that it actually tries to mount the drive twice from one attempt, so I'm suspecting misconfiguration but don't exactly know what I did wrong.



The USB drive I'm trying to mount shows as TYPE="vfat" in blkid and when running fdisk -l it shows as Id: b and Type: W95 FAT32



I'm rather new to udev, with autofs I have some experience. My intention was to create a symbolic link for each plugin of an USB-drive, and then use that symbolic link in autofs to automount it with timeout and permissions and else. I've seen some more advanced configurations in udev that told me it's possible to even automount with udev alone, but my linux skills weren't good enough to comprehend what was needed to do and it also seemed a little overkill for this small project.







share|improve this question


























    up vote
    0
    down vote

    favorite












    I'm trying to automount USB-drives that are being attached to a Raspberry Pi on either port to the same directory each time. For now I'm ignoring the fact that a second USB-drive might cause issues, because I'm even struggling to get the first one working properly, so bear that in mind.



    Udev-Rule Configuration (10-custom.rules):



    ACTION=="add",KERNEL=="sd?", SYMLINK+="usbstick"
    ACTION=="remove",KERNEL=="sd?", SYMLINK+="usbstick"


    And autofs is configured like this:



    auto.master:
    /- /etc/auto.usb --timeout=5,defaults,user,exec,uid=1000,gid=1000
    auto.usb:
    /media/usbhd -fstype=auto :/dev/usbstick


    Here's some log output from /var/log when I attempt to access the autofs folder /media/usbhd OR when trying to mount /dev/usbstick /media/usbhd:



    F2FS-fs (sda): Magic Mismatch, valid(0xf2f52010) - read(0x0)
    F2FS-fs (sda): Can't find valid F2FS filesystem in 1th superblock
    F2FS-fs (sda): Magic Mismatch, valid(0xf2f52010) - read(0x0)
    F2FS-fs (sda): Can't find valid F2FS filesystem in 2th superblock
    F2FS-fs (sda): Magic Mismatch, valid(0xf2f52010) - read(0x0)
    F2FS-fs (sda): Can't find valid F2FS filesystem in 1th superblock
    F2FS-fs (sda): Magic Mismatch, valid(0xf2f52010) - read(0x0)
    F2FS-fs (sda): Can't find valid F2FS filesystem in 2th superblock


    Also visible from that log is that it actually tries to mount the drive twice from one attempt, so I'm suspecting misconfiguration but don't exactly know what I did wrong.



    The USB drive I'm trying to mount shows as TYPE="vfat" in blkid and when running fdisk -l it shows as Id: b and Type: W95 FAT32



    I'm rather new to udev, with autofs I have some experience. My intention was to create a symbolic link for each plugin of an USB-drive, and then use that symbolic link in autofs to automount it with timeout and permissions and else. I've seen some more advanced configurations in udev that told me it's possible to even automount with udev alone, but my linux skills weren't good enough to comprehend what was needed to do and it also seemed a little overkill for this small project.







    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'm trying to automount USB-drives that are being attached to a Raspberry Pi on either port to the same directory each time. For now I'm ignoring the fact that a second USB-drive might cause issues, because I'm even struggling to get the first one working properly, so bear that in mind.



      Udev-Rule Configuration (10-custom.rules):



      ACTION=="add",KERNEL=="sd?", SYMLINK+="usbstick"
      ACTION=="remove",KERNEL=="sd?", SYMLINK+="usbstick"


      And autofs is configured like this:



      auto.master:
      /- /etc/auto.usb --timeout=5,defaults,user,exec,uid=1000,gid=1000
      auto.usb:
      /media/usbhd -fstype=auto :/dev/usbstick


      Here's some log output from /var/log when I attempt to access the autofs folder /media/usbhd OR when trying to mount /dev/usbstick /media/usbhd:



      F2FS-fs (sda): Magic Mismatch, valid(0xf2f52010) - read(0x0)
      F2FS-fs (sda): Can't find valid F2FS filesystem in 1th superblock
      F2FS-fs (sda): Magic Mismatch, valid(0xf2f52010) - read(0x0)
      F2FS-fs (sda): Can't find valid F2FS filesystem in 2th superblock
      F2FS-fs (sda): Magic Mismatch, valid(0xf2f52010) - read(0x0)
      F2FS-fs (sda): Can't find valid F2FS filesystem in 1th superblock
      F2FS-fs (sda): Magic Mismatch, valid(0xf2f52010) - read(0x0)
      F2FS-fs (sda): Can't find valid F2FS filesystem in 2th superblock


      Also visible from that log is that it actually tries to mount the drive twice from one attempt, so I'm suspecting misconfiguration but don't exactly know what I did wrong.



      The USB drive I'm trying to mount shows as TYPE="vfat" in blkid and when running fdisk -l it shows as Id: b and Type: W95 FAT32



      I'm rather new to udev, with autofs I have some experience. My intention was to create a symbolic link for each plugin of an USB-drive, and then use that symbolic link in autofs to automount it with timeout and permissions and else. I've seen some more advanced configurations in udev that told me it's possible to even automount with udev alone, but my linux skills weren't good enough to comprehend what was needed to do and it also seemed a little overkill for this small project.







      share|improve this question














      I'm trying to automount USB-drives that are being attached to a Raspberry Pi on either port to the same directory each time. For now I'm ignoring the fact that a second USB-drive might cause issues, because I'm even struggling to get the first one working properly, so bear that in mind.



      Udev-Rule Configuration (10-custom.rules):



      ACTION=="add",KERNEL=="sd?", SYMLINK+="usbstick"
      ACTION=="remove",KERNEL=="sd?", SYMLINK+="usbstick"


      And autofs is configured like this:



      auto.master:
      /- /etc/auto.usb --timeout=5,defaults,user,exec,uid=1000,gid=1000
      auto.usb:
      /media/usbhd -fstype=auto :/dev/usbstick


      Here's some log output from /var/log when I attempt to access the autofs folder /media/usbhd OR when trying to mount /dev/usbstick /media/usbhd:



      F2FS-fs (sda): Magic Mismatch, valid(0xf2f52010) - read(0x0)
      F2FS-fs (sda): Can't find valid F2FS filesystem in 1th superblock
      F2FS-fs (sda): Magic Mismatch, valid(0xf2f52010) - read(0x0)
      F2FS-fs (sda): Can't find valid F2FS filesystem in 2th superblock
      F2FS-fs (sda): Magic Mismatch, valid(0xf2f52010) - read(0x0)
      F2FS-fs (sda): Can't find valid F2FS filesystem in 1th superblock
      F2FS-fs (sda): Magic Mismatch, valid(0xf2f52010) - read(0x0)
      F2FS-fs (sda): Can't find valid F2FS filesystem in 2th superblock


      Also visible from that log is that it actually tries to mount the drive twice from one attempt, so I'm suspecting misconfiguration but don't exactly know what I did wrong.



      The USB drive I'm trying to mount shows as TYPE="vfat" in blkid and when running fdisk -l it shows as Id: b and Type: W95 FAT32



      I'm rather new to udev, with autofs I have some experience. My intention was to create a symbolic link for each plugin of an USB-drive, and then use that symbolic link in autofs to automount it with timeout and permissions and else. I've seen some more advanced configurations in udev that told me it's possible to even automount with udev alone, but my linux skills weren't good enough to comprehend what was needed to do and it also seemed a little overkill for this small project.









      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 7 at 11:59

























      asked Mar 7 at 11:46









      HackXIt

      366




      366

























          active

          oldest

          votes











          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',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          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%2f428726%2fhow-to-automout-usb-drive-via-autofs-and-udev-magic-mismatch-error%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes










           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f428726%2fhow-to-automout-usb-drive-via-autofs-and-udev-magic-mismatch-error%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          Peggy Mitchell

          Palaiologos

          The Forum (Inglewood, California)