Active Topics

 


Reply
Thread Tools
Posts: 33 | Thanked: 25 times | Joined on Sep 2011 @ grenoble
#41
Originally Posted by Thoke View Post
Yeah, I understand. I've never edited a script before before now I've been very cautious about doing any changes to scripts.
don't worry, i've never used btrfs before

now, if someone know how to lauch script we the other half is installed or removed, that would be great.
i want to mount/unmout my sdcard with that method
 
javispedro's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#42
Originally Posted by Thoke View Post
So it should look like this:
Note the following addendum to the together.jolla.com post:

(edit: replace $MY_MOUNTPOINT above by $MNT if you want the SD-card mounted the very same way a FAT-formatted card would - I am using a different mount point)
 
Posts: 284 | Thanked: 661 times | Joined on Aug 2013 @ Finland
#43
Yes I noted that.

All would've worked if the microsd would've let me write anything on it. Later I discovered an ctioctl error in my microsd's btrfs filesystem which was the root of all my problems from the beginning. I guess it's just unstable in my microsd since I haven't heard anyone else complaining about their btrfs-formatted microsd. I had the problem since the start. I have a Transcend TS64GUSDU1.

Sad ending though as when I found the problem and decided to get rid of btrfs from my microsd I had a momentary lapse and typed mkfs.ext2 /dev/mmcblk0 on my Jolla phone (must be because in my Ubuntu the sdcard is always in /dev/mmcblk0, and I used it a lot formatting the microsd.)

Well, Care Centers exist, and luckily I live in Finland.
 
javispedro's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#44
Originally Posted by Thoke View Post
mkfs.ext2 /dev/mmcblk0
/me sigh that there is still no way to recover from that.
 
Posts: 594 | Thanked: 1,094 times | Joined on Aug 2012 @ Rhine
#45
@Thoke: that's really sad. i always took the sdcard out of the phone and reformated with gparted on pc to avoid something like this.

@javispedro: have you read my post 27? What's your opninion on that?
Or more concrete:
is it right, that mount-sd.sh is called twice?
why is the default mountpoint ready so late, in comparison to another mountpoint?
are there important reasons to use only the default mountpoint?
i know, a lot of questions. maybe you have some answers

@bob_bipbip: what's the advantage of using subvolumes instead of bind mounts? did you also try to mount the whole home/nemo-folder? did you have any problems with it?

@meemorph: can you confirm, the problem with ambiances exists only with default mountpoint? should be the same, when you only mount the Pictures-folder...

Last edited by Leinad; 2014-01-27 at 13:38.
 

The Following User Says Thank You to Leinad For This Useful Post:
Posts: 24 | Thanked: 7 times | Joined on Nov 2011
#46
@Leinad hi, your solution of mounting /home/ entirely on the sdcard seems quite desirable to me... Do you have any feedback on this? Any problem? Does it work well with latest OS upgrade?
 
Posts: 594 | Thanked: 1,094 times | Joined on Aug 2012 @ Rhine
#47
Originally Posted by alci View Post
@Leinad hi, your solution of mounting /home/ entirely on the sdcard seems quite desirable to me... Do you have any feedback on this? Any problem? Does it work well with latest OS upgrade?
with my current configuration, which i've been using for about 2 weeks now, i had no problems at all, not even during or after the latest update.
it seems like mount-sd.sh was not overwritten.

will post detailed instructions in first post soon.
 
Posts: 284 | Thanked: 661 times | Joined on Aug 2013 @ Finland
#48
Originally Posted by Leinad View Post
@Thoke: that's really sad. i always took the sdcard out of the phone and reformated with gparted on pc to avoid something like this.
If I remember right gparted with btrfs-tools doesn't create the same version of btrfs as SailfishOS does. I can't verify it now though (no phone yet). I use gparted too.

---

On topic, while I researched about btrfs, wouldn't this be possible:
First change the mount-sd.sh as said here

Then create btrfs subvolume(s), for example music:
btrfs subvolume create /user/100000/media/sdcard/Music

Copy everything from /home/nemo/Music to your newly created subvolume, and then mount it to home:
mount -o subvol=Music /dev/mmcblk1 /home/nemo/Music/

This way I could copy all my music from computer to my sdcard via MTP without symlinks, just copy/paste to Music folder in Jolla. What would be the downsides of this? The subvolumes should mount automatically too I think, since the mainvol is -thanks to the modified mount-sd.sh. What's better here than symlinking? Well at least for me the symlinks to sdcard didn't work after phone reboots -even after mounting my microsd manually before trying- and I had to create the symlinks again every time, but then again I didn't test this after the changes to mount-sd.sh script, so it may not be a problem.

This may be heavily just a personal preference: do it the way you like.

I'll experiment with this when I get my phone.

And oh, my problem with my btrfs-microsd wasn't due to problems with btrfs filesystem, the problems continued even after formatting to ext2. I begin to suspect either my microsd is faulty, or my Ubuntu has problems (which it had, I had to reinstall it just a few days ago). We'll see.
 
Posts: 594 | Thanked: 1,094 times | Joined on Aug 2012 @ Rhine
#49
i'm not sure about btrfs, i'm using ext4.

first post is completely rewritten.

i tried to write everything correctly out of my memory, but there might still be some mistakes in it. it would be nice, if someone with experience could verify it's working this way.
 

