|
|
|
|
|
|
| Author |
Message |
Jesse Nowells *nix forums beginner
Joined: 18 Sep 2005
Posts: 1
|
Posted: Sun Sep 18, 2005 5:32 pm Post subject:
usb
|
|
|
|
what device should i mount a usb flash drive under? |
|
| Back to top |
|
 |
Sakari *nix forums beginner
Joined: 22 Jul 2005
Posts: 2
|
Posted: Mon Sep 19, 2005 12:23 am Post subject:
Re: usb
|
|
|
| Quote: | what device should i mount a usb flash drive under?
|
You can find out that yourself by typing 'tail -f /var/log/messages' and
connecting the usb device. For example when I connect my creative muvo
the following lines appear:
Sep 19 08:14:45 raahattava /netbsd: umass0 at uhub0 port 1 configuration
1 interface 0
Sep 19 08:14:45 raahattava /netbsd:
Sep 19 08:14:45 raahattava /netbsd: umass0: CREATIVE MuVo V200, rev
2.00/10.21, addr 2
Sep 19 08:14:45 raahattava /netbsd: umass0: using SCSI over Bulk-Only
Sep 19 08:14:45 raahattava /netbsd: scsibus0 at umass0: 2 targets, 1 lun
per target
Sep 19 08:14:45 raahattava /netbsd: sd0 at scsibus0 target 0 lun 0:
<CREATIVE, MuVo V200, 0021> disk removable
Sep 19 08:14:45 raahattava /netbsd: sd0: fabricating a geometry
Sep 19 08:14:45 raahattava /netbsd: sd0: 995 MB, 995 cyl, 64 head, 32
sec, 512 bytes/sect x 2038016 sectors
Then I type 'mount /dev/sd0e /mnt/muvo' to mount it.
/dev/sd0e 995M 911M 84M 91% /mnt/muvo
Remember to umount your usb flash drive before unconnecting it. I've
forgotten it few times and it has always resulted a crash
--
Sakari
@hapate.com |
|
| Back to top |
|
 |
xeno *nix forums beginner
Joined: 05 Mar 2005
Posts: 19
|
Posted: Mon Sep 19, 2005 7:37 am Post subject:
Re: usb
|
|
|
On Mon, 19 Sep 2005, Sakari wrote:
| Quote: | what device should i mount a usb flash drive under?
You can find out that yourself by typing 'tail -f /var/log/messages' and
connecting the usb device. For example when I connect my creative muvo
the following lines appear:
Sep 19 08:14:45 raahattava /netbsd: umass0 at uhub0 port 1 configuration
1 interface 0
Sep 19 08:14:45 raahattava /netbsd:
Sep 19 08:14:45 raahattava /netbsd: umass0: CREATIVE MuVo V200, rev
2.00/10.21, addr 2
Sep 19 08:14:45 raahattava /netbsd: umass0: using SCSI over Bulk-Only
Sep 19 08:14:45 raahattava /netbsd: scsibus0 at umass0: 2 targets, 1 lun
per target
Sep 19 08:14:45 raahattava /netbsd: sd0 at scsibus0 target 0 lun 0:
CREATIVE, MuVo V200, 0021> disk removable
Sep 19 08:14:45 raahattava /netbsd: sd0: fabricating a geometry
Sep 19 08:14:45 raahattava /netbsd: sd0: 995 MB, 995 cyl, 64 head, 32
sec, 512 bytes/sect x 2038016 sectors
Then I type 'mount /dev/sd0e /mnt/muvo' to mount it.
/dev/sd0e 995M 911M 84M 91% /mnt/muvo
Remember to umount your usb flash drive before unconnecting it. I've
forgotten it few times and it has always resulted a crash
|
I didn't see the device when the machine booted up & neither in dmesg. It
turned out that USB function wasn't enabled in my BIOS. (This wasn't an
issue under Linux so I never noticed this before.) When I enabled this
function, the drive showed up. Also you didn't mention using disklabel
[device]. I got baffled by that "device not configured" business until a
google search. |
|
| Back to top |
|
 |
