WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Storage expansion drives in Aspire One  (Read 8323 times)

Offline Onyarian

  • Sr. Member
  • ****
  • Posts: 337
Storage expansion drives in Aspire One
« on: February 14, 2009, 12:03:19 PM »
The AAO has two storage expansion drives.

To access both I load at boot the mmc-2.6.26.tcem extension, who is located in the /tce directory, and in bootlocal.sh I have added modprobe sdhci.

All works ok.
They appear as /mnt/mmcblk0p1 and /mn/mmcblk1p1, but I have to mount both as root (with emelfm2 from the menu entry is possible to run as root).
My question is if it is possible to appear both entries in the mount tool of the control panel.

Now, with tc and the madwifi-hal, Xorg, OSS and the mmc extensions my AAO hardware is working near 100%.
Wow!

Offline ^thehatsrule^

  • Administrator
  • Hero Member
  • *****
  • Posts: 1726
Re: Storage expansion drives in Aspire One
« Reply #1 on: February 14, 2009, 12:47:04 PM »
You can modify the mnttool fltk app and recompile it, ie add a call that does "cd /mnt && ls -1d mmcblk* >> /mnt/mountables; sync" or similar

If you don't prefer to do that, you can do something of a hack-ish workaround, such as the following:
Code: [Select]
mnttool &
sleep 1
killall mnttool
cd /mnt
ls -1d mmcblk* >> /tmp/mountables
chmod -w /tmp/mountables
mnttool 2> /dev/null &

Please note that these ideas are untested.

[revised code]
« Last Edit: February 15, 2009, 02:57:49 PM by ^thehatsrule^ »

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: Storage expansion drives in Aspire One
« Reply #2 on: February 14, 2009, 08:55:01 PM »
You can modify the mnttool fltk app and recompile it, ie add a call that does "cd /mnt && ls -1d mmcblk* >> /mnt/mountables; sync" or similar

If you don't prefer to do that, you can do something of a hack-ish workaround, such as the following:
Code: [Select]
mnttool &
sleep 1
killall mnttool
cd /mnt
ls -1d mmcblk* >> /mnt/mountables
chmod -w /mnt/mountables
mnttool 2> /dev/null &

Please note that these ideas are untested.

It's interesting how chmod -w works differently than chmod -x or chmod -r. If you're  in root, it only negates write privileges in root, leaving them for the owner or others. Chmod -x or chmod -r would negate privileges across root, owner and others. 
« Last Edit: February 14, 2009, 09:16:47 PM by jpeters »

Offline Onyarian

  • Sr. Member
  • ****
  • Posts: 337
Re: Storage expansion drives in Aspire One
« Reply #3 on: February 15, 2009, 03:37:40 AM »
Hats,

thanks, but I have created monta.sh with
Quote
mnttool &
sleep 1
killall mnttool
cd /mnt
ls -1d mmcblk* >> /mnt/mountables
chmod -w /mnt/mountables
mnttool 2> /dev/null &

I execute it as root with sudo, because as user it says
Quote
./monta.sh: line 5: can't create /mnt/mountables: Permission denied
chmod: /mnt/mountables: Operation not permitted

and it creates /mnt/mountables file with
Quote
mmcblk0
mmcblk0p1
mmcblk1
mmcblk1p1

then appears the mount tool but without this two mountpoints
What else can I do?


Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Storage expansion drives in Aspire One
« Reply #4 on: February 15, 2009, 04:16:21 AM »
The mounttool overwrites that file on start, so the only way would be to edit the source.

But since the sd/mmc driver is not yet in the base, I don't see how mnttool should have built-in support for it either. But if there are no objections, once .29 is out mmc will be included in base, and then the mount tool could be updated too.
The only barriers that can stop you are the ones you create yourself.

Offline Onyarian

  • Sr. Member
  • ****
  • Posts: 337
Re: Storage expansion drives in Aspire One
« Reply #5 on: February 15, 2009, 05:29:29 AM »
Now, to mount it easier I have changed the mount command in the setup of Emelfm2 to sudo mount.
Goes like a charm

But I really would like to have the mount tool working.

Offline ^thehatsrule^

  • Administrator
  • Hero Member
  • *****
  • Posts: 1726
Re: Storage expansion drives in Aspire One
« Reply #6 on: February 15, 2009, 11:24:15 AM »
There was a mistake in my first post.  Here's a revised one:
Code: [Select]
mnttool &
sleep 1
killall mnttool
cd /mnt
ls -1d mmcblk* >> /tmp/mountables
chmod -w /tmp/mountables
mnttool 2> /dev/null &
This should be able to run without root privileges.

