LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-22-2006, 08:11 AM   #16
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Original Poster
Rep: Reputation: 47

What is umount command for me? Just ' umount cdrom ' won't work, I think.

What is the correct command for me to mount my USB?
Do I have to mount it too? I mean to save a file on the USB.

Last edited by Gins; 09-22-2006 at 08:17 AM.
 
Old 09-22-2006, 09:51 AM   #17
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
You use "umount /dev/cdrom", "umount /dev/hdc" (assuming /dev/cdrom points to /dev/hdc) or "umount /mnt/cdrom" (assuming that's where you mounted to).

You do need to mount your USB device to be able to write to it. What does dmesg say when you plug it in?
 
Old 09-22-2006, 12:03 PM   #18
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 33
suggestion: read mount's man page

you do this by running 'man mount'
 
Old 09-22-2006, 12:56 PM   #19
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Original Poster
Rep: Reputation: 47
I thank both of you for the valuble comments.

------------------------------------




[root@c83-250-110-112 cdrom]# umount /mnt/cdrom
umount: /mnt/cdrom: device is busy
umount: /mnt/cdrom: device is busy
[root@c83-250-110-112 cdrom]# umount /dev/cdrom
umount: /mnt/cdrom: device is busy
umount: /mnt/cdrom: device is busy
[root@c83-250-110-112 cdrom]# umount /dev/hdc
umount: /mnt/cdrom: device is busy
umount: /mnt/cdrom: device is busy
[root@c83-250-110-112 cdrom]#
------------------------------------------

What would be the reason that none of the commands worked?
 
Old 09-22-2006, 12:57 PM   #20
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
You're "in" the directory. If you cd to another directory, you'll be able to unmount.
 
Old 09-22-2006, 01:01 PM   #21
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Quote:
root@c83-250-110-112 cdrom
You can not unmount a filesystem when its being accessed by an application. When the current working directory is /mnt/cdrom your still accessing the filesystem and therefore the 'device is busy' error message.
 
Old 09-22-2006, 01:10 PM   #22
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Original Poster
Rep: Reputation: 47
Thanks michaelk

I got your point.
So I just went back one step and wrote the command ' umount /dev/hdc '.

It worked.

If you don't unmount,what would be the consquences?'

I can shut down the computer as usual without unmounting.

Last edited by Gins; 09-22-2006 at 01:12 PM.
 
Old 09-22-2006, 01:26 PM   #23
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Original Poster
Rep: Reputation: 47
Nylex
The dmesg command gave me a long list.
What are you interested in?
The some of them are as follows:

-------------------------

Bootdata ok (command line is auto BOOT_IMAGE=linux root=306 resume=/dev/hda7 splash=silent)
Linux version 2.6.12-12mdk (gb@ramanujan.mandriva.com) (gcc version 4.0.1 (4.0.1-5mdk for Mandriva Linux release 2006.0)) #1 Fri Sep 9 17:26:56 CEST 2005
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000e8000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 000000003ffb0000 (usable)
BIOS-e820: 000000003ffb0000 - 000000003ffc0000 (ACPI data)
BIOS-e820: 000000003ffc0000 - 000000003fff0000 (ACPI NVS)
BIOS-e820: 000000003fff0000 - 0000000040000000 (reserved)
BIOS-e820: 00000000ff7c0000 - 0000000100000000 (reserved)
ACPI: RSDP (v000 ACPIAM ) @ 0x00000000000f98b0
ACPI: RSDT (v001 A M I OEMRSDT 0x08000530 MSFT 0x00000097) @ 0x000000003ffb0000
ACPI: FADT (v001 A M I OEMFACP 0x08000530 MSFT 0x00000097) @ 0x000000003ffb0200
ACPI: MADT (v001 A M I OEMAPIC 0x08000530 MSFT 0x00000097) @ 0x000000003ffb0390
ACPI: OEMB (v001 A M I AMI_OEM 0x08000530 MSFT 0x00000097) @ 0x000000003ffc0040
ACPI: DSDT (v001 K8CBZ K8CBZ231 0x00000231 INTL 0x02002026) @ 0x0000000000000000
On node 0 totalpages: 261967
DMA zone: 3999 pages, LIFO batch:1
Normal zone: 257968 pages, LIFO batch:31
HighMem zone: 0 pages, LIFO batch:1
ACPI: PM-Timer IO Port: 0x808
ACPI: Local APIC address 0xfee00000
 
Old 09-22-2006, 01:29 PM   #24
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
The end of dmesg is the important bit, all the stuff that talks about USB.
 
Old 09-22-2006, 01:31 PM   #25
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Original Poster
Rep: Reputation: 47
The ' fdisk -l ' command is intersting.


[root@c83-250-110-112 nissanka]# fdisk -l

Disk /dev/hda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 4561 36636201 7 HPFS/NTFS
/dev/hda2 4562 24321 158722200 f W95 Ext'd (LBA)
/dev/hda5 4562 14264 77939316 b W95 FAT32
/dev/hda6 14265 24129 79240581 83 Linux
/dev/hda7 24130 24321 1542208+ 82 Linux swap / Solaris

Disk /dev/sda: 1031 MB, 1031798784 bytes
16 heads, 32 sectors/track, 3936 cylinders
Units = cylinders of 512 * 512 = 262144 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 3936 1007600 e W95 FAT16 (LBA)
[root@c83-250-110-112 nissanka]#
 
Old 09-22-2006, 01:33 PM   #26
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
/dev/sda1 is what you need to mount. You don't need to worry about dmesg now.
 
Old 09-22-2006, 01:42 PM   #27
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Original Poster
Rep: Reputation: 47
Nathanael wants me to read the man pages on mount.
That is an uninteresting bunch of details.

The man pages are written in the best unsuitable language for people who wants to learn. I just looked at the man pages on mount. I can't read them.
--------------------------------------------------------------------
All right, what would be the command to mount and unmount the USB?
 
Old 09-22-2006, 01:44 PM   #28
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,662

Original Poster
Rep: Reputation: 47
Here is the end portion of the 'dmesg' .

-------------------------------------------

ID=8 DF PROTO=UDP SPT=5353 DPT=5353 LEN=98
Neighbour table overflow.
Shorewall:net2allROP:IN=eth1 OUT= MAC= SRC=83.250.110.112 DST=224.0.0.251 LEN=118 TOS=0x00 PREC=0x00 TTL=255 ID=9 DF PROTO=UDP SPT=5353 DPT=5353 LEN=98
Shorewall:net2allROP:IN=eth1 OUT= MAC=00:10:4b:45:5c:12:00:0f:34:7b:dd:63:08:00 SRC=203.222.120.111 DST=83.250.110.112 LEN=513 TOS=0x00 PREC=0x00 TTL=55 ID=57393 PROTO=UDP SPT=31258 DPT=1026 LEN=493
usb 4-8: new high speed USB device using ehci_hcd and address 4
Initializing USB Mass Storage driver...
scsi2 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
Vendor: Kingston Model: DataTraveler 2.0 Rev: PMAP
Type: Direct-Access ANSI SCSI revision: 00
SCSI device sda: 2015232 512-byte hdwr sectors (1032 MB)
sda: Write Protect is off
sda: Mode Sense: 23 00 00 00
sda: assuming drive cache: write through
SCSI device sda: 2015232 512-byte hdwr sectors (1032 MB)
sda: Write Protect is off
sda: Mode Sense: 23 00 00 00
sda: assuming drive cache: write through
/dev/scsi/host2/bus0/target0/lun0: p1
Attached scsi removable disk sda at scsi2, channel 0, id 0, lun 0
usb-storage: device scan complete
Shorewall:net2allROP:IN=eth1 OUT= MAC= SRC=83.250.110.112 DST=224.0.0.251 LEN=118 TOS=0x00 PREC=0x00 TTL=255 ID=10 DF PROTO=UDP SPT=5353 DPT=5353 LEN=98
Shorewall:net2allROP:IN=eth1 OUT= MAC= SRC=83.250.110.112 DST=83.250.111.255 LEN=44 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=UDP SPT=32793 DPT=7741 LEN=24
Neighbour table overflow.
Neighbour table overflow.
Neighbour table overflow.
Neighbour table overflow.
Neighbour table overflow.
Neighbour table overflow.
Neighbour table overflow.
Neighbour table overflow.
Neighbour table overflow.
Neighbour table overflow.
Shorewall:net2allROP:IN=eth1 OUT= MAC=00:10:4b:45:5c:12:00:0f:34:7b:dd:63:08:00 SRC=64.26.31.126 DST=83.250.110.112 LEN=404 TOS=0x00 PREC=0x00 TTL=114 ID=21286 PROTO=UDP SPT=2644 DPT=1434 LEN=384
Shorewall:net2allROP:IN=eth1 OUT= MAC= SRC=83.250.110.112 DST=83.250.111.255 LEN=44 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=UDP SPT=32806 DPT=7741 LEN=24
printk: 3064 messages suppressed.
Neighbour table overflow.
Neighbour table overflow.
Neighbour table overflow.
Neighbour table overflow.
Neighbour table overflow.
Neighbour table overflow.
Neighbour table overflow.
Neighbour table overflow.
Neighbour table overflow.
Neighbour table overflow.
[root@c83-250-110-112 nissanka]#
 
Old 09-22-2006, 01:44 PM   #29
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
The shutdown process automatically unmounts all filesystems.

The CD drive is locked so you can not remove the disk until you umount. A filesystem read/write buffers are cached by default so for example if a floppy or usb disk was not unmounted prior to ejecting then its data will be corrupted. If another floppy disk was inserted and data written to it or a umount command was executed then its filesystem will be corrupted too.
 
Old 09-22-2006, 01:46 PM   #30
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
You mount your USB device the same way you'd mount anything else, e.g.

# mount /dev/sda1 /mnt/usb.

Obviously /mnt/usb has to exist before you use it. If mount asks you to specify the filesystem type, you use mount's -t option. I think you use vfat for FAT16 partitions:

# mount /dev/sda1 /mnt/usb -t vfat.

You don't have to use /mnt/usb, of course. Use whatever directory you like. Also be aware that mount has other options you can use as well.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
i get the error Could not enter folder /mnt/hdb1 linuxretard Linux - Hardware 2 04-10-2005 10:54 AM
Mounting a ftp folder in /mnt actionthomas Linux - Newbie 2 01-20-2004 06:09 PM
i changed /mnt/cdrom to /mnt/CD-RW - now i've got a problem?!?! spyghost Linux - Software 7 09-30-2003 02:06 PM
/mnt/cdrom & /mnt/scd0 locks up machine RIgimp75 Mandriva 7 09-01-2003 09:32 PM
mount -t //192.168.0.1/mnt /mnt/windows -o password='' generates error broadsoft Linux - Networking 3 08-07-2003 04:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration