# USB memory device is hiding



## Odyssey (Apr 1, 2003)

Linux Newbie here, so your patience appreciated. Have installed Ubuntu on one of our office computers with intent to do so on all of them and become a refugee from Windoze.

It found the CD Drive OK and was able to install a USB printer OK, but I put a Kingston USB memory device into the USB port and nothing came up on the desktop. My computer doesn't show it, but I can see it in Device Manager.

What do I need to do to be able to access it please? TIA


----------



## utanja (Oct 22, 2003)

Odyssey said:


> Linux Newbie here, so your patience appreciated. Have installed Ubuntu on one of our office computers with intent to do so on all of them and become a refugee from Windoze.
> 
> It found the CD Drive OK and was able to install a USB printer OK, but I put a Kingston USB memory device into the USB port and nothing came up on the desktop. My computer doesn't show it, but I can see it in Device Manager.
> 
> What do I need to do to be able to access it please? TIA


have you installed udev and hal as well as gnome-volume-manager?


----------



## Odyssey (Apr 1, 2003)

Utanja, Thank you, but I don't know what any of that means. Consequently, it probably means that I have not. How do I go about it?


----------



## linuxphile (Mar 6, 2003)

Generally Ubuntu installs the required services to recognize the USB devices such as memory sticks. In fact, an out of the box install of Ubuntu 6.04 recently was able to recognize a USB drive. Do you see a directory in /media that might be your USB drive? Have you tried booting the computer with the device plugged in? Would you paste the contents of your /etc/fstab here for our perusal?


----------



## Odyssey (Apr 1, 2003)

linuxphile, Thanks for the information. I will be at the office again tomorrow and will try the reboot and to get the "contents of your /etc/fstab" to post.

Errrr.... How do I get that?  

Also, I think my version of Ubuntu is 5. something which I intend to try to update tomorrow using Synaptic as well. (Any cautions/guidance on this?)


----------



## linuxphile (Mar 6, 2003)

You can get the contents of your /etc/fstab by opening a terminal window and issuing the following command: 
'sudo cat /etc/fstab' 
You can then select the information printed to your screen and copy and paste here.

I'm a big fan of complete reinstalls. I've never gone through an Ubuntu upgrade honestly. I have used apt/yum to upgrade Fedora installations and they haven't always gone so well so I tend to backup any data/config files I need and then do a complete install from scratch. 

Let us know how your's goes. 

Cheers!


----------



## Odyssey (Apr 1, 2003)

Here 'tis:

Before plugging in USB device (Kingston 512MB memory drive)
Password:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda6 / ext3 defaults,errors=remount-ro 0 1
/dev/hdc /media/cdrom0 udf,iso9660 ro,user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
[email protected]:~$ sudo cat /etc/fstab
# /etc/fstab: static file system information.
#

After plugging in USB device:

# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda6 / ext3 defaults,errors=remount-ro 0 1
/dev/hdc /media/cdrom0 udf,iso9660 ro,user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
[email protected]:~$

Hopefully, this will tell you something

Also gave command "lsusb" and got the following:

Bus 003 Device 009: ID 0930:6533 Toshiba Corp.
Bus 003 Device 002: ID 04a7:022c Visioneer
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 005: ID 03f0:6204 Hewlett-Packard DeskJet 5150c
Bus 001 Device 001: ID 0000:0000

FYI, "My Computer" shows a floppy1 which my computer does not have, but does not show the USB drive.

Starting the update now.

thanks.


----------



## Odyssey (Apr 1, 2003)

Not having much luck trying to update my Ubuntu 5.04. Can anyone point me to a tutorial? thanks.


----------



## linuxphile (Mar 6, 2003)

The Ubuntu documentation has some good info on upgrading: https://help.ubuntu.com/community/DapperUpgrades and there is also http://www.cyberciti.biz/tips/howto-upgrade-from-ubuntu-linux-breezy-to-dapper.html


----------



## Odyssey (Apr 1, 2003)

Linuxphile, thanks for the lead.

What could you tell from the fstab dump?


----------



