Alex | 27 Mar 04:11 2011
Picon

Hard drive partition as an SD card

I'm trying to mount a FAT32 partition as an SD card, but for some
reason the methods described in "Sdcard HowTo" don't work for me.

I created /etc/vold.fstab file which contains this line:
dev_mount sdcard /mnt/sdcard auto /dev/sda6
After reboot I can see /sdcard dir in a file manager, but it's empty,
and I cannot mount/unmount the SD card in the storage settings.

Tried to add "SDCARD=/dev/sda6" to the kernel line in GRUB menu - it
doesn't work either. On startup the system says "Damaged SD card".
When I try to mount it in the storage settings, it gets unmounted
right away with a message "Safe to remove SD card".

The strange thing is: when I try fdisk -l, its output is empty. Is it
normal? I got the location of my partition as "sda6" by booting to
Ubuntu and checking it there.

One more detail: that FAT32 partition is a logical one. Does it need
to be a primary partition?

Suman Saraf | 27 Mar 04:51 2011

Re: Hard drive partition as an SD card

You should try the following on a console:

fdisk /dev/block/sda and check what the partition type is for that partition.

mount -t vfat /dev/block/sda6 /mnt/sdcard
vdc volume mount /mnt/sdcard

After these steps do you have a functional sdcard? If not, please post the logcat output here. If the fs is
damaged, newfs_msdos /dev/block/sda6, might help.

Also SDCARD= and vold.fstab are exclusive i.e. SDCARD= works only when vold.fstab doesn't exist.

On 27-Mar-2011, at 7:41 AM, Alex wrote:

> I'm trying to mount a FAT32 partition as an SD card, but for some
> reason the methods described in "Sdcard HowTo" don't work for me.
> 
> I created /etc/vold.fstab file which contains this line:
> dev_mount sdcard /mnt/sdcard auto /dev/sda6
> After reboot I can see /sdcard dir in a file manager, but it's empty,
> and I cannot mount/unmount the SD card in the storage settings.
> 
> Tried to add "SDCARD=/dev/sda6" to the kernel line in GRUB menu - it
> doesn't work either. On startup the system says "Damaged SD card".
> When I try to mount it in the storage settings, it gets unmounted
> right away with a message "Safe to remove SD card".
> 
> The strange thing is: when I try fdisk -l, its output is empty. Is it
> normal? I got the location of my partition as "sda6" by booting to
> Ubuntu and checking it there.
(Continue reading)

Alex | 27 Mar 09:19 2011
Picon

Re: Hard drive partition as an SD card


On Mar 26, 7:51 pm, Suman Saraf <su...@...> wrote:
> You should try the following on a console:
>
> fdisk /dev/block/sda and check what the partition type is for that partition.
>
> mount -t vfat /dev/block/sda6 /mnt/sdcard
> vdc volume mount /mnt/sdcard
>
> After these steps do you have a functional sdcard?

Yes, this works! The partition mounts as an SD card, and works fine.
And what does this mean?
As far as I understand, the partition itself is OK, it can be mounted
and is accessible from Android. But how could I make it mount
automatically? Why those described methods do not work in my case?

> Also SDCARD= and vold.fstab are exclusive i.e. SDCARD= works only when vold.fstab doesn't exist.

Yes, I know - I deleted the vold.fstab before trying SDCARD variable.

--

-- 
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To post to this group, send email to android-x86@...
To unsubscribe from this group, send email to android-x86+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-x86?hl=en.

Suman Saraf | 27 Mar 15:38 2011

Re: Hard drive partition as an SD card

Hmm looked at vold code. It seems to be ignoring paritions > 4, hence its state machine doesn't think it has
discovered all the partitions for that disk.

You might want to change MAX_PARTITIONS from 4 to 8 or something in DirectVolume.h and try.

On 27-Mar-2011, at 12:49 PM, Alex wrote:

> 
> On Mar 26, 7:51 pm, Suman Saraf <su...@...> wrote:
>> You should try the following on a console:
>> 
>> fdisk /dev/block/sda and check what the partition type is for that partition.
>> 
>> mount -t vfat /dev/block/sda6 /mnt/sdcard
>> vdc volume mount /mnt/sdcard
>> 
>> After these steps do you have a functional sdcard?
> 
> Yes, this works! The partition mounts as an SD card, and works fine.
> And what does this mean?
> As far as I understand, the partition itself is OK, it can be mounted
> and is accessible from Android. But how could I make it mount
> automatically? Why those described methods do not work in my case?
> 
>> Also SDCARD= and vold.fstab are exclusive i.e. SDCARD= works only when vold.fstab doesn't exist.
> 
> Yes, I know - I deleted the vold.fstab before trying SDCARD variable.
> 
> -- 
> You received this message because you are subscribed to the Google Groups "Android-x86" group.
(Continue reading)

Alex | 27 Mar 23:15 2011
Picon

Re: Hard drive partition as an SD card

Your guess was right!
Changing MAX_PARTITIONS from 4 to 8 in DirectVolume.h really helped!
I still cannot make the vold.fstab work though, but adding SDCARD=/dev/
sda6 to the kernel line in GRUB menu works - now I have my partition
automatically mounted as SD card.
Thank you very much!

