DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 24th October 2011
amrogers3 amrogers3 is offline
Port Guard
 
Join Date: Oct 2011
Posts: 20
Default trying to understand command

#mkdir /mnt/flashdrive
#newfs -t msdos sd0c
#mount /dev/sd0i /mnt/flashdrive

I am trying to mount a flashdrive to openBSD. I am trying to understand why the above works. First, how do I find what device the flashdrive is, i.e. "sd0c"?

Second, when I go to mount using /dev/sd0i why does "sd0c" change to "sd0i"?
Reply With Quote
  #2   (View Single Post)  
Old 24th October 2011
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

"c" should never be used when formatting drives that should have MBRs, it eliminates the MBR.

"i" is used by the kernel as a virtual disklabel for the first foreign filesystem, if it is available.
Reply With Quote
  #3   (View Single Post)  
Old 24th October 2011
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

Using newfs(8) on sd0c will overwrite or "format" the entire device, I'm going to guess that's probably NOT what you want.. you should use fdisk(8) to create an appropriate MBR partition table.

OpenBSD's dmesg(8) can help you identify disks and their corresponding device nodes, the kernel uses sd(4) for a lot of SCSI-like devices, including USB mass storage.

BSD as well as other BSD's have an additional level of partitioning called "disklabels", on OpenBSD, the c partition is reserved and represents the entire device. When you have foreign partitions/filesystems OpenBSD creates a "fake" disklabel in memory and starts them off at i.

OpenBSD has a fairly comprehensive FAQ and is constantly improving the system documentation, or man pages. You should take the time to become familiar with the system.

Last edited by BSDfan666; 24th October 2011 at 02:38 AM.
Reply With Quote
  #4   (View Single Post)  
Old 24th October 2011
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

Just a general note, but a lot of people seem to forgot or ignore, on OpenBSD.. you should almost always use the raw character device except when you're mounting, in which case the block devices are preferred.

That means using /dev/r??[a-p] vs /dev/??[a-p] for most userland commands that directly deal with disk devices.
Reply With Quote
  #5   (View Single Post)  
Old 25th October 2011
amrogers3 amrogers3 is offline
Port Guard
 
Join Date: Oct 2011
Posts: 20
Default

Thanks for posts. It was a 128MB flashdrive so not too concerned with formatting the whole drive.

Also, working on reading the documentation. New to BSD and linux in general so it's a steep learning curve. Trying to google as much as I can, however, apparently my google Fu is not so good.

Thanks again.
Reply With Quote
  #6   (View Single Post)  
Old 25th October 2011
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by amrogers3 View Post
Trying to google as much as I can, however, apparently my google Fu is not so good.
This is not as effective a method as you may assume.

OpenBSD is constantly changing -- especially given that there are two new releases each year. Most information randomly found on the Internet (usually found on Google...) is either out-of-date, incomplete, or simply wrong. The best sources of information are (The order below is intentional...):
  1. OpenBSD's manpages.
  2. Information stated by project developers on the project's mailing lists:

    http://www.openbsd.org/mail.html
  3. OpenBSD's official FAQ.
  4. Other non-project sites bearing information should all be considered suspect -- including this one.
OpenBSD is an extremely small project in comparison to others -- *BSD or otherwise. A significant infrastructure for helping newcomers does not exist outside of the sources mentioned above. Most who come to OpenBSD are professionals who have Unix experience. A lot of hand-holding is not available. However, for those who study the sources above in earnest, they can compensate for cultural & community shortcomings.

Last edited by ocicat; 25th October 2011 at 07:24 PM.
Reply With Quote
  #7   (View Single Post)  
Old 28th October 2011
amrogers3 amrogers3 is offline
Port Guard
 
Join Date: Oct 2011
Posts: 20
Default

I've experienced exactly what you stated. Google searches on most anything I have tried to find on openBSD or BSD in general has been outdated or my search has returned zero results. Problem is that there are problems or questions I have had that the FAQ or manual will not answer.

Anyway, I've got a couple books on the way and I am trying to stumble through/figure out the BSD OS. So far, I like the operating system. Just going to take some time learning how to use it.
Reply With Quote
  #8   (View Single Post)  
Old 28th October 2011
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by amrogers3 View Post
...there are problems or questions I have had that the FAQ or manual will not answer.
If you care to enumerate, perhaps we can help.
Reply With Quote
  #9   (View Single Post)  
Old 28th October 2011
amrogers3 amrogers3 is offline
Port Guard
 
Join Date: Oct 2011
Posts: 20
Default

No sir (or ma'am), thank you though. It was a perl dependency problem. Took me a while but I eventually figured it out.
Reply With Quote
Old 3rd November 2011
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by amrogers3 View Post
It was a perl dependency problem.
Be aware that a number of CPAN modules are already ported to OpenBSD & are available through the packages/ports system. The module names are not necessarily the same as on CPAN, so careful searching through either OpenPorts or through the ports tree itself is required.

We have seen a number of members run into brick walls trying to install directly from CPAN when the modules in question were already available as packages/ports.
Reply With Quote
Reply

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to understand routing with openbsd badguy OpenBSD General 7 18th September 2011 02:08 AM
How to expand who command? guitarscn FreeBSD General 1 27th August 2010 11:53 PM
please help me understand wpa settings gosha OpenBSD General 1 14th July 2009 11:37 AM
Delayed command? wubrgamer Other BSD and UNIX/UNIX-like 9 22nd April 2009 03:15 AM
How understand someone connect to my BOX with VNC mfaridi OpenBSD Security 8 21st November 2008 12:24 AM


All times are GMT. The time now is 08:30 PM.


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