ubuntu touch - own libertine container in the custom directory or partition - Ask Ubuntu
is there way install own libertine container in custom directory or partition? think main size (volume) of container installation belongs directory this:
/home/phablet/.cache/libertine-container/my-container/rootfs
of course helpful know list of other file locations of own container like:
~/.local/share/libertine/containersconfig.json ~/.cache/libertine-container/my-container ~/.cache/my-container ~/.local/share/libertine-container/user-data/my-container ~/.local/share/libertine-container/user-data/my-container/.cach/libertine-container/my-container
i see way using mount --bind..
, in doing have several problems here /etc/fstab
editing or using /etc/rc.local
or upstart script automount on device starting.
so, second question that: if use mount --bind..
binding /home/phablet/.cache/libertine-container/my-container/rootfs
manually time time, will have trouble correct work of libertine scope (like described there)?
before our actions should have sd card ext2/3/4
partition. in ubuntu touch can represented /dev/mmcblk1p2
(in case). if want permanent mounting, can’t use /etc/fstab/
can use /lib/init/fstab
pointed in answer there. permanent mounting of sd in ubuntu touch not convenient , not stable. sometimes, because of error in file system on ext2 partition, had got problems booting of ubuntu touch. perhaps, shooting down of device doesn't perform dismounting correctly. so, decided mount sd card , use libertine container on time time.
at first, created new container name sd-container
usual in internal disk space: /home/phablet/.cache/libertine-container/sd-container
. then, mounted ext2 partition on sd such command:
sudo mount /dev/mmcblk1p2 /home/phablet/mnt/sd -t ext2 -o defaults,noatime,nodiratime,errors=remount-ro
then made directory /home/phablet/mnt/sd/sd-container/
, made copy of rootfs of sd-container ext2 partition on sd:
cd /home/phablet/.cache/libertine-container/sd-container rsync -aaxvh ./ /home/phablet/mnt/sd/sd-container/
after preparing made script mount ext2 partition on sd , bind rootfs (sdgo.sh
):
#!/bin/sh sudo mount /dev/mmcblk1p2 /home/phablet/mnt/sd -t ext2 -o defaults,noatime,nodiratime,errors=remount-ro sudo mount --bind /home/phablet/mnt/sd/sd-container/rootfs /home/phablet/.cache/libertine-container/sd-container/rootfs restart unity8-dash
and script stop playng (sdstop.sh
):
#!/bin/sh sudo umount /home/phablet/.cache/libertine-container/sd-container/rootfs sudo umount /dev/mmcblk1p2 restart unity8-dash
finally, after run sdgo.sh
unity8-dash restarts, , can see new sd-container scope , applications under desktop app scope. can run or install new applications usual. rootfs of container situated on sd card! when want stop run sdstop.sh
, sd-container scope disappears. , small original rootfs
(hidden binding) remains on internal disk space without changes.
conclusion: have rootfs of libertine container on sd card , possibility switch on/off , scope when want.
Comments
Post a Comment