|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
Mounting exFAT USB Stick
Firstly, I'd like to thank everyone for the warm welcome. I knew daemonforums was going to be a great place to share information, but I never thought that through my "Intro" post, I'd already be off to the races with people willing to jump in and answer questions.
Now, since that info will eventually be buried in an Intro post no one will ever look at again here is my experience, along with the excellent help and information I received from jggimi to get what I needed working. First, the problem... I was new to OpenBSD but not to *NIX type operating systems, so I was trying to use my existing skills to mount a 128GB USB Drive that had been originally formatted in Windows 10. Determining the device name: As I found that familiar commands like lsblk and fdisk -l were not present. I took to a search engine and found: sysctl hw.disknames This command doesn't need to be run as root, so you can leave out the doas or sudo. Quote:
sd0:d4460e17cba6fe3c - which is my primary boot drive (A Samsung 250GB SSD) sd1 - which is my USB stick. The trick is to run this command twice and compare the output before/after inserting the USB stick. Finding the Partition ID: Next, I needed to find what OpenBSD saw as the partition name, so I could mount it. This is done using the disklabel utility: disklabel sd1 This can also be done using the full /dev/sd1 - but I discovered it isn't required. This command needs to be run as root using either doas or sudo as you prefer (I prefer sudo because I haven't trained my fingers to automagically type doas yet). Quote:
This is where things got really confusing to me, as I was attempting to mount this partition using NTFS. Why not right? Clearly it says that it's NTFS right there in the disklabel output! Except it's not Again, jggimi shed a bit of light on why it is possibly reporting incorrectly based on Windows partition types, and not knowing if Windows uses the same partition type for both NTFS and exFAT. You can read jggimi's response yourself here. Either way, the pro tip here is if it looks like NTFS, but doesn't mount like NTFS... it's possibly exFAT. Now, let's move on to the meat of how to mount exFAT in OpenBSD. Install exFAT FUSE: OpenBSD doesn't come shipped with the tools needed to mount exFAT out of the box. This is a simple fix though, as the package required is available through the PKG_ADD command: sudo pkg_add exfat-fuse Finally, mounting the USB Stick: We're in the home stretch! This part should be familiar to anyone with experience mounting drives on *NIX systems. First, create your mount point (the directory or folder that you want to see the files in once they are mounted): sudo mkdir /mnt/usbstick Now, the only difference between say, Linux and OpenBSD is that you aren't using the vanilla mount command. You're going to use the command that first tells FUSE (Filesystem in Userspace Utility) what filesystem you are mounting, and then mounts it for you. sudo mount.exfat-fuse /dev/sd1i /mnt/usbstick When you run this command, if successful, you'll either get no error and be sent back to your command prompt, or you'll see something like FUSE exfat 1.2.8. You can now view your files and folders on the USB stick by navigating/browsing to that folder! Unmounting the USB Stick: Just to make sure I close the loop, when you're done using the stick - you will want to unmount it before removing it from the system. If you don't, you risk filesystem corruption on the usb stick - and in some systems (not OpenBSD) - I've had full system crashes from yanking out a drive that wasn't properly dismounted. sudo umount /mnt/usbstick That's it! I know that was a long post, but my intention was to give explanation along with the steps for those who like to learn why things do things. Hopefully I've bolded/highlighted the important parts for the tldr folks out there. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
input/output error | mounting usb stick | bluemorph | OpenBSD General | 11 | 7th December 2014 07:07 PM |
Creating NetBSD live CD or USB stick | mbzadegan | NetBSD General | 4 | 12th February 2014 10:00 AM |
7.3-BETA1 Available...but no memory stick image | J65nko | FreeBSD Installation and Upgrading | 1 | 28th May 2010 01:06 AM |
Everything you want to know about Installing FreeBSD on a USB stick | FBSD | Guides | 0 | 17th February 2010 08:22 AM |
make iso bootable from USB stick | ccc | FreeBSD General | 2 | 30th October 2008 02:28 AM |