On Mar 27, 6:38 am, Suman Saraf <su...@...> wrote:
> Hmm looked at vold code. It seems to be ignoring paritions > 4, hence its state machine doesn't think it has
discovered all the partitions for that disk.
>
> You might want to change MAX_PARTITIONS from 4 to 8 or something in DirectVolume.h and try.
>
> On 27-Mar-2011, at 12:49 PM, Alex wrote:
>
> > On Mar 26, 7:51 pm, Suman Saraf <su...@...> wrote:
> >> You should try the following on a console:
>
> >> fdisk /dev/block/sda and check what the partition type is for that partition.
>
> >> mount -t vfat /dev/block/sda6 /mnt/sdcard
> >> vdc volume mount /mnt/sdcard
>
> >> After these steps do you have a functional sdcard?
>
> > Yes, this works! The partition mounts as an SD card, and works fine.
> > And what does this mean?
> > As far as I understand, the partition itself is OK, it can be mounted
> > and is accessible from Android. But how could I make it mount
> > automatically? Why those described methods do not work in my case?
(Continue reading)

Chih-Wei Huang | 28 Mar 12:47 2011

Re: Hard drive partition as an SD card

2011/3/28 Alex <alpaxx@...>:
> Your guess was right!
> Changing MAX_PARTITIONS from 4 to 8 in DirectVolume.h really helped!
> I still cannot make the vold.fstab work though, but adding SDCARD=/dev/

You said

dev_mount sdcard /mnt/sdcard auto /dev/sda6

this is a wrong syntax. You can't say /dev/sda6 directly.
You should put the devpath of sda,
or say SDCARD=/dev/sda6
(this is an android-x86 extended and undocumented feature)

> sda6 to the kernel line in GRUB menu works - now I have my partition
> automatically mounted as SD card.

--

-- 
Chih-Wei
Android-x86 project
http://www.android-x86.org

Alex | 28 Mar 23:05 2011
Picon

Re: Hard drive partition as an SD card


On Mar 28, 3:47 am, Chih-Wei Huang <cwhu...@...> wrote:
> dev_mount sdcard /mnt/sdcard auto /dev/sda6
>
> this is a wrong syntax. You can't say /dev/sda6 directly.
> You should put the devpath of sda,
> or say SDCARD=/dev/sda6
> (this is an android-x86 extended and undocumented feature)

Well, SDCARD works for me at the moment, but just in case - what would
be the correct syntax for vold.fstab in my configuration? I still
don't get it (not yet that familiar with Linux internals, sorry). I
tried "/dev/sda", "/dev/block/sda", "/block/sda", the same with "sda6"
- apparently that's not it. The example in system/core/rootdir/etc/
vold.fstab seems to be for the SD/MMC-cards. Does the devpath for the
hard drive also need to start with "/devices/platform/"? Where can I
find the correct path?

--

-- 
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To post to this group, send email to android-x86@...
To unsubscribe from this group, send email to android-x86+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-x86?hl=en.

Chih-Wei Huang | 29 Mar 04:51 2011

Re: Hard drive partition as an SD card

2011/3/29 Alex <alpaxx@...>:
>
> Well, SDCARD works for me at the moment, but just in case - what would
> be the correct syntax for vold.fstab in my configuration? I still
> don't get it (not yet that familiar with Linux internals, sorry). I
> tried "/dev/sda", "/dev/block/sda", "/block/sda", the same with "sda6"
> - apparently that's not it.

I've said,

dev_mount sdcard /mnt/sdcard auto SDCARD=/dev/sda6

> The example in system/core/rootdir/etc/
> vold.fstab seems to be for the SD/MMC-cards. Does the devpath for the
> hard drive also need to start with "/devices/platform/"? Where can I
> find the correct path?

ls -l /sys/class/block/

--

-- 
Chih-Wei
Android-x86 project
http://www.android-x86.org

Alex | 29 Mar 22:10 2011
Picon

Re: Hard drive partition as an SD card


On Mar 28, 7:51 pm, Chih-Wei Huang <cwhu...@...> wrote:
> I've said,
>
> dev_mount sdcard /mnt/sdcard auto SDCARD=/dev/sda6

Oh, sorry, I didn't get that you meant to add it right in that line.
Got confused with the same syntax in the kernel command line
parameters. Now I understand.

> > Where can I find the correct path?
>
> ls -l /sys/class/block/

OK, I'll keep this in mind, thanks.
But for now it seems like the extra item in the GRUB menu (with SDCARD
variable in the kernel line) works better for me - this way I can use
the hard drive partition, but when needed, can reboot, select another
option, and use USB flash drive as an SD card.
Currently there is no way to switch the "SD card" on the fly - between
the hard drive, and USB device, right?

--

-- 
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To post to this group, send email to android-x86@...
To unsubscribe from this group, send email to android-x86+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-x86?hl=en.

Chih-Wei Huang | 31 Mar 04:15 2011

Re: Hard drive partition as an SD card

2011/3/30 Alex <alpaxx@...>:
> But for now it seems like the extra item in the GRUB menu (with SDCARD
> variable in the kernel line) works better for me - this way I can use
> the hard drive partition, but when needed, can reboot, select another
> option, and use USB flash drive as an SD card.

Yes. Using SDCARD variable in cmdline
is more flexible. It's the recommended way
to use on android-x86.

> Currently there is no way to switch the "SD card" on the fly - between
> the hard drive, and USB device, right?

No.
But it's possible to create multiple lines
in vold.fstab. See tegav2's for an example.

--

-- 
Chih-Wei
Android-x86 project
http://www.android-x86.org


Gmane