Offline Onyarian

  • Sr. Member
  • ****
  • Posts: 337
Re: Storage expansion drives in Aspire One
« Reply #7 on: February 15, 2009, 02:24:31 PM »
Bingo hats! :D

now as user and appears in mount tool!

Thanks!

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Storage expansion drives in Aspire One
« Reply #8 on: February 16, 2009, 04:45:56 AM »
Onyarian, could you post your /proc/partitions? I wonder if the mmc* devices are mentioned there.
The only barriers that can stop you are the ones you create yourself.

Offline Onyarian

  • Sr. Member
  • ****
  • Posts: 337
Re: Storage expansion drives in Aspire One
« Reply #9 on: February 16, 2009, 07:40:09 AM »
Curaga, the file /proc/partitions is empty:
Quote
Item: /proc/partitions
Type: ASCII text
Size: 0 bytes
User: root
Group: root
Permissions: r-- r-- r--
Accessed: Mon 16 Feb 2009 04:34 PM
Modified: Mon 16 Feb 2009 04:34 PM
Changed: Mon 16 Feb 2009 04:34 PM
there is a symbolic link /proc/mounts to /proc/self/mounts but is empty too
Quote
Item: /proc/self/mounts
Type: ASCII text
Size: 0 bytes
User: root
Group: root
Permissions: r-- r-- r--
Accessed: Mon 16 Feb 2009 04:30 PM
Modified: Mon 16 Feb 2009 04:30 PM
Changed: Mon 16 Feb 2009 04:30 PM

Helps?

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Storage expansion drives in Aspire One
« Reply #10 on: February 16, 2009, 08:31:54 AM »
You would need to cat /proc/partitions to see the contents.

But they also appear in /etc/fstab as they should.

When I was writing mnttool, the sd card on the eeepc works as expected.
Now that I have a Dell Mini 9, I can see the issue.
Since mnttool dynamically scans upon each cycle, I can improve the parsing to pick up such devices.

10+ Years Contributing to Linux Open Source Projects.

Offline Onyarian

  • Sr. Member
  • ****
  • Posts: 337
Re: Storage expansion drives in Aspire One
« Reply #11 on: February 16, 2009, 10:28:07 AM »
Hats,
I have made a little change in
ls -1d mmcblk* >> /tmp/mountables
to
ls -1d mmcblk?p* >> /tmp/mountables
so in the mount tool there is only mmcblk0p1, and not both mmcblk0 and mmcblk0p1
like there is sda1, and not sda1 and sda

Curaga,
this is the result of cat /proc/partitions:
Quote
major minor  #blocks  name

   7     0       3924 loop0
   7     1      26848 loop1
   7     2        108 loop2
   7     3       1022 loop3
   7     4        532 loop4
   7     5         68 loop5
   7     6        372 loop6
   7     7        112 loop7
  22     0    7880544 hdc
  22     1    6827593 hdc1
  22     2    1052257 hdc2
   8     0    1024000 sda
   8     1    1020096 sda1
   7     8        668 loop8
   7     9        600 loop9
   7    10        772 loop10
   7    11       3384 loop11
   7    12        120 loop12
   7    13        584 loop13
   7    14       1032 loop14
   7    15        714 loop15
   7    16       1382 loop16
   7    17        444 loop17
 179     0   15694336 mmcblk0
 179     1   15690240 mmcblk0p1

Roberts,
When I see the mount tool before exec monta.sh there are two drives: hdc1 and sda1
if I put a new usb-pendrive, in a few moments appear in the mount tool: hdc1, sda1 and sdb1, but is not incorporated the mmcblk. Only when I exec the monta.sh it appears.

Offline Onyarian

  • Sr. Member
  • ****
  • Posts: 337