## Odyssey (Apr 1, 2003)

Linuxphile,

Also, when you say you do a complete reinstall, do you remove the older version first and if so, how, and if not, do you just install over the older one?


----------



## linuxphile (Mar 6, 2003)

It is not necessary to remove the old installation if you plan on reformatting the hard drive, which can be done within the installer. Usually I create a separate partition for my /home directory and leave it intact when I reinstall/upgrade. 

Cheers!


----------



## Odyssey (Apr 1, 2003)

LP, thanks for the response regarding reinstalls.

I am very hopeful to get my Kingston USB memory device to work. I surmise that the fstab dump results did not tell you anything. Is there anything else I might interrogate to find the problem/solution?


----------



## linuxphile (Mar 6, 2003)

Try using dmesg to determine the location of the device within the filesystem using:
sudo dmesg | grep SCSI

Example result from system
[17308985.960000] SCSI device sda: 1000944 512-byte hdwr sectors (512 MB)

Then determine if fdisk can see the drive using:
sudo fdisk -l /dev/sdb (NOTE: replace /dev/sdb with the actual device location as determined by the dmesg command)

If fdisk is able to identify the device create a directory somewhere to mount the device. For example create a usbdrive folder in your home directory.

Now, from a terminal window again try:
sudo mount /dev/sdb /home/user/usbdrive (NOTE: replace /dev/sdb with the device as determined by the dmesg command, and replace /home/user/usbdrive with the full path to the folder you created in the previous step.)

HTH


----------



## Odyssey (Apr 1, 2003)

LP, thanks very much.

the results of the dmesg: 

scsi9 : SCSI emulation for USB Mass Storage devices
Type: Direct-Access ANSI SCSI revision: 00
SCSI device sda: 2033377 512-byte hdwr sectors (1041 MB)
SCSI device sda: 2033377 512-byte hdwr sectors (1041 MB)

Am a bit unsure about "replace /dev/sdb with the actual device location as determined by the dmesg command)". Should I be replacing "/dev/sdb" with "/dev/sda"?

Have done this and the results are:

[email protected]:~$ sudo fdisk -l /dev/sda

Disk /dev/sda: 1041 MB, 1041089024 bytes
33 heads, 61 sectors/track, 1010 cylinders
Units = cylinders of 2013 * 512 = 1030656 bytes

This doesn't look like a partition table
Probably you selected the wrong device.

Device Boot Start End Blocks Id System
/dev/sda1 ? 386556 953625 570754815+ 72 Unknown
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(357, 116, 40) logical=(386555, 11, 23)
Partition 1 has different physical/logical endings:
phys=(357, 32, 45) logical=(953624, 6, 61)
Partition 1 does not end on cylinder boundary.
/dev/sda2 ? 83801 1045563 968014120 65 Novell Netware 386
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(288, 115, 43) logical=(83800, 2, 1)
Partition 2 has different physical/logical endings:
phys=(367, 114, 50) logical=(1045562, 23, 53)
Partition 2 does not end on cylinder boundary.
/dev/sda3 ? 928903 1890666 968014096 79 Unknown
Partition 3 has different physical/logical beginnings (non-Linux?):
phys=(366, 32, 33) logical=(928902, 28, 32)
Partition 3 has different physical/logical endings:
phys=(357, 32, 43) logical=(1890665, 16, 36)
Partition 3 does not end on cylinder boundary.
/dev/sda4 ? 1 1806869 1818613248 d Unknown
Partition 4 has different physical/logical beginnings (non-Linux?):
phys=(372, 97, 50) logical=(0, 0, 1)
Partition 4 has different physical/logical endings:
phys=(0, 10, 0) logical=(1806868, 19, 53)
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order

While I am trying to figure out how to make a new folder, I thought I would go ahead and post this to see if I am on the right track. Apologies for the low level of understanding here, but I am an absolute beginner to Linux & Ubuntu.


----------



## Odyssey (Apr 1, 2003)

LP, the new folder is set up. Can you see from the last post what the problem is or what I should do next. Many thanks.


----------