igor@nospam.invalid *nix forums addict
Joined: 17 Aug 2005
Posts: 81
|
Posted: Thu Sep 22, 2005 7:34 am Post subject:
Re: usb
|
|
|
xeno <xeno@transbay.net> wrote:
| Quote: |
I didn't see the device when the machine booted up & neither in dmesg. It
turned out that USB function wasn't enabled in my BIOS. (This wasn't an
issue under Linux so I never noticed this before.) When I enabled this
function, the drive showed up. Also you didn't mention using disklabel
[device]. I got baffled by that "device not configured" business until a
google search.
|
Sometimes there are problems when mounting USB flash devices if
"legacy USB" is enabled in the computer BIOS too. I spend some time
trying to mount a USB device on my laptop until I figured out that
legacy USB should be disabled. Some computers enable this option by
default to support USB keyboards with old (non-USB) operating systems.
Usually, running disklabel is not required as the label on the disk is
a standard one for most devices. If you want to run disklabel you can
do it either as "root" or "System Operator" (running disklabel as System
Operator will protect the device against mistakes when running that
command, as you cannot change the label on the disk).
Take care,
Igor. |
|
| Back to top |
|
 |
xeno *nix forums beginner
Joined: 05 Mar 2005
Posts: 19
|
Posted: Sun Sep 25, 2005 4:19 am Post subject:
Re: usb
|
|
|
On Thu, 22 Sep 2005 igor@nospam.invalid wrote:
| Quote: | I didn't see the device when the machine booted up & neither in dmesg. It
turned out that USB function wasn't enabled in my BIOS. (This wasn't an
issue under Linux so I never noticed this before.) When I enabled this
function, the drive showed up. Also you didn't mention using disklabel
[device]. I got baffled by that "device not configured" business until a
google search.
Sometimes there are problems when mounting USB flash devices if "legacy
USB" is enabled in the computer BIOS too.
|
In this case, the opposite was true. So, now what?
| Quote: | I spend some time trying to mount a USB device on my laptop until I
figured out that legacy USB should be disabled. Some computers enable
this option by default to support USB keyboards with old (non-USB)
operating systems.
Usually, running disklabel is not required as the label on the disk is
a standard one for most devices.
|
Running disklabel [device] tells you what the drive letter is. If I don't
know it, how else am I going to find out? dmesg only tells me what the
device is & the partition number. You mounted with /dev/sd1i or something.
Mine is /dev/sd1e. So where is this standard you're talking about?
| Quote: | If you want to run disklabel you can do it either as "root" or "System
Operator" (running disklabel as System Operator will protect the device
against mistakes when running that command, as you cannot change the
label on the disk). Take care, Igor.
|
I'm not trying to change the label. & you can't change the label by simply
running disklabel [device]. & you're not going to protect against mistakes
made by yourself merely by running as root or superuser. You have to be a
superuser to run disklabel in the first place. |
|
| Back to top |
|
 |