Re: Storage expansion drives in Aspire One
« Reply #12 on: February 17, 2009, 09:11:22 AM »
Now I have access to mmcblk0p1 but this access is only for read. the owner and group is root (I can't change this root permission even registered as root)
I see in fstab that tc creates access to sda1 with umask=000
Quote
# /etc/fstab
proc            /proc        proc    defaults          0       0
sysfs           /sys         sysfs   defaults          0       0
devpts          /dev/pts     devpts  defaults          0       0
tmpfs           /dev/shm     tmpfs   defaults          0       0
/dev/hdc        /mnt/hdc        auto     noauto,users,exec    0 0 # Added by TC
/dev/hdc1       /mnt/hdc1       ext2     noauto,users,exec,relatime 0 0 # Added by TC
/dev/hdc2       none            swap     defaults             0 0 # Added by TC
/dev/sda        /mnt/sda        auto     noauto,users,exec    0 0 # Added by TC
/dev/sda1       /mnt/sda1       vfat     noauto,users,exec,umask=000 0 0 # Added by TC
/dev/mmcblk0    /mnt/mmcblk0    auto     noauto,users,exec    0 0 # Added by TC
/dev/mmcblk0p1  /mnt/mmcblk0p1  auto     noauto,users,exec    0 0 # Added by TC

the result of cat /etc/mtab:
Quote
rootfs / rootfs rw 0 0
/proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
devpts /dev/pts devpts rw,mode=600 0 0
tmpfs /dev/shm tmpfs rw 0 0
/dev/sda1 /mnt/sda1 vfat rw,nosuid,nodev,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1 0 0
/dev/loop0 /tmp/tcloop/OSS iso9660 ro 0 0
/dev/loop1 /tmp/tcloop/Xorg-7.4 iso9660 ro 0 0
/dev/loop2 /tmp/tcloop/conky cramfs ro 0 0
/dev/loop3 /tmp/tcloop/dbus_glib iso9660 ro 0 0
/dev/loop4 /tmp/tcloop/emelfm2 cramfs ro 0 0
/dev/loop5 /tmp/tcloop/expat2 cramfs ro 0 0
/dev/loop6 /tmp/tcloop/file cramfs ro 0 0
/dev/loop7 /tmp/tcloop/fontconfig cramfs ro 0 0
/dev/loop8 /tmp/tcloop/glib2 cramfs ro 0 0
/dev/loop9 /tmp/tcloop/graphics-2.6.26 iso9660 ro 0 0
/dev/loop10 /tmp/tcloop/graphics-libs-1 cramfs ro 0 0
/dev/loop11 /tmp/tcloop/gtk+-2 cramfs ro 0 0
/dev/loop12 /tmp/tcloop/leafpad-0.8.16-le cramfs ro 0 0
/dev/loop13 /tmp/tcloop/libxml2 cramfs ro 0 0
/dev/loop14 /tmp/tcloop/openssl-0.9.8h cramfs ro 0 0
/dev/loop15 /tmp/tcloop/ttf-bitstream-vera iso9660 ro 0 0
/dev/loop16 /tmp/tcloop/wireless-2.6.26 iso9660 ro 0 0
/dev/loop17 /tmp/tcloop/wireless_tools iso9660 ro 0 0
/dev/mmcblk0p1 /mnt/mmcblk0p1 vfat rw,nosuid,nodev,fmask=0022,dmask=0022,allow_utime=177777,codepage=cp437,iocharset=iso8859-1 0 0

How can I put the umask=000 to the mmcblk0p1 or have write access to mmcblk0p1 every time I mount it?

edited 2009/2/18:

How can I put the umask=000 to the mmcblk0p1 or have write access to mmcblk0p1 every time I mount it with mount tool?
I know manually with
Quote
mount -t vfat -o users,exec,umask=000 /dev/mmcblk0p1 /mnt/mmcblk0p1

« Last Edit: February 18, 2009, 09:24:49 AM by Onyarian »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Storage expansion drives in Aspire One
« Reply #13 on: February 18, 2009, 12:33:54 PM »
The mount tool uses fstab options, so add it to the relevant line:

/dev/mmcblk0p1  /mnt/mmcblk0p1  auto     noauto,users,exec,umask=000    0 0 # Added by TC
The only barriers that can stop you are the ones you create yourself.

Offline Onyarian

  • Sr. Member
  • ****
  • Posts: 337
Re: Storage expansion drives in Aspire One
« Reply #14 on: February 19, 2009, 10:10:03 AM »
Thanks Curaga,

but seems that it is not so easy.
If I simply add this to fstab it is not restored in a new boot
Then if I put the modified fstab in .filetool.lst then in a new boot it stay but is not created the entries /mnt/mmcblk0 and /mnt/mmcblk0p1 in /mnt and monta.sh gives error.

Then if I copy the modified fstab to /home/tc, delete the entry in .filetools.lst and in the new boot I exec this modified monta.sh:
Quote
sudo cp fstab /etc/fstab
mnttool &
sleep 1
killall mnttool
cd /mnt
ls -1d mmcblk?p* >> /tmp/mountables
chmod -w /tmp/mountables
mnttool 2> /dev/null &
in the mount tool I found the entry mmcblk0p1 but It can't be mounted because seems that it is not in mtab

so seems that the only possibility is to mount it manually with
Quote
mount -t vfat -o users,exec,umask=000 /dev/mmcblk0p1 /mnt/mmcblk0p1
and forget the mount tool
« Last Edit: February 19, 2009, 10:17:37 AM by Onyarian »