NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Dummies guide to mounting SD cards

On Tue, Mar 5, 2013 at 11:07 AM, Peter Ibbotson <> 
> I'm just about to reinstall on an aging Asus eee 701 and I never quite
> managed to get the SD card to work (or any other usb media for that matter).
> Basically I'm looking for a dummies guide to mounting / formatting SD cards
> so I can use it as storage for building from source (the poor eee only has
> 4GB internal drive). Does anyone have one?

Ahh, dummies guide... You're probably not a dummy if you're using NetBSD.

This really depends on if you're going to use it with a Windows, Mac,
etc compatible filesystem, or if you plan to prepare it as a native
NetBSD disk.

First, plug it in and see how it was detected by NetBSD. You can
probably do something like "tail -15 /var/log/messages". For example,
from one of my machines:

dockstar$ tail -10 /var/log/messages
Mar  4 18:00:00 dockstar syslogd[415]: restart
Mar  5 03:18:23 dockstar root: /etc/daily: WARNING:
$fetch_pkg_vulnerabilities is not set properly - see daily.conf(5).
Mar  5 17:30:11 dockstar /netbsd: umass1 at uhub1 port 4 configuration
1 interface 0
Mar  5 17:30:11 dockstar /netbsd: umass1: TRONLegacy Sam Flynn's Light
cycle, rev 2.00/1.04, addr 4
Mar  5 17:30:11 dockstar /netbsd: umass1: using SCSI over Bulk-Only
Mar  5 17:30:11 dockstar /netbsd: scsibus1 at umass1: 2 targets, 1 lun
per target
Mar  5 17:30:11 dockstar /netbsd: sd1 at scsibus1 target 0 lun 0:
<TRON:, Legacy, 8.07> disk removable
Mar  5 17:30:11 dockstar /netbsd: sd1: fabricating a geometry
Mar  5 17:30:11 dockstar /netbsd: sd1: 4038 MB, 4038 cyl, 64 head, 32
sec, 512 bytes/sect x 8269824 sectors
Mar  5 17:30:11 dockstar /netbsd: sd1: fabricating a geometry

(Look how cool I am, I have a Tron Light cycle USB drive!)

If you just want to mount the (likely FAT) filesystem, you can
probably do this as root:

mount /dev/sdXe /mnt (where X is the disk you are using)

In my case:

dockstar$ su -
dockstar# mount /dev/sd1e /mnt
dockstar# mount
/dev/sd0a on / type ffs (local)
tmpfs on /dev type tmpfs (union, local)
/dev/sd0f on /usr type ffs (local)
/dev/sd0g on /home type ffs (local)
ptyfs on /dev/pts type ptyfs (local)
procfs on /proc type procfs (local)
kernfs on /kern type kernfs (local)
/dev/sd1e on /mnt type msdos (local) <--- See, it mounted just fine

You might need to do disklabel and determine which BSD partition you
are mounting, but in general it will be "e" if it's a FAT filesystem.

If you want to use the disk natively, the Guide has instructions that
resemble what you need to do here:

There probably should be a section under "Using removable media" for
USB disks or flash cards. These are more relevant than some of the
stuff in there now, like ZIP disks...


Home | Main Index | Thread Index | Old Index