igor@nospam.invalid *nix forums addict
Joined: 17 Aug 2005
Posts: 81
|
Posted: Sun Sep 25, 2005 3:20 pm Post subject:
Re: usb
|
|
|
xeno <xeno@transbay.net> wrote:
| Quote: |
In this case, the opposite was true. So, now what?
[...]
Running disklabel [device] tells you what the drive letter is. If I don't
know it, how else am I going to find out? dmesg only tells me what the
device is & the partition number. You mounted with /dev/sd1i or something.
Mine is /dev/sd1e. So where is this standard you're talking about?
|
I usually do not follow up threads with so aggresive attitudes in
the members that are posting messages, but...
I never mounted /dev/sd1i or something like that. Can you show the
post where I said that? Most devices with a single filesystem on
it are using either "a" or "e".
| Quote: | If you want to run disklabel you can do it either as "root" or "System
Operator" (running disklabel as System Operator will protect the device
against mistakes when running that command, as you cannot change the
label on the disk). Take care, Igor.
I'm not trying to change the label. & you can't change the label by simply
running disklabel [device]. & you're not going to protect against mistakes
made by yourself merely by running as root or superuser. You have to be a
superuser to run disklabel in the first place.
|
I suggest you carefully reading the output of these commands and
understanding how file and directory permissions work in Unix
filesystems:
$ su operator
Password:
% disklabel wd0
# /dev/rwd0d:
type: unknown
disk: IC25N020ATDA04
label:
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 38760
total sectors: 39070080
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0
16 partitions:
# size offset fstype [fsize bsize cpg/sgs]
a: 97776 546336 4.2BSD 1024 8192 12224 # (Cyl. 542 - 638)
b: 263088 644112 swap # (Cyl. 639 - 899)
c: 38523744 546336 unused 0 0 # (Cyl. 542 - 38759)
d: 39070080 0 unused 0 0 # (Cyl. 0 - 38759)
e: 787248 907200 4.2BSD 1024 8192 43736 # (Cyl. 900 - 1680)
f: 66528 1694448 4.2BSD 1024 8192 8320 # (Cyl. 1681 - 1746)
g: 24392592 1760976 4.2BSD 1024 8192 46912 # (Cyl. 1747 - 25945)
h: 525168 26153568 4.2BSD 1024 8192 43768 # (Cyl. 25946 - 26466)
i: 66528 26678736 4.2BSD 1024 8192 8320 # (Cyl. 26467 - 26532)
j: 2097648 26745264 4.2BSD 1024 8192 45608 # (Cyl. 26533 - 28613)
k: 4195296 28842912 4.2BSD 1024 8192 46616 # (Cyl. 28614 - 32775)
l: 787248 33038208 4.2BSD 1024 8192 39368 # (Cyl. 32776 - 33556)
m: 3146976 33825456 4.2BSD 1024 8192 46280 # (Cyl. 33557 - 36678)
n: 2097648 36972432 4.2BSD 1024 8192 45608 # (Cyl. 36679 - 38759)
% disklabel -R wd0
disklabel: /dev/rwd0d: Permission denied
% whoami
operator |
|
| Back to top |
|
 |
xeno *nix forums beginner
Joined: 05 Mar 2005
Posts: 19
|
Posted: Sun Sep 25, 2005 5:09 pm Post subject:
Re: usb
|
|
|
On Sun, 25 Sep 2005 igor@nospam.invalid wrote:
| Quote: | In this case, the opposite was true. So, now what?
[...]
Running disklabel [device] tells you what the drive letter is. If I don't
know it, how else am I going to find out? dmesg only tells me what the
device is & the partition number. You mounted with /dev/sd1i or something.
Mine is /dev/sd1e. So where is this standard you're talking about?
I usually do not follow up threads with so aggresive attitudes in the
members that are posting messages, but... I never mounted /dev/sd1i or
something like that. Can you show the post where I said that? Most
devices with a single filesystem on it are using either "a" or "e".
|
There was an example, that I recalled, that did, which is the pertinent
point. You said: "Usually running dislkabel is not required as the label
on the idisk is a standard one for most devices". All of that is
irrelevant if one doesn't know what that so-called standard one is. It
would have suffice for you to have said in the first place that it is
usually "a" or "e". However, using disklabel [device] eliminates all
guessing games & obscurantisms, now doesn't it? |
|
| Back to top |
|
 |
