maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   Ubuntu Mounting Mass Storage (https://talk.maemo.org/showthread.php?t=45788)

daemonk 2010-02-25 08:47

Ubuntu Mounting Mass Storage
 
Hi,

I am trying to mount the mass storage onto my Ubuntu Lucid machine.

I am seeing the storage device and can open the device through fdisk but can see there are no partitions.

What is the partition type used for the Mass Storage? would this be a standard USB type format that should be supported by my machine.

I want to check that I have support for this format.

Thanks in advance!

slender 2010-02-25 08:50

Re: Ubuntu Mounting Mass Storage
 
Quote:

Originally Posted by daemonk (Post 545482)
Hi,

I am trying to mount the mass storage onto my Ubuntu Lucid machine.

I am seeing the storage device and can open the device through fdisk but can see there are no partitions.

What is the partition type used for the Mass Storage? would this be a standard USB type format that should be supported by my machine.

I want to check that I have support for this format.

Thanks in advance!

Generally Fat16 or Fat32 and those should work out of box. But what kind of mass storage device we are talking about here?

I think that fdisk should show format of partitions...hmm

myk 2010-02-25 09:03

Re: Ubuntu Mounting Mass Storage
 
Something is wrong there. How big a device does fdisk see?
Try putting a micro-SD card in, and see if Ubuntu can read that in UMS mode.

slender 2010-02-25 09:06

Re: Ubuntu Mounting Mass Storage
 
Quote:

Originally Posted by myk (Post 545496)
Something is wrong there. How big a device does fdisk see?
Try putting a micro-SD card in, and see if Ubuntu can read that in UMS mode.

What micro-SD card? Do you have telepathic skills :P

.edit
This is general Sub-Forum.

dmj726 2010-02-25 09:11

Re: Ubuntu Mounting Mass Storage
 
Can you mount other USB drives?

lma 2010-02-25 09:28

Re: Ubuntu Mounting Mass Storage
 
Do you select mass storage mode on the N900 after plugging in the USB cable? If not, the mass storage devices will still be shown to the host but they will be empty/0-size.

daemonk 2010-02-25 09:30

Re: Ubuntu Mounting Mass Storage
 
Thanks for the replies!

I have just tested a USB Key and it mounted automatically and works.

when I look at the device in Disk Utilities or fdisk, I can see that the device size is 29GB.

On the phone itself, I can view the stats on the device as well as the files inside, so the device is working on the phone.

Is a strange one.

Thanks

daemonk 2010-02-25 09:31

Re: Ubuntu Mounting Mass Storage
 
I can confirm I selected the Mass Storage Device.

Thanks

slender 2010-02-25 09:35

Re: Ubuntu Mounting Mass Storage
 
for future remeber that this is not n900 forum.There is also all the old devices.from first post I thought that you are talking about some other mass storage device.

daemonk 2010-02-25 09:38

Re: Ubuntu Mounting Mass Storage
 
Will do, sorry about that!

daemonk 2010-02-25 09:51

Re: Ubuntu Mounting Mass Storage
 
Here is some stats, you can see that I have just put in another 2GB SD card to test.

Both are correct in size/detection but show no partitions. Both have partitions and data on the phone.

-----

[305111.462290] sd 17:0:0:0: Attached scsi generic sg2 type 0
[305111.462560] sd 17:0:0:1: Attached scsi generic sg3 type 0
[305111.472846] sd 17:0:0:0: [sdc] 56631296 512-byte logical blocks: (28.9 GB/27.0 GiB)
[305111.473509] sd 17:0:0:1: [sdd] Attached SCSI removable disk
[305111.474249] sd 17:0:0:0: [sdc] Write Protect is off
[305111.474257] sd 17:0:0:0: [sdc] Mode Sense: 0f 00 00 00
[305111.474263] sd 17:0:0:0: [sdc] Assuming drive cache: write through
[305111.475872] sd 17:0:0:0: [sdc] Assuming drive cache: write through
[305111.475883] sdc:
[305111.480115] sd 17:0:0:0: [sdc] Assuming drive cache: write through
[305111.480126] sd 17:0:0:0: [sdc] Attached SCSI removable disk
[305115.438031] sd 17:0:0:1: [sdd] 3921920 512-byte logical blocks: (2.00 GB/1.87 GiB)
[305115.438626] sd 17:0:0:1: [sdd] Assuming drive cache: write through
[305115.441882] sd 17:0:0:1: [sdd] Assuming drive cache: write through
[305115.441894] sdd:
brent@brent-laptop:~/Download$ sudo fdisk /dev/sdc

The number of cylinders for this disk is set to 27652.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sdc: 29.0 GB, 28995223552 bytes
64 heads, 32 sectors/track, 27652 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical / optimal IO): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System