## saikee (Jun 11, 2004)

linuxphile has given you the necessary tip and you have used it to the good effect.

If you haven't got another Sata/SCSI/USB device then your current USB device will have to be called sda in Linux. Linuxphile assumes you may have one already and so suggest you to check sdb.

If you are not sure the best way is to omit the device reference by

```
fdisk -l
```
that will list all the hard disks and memory devices in your PC plus all their partitions.

There is no denial now that your 1Gb USB device isn't hiding. It is available. To use it you must

(1) delete the partitions as they are choatic possibly due to various attempts to read and write. This can be done by running either "cfdisk /dev/sda" or "fdisk /dev/sda". You need root privilege to do such task so append the command with "sudo" or type "su" and supply the root password.

(2) Re-create the partitions in Fat. Most USB memory devices support only FAT16 format and it is better to stick to it.

(3) It is a good practice to reboot the PC every time you alter the partition table, especially one with Dos partitions.

(4) After a reboot you can format the device first and then mount it manually for read/write.

(5) Amend /etc/fstab to include the device if you want it available permanently.


----------



## Odyssey (Apr 1, 2003)

I hate being so helpless. I am guessing that all this is fairly elementary to you, but I have been beating my brains out without getting much closer to a solution. If you can see what I need to understand to get on top of this I will appreciate your guidance. (Incidentally I have read a 500+ page book on introductory Ubuntu and reread many parts, but even at that length, it just doesn't give me enough to deal with this except to be able to give commands and move around (so as to be able to implement the suggestions in the replies).

FYI, there is a USB printer attached which is working well and a USB scanner attached (though I haven't tried to use the scanner yet-will move on to it when I can get the USB memory stick installed.) So there are two additional USB devices.

I am including the below so that you will see the contents of my "usbdisk" directory:

[email protected]:/media/usbdisk$ ls
[email protected]:/media/usbdisk$ ls -l
total 0

It appears to me that there is nothing there?

here is the output from fdisk -l:

Disk /dev/sda: 64 MB, 64487424 bytes
4 heads, 32 sectors/track, 984 cylinders
Units = cylinders of 128 * 512 = 65536 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 983 62896 6 FAT16

From what I do understand, this looks like the USB memory device. No?

here is the output from dmesg:

device fd0, logical block 3
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
Buffer I/O error on device fd0, logical block 0

(Note from Odyssey, the above 2 lines were repeated approximately 100 times so I deleted them to shorten this post)

EXT3-fs: unable to read superblock
end_request: I/O error, dev fd0, sector 0
Buffer I/O error on device fd0, logical block 0
end_request: I/O error, dev fd0, sector 2
Buffer I/O error on device fd0, logical block 1
end_request: I/O error, dev fd0, sector 4
Buffer I/O error on device fd0, logical block 2
end_request: I/O error, dev fd0, sector 6
Buffer I/O error on device fd0, logical block 3
end_request: I/O error, dev fd0, sector 0
Buffer I/O error on device fd0, logical block 0
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 2

(the above pair of lines were repeated about40-50 times, also deleted for brevity)

EXT3-fs: unable to read superblock
ibm_acpi: ec object not found
cdrom: open failed.
cdrom: open failed.
UDF-fs: No VRS found
ISO 9660 Extensions: Microsoft Joliet Level 3
ISO 9660 Extensions: RRIP_1991A
ohci_hcd 0000:00:02.1: wakeup
usb 2-2: new full speed USB device using ohci_hcd and address 2
scsi9 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
Vendor: Model: Rev:
Type: Direct-Access ANSI SCSI revision: 00
SCSI device sda: 2033377 512-byte hdwr sectors (1041 MB)
sda: Write Protect is off
sda: Mode Sense: 00 c0 00 00
sda: assuming drive cache: write through
SCSI device sda: 2033377 512-byte hdwr sectors (1041 MB)
sda: Write Protect is off
sda: Mode Sense: 00 c0 00 00
sda: assuming drive cache: write through
/dev/scsi/host9/bus0/target0/lun0: unknown partition table
Attached scsi removable disk sda at scsi9, channel 0, id 0, lun 0
usb-storage: device scan complete
usb 2-2: USB disconnect, address 2
ohci_hcd 0000:00:02.1: wakeup
usb 2-2: new full speed USB device using ohci_hcd and address 3
scsi10 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
Vendor: LEXAR Model: JUMPDRIVE Rev: 1.11
Type: Direct-Access ANSI SCSI revision: 01 CCS
SCSI device sda: 125952 512-byte hdwr sectors (64 MB)
sda: Write Protect is off
sda: Mode Sense: 23 00 00 00
sda: assuming drive cache: write through
SCSI device sda: 125952 512-byte hdwr sectors (64 MB)
sda: Write Protect is off
sda: Mode Sense: 23 00 00 00
sda: assuming drive cache: write through
/dev/scsi/host10/bus0/target0/lun0: p1
Attached scsi removable disk sda at scsi10, channel 0, id 0, lun 0
usb-storage: device scan complete
usb 2-2: USB disconnect, address 3
ohci_hcd 0000:00:02.1: wakeup
usb 2-1: new full speed USB device using ohci_hcd and address 4
scsi11 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
Vendor: LEXAR Model: JUMPDRIVE Rev: 1.11
Type: Direct-Access ANSI SCSI revision: 01 CCS
SCSI device sda: 125952 512-byte hdwr sectors (64 MB)
sda: Write Protect is off
sda: Mode Sense: 23 00 00 00
sda: assuming drive cache: write through
SCSI device sda: 125952 512-byte hdwr sectors (64 MB)
sda: Write Protect is off
sda: Mode Sense: 23 00 00 00
sda: assuming drive cache: write through
/dev/scsi/host11/bus0/target0/lun0: p1
Attached scsi removable disk sda at scsi11, channel 0, id 0, lun 0
usb-storage: device scan complete

I did not have the Kingston drive today and have used a Lexar drive which Ubunutu seems to see, but that massive output today is totally overwhelming to me.

If you could kindly help me understand it and guide me further, I would be eternally grateful. TIA


----------



## Odyssey (Apr 1, 2003)

Apologies as part of my reply got deleted. I am not ignoring the guidance in your last post, but just want to get a better understanding before I try to implement it and had written this up in a separate text editor.

I had several questions, such as (by your numbers):

(1) Is this what likely caused the multiple instances above? Should I go ahead and use "cfdisk /dev/sda" or "fdisk /dev/sda" now (i.e., at this stage of my understanding)?
(2) Re-create the partitions in Fat. If I have understood the above, it appears that the jumpdrive is a FAT16, but the drive has important data on it and I don't want to lose it. AFAIK, the device is fine, It just appears to me to be that it doesn't "self-mount" in Ubuntu?
(3)OK, but depending on #2 above, will I be altering the partition table,?
(4) Same question applies
(5) Amend /etc/fstab to include the device if you want it available permanently. I will google to try to find out how to do this.


----------



## Odyssey (Apr 1, 2003)

Having studied the above output further, I see:

Attached scsi removable disk sda at scsi9, channel 0, id 0, lun 0

and later:

Attached scsi removable disk sda at scsi10, channel 0, id 0, lun 0, then:

Attached scsi removable disk sda at scsi11, channel 0, id 0, lun 0

Is this the usb drive and if so, what is the significance of:

1- numbers starting at 9? Does this sort of reflect the times that a USB device has been plugged and unplugged, and

2-if so, would scsi11 be the "most current" and therefore the "operative" assignment?

Youth wants to know!


----------



## Odyssey (Apr 1, 2003)

Have been hoping for comfort with respect to the data on the drive. Before I attempt to implement the instructions, would like to better understand the implications as I remember from DOS that "fdisk" is a potentially disasterous command.

Please help me understand what is actually happening. Is the partition that you suggest needs to have the fdisk applied the USB device or a "file" (have I used the right word?) in the Ubuntu that exists on the hard disk?

If the former, will it not erase the files on the USB device? Also, will it then need to be formatted?

Finally, since the USB device is visible in the device manager, is there not a potentially less drastic solution. I am willing to do as instructed above, but this beginner just need a little tlc. thanks.


----------



## saikee (Jun 11, 2004)

Sorry I have been busy and didn't manage reply this thread which is getting confusing.

If you havevaluable data then you should not format the memory drive.

I would guess the error in the read/write is likely due to the USB drive plugging and unplugging without being unmounted first. Similar in XP/Win2k a user need to let the system to disengage the drive first before removing it away from the port.

The "fidsk -l" I mentioned earlier is a Linux command and is totally different from DOS's fdisk.exe. The suggested command does not change anything from the drive. It simply lists all the partitions in every disk Linux finds from your PC. Seeing an error in the partition there gives you a second opinion on the well being of the memory drive.

You should save the files and data before deleting the partition. A mess-up in the partition can be generally overcome by deleting it and re-create the same.

cfdisk /dev/sda is a safe option and easier to use. Nothing is implemented until you click "write" before existing the program.


----------



## Odyssey (Apr 1, 2003)

Saikee, thanks for yours and I agree that this thread has become confusing (doubtless reflecting my own state of mind). I view problem solving as a learning experience and hope to improve my understanding of what is happening here.

I gather you and linuxphile have concluded that there is an "error in the read/write". Copying the USB drive contents to another computer is not a problem for me, but at the same time, it works perfectly in Windows making me wonder about the need for reformatting. I would be grateful if you could copy the line/s that shows the error state (and any commentary would be super) so I can better understand what is happening and to know what to watch for in future.

I have every confidence that the two of you know very well what you are doing and I hope that you do not mind my raising this issue again.


----------



## saikee (Jun 11, 2004)

There are conflicts between different partitioning programs between different OSs. It would be better if you just stick to one.OS for partitioning even if you use more than one OS. 

My eariler advice is for you to extract the data out of your memory drive, delete the partition and re-create it again to remove the conflicts. It is possible that the complaints reported in one OS is totally harmless.

The Windows software Partition Magic for example is known to cause hard disk conflicts by attempting to fix Linux partitions that it doesn't understand.


----------



## Odyssey (Apr 1, 2003)

I need to ask for clarification now. There is only one OS on my computer, i.e., Ubuntu, (although the hdd previously had XP on it.) AFAIK, the hdd now only has one partition - linux. So I am unsure whether I understand your guidance and mention this in case it is material. Pls clarify. Thanks.


----------



## saikee (Jun 11, 2004)

Your reported the memory device has errors in Linux but works perfectly in Windows.

Your previous "fdisk -l" command picks up the following information in Post #18

*Disk /dev/sda: 64 MB, 64487424 bytes
4 heads, 32 sectors/track, 984 cylinders
Units = cylinders of 128 * 512 = 65536 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 983 62896 6 FAT16*

This is a health report of a single SCSI/USB/Sata device picked up by Linux. It has 64 Mb of ram and has only one partition Type 6 denoting Fat16. Only you know if the USB has 64Mb but Fat16 is the standard partition type used in a memory stick.

fdisk program reports no error in this memory device.

I do not know what problem you have with it.

A USB device needs to be mounted before it can be read although most Linux, especially the Live CDs, will mount it for you automatically. Do you have a problem finding it from the filing system?

Normally it is inside /mnt/sda1 or /media/sda1.

If you can't find it you can always mount it manually yourself by the following commands

```
sudo mkdir /mnt/sda1
mount /dev/sda1 /mnt/sda1
ls /mnt/sda1
```
The last line lists the content of the sda1 directory.


----------



## Odyssey (Apr 1, 2003)

saikee said:


> Your reported the memory device has errors in Linux but works perfectly in Windows.
> ......
> I do not know what problem you have with it.
> ......


Saikee, thanks for yours, I think I see how the confusion set in. See this from the initial post:



It (i.e. said:


> Other than as may have been further reported in subsequent posts (see next paragraph), I have not found an error in the USB device in Linux, because I have not been able to access it. So getting it mounted is, as I see it, the problem and the latter part of your last addresses this spot on and this is much appreciated.
> 
> Later, I posted some lengthy quotes from various command results, including:
> 
> ...


----------



## Odyssey (Apr 1, 2003)

Here are results:

[email protected]:~$ sudo mkdir /mnt/sda1
Password:
[email protected]:~$ sudo mount /dev/sda1 /mnt/sda1

[email protected]:~$ ls -l /mnt/sda1
total 11608
-rwxr-xr-x 1 root root 0 2006-05-16 13:22 20060516.001
drwxr-xr-x 2 root root 2048 2005-11-04 14:39 acctco~1
-rwxr-xr-x 1 root root 11877285 2006-07-04 15:26 alamof~1.qbb
drwxr-xr-x 2 root root 2048 2004-11-01 23:00 backups
dr-xr-xr-x 3 root root 2048 2003-04-16 11:44 safegrd
-rwxr-xr-x 1 root root 0 2006-05-16 13:22 volume~1.qbl
drwxr-xr-x 2 root root 2048 2006-01-15 12:05 win200~1

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

shouldn't we see the USB device listed? Nothing jumps out at me. Not sure what the win2000~1 and "safegrd" are? (In retrospect, should have listed the contents before giving the "mount" command!)

It is a Lexar "Secure" Jumpdrive with some sort of secure storage area built in. Could this have to do with the "safegrd" directory listed above?

Could the "Secure" feature be a problem (although the Kingston first tried didn't show up either)? Should I get another drive and try it? TIA


----------



## saikee (Jun 11, 2004)

The memory does not show up any error and can read in root terminal.

I wouldn't know the directory name of your memory drive secure feature. In any case it would be likely a Windows program ending with .exe which is useless in Linux.

I would in your case boot up a Live CD like Slax which allows log in with root. In that case I could see the content of the memory drive in GUI and can use Linux GUI programs to test the Windows data.

The conclusion so far

fdisk -l shows up a memory device sda size 64Mb.
fdisk -l reports no error and list one fat16 partition sda1 in Fat16
the memory drive shows several files and again no error reported by "ls -l" command


----------



## Odyssey (Apr 1, 2003)

I can set up a root account in Ubuntu. Would this not allow the same view? thanks.


----------



## linuxphile (Mar 6, 2003)

That's correct. You should replace sdb with sda as determine by dmesg:
SCSI device sda: 2033377 512-byte hdwr sectors (1041 MB)

So your command would look like:
sudo mount /dev/sda /home/user/usbdrive

Note if the above command fails try:
sudo mount /dev/sda1 /home/user/usbdrive


----------



## saikee (Jun 11, 2004)

As far as I am aware Ubuntu does not permit a log in with root to the GUI. That is the general problem of many Debian based distros but apparently there are ways to get over it. The standard approach is to discourage the root user log in with the GUI.

I expect Ubuntu GUI to deny access to the memory device as the files appear to owned by root. It would be certainly the case if you ask it to read any NTFS files owned by Windows.

The files are always accessible in the terminal mode by the root user.


----------



## linuxphile (Mar 6, 2003)

To gain the ability to log in as root do the following from a terminal:
sudo passwd root
You will be prompted for root's password, twice. After this you will be able to log in as root. 

Cheers!


----------



## saikee (Jun 11, 2004)

Linuxphile,

There is no problem to log in as root in terminal mode in Ubuntu. 

The problem is Ubuntu distro disallows a root log in to the GUI. Without the GUI one may have difficulty to run the Linux programs when given a list of files in text mode.


----------



## linuxphile (Mar 6, 2003)

Why wouldn't you be able to run the specific application from the terminal as root? 

Regardless, you can login as root with a little setup (from ubuntuforums.org):
HowTo: First Go to gnome start menu and go to system-->Administration-->User and Groups
There search for the user "root". U will find it. After choosing root, click on "properties" and change the password to something u want. there will be a system generated random root password which you have to erase and set a new one of your choice. once you are done come out of that and close all windows.
THEN, again from start menu go to System --> Administration --> Login Screen Setup.
There go to the "security" tab and CHECK "allow root to login with GDM". Close all windows and log out of GNOME and on to GDM.
type root, root's password that u had set and log in as root!


----------



## Odyssey (Apr 1, 2003)

Issue now resolved, though I am still a bit 'fused about one thing.

The commands:

mkdir /mnt/flash
and
mount -t vfat /dev/sda1 /mnt/flash

resulted in an icon on my desktop and there are my files on the USB device. Yippee!

Many thanks to all who have contributed.

One thing I still don't understand is why use sda1 in the mount command above when Ubuntu identified the USB device as sda*? Please clarify.

* FYI: Here is result from tail /var/log/messages :

Jul 24 16:46:05 localhost kernel: Type: Direct-Access ANSI SCSI revision: 01 CCS
Jul 24 16:46:05 localhost kernel: SCSI device sda: 125952 512-byte hdwr sectors (64 MB)
Jul 24 16:46:05 localhost kernel: sda: Write Protect is off
Jul 24 16:46:05 localhost kernel: SCSI device sda: 125952 512-byte hdwr sectors (64 MB)
Jul 24 16:46:05 localhost kernel: sda: Write Protect is off
Jul 24 16:46:05 localhost kernel: /dev/scsi/host5/bus0/target0/lun0: p1
Jul 24 16:46:05 localhost kernel: Attached scsi removable disk sda at scsi5, channel 0, id 0, lun 0


----------



## saikee (Jun 11, 2004)

sda is a raw device same as sda1 to Linux. The former is the whole disk while the other is the 1st partition of it.

You always mount a partition on the tree-like filing structure because you want access the files.

Mounting the whole device does not make sense because you may have a Windows partition, say NTFS type, in one partition and a Linux Ext3 partition in another. Linux and you will be confused.

sda is a SCSI disk device to Linux for naming USB devices, SCSI disks and Sata hard disks.


----------



## Odyssey (Apr 1, 2003)

saikee, Many thanks. This helps me.

Here's my understanding now. Ubuntu identified the device and "assigned" it to sda (but it is still not mounted), then the mount command did in fact mount it at sda1 within (or on top of or associated with) sda. i.e., sort of like a (Windows) subfolder (sda1) under folder sda?

If off the mark, please elaborate. TIA


----------



## saikee (Jun 11, 2004)

Unless a raw device has been instructed to be mounted, via /etc/fstab, it remains in the background.

You can ask a Linux to list all the disks and their partitions by command

```
fdisk -l
```
If sda is reported then you can safely assume the device is picked up at the hardware level.

Linux cannot mount any sda on its filing system because your sda may be new, unformatted and has no partition created yet. Many recent Live CDs and distros will try to mount automatically its partitions if they have recognisable filing systems inside. In general you should be prepared to mount the partitions manually as you have done.

Linux have commands that work on raw devices without the need of mounting them. Commands like formatting (mkfsdos) and "dd" are instructed directly with the raw devices and safter if they are not mounted. Therefore not mounting a USB device does make sense. This is the same situation with XP although a USB device is usually pre-formatted to fat16 and so XP (or Win2k) can mount it without the need from the user. However if the USB device is a new hard disk you will not find it in XP's filing system until you have created a partition and formatted it.


----------



## Odyssey (Apr 1, 2003)

Thank you for that very instructive and understandable reply.


----------



## Odyssey (Apr 1, 2003)

A further thought on this. Is there a way to get Ubuntu to automatically recognize an (already formatted) USB drive, mount it and put up the desktop icon, rather than my having to do it manually (and to remember how)?


----------



## saikee (Jun 11, 2004)

Just edit /etc/fstab and place an entry there.

The devices listed in /etc/fstab are those the kernel must mount on a boot up.


----------



## prunejuice (Apr 3, 2002)

Odyssey said:


> A further thought on this. Is there a way to get Ubuntu to automatically recognize an (already formatted) USB drive, mount it and put up the desktop icon, rather than my having to do it manually (and to remember how)?


My "Dapper" does this by default.


----------