xeno *nix forums beginner
Joined: 05 Mar 2005
Posts: 19
|
Posted: Sun Sep 25, 2005 5:57 pm Post subject:
Re: usb
|
|
|
On Sun, 25 Sep 2005 igor@nospam.invalid wrote:
| Quote: | I'm not trying to change the label. & you can't change the label by simply
running disklabel [device]. & you're not going to protect against mistakes
made by yourself merely by running as root or superuser. You have to be a
superuser to run disklabel in the first place.
I suggest you carefully reading the output of these commands and
understanding how file and directory permissions work in Unix
filesystems:
|
What you *allude* to is that non superusers have permission to use
disklabel but not to read, write or execute most of the devices, which
renders disklabel useless for the most part for non-superusers. That's
the reason to run disklabel as root or superuser. Since I got the
information I needed by using the read form of disklabel, why are you
telling me to read the output of disklabel to do just that? Before you
seem to object to me using disklabel at all.
| Quote: |
$ su operator
Password:
% disklabel wd0
# /dev/rwd0d:
type: unknown
disk: IC25N020ATDA04
label:
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 38760
total sectors: 39070080
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0
16 partitions:
# size offset fstype [fsize bsize cpg/sgs]
a: 97776 546336 4.2BSD 1024 8192 12224 # (Cyl. 542 - 638)
b: 263088 644112 swap # (Cyl. 639 - 899)
c: 38523744 546336 unused 0 0 # (Cyl. 542 - 38759)
d: 39070080 0 unused 0 0 # (Cyl. 0 - 38759)
e: 787248 907200 4.2BSD 1024 8192 43736 # (Cyl. 900 - 1680)
f: 66528 1694448 4.2BSD 1024 8192 8320 # (Cyl. 1681 - 1746)
g: 24392592 1760976 4.2BSD 1024 8192 46912 # (Cyl. 1747 - 25945)
h: 525168 26153568 4.2BSD 1024 8192 43768 # (Cyl. 25946 - 26466)
i: 66528 26678736 4.2BSD 1024 8192 8320 # (Cyl. 26467 - 26532)
j: 2097648 26745264 4.2BSD 1024 8192 45608 # (Cyl. 26533 - 28613)
k: 4195296 28842912 4.2BSD 1024 8192 46616 # (Cyl. 28614 - 32775)
l: 787248 33038208 4.2BSD 1024 8192 39368 # (Cyl. 32776 - 33556)
m: 3146976 33825456 4.2BSD 1024 8192 46280 # (Cyl. 33557 - 36678)
n: 2097648 36972432 4.2BSD 1024 8192 45608 # (Cyl. 36679 - 38759)
% disklabel -R wd0
disklabel: /dev/rwd0d: Permission denied
% whoami
operator
|
|
|
| Back to top |
|
 |
igor@nospam.invalid *nix forums addict
Joined: 17 Aug 2005
Posts: 81
|
Posted: Sun Sep 25, 2005 6:52 pm Post subject:
Re: usb
|
|
|
xeno <xeno@transbay.net> wrote:
| Quote: |
There was an example, that I recalled, that did, which is the pertinent
point. You said: "Usually running dislkabel is not required as the label
on the idisk is a standard one for most devices". All of that is
irrelevant if one doesn't know what that so-called standard one is. It
would have suffice for you to have said in the first place that it is
usually "a" or "e". However, using disklabel [device] eliminates all
guessing games & obscurantisms, now doesn't it?
|
Of course, using disklabel is the best method to know what filesystems
that drive has and the type of each one of these filesystems. I am
certainly NOT against using disklabel.
For disks with a single filesystem and a default layout, "a" is used
if there is not a BIOS partition on the disk drive, and "e" otherwise.
Certainly running disklabel will help not only to avoid guessing but
also to see if there are other filesystems on the disk and discover
possible mistakes in the label (e.g., overlapping filesystems).
Best regards,
Igor. |
|
| Back to top |
|
 |
igor@nospam.invalid *nix forums addict
Joined: 17 Aug 2005
Posts: 81
|
Posted: Sun Sep 25, 2005 7:14 pm Post subject:
Re: usb
|
|
|
xeno <xeno@transbay.net> wrote:
| Quote: |
What you *allude* to is that non superusers have permission to use
disklabel but not to read, write or execute most of the devices, which
renders disklabel useless for the most part for non-superusers. That's
the reason to run disklabel as root or superuser. Since I got the
information I needed by using the read form of disklabel, why are you
telling me to read the output of disklabel to do just that? Before you
seem to object to me using disklabel at all.
|
Usually, only the root account has write permission to disk devices.
The point was that there are non-root accounts with READ permission
on these devices. In fact, the System Operator is one of these
non-root accounts (as any account in the group "operator") with read
permission on disk related devices. That turns disklabel into a useful
and secure tool. My advice was using one of these accounts for gathering
information from disk devices. Of course, you can follow my advice or
ignore it. I see that you know disklabel and used it.
On my example, "operator" is able to gather information about the hard
disk label on my laptop, but he is unable to edit it.
I usually like working with the less privileged account that provides
all features I need.
Have a nice day,
Igor. |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Thu Jan 08, 2009 5:57 am | All times are GMT
|
|
Xecuter 3 Mod Chip | Debt Consolidation | Travel Shop | Web Advertising | Looking for Credit Cards?
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|