Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

mounting a usb drive from debian base (command line)?

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
User avatar
unicornswag
Posts: 149
Joined: 2013-05-31 16:09
Location: Wisconsin, US

mounting a usb drive from debian base (command line)?

#1 Post by unicornswag »

So I am the proud owner of an old g3 imac that I believe can still be useful running debian. It has no internet connection so I intended to burn and install a cd of 7.0 wheezy. However, like an idiot I accidentally burned a cd of 6.0.7 base (command line only), and erased the install of osx. This is my only computer with a cd drive, but debian base has no utility for burning disks. I would like to copy the package cdrecord and dependancies to my imac as well as the wheezy ppc iso, then burn my cd and install the system i originally wanted. My only problem is that as i am very new to linux and debian, I have no idea how to access the contents of my usb drive. Could someone please walk me through the process of mounting and accessing the files on my flash drive? Any help would be greatly appreciated as I am looking forward to keeping this dinosaur of pc useful for many years to come :)
Debian 7.1 Wheezy KDE / DWM

2001 600 mhz iMac G3


Ubuntu: An ancient African word meaning "I can't configure Debian."

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5347
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 66 times

Re: mounting a usb drive from debian base (command line)?

#2 Post by dilberts_left_nut »

Plug it in.
Check 'dmesg' to see what letter it was assigned (e.g sdb)
Make mountpoint 'mkdir /mnt/usb' or such
Mount it 'mount /dev/sdb1 /mnt/usb' (assuming a single partition device)
AdrianTM wrote:There's no hacker in my grandma...

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: mounting a usb drive from debian base (command line)?

#3 Post by kiyop »

Login as root or use

Code: Select all

su -
to get root privilege.

Code: Select all

blkid
fdisk -l
to search partitions on your USB media.
I am not familiar with Mac.
The device file name of the partition on your USB media may /dev/sdb1. I assume it as /dev/sdb1. If not, use the correct one.

Code: Select all

mount -t auto /dev/sdb1 /mnt && ls /mnt
and post the result.
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

User avatar
unicornswag
Posts: 149
Joined: 2013-05-31 16:09
Location: Wisconsin, US

Re: mounting a usb drive from debian base (command line)?

#4 Post by unicornswag »

Thanks so much kiyop! This worked perfectky :)
Debian 7.1 Wheezy KDE / DWM

2001 600 mhz iMac G3


Ubuntu: An ancient African word meaning "I can't configure Debian."

User avatar
Tsunalugi
Posts: 60
Joined: 2014-01-17 05:31
Location: Oklahoma (The concealed Hollywood)

Re: mounting a usb drive from debian base (command line)?

#5 Post by Tsunalugi »

Hello,

I followed the instructions:

dmesg
mkdir /mnt/usb
mount /dev/sd(usb) /mnt/usb

though the console is giving me a message: "mount: you must specify the filesystem type"

Suggestions?

Gracias.
Long time User of Linux.

With the publication of the Greek Pagan Deity Planet Names, society is more likely to reflect what's appropriate.

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: mounting a usb drive from debian base (command line)?

#6 Post by kiyop »

Tsunalugi wrote:I followed the instructions:

mount /dev/sd(usb) /mnt/usb

though the console is giving me a message: "mount: you must specify the filesystem type"

Suggestions?
Have you read the above post of mine?
kiyop wrote:The device file name of the partition on your USB media may /dev/sdb1. I assume it as /dev/sdb1. If not, use the correct one.

Code: Select all

mount -t auto /dev/sdb1 /mnt && ls /mnt
Add "-t FILESYSTEM" option.
Read

Code: Select all

man mount
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

User avatar
Tsunalugi
Posts: 60
Joined: 2014-01-17 05:31
Location: Oklahoma (The concealed Hollywood)

Re: mounting a usb drive from debian base (command line)?

#7 Post by Tsunalugi »

As far as I have read, there's not a man page reference to the FILESYSTEM types. The -t option reads "-t type device dir". I'm fairly certain the options are not actually the context of the specific rule to identify the -t. What I'm trying to get to mount is a "usb" drive locating itself within the context of "sd(x)".

Suggestions? :)
Long time User of Linux.

With the publication of the Greek Pagan Deity Planet Names, society is more likely to reflect what's appropriate.

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: mounting a usb drive from debian base (command line)?

#8 Post by dasein »

Tsunalugi wrote:As far as I have read, there's not a man page reference to the FILESYSTEM types.
[snip]
Suggestions? :)
Yes. Read more carefully. Pay particular attention to the sentence that begins with The filesystem types which are currently supported include... .

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: mounting a usb drive from debian base (command line)?

#9 Post by kiyop »

Thank you, dasein :)

To Tsunalugi,
Tsunalugi wrote:As far as I have read, there's not a man page reference to the FILESYSTEM types. The -t option reads "-t type device dir".
Excuse my having expected that you can imagine. :wink:
Do you like "spoon-feed"? :wink:
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

User avatar
Tsunalugi
Posts: 60
Joined: 2014-01-17 05:31
Location: Oklahoma (The concealed Hollywood)

