1 |
Meino.Cramer@×××.de wrote: |
2 |
|
3 |
> Hi, |
4 |
> |
5 |
> ...still fiddling with Linux on my ASUS MeMO Pad 7... ;) |
6 |
> |
7 |
> Current status: |
8 |
> SDCard: |
9 |
> Back from extFAT (toooooo slllooooooww) to FAT32 |
10 |
> On this SDCard two file, each 4GB in sizse and formatted ext4 |
11 |
> One conatins currently the complete Linux (used as chroot environment) |
12 |
> The second one contains a copy of /usr (that is, the second image |
13 |
> contains /usr - not only its ontents). |
14 |
> |
15 |
> I finally want to get rid of the /usr on the first file to get more |
16 |
> space for upgrades, intstallations and such. |
17 |
> |
18 |
> While using the chrooted environment (completly booted from the first |
19 |
> file) I did |
20 |
> |
21 |
> mount /dev/sdcard /mnt |
22 |
> losetup /dev/loop(x) /mnt/frstfile.img |
23 |
> mount /dev/loop(x) /image |
24 |
> mount --bind /image/usr /usr |
25 |
> |
26 |
> This way the /usr of the first image file was somehow |
27 |
> "knocked off" and the (identical) /usr of the second image |
28 |
> file tooks its place. |
29 |
> |
30 |
> It works so far. |
31 |
> |
32 |
> Now the problem: |
33 |
> How can I manipulate /etc/fstab (and may be others) in a |
34 |
> way that /usr of the second image file permanently replaces |
35 |
> /usr of the first image file AND gives me the change to remove |
36 |
> /usr of the first image file? |
37 |
|
38 |
I forgot something in my last post. |
39 |
|
40 |
Shouldn't it possible to use fstab entries like these: |
41 |
|
42 |
/dev/sdcard /mnt auto defaults 0 0 |
43 |
/mnt/frstfile.img /usr auto loop 0 0 |
44 |
|
45 |
If mounting with fstab doesn't work, you can place a script under |
46 |
/etc/local.d/ that will do the mount for you. But I don't know if this |
47 |
works if you are using systemd. |
48 |
|
49 |
It's many years ago that I used loop devices and I can barely remember |
50 |
it. So maybe I'm totally wrong here. :-) |
51 |
|
52 |
-- |
53 |
Regards |
54 |
wabe |