DaemonForums  

Go Back   DaemonForums > Miscellaneous > Off-Topic

Off-Topic Everything else.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 26th March 2019
jayblingham jayblingham is offline
Real Name: Jay
Port Guard
 
Join Date: Mar 2019
Location: Toronto, Ontario, Canada
Posts: 15
Default Intro

Hi everyone!

I'm horrible at introductions but suffice it to say that I'm a Microsoft guy by day / Linux guy by night, slowly starting to get into the Open/Free BSD world. My experience over the years has had me working with IBM AS/400 (iSeries), AIX, Linux and various Windows versions.

My current focus at work is Azure, Exchange, AD, but at home I run (nearly) completely Linux: 2x Debian Desktops (one acting as a server/storage box), 2x Raspberry Pis running Raspbian, and a laptop that I've been distro-hopping on.

My experience with *BSD so far is a little PfSense, building a small FreeBSD server and my laptop when I "hop" to OpenBSD.

I'm hoping to learn a lot from all of you, and tackle some of the issues I've been having on the laptop, mostly related to mounting USB drives/SD cards.

See... I told you I was horrible at intros

Jay
Reply With Quote
  #2   (View Single Post)  
Old 26th March 2019
LeFrettchen's Avatar
LeFrettchen LeFrettchen is offline
Marveled user
 
Join Date: Aug 2012
Location: France
Posts: 365
Default

Hi Jay, welcome onboard.

Since You already use several OS, I'm pretty sure you're gonna learn quickly how-to avoid issues with *BSD

Have a great day
__________________
The secret of wisdom is not wisdom itself, it's the road that leads us there.
Reply With Quote
  #3   (View Single Post)  
Old 26th March 2019
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,711
Default

Hello, and welcome!


Mounting is easy. All you need to know is that every OS uses a different device nomenclature, and the options are slightly different. It's like that old adventure game, where you are lost in a maze of twisty little passages, all alike. Or was it the twisting maze of little passages, all different?
Reply With Quote
  #4   (View Single Post)  
Old 26th March 2019
jayblingham jayblingham is offline
Real Name: Jay
Port Guard
 
Join Date: Mar 2019
Location: Toronto, Ontario, Canada
Posts: 15
Default

Thanks LeFrettchen! So far, you're right - my attempts have been mostly successful Let's hope it stays that way lol
Reply With Quote
  #5   (View Single Post)  
Old 26th March 2019
jayblingham jayblingham is offline
Real Name: Jay
Port Guard
 
Join Date: Mar 2019
Location: Toronto, Ontario, Canada
Posts: 15
Default

Hi jggimi, and thanks for the welcome!

I couldn't have described it any better

Finding the device name/partition ID wasn't too bad, once I learned sysctl hw.disknames, and disklabel. Now, my challenge is mounting NTFS and exFAT. I'm not sure why yet, but ever after ensuring ntfs-3g and exFat tools are installed I still get "invalid option". I haven't really dug deeply into it yet, but now that I have access here, I know where to come if my search leads me into a black hole
Reply With Quote
  #6   (View Single Post)  
Old 26th March 2019
hitest's Avatar
hitest hitest is offline
Real Name: George Nielsen
Spam Deminer
 
Join Date: Sep 2008
Location: B.C., Canada
Posts: 263
Default

Welcome, jayblingham!
As you're an IT professional you will catch on quickly to OpenBSD. I predict that you'll appreciate and enjoy OpenBSD a lot. I got a lot of use out of the book Absolute OpenBSD. Mr. Lucas has a dry sense of humour.

https://nostarch.com/obenbsd2e
__________________
hitest
Reply With Quote
  #7   (View Single Post)  
Old 26th March 2019
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,711
Default

Quote:
Originally Posted by jayblingham View Post
Now, my challenge is mounting NTFS and exFAT. I'm not sure why yet, but ever after ensuring ntfs-3g and exFat tools are installed I still get "invalid option".
If it's OpenBSD, you don't use mount(8) with these fuse(4) applications. Instead, you use ntfs-3g(8) and mount.exfat-fuse(8) to mount the filesystems. However, you do use umount(8) to dismount 'em.
Reply With Quote
  #8   (View Single Post)  
Old 26th March 2019
jayblingham jayblingham is offline
Real Name: Jay
Port Guard
 
Join Date: Mar 2019
Location: Toronto, Ontario, Canada
Posts: 15
Default

Thanks hitest! I will certainly give that book a look. Much appreciated!
Reply With Quote
  #9   (View Single Post)  
Old 26th March 2019
jayblingham jayblingham is offline
Real Name: Jay
Port Guard
 
Join Date: Mar 2019
Location: Toronto, Ontario, Canada
Posts: 15
Default

Thanks for that info jggimi - I noticed when running the mount -t ntfs-3g command that it was actually running the ntfs-3g command in the background, but I had no luck trying ntfs-3g manually myself either (see below).

I then started down the road of exfat after I checked and saw that the FS was reporting as HPFS/NTFS/exFAT. The disk I was playing with primarily, is a 128GB flash drive formatted in Windows 10. I haven't had a chance to put it back into Windows to verify what file system is actually on there, although I rarely - if ever - format a USB stick as NTFS. That being said, I had similar results with a 4TB external hard drive that I'm certain is NTFS.

I'm also not 100% certain I ran the ntfs-3g command properly. When I look at the output of "disklabel", it shows me two partitions (I believe they were partitions, I don't have it in front of me). One listed as 'c' and another listed as 'i'. Given the sizes, I assumed that it was 'i' that I would be trying to mount, and tried this command:

ntfs-3g /dev/sd1i /mnt/tmp

This still gave me the invalid option error.