Re: mounting a usb drive from debian base (command line)?

#10 Post by Tsunalugi »

Dasein,

Gracias for the help. I discovered the -t usbfs type, though I'm still not discovering my usb device as mounted. Once I do the command mount -t usbfs /dev/sd(x) /mnt/usb, the drive is not visible in the media folder as I would expect.

Suggestions?
Long time User of Linux.

With the publication of the Greek Pagan Deity Planet Names, society is more likely to reflect what's appropriate.

dzz
Posts: 257
Joined: 2007-02-05 20:39
Location: Devon, England

Re: mounting a usb drive from debian base (command line)?

#11 Post by dzz »

Why not use pmount? no need to mess with fstab or extra params.. e.g.

Code: Select all

pmount sdb1

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5347
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 66 times

Re: mounting a usb drive from debian base (command line)?

#12 Post by dilberts_left_nut »

Tsunalugi wrote:Dasein,

Gracias for the help. I discovered the -t usbfs type, though I'm still not discovering my usb device as mounted. Once I do the command mount -t usbfs /dev/sd(x) /mnt/usb, the drive is not visible in the media folder as I would expect.

Suggestions?
If you mounted it into /mnt/usb why would you expect it to be under /media ?
AdrianTM wrote:There's no hacker in my grandma...

Birdy
Posts: 358
Joined: 2013-05-28 13:26

Re: mounting a usb drive from debian base (command line)?

#13 Post by Birdy »

dzz wrote:Why not use pmount? no need to mess with fstab or extra params.. e.g.

Code: Select all

pmount sdb1
That is a good option.

User avatar
Tsunalugi
Posts: 60
Joined: 2014-01-17 05:31
Location: Oklahoma (The concealed Hollywood)

Re: mounting a usb drive from debian base (command line)?

#14 Post by Tsunalugi »

Birdy,

Primarily the terminal response was that the disk was already mounted.
I did a umount, then tried the pmount & the response was:
"NTFS signature is missing.
Failed to mount '/dev/sd(x)': Invalid argument
The device '/dev/sd(x)' doesn't seem to have a valid NTFS."
The device was formatted with FAT32 priori the info was placed within the drive.

Gracias for your help birdy.
Further suggestions?
Long time User of Linux.

With the publication of the Greek Pagan Deity Planet Names, society is more likely to reflect what's appropriate.

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: mounting a usb drive from debian base (command line)?

#15 Post by kiyop »

Tsunalugi wrote:Primarily the terminal response was that the disk was already mounted.
I did a umount,
:mrgreen:

I tried to neglect you in order to enhance your independence, but I cannot. Excuse my bothering. So, my spoon-feeding is starting. :wink:
If it has been mounted already, why do you want to mount it to another directory? :wink:
Is it mounted as read-only and do you want to mount it as read-write?
If so...

First of all, did you get root privilige?
To get root privilege,

Code: Select all

su -
and type root password. If your user account can use "sudo",

Code: Select all

sudo su -
and type the password of the ordianry (non-root) user account you are using.
As for "sudo", read https://wiki.debian.org/sudo

First, understand the device file name of the partition in the USB media.

Code: Select all

blkid
may give you list of partitions. Find the device file name of the partition. It may be /dev/sdXY. X is a alphabet and Y is number. I assume it is /dev/sdb1. In some rare cases, it is /dev/sdX, which is abnormal.
For blkid, read a manual by

Code: Select all

man blkid
Tsunalugi wrote:The device was formatted with FAT32 priori the info was placed within the drive.
In linux, FAT32 is sometimes expressed as "vfat".
Read a manual for mount

Code: Select all

man mount
If you execute

Code: Select all

mount
all the mounted partitions and their mount points are displayed. If the partition of the USB media is mounted read-write (rw), you can write to it with root privilege.
If it is mounted and you cannot write with non-root user, you can mount it with proper option.
Read

Code: Select all

man mount
There must be "vfat" and "uid=" and "umask=" option.
Read them and if you do not understand, write what you cannot do.

To unmount it before mounting with proper option, first you must execute

Code: Select all

umount /dev/sdb1
You can add "-l" or "-f" option. Read

Code: Select all

man umount
If you get error messages, post them and the result of

Code: Select all

dmesg |tail
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

User avatar
Tsunalugi
Posts: 60
Joined: 2014-01-17 05:31
Location: Oklahoma (The concealed Hollywood)

Re: mounting a usb drive from debian base (command line)?

#16 Post by Tsunalugi »

Well, within the response to the attempt to help:
# dmesg | tail
[64078.369633] sd 4:0:0:0: [sdc] Write Protect is off
[64078.369636] sd 4:0:0:0: [sdc] Mode Sense: 23 00 00 00
[64078.369775] sd 4:0:0:0: [sdc] No Caching mode page present
[64078.369779] sd 4:0:0:0: [sdc] Assuming drive cache: write through
[64078.372226] sd 4:0:0:0: [sdc] No Caching mode page present
[64078.372234] sd 4:0:0:0: [sdc] Assuming drive cache: write through
[64078.393226] sdc: unknown partition table
[64078.394509] sd 4:0:0:0: [sdc] No Caching mode page present
[64078.394512] sd 4:0:0:0: [sdc] Assuming drive cache: write through
[64078.394515] sd 4:0:0:0: [sdc] Attached SCSI removable disk
Of what I can discern, because each object has a unique UUID, the command "blkid" returns a uuid for each partitioned drive. The result of the command "blkid" did not return the UUID for the USB drive. Potentially because it's not actually mounted.

