1 |
On 24/09/2021 21:30, Canek Peláez Valdés wrote: |
2 |
> On Fri, Sep 24, 2021 at 2:25 PM antlists <antlists@××××××××××××.uk |
3 |
> <mailto:antlists@××××××××××××.uk>> wrote: |
4 |
> |
5 |
> This is weird ... |
6 |
> |
7 |
> My /home directory is set up somewhat strangely, as in I've got two raw |
8 |
> partitions, I've put dm-integrity on them, raided them together, then |
9 |
> put lvm on top of that. |
10 |
> |
11 |
> |
12 |
> Which got me into a bind with fstab. I've created a systemd service, |
13 |
> which fires up dm-integrity on those two partitions. But I get the |
14 |
> impression it doesn't run until fstab completes. Catch-22 - fstab tries |
15 |
> to mount /home, but it can't until dm-integrity has made the volume |
16 |
> appear! |
17 |
> |
18 |
> |
19 |
> Have you tried using Before=local-fs.target in the service? Or even |
20 |
> Before=local-fs-pre.target? |
21 |
|
22 |
You mean in my integritysetup.service file? No, because in scrabbling |
23 |
around to try and find out what magic incantation was required, I didn't |
24 |
find it. |
25 |
|
26 |
There's a lot of info about how to write a service file, but if you need |
27 |
to run before or after system service files, it's nowhere near so easy |
28 |
to find out Before=WHAT or After=WHAT :-) |
29 |
> |
30 |
> So I created a systemd mount unit for /home, which only runs after |
31 |
> dm-integrity. Great - I enabled it and it appeared to work! |
32 |
> |
33 |
> |
34 |
> You removed the /home entry from fstab, right? |
35 |
> |
36 |
mad it noauto, yes ... |
37 |
|
38 |
> Only problem, startplasma-wayland now dumped me at a blank screen. |
39 |
> |
40 |
> Now for the weirdo. I disabled it, thinking I would have to log in as |
41 |
> root, mount /home, and go from there. Except that, when I logged in, |
42 |
> /home was mounted and startplasma-wayland worked! |
43 |
> |
44 |
> |
45 |
> That sounds like /home was still on fstab... |
46 |
|
47 |
#LABEL=boot /boot ext4 noauto,noatime 1 2 |
48 |
/dev/disk/by-uuid/F436-354A /boot vfat noauto,noatime 1 2 |
49 |
#UUID=58e72203-57d1-4497-81ad-97655bd56494 / ext4 noatime 0 1 |
50 |
#LABEL=swap none swap sw 0 0 |
51 |
#/dev/cdrom /mnt/cdrom auto noauto,ro 0 0 |
52 |
/dev/vg-root/lv-gentoo / ext4 rw 0 0 |
53 |
/dev/vg-home/lv-data /home ext4 noauto,rw 0 0 |
54 |
/dev/disk/by-uuid/e2b75f09-8cb4-4e20-9cfd-21c0aadfa540 none swap |
55 |
sw,pri=1 0 0 |
56 |
/dev/disk/by-uuid/e03459f5-1f57-485b-92e4-b09cf50534c1 none swap |
57 |
sw,pri=1 0 0 |
58 |
> |
59 |
> systemctl tells me mount.home is disabled, but also tells me that it |
60 |
> ran |
61 |
> and mounted the drive. |
62 |
> |
63 |
> |
64 |
> That should be home.mount. What does systemctl status home.mount says? |
65 |
> |
66 |
anthony@thewolery ~ $ systemctl status home.mount |
67 |
● home.mount - Mount Home |
68 |
Loaded: loaded (/etc/systemd/system/home.mount; disabled; vendor |
69 |
preset: disabled) |
70 |
Active: active (mounted) since Fri 2021-09-24 20:13:49 BST; 2min |
71 |
51s ago |
72 |
Where: /home |
73 |
What: /dev/mapper/vg--home-lv--data |
74 |
CPU: 13ms |
75 |
CGroup: /system.slice/home.mount |
76 |
|
77 |
Sep 24 20:13:48 thewolery systemd[1]: Mounting Mount Home... |
78 |
Sep 24 20:13:49 thewolery systemd[1]: Mounted Mount Home. |
79 |
anthony@thewolery ~ $ cd Scans/HP-M477/ |
80 |
|
81 |
> So what on earth is going on, and more importantly, what am I |
82 |
> misunderstanding or doing wrong. I would very much like to know why |
83 |
> it's |
84 |
> working, when I think it shouldn't be! |
85 |
> |
86 |
So fstab says noauto, home.mount is disabled, and /home is mounted on |
87 |
boot... |
88 |
|
89 |
Cheers, |
90 |
Wol |