I'll likely resume my searching/testing tonight (when I get home from work and shed my Microsoft "Clark Kent" like facade).

Thanks for all your help!
Jay
Reply With Quote
Old 26th March 2019
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,711
Default

Jay,


I'll guess you were attempting to mount the EFI boot partition as if it were NTFS. It isn't. Your NTFS partition is likely to be partition "j". All you need to do is issue # disklabel sd1 to find out if I'm correct.

---- some background, just in case some of it is useful ----

As you know a typical, basic Windows workstation installation will have two GPT partitions. A small EFI boot partition of type x'EF', and a larger data partition of type x'07', containing the Windows OS. The disk might also have additional partitioning from the OEM, if you haven't scraped it off the drive already.
  • Other than the x'EF' partition type definition, the EFI boot partition is a standard FAT filesystem.
  • The Windows data partition, normally the second GPT partition, is usually an NTFS filesystem.
OpenBSD will create a virtual, in-memory-only disklabel for any attached direct access storage device which does not have a disklabel already installed on it. This includes diskettes, CDs, disk drives, USB memory sticks, SD cards, etc. To my understanding, the only storage device type that doesn't get a virtual disklabel is tape.

When OpenBSD creates its virtual disklabel, it will scan the device's GPT or MBR partition table -- if the device has one -- looking for any known-to-OpenBSD foreign filesystem types, such as the various types of FAT and NTFS partitions. If it finds any, it assigns them to virtual disklabel partitions, starting with partition "i" and running through "p", after which it stops, because that's the last possible disklabel partition letter to assign.

If a disklabel is discovered on the disk, OpenBSD doesn't look in any MBR or GPT partition table, because the on-disk disklabel is loaded into memory and it wins, regardless what's in any other on-disk partition table at the time.

For shared drives, if you write an OpenBSD disklabel after the MBR/GPT has already been established OpenBSD will map foreign filesystems to partitions for you. If you muck about with your GPT/MBR partition table *after* you've written an OpenBSD disklabel, you must manually make changes to the OpenBSD disklabel yourself, using the disklabel(8) program.

Lastly, OpenBSD's "c" partition is truly special. It is always the "whole drive" partition, from sector number 0 to the end of the drive. It always exists, even if there are no other partitions at all. This leaves 15 other partitions "a", "b", and "d" through "p" for actual data partitions.
Reply With Quote
Old 27th March 2019
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 874
Default

Welcome to the forum, jblingham !
Reply With Quote
Old 27th March 2019
jayblingham jayblingham is offline
Real Name: Jay
Port Guard
 
Join Date: Mar 2019
Location: Toronto, Ontario, Canada
Posts: 15
Default

Thanks jggimi, with all the info/help in your posts I was able to successfully mount the USB stick!

The biggest confusion through all of this was that the FS type was being reported as NTFS by the disklabel utility. This was not the case however; as it turned out to be exFAT.

This is an excerpt from the disklabel output showing this:

Quote:
16 partitions:
# size offset fstype [fsize bsize cpg]
c: 241827840 0 unused
i: 241796608 31232 NTFS
I can't now remember which command hinted at exFAT in the first place - but after installing exfat-fuse, the /dev/sd1i mounted with mount.exfat-fuse on the first try.

Again, I can't thank you enough. I had high expectations for Daemonforums, but wasn't expecting a resolution to something in my Intro thread
Reply With Quote
Old 27th March 2019
jayblingham jayblingham is offline
Real Name: Jay
Port Guard
 
Join Date: Mar 2019
Location: Toronto, Ontario, Canada
Posts: 15
Default

Thanks IdOp! Glad to be here!

Jay
Reply With Quote
Old 27th March 2019
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,711
Default

Quote:
Originally Posted by jayblingham View Post
The biggest confusion through all of this was that the FS type was being reported as NTFS by the disklabel utility. This was not the case however; as it turned out to be exFAT.
The virtual disklabel(8) only captures recognized partitions from the GPT or MBR partition table. It doesn't inspect the filesystems.

I've never used exFAT, so I don't know what MBR/GPT partition types it may use. If it uses x'07', the the kernel can't distinguish it from NTFS when it maps a virtual disklabel.
Quote:
...but wasn't expecting a resolution to something in my Intro thread
Well, our admins frown on using a single thread for multiple purposes, as it makes it hard to find the right thread when searching. But I'm glad you got the problem resolved!
Reply With Quote
Old 27th March 2019
jayblingham jayblingham is offline
Real Name: Jay
Port Guard
 
Join Date: Mar 2019
Location: Toronto, Ontario, Canada
Posts: 15
Default

As am I! Wish there was some way to repost it.

Is there a spot you could recommend where I could post a summary of my issue, and the steps/info you gave me to resolve? Rather than it being a question/answer post, it could be a "Hey here's what I experienced" post. I've been reading forums for most of my life, but haven't done much posting so I'll need a bit of hand-holding in the short-term.
Reply With Quote
Old 27th March 2019
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,711
Default

I'll recommend the "OpenBSD General" forum.
Reply With Quote
Old 27th March 2019
jayblingham jayblingham is offline
Real Name: Jay
Port Guard
 
Join Date: Mar 2019
Location: Toronto, Ontario, Canada
Posts: 15
Default

Done - any feedback on the post would be appreciated!
Reply With Quote
Old 27th March 2019
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,711
Default

Sure. I'll take a look.

And ... partition type x'07' is used for a ton o' stuff. While a simple FAT partition is smeared across a whole bunch of different partition types. There's no sense in these standards.

https://www.win.tue.nl/~aeb/partitio...n_types-1.html
Reply With Quote
Reply

Tags
introduction

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:00 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick