I'm trying to mount my G1 via USB and can't seem to. When I plug it in, I see this in /var/log/messages:
Nov 17 05:20:03 flatcoat kernel: [112494.982744] usb 2-1: new full speed USB device using ohci_hcd and address 3
Nov 17 05:20:03 flatcoat kernel: [112495.210830] usb 2-1: configuration #1 chosen from 1 choice
Nov 17 05:20:04 flatcoat kernel: [112495.233817] scsi3 : SCSI emulation for USB Mass Storage devices
Then every few seconds, it prints:
Nov 17 05:20:14 flatcoat kernel: [112505.906093] usb 2-1: reset full speed USB device using ohci_hcd and address 3
Finally it prints:
Nov 17 05:20:52 flatcoat kernel: [112543.758318] scsi 3:0:0:0: Device offlined - not ready after error recovery
I see the notification on the G1, and tell it that I want to mount. (Does this mount something ? Or let it be mounted ?)
In any case, as I'm entering:
mount /dev/sdb1 /mnt
I get:
mount: special device /dev/sdb1 does not exist
I've also tried sdb2... and sdc1...
Any suggestions ?
Until you activate the mount option on the G1, it will not expose any USB Mass Storage devices to the host. Try connecting G1 to your pc, activate mount on G1, then run dmesg on pc to see what name the device has been assigned.
What flavor of Linux are you runing?
What exactly are you trying to mount? The SD card or the phone?
Do you even know what the mount option on the G1 does?
Do you have USB Debbugin enabled?
If you can't answer some of these questions, I would recomend (and in no means am I trying to bash you) "UNDERSTANDING" your phone. Also, have you used the "search" option.
I can help, so answer those questions up top.
jashsu said:
Until you activate the mount option on the G1, it will not expose any USB Mass Storage devices to the host. Try connecting G1 to your pc, activate mount on G1, then run dmesg on pc to see what name the device has been assigned.
Click to expand...
Click to collapse
I guess I wasn't clear enough but that is exactly what I did, and showed the output of. My point is that no device (at least in the /dev/sdb1 sense) was displayed.
Does this mean a kernel module is missing ? (usb-storage does get loaded) or more that something like hal is not set up correctly ?
I haven't had a linux not seamlessly auto-node and auto-mount my usb stuff for a long time.
Anyway if you have usb-storage and ohci_hcd then I don't think anything is missing. Try lsusb to see if the device is showing on the usb bus. Also, if you haven't already done so try mounting the G1 on another computer. Could possibly be a junk usb cable.
For future reference to anyone who runs across this issue:
Spent a while trying to figure this out...
In linux, before scanning for a partition, it waits for the device to settle. For some reason the G1 doesn't "settle."
To force scan for a partition run:
"fdisk -l /dev/sdb"
(depenind on devices currently mounted, you need to scan for the next partition letter
example /dev/sdc or /dev/sdd)
The reason this isnt a problem for Windows.. etc is because windows does not wait for the device to settle before scanning.
Good luck.
As has been suggested, you probably have a bad cable.
Finding and Mounting an HTC G1
dmesg is helpful. You need to have allowed mounting in the USB connection dialog (among alerts) on the phone. This must be done every time it is plugged into the USB.
Another way to see what device name your mass storage device landed on is to install and run lsscsi. Here's what mine looks like with my HTC G1 plugged in:
eshpc dev # lsscsi
[0:0:0:0] disk Generic USB SD Reader 1.00 /dev/sda
[0:0:0:1] disk Generic USB CF Reader 1.01 /dev/sdb
[0:0:0:2] disk Generic USB SM Reader 1.02 /dev/sdc
[0:0:0:3] disk Generic USB MS Reader 1.03 /dev/sdd
[2:0:0:0] disk HTC Android Phone 0100 /dev/sde
eshpc dev # fdisk -l /dev/sde
Disk /dev/sde: 1004 MB, 1004535808 bytes
7 heads, 38 sectors/track, 7375 cylinders
Units = cylinders of 266 * 512 = 136192 bytes
Disk identifier: 0x7e76f81a
Device Boot Start End Blocks Id System
/dev/sde1 1 7376 980864+ 6 FAT16
eshpc dev # mount /dev/sde1 /mnt/g1
eshpc dev # ls /mnt/g1
Music amazonmp3 dcim froogloid pdf tmp
albumthumbs appmanager download nandroid recovery-backup.img where
That is the contents of my sdcard.
Seen mounting errors happen twice, once was a bad cable, other time was too many devices plugged into a usb hub.
Constrabus said:
For future reference to anyone who runs across this issue:
Spent a while trying to figure this out...
In linux, before scanning for a partition, it waits for the device to settle. For some reason the G1 doesn't "settle."
To force scan for a partition run:
"fdisk -l /dev/sdb"
(depenind on devices currently mounted, you need to scan for the next partition letter
example /dev/sdc or /dev/sdd)
The reason this isnt a problem for Windows.. etc is because windows does not wait for the device to settle before scanning.
Good luck.
Click to expand...
Click to collapse
This is indeed helpful. Could you be more explicit about what you meant by 'settle'?
Related
Hello,
I'am looking for a solution to get the FAT32 partition access as an USB mass storage only by manipulating my PC (of course, after pluging my G1 on USB).
I don't want to use the notification system on my G1.
Through an adb command for example...
A perfect solution would be : an icon to mount, and another icon to unmount.
Any idea ?
I'm not so sure about this one. I'd imagine it would involve a script that begins running adb and mounting your Android's SD card through adb. THEN you'd have to have another icon that recognizes the currently mounted drive and unmount it. I could see how you can associate your SD card to only show up as a certain drive (I have mine set to always come up as the "B:" drive), but there's so much communication involved between your phone and PC it leads me to believe the rest of the process to be an impossiblity. You're sure asking your PC to do a LOT. Considering what you want this "program" to do, it's hardly worth the effort to even attempt writing it.
Simply put, it's like trying to train your dog to unlock and open your house for you when you come home instead of simply using your house key.
PartEdMagic is your key to a FAT32 formatted microSD card
The easiest way to FAT32 your SD card is to boot up your PC with the "gparted Magic" ISO/CD (can do in vmware even), mount your SD card (via phone may work, I used a micro-SD USB card reader) - delete your partition on the SD card and recreate as FAT32, then format it. All can be done in PartEd Magic.
Hope that helps
[email protected]
mattrophy:
... i don't think he wanted to format it
Christopher3712:
Asking his PC to do alot? This is in no way a hard task, it requires 2 calls to adb, thats all...
koxx:
To mount it from your pc run: "adb wait-for-device shell sdutil ums enable", and to unmount "adb shell sdutil ums disable".
So, if you want 2 icons doing that, just make a shortcut that executes the commands above (either with the full path to ADB, or with adb's directory in your PATH var).
Joushou said:
mattrophy:
... i don't think he wanted to format it
Christopher3712:
Asking his PC to do alot? This is in no way a hard task, it requires 2 calls to adb, thats all...
koxx:
To mount it from your pc run: "adb wait-for-device shell sdutil ums enable", and to unmount "adb shell sdutil ums disable".
So, if you want 2 icons doing that, just make a shortcut that executes the commands above (either with the full path to ADB, or with adb's directory in your PATH var).
Click to expand...
Click to collapse
Exactly, I don't want to format my card ... it's already done
Your command works fine ! Thank you very much !
To finish, do I need a windows command to synchronize data before unmount UMS ? (equiv of "windows unmount" operation)
As I understand it, the device would recognize a flash drive
but the system software doesn't explicitly know that the USB A
host port can hold removable storage, so it needs to be manually
unmounted. I figured worst case I could use ADB or terminal shell
commands to sync and umount?
thanks
Hi,
I've been lurking and searching for a while here on the forums and have been Googling for solutions to my problem as well. I have Debian Kit (can't post URLs as of now so you'll have to Google it) set up on my TF101, because I needed the GNU Toolkit as Busybox is lacking and I'm doing some LaTeX editing on the command line as well. I've actually successfully set up Debian Kit in the past, though I just resorted to installing everything in a ~2GB loopdisk file inside my internal storage. I've recently recovered my TF101 from a soft brick and when I was setting up Debian Kit again I thought of installing it on an external microSD instead since 2GB seems a little too small for my needs.
So I partitioned a 16GB microSD as follows: I created a 12GB ext3 partition (this is where Debian will go) and the rest as a FAT32 partition (I never thought of using around 16GB for a small Debian install residing inside Android anyway).
I set up Debian, but I noticed that everytime the tablet went to sleep, either automatically or through my intervention, all the inactive USB storages and external SD cards get unmounted by the tablet. Since my ROM (ARHD, which is based off the stock ASUS ROM) only "natively" recognizes FAT32 and NTFS partitions, my ~4GB FAT32 partition was affected by the annoying auto-umount/remount. However, I noticed that whenever it does, my 12GB partition appears to be affected as well, and for some reason I couldn't find my Debian install anymore (partition seems to be missing), though a reboot fixes the problem.
I got tired of this so I repartitioned the microSD such that its entirety will be formatted as an ext3 partition. I installed Debian again and now I noted that whenever my tablet goes to sleep the ext3 partition no longer gets unmounted.
The problem is not solved however. After an unspecified and probably random period of time in inactivity, the block partition of the external SD where Debian is installed somehow "renames" itself into the next available label for it in /dev/block. I can't clearly describe it through words without using too many paragraphs so here's a couple of outputs (I can't post screenshots because of the 10-post rule):
During normal usage (block device of the external SD card is boxed):
Code:
[email protected]: /dev/block $ ls
*
*
*
mmcblk0 <- this is my internal storage
mmcblk0p1
*
*
*
mmcblk0p7
mmcblk1 <- my external microSD
mmcblk1p1 <- the 16GB ext3 partition
*
*
*
And here's an ls of /dev/block when Debian suddenly goes MIA:
Code:
[email protected]: /dev/block $ ls
*
*
*
mmcblk0 <- this is my internal storage
mmcblk0p1
*
*
*
mmcblk0p7
mmcblk2 <- my external microSD
mmcblk2p1 <- the 16GB ext3 partition
*
*
*
Whenever my microSD goes by another block device Debian goes haywire (it's now just running of my RAM), and even if I restart it, it doesn't fix the problem, so I have to reboot everytime this happens. It doesn't happen as frequently as it did before I repartitioned the microSD such that the entirety of it is now an ext3 partition, but it's still quite annoying to have to reboot every few hours or so.
I'm not exactly looking for a solution here, I'm just trying to find out what's going on so that I can look for the solution on my own. I'm hoping that this is just an annoying problem (ASUS actually calls them "features") with my ROM, and if that's true I'm just going to move to a ROM that isn't based off the stock ASUS ROMs.
Any help and insights would be appreciated.
The reason for this is fairly simple, as far as the os is concerned the sdcard should be removable, so when it goes to sleep it tells the kernel "hey, that device can sleep too and save some more power" but because debian was still mounted, and running from that partition the mmcblk1 marker is effectively unavailable, same thing happens if you unplug a usb drive from your computer and replug it quickly under linux without safely unmounting it first, it will start jumping up the lettering from sdb->c->d etc
Is there a way to stop making the kernel automatically unmount the sdcard? Because constantly unmounting and remounting Debian sounds like a terrible chore.
My device is a BLU Studio 5.0S (GSM Arena link in my sig for the exact phone, model D570a
My ROM is a modified variant of the stock from BLU, that I made myself
The SD card in question is a 8GB SDHC Class 4 card.
When I physically take the card out of the phone, put it in an SD adapter, and put it in my laptop (running Ubuntu 13.10 64bit), it is just fine, and I can read, write, execute, etc. with no problems whatsoever.
When I hook the phone up to the computer via USB, I can get into the phone's memory (1.4GB) just fine, but when I try to mount the 8GB SD card, I just get this message:
Code:
Error mounting /dev/sr1 at /media/k2trf/8GB C4: Command-line `mount -t "vfat" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush" "/dev/sr1" "/media/k2trf/8GB C4"' exited with non-zero exit status 32: mount: block device /dev/sr1 is write-protected, mounting read-only
mount: /dev/sr1: can't read superblock
The only difference betwen the arguments on the internal storage and the SD is the GID -- for the internal storage it is 1023 (which doesn't coorespond to anything), but for the 8GB SD card it is 1015 (which is sdcard_rw).
Mounting it shows GID 1000 (which would be the group id for my account, 'k2trf' on the computer.
That's the only difference between the two I can see on the device. Since there are both entries for /dev/sr0 and /dev/sr1 in my /dev/, I can safely assume that sr0 is the internal memory (which is working perfectly), and sr1 is the SD card (which seems to have a bad superblock?).
This confuses me, because physically putting the SD card in the laptop, it's completely fine, and there's no super block issues that I've been able to find, so I have to assume that it's the superblock controlling the sdcard in the phone that's bad (/dev/block/void/179:33) -- is there a way I can go about rewriting the superblock somehow for just that partition?
I've already tried doing it like I would on the laptop for other flash memory (using mke2fs and e2fsck), but I guess busybox doesn't include those commands (which would make a bit of sense, I can't imagine those are simple or small functions).
I have a 32 gb surface rt.
When i start it "surface" is shown on the screen for 5 seconds and the tablet shuts down.
I downloaded recovery files from microsoft, copied to fat 32 usb.
if i press volume down and power, it boot up and goes into recovery.
When i tried to recover the tablet says "missing partition" or "drive is locked"
if i start command prompt i can see my usb as c: And the tablet´s memory is shown as x:
If i run diskpart and type "list volume" the only drive shown is my usb drive.
Somehow the build in drive is not readable and not shown.
And i think that is the issue windows can´t boot because the drive is missing.
I tried to copy files from usb to built in drive and that is possible.
is drive letter x: the right letter for the built in drive?
it might has to be c: as on a pc.
If any one has a suggestion what to do.
I has been searching for a tool that could repartition the built in drive and after that i wanted to do a clean install from the usb recovery. but i haven´t found anything.
torben5247 said:
I have a 32 gb surface rt.
When i start it "surface" is shown on the screen for 5 seconds and the tablet shuts down.
I downloaded recovery files from microsoft, copied to fat 32 usb.
if i press volume down and power, it boot up and goes into recovery.
When i tried to recover the tablet says "missing partition" or "drive is locked"
if i start command prompt i can see my usb as c: And the tablet´s memory is shown as x:
If i run diskpart and type "list volume" the only drive shown is my usb drive.
Somehow the build in drive is not readable and not shown.
And i think that is the issue windows can´t boot because the drive is missing.
I tried to copy files from usb to built in drive and that is possible.
is drive letter x: the right letter for the built in drive?
it might has to be c: as on a pc.
If any one has a suggestion what to do.
I has been searching for a tool that could repartition the built in drive and after that i wanted to do a clean install from the usb recovery. but i haven´t found anything.
Click to expand...
Click to collapse
AFAIK the volumes are mounted incorrectly or C:/ drive MBR/GPT sector corrupt .(must have done smth with regedit or volume encryption, bitlocker, corrupt TPM). The external usb is being detected as the primary windows system( C: drive ) and built in drive(C:/) is being read as virtual drive X:/
I think that you have to make a bootable OS on your usb device and boot from it. Either create bootable ubuntu 14.01 or surface rt stock image if available. Then It should boot by reading usb as primary drive ,i.e, C : /
AND ADD PHOTOS/VIDEO OF THE ISSUE in your post for better understanding.
EDIT- For creating bootable USB OS, use Rufus. And for creating Linux based bootable OS format drive as exFAT( I am not sure on this one but Linux use exFAT for file permission support).