Command (m for help): q

brent@brent-laptop:~/Download$ sudo fdisk /dev/sdd

Command (m for help): p

Disk /dev/sdd: 2008 MB, 2008023040 bytes
62 heads, 62 sectors/track, 1020 cylinders
Units = cylinders of 3844 * 512 = 1968128 bytes
Sector size (logical / optimal IO): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System

Command (m for help): q


----


Thanks

lma 2010-02-25 09:56

Re: Ubuntu Mounting Mass Storage
 
Quote:

Originally Posted by daemonk (Post 545529)
On the phone itself, I can view the stats on the device as well as the files inside, so the device is working on the phone.

Ah, that probably means that some processes have open files on the cards, which prevents the N900 from unmounting them and thus exporting them over USB.

daemonk 2010-02-25 10:02

Re: Ubuntu Mounting Mass Storage
 
Just did a test to confirm. All applications are closed. This is a new phone so haven't installed anything that might be using files in the background.

In file manager on the phone the storage devices remove when I connect and the phone does say USB Connected.

So appears that the phone is locking it correctly when connecting to the PC.

dmj726 2010-02-25 10:09

Re: Ubuntu Mounting Mass Storage
 
I would try rebooting the phone, plugging it in, rebooting the Ubuntu machine, and plugging it in again.

Edit: I know it's the standard thing and you might already have tried, but it's worked wonders before, so hopefully worth mentioning. ;)

daemonk 2010-02-25 10:45

Re: Ubuntu Mounting Mass Storage
 
Hi, just back from a reboot.

Interestingly the 2GB device (external SD card) that I put in to test previously now automounts perfectly and I can browse the directories. So a fruitful reboot ;)

If I mount the 29GB internal storage manually with sudo mount..., I can now see a few files, none of the audio and video that I can see from the phone.

I even managed to create an empty text file on the 29GB device which I viewed on the phone. - needed to create as root.

So a solution for me seems to be, manually editing the fstab to setup a mount and rights for this device. A totally workable solution.

It is however not an automount ;)

EDIT: this is what I have as my fstab to mount this nicely

/dev/sdb /media/n900 vfat dmask=027,uid=1000,gid=1000,fmask=137,user,auto 0 0


Thanks!

myk 2010-02-26 01:34

Re: Ubuntu Mounting Mass Storage
 
Quote:

Originally Posted by slender (Post 545501)
What micro-SD card? Do you have telepathic skills :P

This is general Sub-Forum.

Ok, I might have said "micro or full SD" in case you have a 770 or N800. But sometimes you can tell a new (N900) maemo user from the question :D

Did you try rebooting the Ubuntu box in case the kernel mount tables are mixed up? (I'm assuming you are not running Ubuntu ARM NIT remix.)
You should not need a manual fstab entry.

Mandor 2010-02-26 01:47

Re: Ubuntu Mounting Mass Storage
 
"Did you try rebooting the Ubuntu box in case the kernel mount tables are mixed up?"

That would be my thought also. Is that a fresh Ubuntu install ? How did you install it ? From CD or from USB key ?

daemonk 2010-02-28 11:23

Re: Ubuntu Mounting Mass Storage
 
Hi,

Thanks for the help!

I think it is something to do with a move to devicekit from HAL that might be effecting the automount.

Once I added that line to the fstab, when I plug the phone in all is perfect.

I changed the fstab line slightly as the AUTO option was stopping it from booting properly, now I am using.

HTML Code:

/dev/sdb /media/n900        vfat        dmask=027,uid=1000,gid=1000,fmask=137,user,noauto        0        0
I did need to setup the /media/n900 directory and rights.

Thanks


All times are GMT. The time now is 19:24.

vBulletin® Version 3.8.8