Gracias for the help.
Long time User of Linux.

With the publication of the Greek Pagan Deity Planet Names, society is more likely to reflect what's appropriate.

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: mounting a usb drive from debian base (command line)?

#17 Post by kiyop »

Tsunalugi wrote:
[64078.369775] sd 4:0:0:0: [sdc] No Caching mode page present
(snip by kiyop)
[64078.393226] sdc: unknown partition table
The above is weird.
Tsunalugi wrote:The result of the command "blkid" did not return the UUID for the USB drive. Potentially because it's not actually mounted.
blkid gives information on partitions which are not mounted. Thus I think that the reason the UUID for the USB "drive" is not displayed by "blkid" command is not that the USB is not mounted.
AFAIK, media such as an USB drive do not have UUID(s) usually, but partitions have.
But an USB media may have only one partition for whole of the media without partition table when cd-rom/dvd/usb hybrid image or so is dd'ed (raw-written) to it.
How did you format your USB "drive" ?
Is there any error on your USB "drive" ?
Did you confirm that your USB "drive" is recognized and you can write some files on your USB "drive"?

ADDED at Tue Jan 28 00:13:05 JST 2014;
The above "blkid gives information on partitions which are not mounted" is misleading. What I wanted to mean is: blkid gives not only information on mounted partitions but also information on partitions which are not mounted.
Last edited by kiyop on 2014-01-27 15:15, edited 1 time in total.
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

User avatar
llivv
Posts: 5340
Joined: 2007-02-14 18:10
Location: cold storage

Re: mounting a usb drive from debian base (command line)?

#18 Post by llivv »

Tsunalugi wrote:Birdy,

Primarily the terminal response was that the disk was already mounted.
did you get an error when looking at the mounted disk?
Tsunalugi wrote:I did a umount, then tried the pmount & the response was:
why did you umount it if it was already mounted for you?
"NTFS signature is missing.
Failed to mount '/dev/sd(x)': Invalid argument
was this the actual terminal message ? The device '/dev/sd(x)'
The device '/dev/sd(x)' doesn't seem to have a valid NTFS."
Tsunalugi wrote:The device was formatted with FAT32 priori the info was placed within the drive.
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.

User avatar
Tsunalugi
Posts: 60
Joined: 2014-01-17 05:31
Location: Oklahoma (The concealed Hollywood)

Re: mounting a usb drive from debian base (command line)?

#19 Post by Tsunalugi »

Yes kiyop & llivv,

For further reference:
#dmesg
[533411.592028] usb 1-5: new high-speed USB device number 4 using ehci_hcd
[533411.729914] usb 1-5: New USB device found, idVendor=13fe, idProduct=3e00
[533411.729919] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[533411.729922] usb 1-5: Product: USB DISK 2.0
[533411.729927] usb 1-5: Manufacturer:
[533411.729929] usb 1-5: SerialNumber: 07B911030AA658A3
[533411.730341] scsi5 : usb-storage 1-5:1.0
[533412.758475] scsi 5:0:0:0: Direct-Access USB DISK 2.0 PMAP PQ: 0 ANSI: 4
[533412.759337] sd 5:0:0:0: Attached scsi generic sg3 type 0
[533414.259972] sd 5:0:0:0: [sdc] 15634432 512-byte logical blocks: (8.00 GB/7.45 GiB)
[533414.260251] sd 5:0:0:0: [sdc] Write Protect is off
[533414.260259] sd 5:0:0:0: [sdc] Mode Sense: 23 00 00 00
[533414.260515] sd 5:0:0:0: [sdc] No Caching mode page present
[533414.260526] sd 5:0:0:0: [sdc] Assuming drive cache: write through
[533414.263472] sd 5:0:0:0: [sdc] No Caching mode page present
[533414.263479] sd 5:0:0:0: [sdc] Assuming drive cache: write through
[533414.284344] sdc: unknown partition table
[533414.287051] sd 5:0:0:0: [sdc] No Caching mode page present
[533414.287055] sd 5:0:0:0: [sdc] Assuming drive cache: write through
[533414.287058] sd 5:0:0:0: [sdc] Attached SCSI removable disk
Suggestions?

Gracias for the help. :)
Long time User of Linux.

With the publication of the Greek Pagan Deity Planet Names, society is more likely to reflect what's appropriate.

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: mounting a usb drive from debian base (command line)?

#20 Post by kiyop »

http://forums.debian.net/viewtopic.php? ... 84#p527575
kiyop wrote:How did you format your USB "drive" ?
Is there any error on your USB "drive" ?
Did you confirm that your USB "drive" is recognized and you can write some files on your USB "drive"?
If you cannot answer, write so.
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

Post Reply