The Following User Says Thank You to Leinad For This Useful Post:
Posts: 539 | Thanked: 518 times | Joined on May 2010 @ nanaurbusiness
#50
Originally Posted by Thoke View Post
On topic, while I researched about btrfs, wouldn't this be possible:
First change the mount-sd.sh as said here

Then create btrfs subvolume(s), for example music:
btrfs subvolume create /user/100000/media/sdcard/Music
That's what I'm using.

my mount-sd.sh now looks like this
Code:
#!/bin/bash

SDCARD=/mnt/sdcard
DEF_UID=$(grep "^UID_MIN" /etc/login.defs |  tr -s " " | cut -d " " -f2)
DEF_GID=$(grep "^GID_MIN" /etc/login.defs |  tr -s " " | cut -d " " -f2)
DEVICEUSER=$(getent passwd $DEF_UID | sed 's/:.*//')
MNT=/run/user/$DEF_UID/media/sdcard

if [ "$ACTION" = "add" ]; then
        if [ -b /dev/mmcblk1p1 ]; then
                ln -sf /dev/mmcblk1p1 $SDCARD
        elif [ -b /dev/mmcblk1 ]; then
                ln -sf /dev/mmcblk1 $SDCARD
        else
                exit $?
        fi
        su $DEVICEUSER -c "mkdir -p $MNT"
        mount $SDCARD $MNT -o uid=$DEF_UID,gid=$DEF_GID || mount -o subvol=sdcard,compress /dev/mmcblk1 /home/nemo/sdcard/
        mount -o subvol=Videos /dev/mmcblk1 /home/nemo/Videos/
        mount -o subvol=Desktop /dev/mmcblk1 /home/nemo/Desktop/
        mount -o subvol=Documents /dev/mmcblk1 /home/nemo/Documents/
        mount -o subvol=Downloads /dev/mmcblk1 /home/nemo/Downloads/
        mount -o subvol=Music /dev/mmcblk1 /home/nemo/Music/
        mount -o subvol=Pictures /dev/mmcblk1 /home/nemo/Pictures/
        mount -o subvol=Public /dev/mmcblk1 /home/nemo/Public/
        mount -o subvol=Templates /dev/mmcblk1 /home/nemo/Templates/
        mount -o subvol=.android /dev/mmcblk1 /data/sdcard/
else
        umount $SDCARD

        if [ $? = 0 ]; then
                rm -f $SDCARD
        else
                umount -l $MNT
                rm -f $SDCARD
        fi
fi
so now mount command shows:
Code:
/dev/mmcblk1 on /home/nemo/Public type btrfs (rw,relatime,thread_pool=4,ssd,noacl,space_cache)
/dev/mmcblk1 on /home/nemo/Templates type btrfs (rw,relatime,thread_pool=4,ssd,noacl,space_cache)
/dev/mmcblk1 on /data/sdcard type btrfs (rw,relatime,thread_pool=4,ssd,noacl,space_cache)
/dev/mmcblk1 on /home/nemo/sdcard type btrfs (rw,relatime,thread_pool=4,ssd,noacl,space_cache)
/dev/mmcblk1 on /home/nemo/Videos type btrfs (rw,relatime,thread_pool=4,ssd,noacl,space_cache)
/dev/mmcblk1 on /home/nemo/Desktop type btrfs (rw,relatime,thread_pool=4,ssd,noacl,space_cache)
/dev/mmcblk1 on /home/nemo/Documents type btrfs (rw,relatime,thread_pool=4,ssd,noacl,space_cache)
/dev/mmcblk1 on /home/nemo/Downloads type btrfs (rw,relatime,thread_pool=4,ssd,noacl,space_cache)
/dev/mmcblk1 on /home/nemo/Music type btrfs (rw,relatime,thread_pool=4,ssd,noacl,space_cache)
/dev/mmcblk1 on /home/nemo/Pictures type btrfs (rw,relatime,thread_pool=4,ssd,noacl,space_cache)
and df -h gives me...
Code:
/dev/mmcblk1           60G  3.0G   53G   6% /home/nemo/Public
/dev/mmcblk1           60G  3.0G   53G   6% /home/nemo/Templates
/dev/mmcblk1           60G  3.0G   53G   6% /data/sdcard
/dev/mmcblk1           60G  3.0G   53G   6% /home/nemo/sdcard
/dev/mmcblk1           60G  3.0G   53G   6% /home/nemo/Videos
/dev/mmcblk1           60G  3.0G   53G   6% /home/nemo/Desktop
/dev/mmcblk1           60G  3.0G   53G   6% /home/nemo/Documents
/dev/mmcblk1           60G  3.0G   53G   6% /home/nemo/Downloads
/dev/mmcblk1           60G  3.0G   53G   6% /home/nemo/Music
/dev/mmcblk1           60G  3.0G   53G   6% /home/nemo/Pictures
No need to manually mount my btrfs subvolumes anymore.

I use bob_bipbip's guide posted here
but I added a hidden android subvolume (.android) and mounted the hidden .android subvolume to /data/sdcard and the sdcard itself to /home/nemo/sdcard

Code:
mount -o subvol=sdcard,compress /dev/mmcblk1 /home/nemo/sdcard/
mount -o subvol=.android /dev/mmcblk1 /data/sdcard/
Regards,

J4ZZ
__________________

N900 ~ $ make me a sandwich
-bash: no, make it yourself
N900 ~ $ sudo make me a sandwich
-bash: ok then...
 

The Following 2 Users Say Thank You to J4ZZ For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 12:01.