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

Clash 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.
udev usb-drive autofs
add a comment |Â
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.
udev usb-drive autofs
add a comment |Â
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.
udev usb-drive autofs
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.
udev usb-drive autofs
edited Mar 7 at 11:59
asked Mar 7 at 11:46
HackXIt
366
366
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password