View previous topic :: View next topic |
Author |
Message |
picarica Guru
Joined: 11 Aug 2018 Posts: 329
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54663 Location: 56N 3W
|
Posted: Sat Nov 02, 2019 2:51 pm Post subject: |
|
|
picarica,
I think its a timing issue. Here is a test. Its not a fix, even if it appears to be.
Make a new file is /etc/local.d/ call it mnt_home.start
Inside that file put Code: | #!/bin/bash/
mount /dev/mapper/vg0-home /home |
Once it exists. chmod +x it as it will be run as root.
localmount which reads /etc/fstab runs quite early is the boot process. Mounting home will still fail here.
local is the last process started before login, after everything else starts, so if its a timing thing, it should work here.
lvm2 is involved as device mapper provides the 'container' for your encrypted volume.
You donate one or more block devices to a LVM volume group. Then you create Logical Volumes inside that volume group.
Your volume group is called vg0 and the logical volume inside it is called home. Hence vg0-home.
Try the commands pvdisplay and lvdisplay.
If your logical volumes are not available before localmount is run, then fstab cannot mount any logical volumes. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22915
|
Posted: Sat Nov 02, 2019 4:26 pm Post subject: |
|
|
Please don't use videos or Firefox Send for error messages. It expires too quickly, and requires Javascript. Instead, post inline or pastebin text of the relevant errors, so that they are searchable and quotable.
From init scripts here: /etc/init.d/dmcrypt: | depend() {
before checkfs fsck |
/etc/init.d/localmount: | depend()
{
need fsck | As I read this, dmcrypt must be before fsck. localmount must be after fsck, since localmount needs fsck. Thus, dmcrypt must run before localmount, so the device must be ready.
Since you have LVM inside LUKS, you need to run LVM discovery after the LUKS unlock and before mount. This bold qualifier is likely what is missing for you. Change the dependency relations so that openrc starts components in the right sequence. |
|
Back to top |
|
|
picarica Guru
Joined: 11 Aug 2018 Posts: 329
|
Posted: Sun Nov 03, 2019 7:02 pm Post subject: |
|
|
NeddySeagoon wrote: | picarica,
I think its a timing issue. Here is a test. Its not a fix, even if it appears to be.
Make a new file is /etc/local.d/ call it mnt_home.start
Inside that file put Code: | #!/bin/bash/
mount /dev/mapper/vg0-home /home |
Once it exists. chmod +x it as it will be run as root.
localmount which reads /etc/fstab runs quite early is the boot process. Mounting home will still fail here.
local is the last process started before login, after everything else starts, so if its a timing thing, it should work here.
lvm2 is involved as device mapper provides the 'container' for your encrypted volume.
You donate one or more block devices to a LVM volume group. Then you create Logical Volumes inside that volume group.
Your volume group is called vg0 and the logical volume inside it is called home. Hence vg0-home.
Try the commands pvdisplay and lvdisplay.
If your logical volumes are not available before localmount is run, then fstab cannot mount any logical volumes. |
i found out very intresting things
Code: |
doas lvdisplay
--- Logical volume ---
LV Path /dev/vg0/home
LV Name home
VG Name vg0
LV UUID nMgTrk-Pn12-ldjH-Zajs-Kzfg-ExTG-rqG5K5
LV Write Access read/write
LV Creation host, time xubuntu, 2019-10-15 18:49:11 +0200
LV Status available
# open 1
LV Size 457.79 GiB
Current LE 117195
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:1
|
if my real home is /dev/vg0/home should i mount this ?
also my VG is correct as vg0
Code: |
doas vgdisplay
--- Volume group ---
VG Name vg0
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 457.79 GiB
PE Size 4.00 MiB
Total PE 117195
Alloc PE / Size 117195 / 457.79 GiB
Free PE / Size 0 / 0
VG UUID nlTc0k-J0Rf-IIgo-KUbz-i3iV-UAXO-hJztgI
|
what does this means ? |
|
Back to top |
|
|
picarica Guru
Joined: 11 Aug 2018 Posts: 329
|
Posted: Sun Nov 03, 2019 7:03 pm Post subject: |
|
|
Hu wrote: | Please don't use videos or Firefox Send for error messages. It expires too quickly, and requires Javascript. Instead, post inline or pastebin text of the relevant errors, so that they are searchable and quotable.
From init scripts here: /etc/init.d/dmcrypt: | depend() {
before checkfs fsck |
/etc/init.d/localmount: | depend()
{
need fsck |
As I read this, dmcrypt must be before fsck. localmount must be after fsck, since localmount needs fsck. Thus, dmcrypt must run before localmount, so the device must be ready.
Since you have LVM inside LUKS, you need to run LVM discovery after the LUKS unlock and before mount. This bold qualifier is likely what is missing for you. Change the dependency relations so that openrc starts components in the right sequence. |
not sure if wrong i edited localmount and put in need dmcrypt, but it still failed to mount :/ |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54663 Location: 56N 3W
|
Posted: Sun Nov 03, 2019 7:38 pm Post subject: |
|
|
picarica,
Did you try my test?
What does output?
I suspect that your install uses LVM as a container for your LUKS volume.
That means the LUKS volume is not any physical block device as it will only appear once the physical block device is unlocked.
Its not quite that straight forward as LUKS inside LVM works as does LVM inside LUKS.
We don't know which you have. The ordering of the layers matters, since they must be started in the right order. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
picarica Guru
Joined: 11 Aug 2018 Posts: 329
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54663 Location: 56N 3W
|
Posted: Sun Nov 03, 2019 8:00 pm Post subject: |
|
|
picarica,
Not with 7z and not with Firefox send.
Most of it is not useful ether.
Answer the questions and post the things we ask for on a pastebin site if they are too big for a post. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
picarica Guru
Joined: 11 Aug 2018 Posts: 329
|
Posted: Sun Nov 03, 2019 8:18 pm Post subject: |
|
|
NeddySeagoon wrote: | picarica,
Did you try my test?
What does output?
I suspect that your install uses LVM as a container for your LUKS volume.
That means the LUKS volume is not any physical block device as it will only appear once the physical block device is unlocked.
Its not quite that straight forward as LUKS inside LVM works as does LVM inside LUKS.
We don't know which you have. The ordering of the layers matters, since they must be started in the right order. |
well i did put the file where u said and chmodded it, rebooted and i have this as rc-update show -v
seems pretty normal to me, and how can i show how i have those layers ordered?
now i notcied too that i have lvm in boot runlevel and default, could that be making any problems ?
what's next? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54663 Location: 56N 3W
|
Posted: Sun Nov 03, 2019 10:53 pm Post subject: |
|
|
picarica,
You have Good thats normal and you have
only boot matters and looks good too.
I was also expecting to see device-mapper in the boot runlevel but it may be started by one of the other things.
Did my test appear to fix /home mounting?
It does the same thing as you logging in and running the command by hard.
I don't know how to determine the layer order except by trial and error and you can only do that once it works.
Then you can start all the layers one at a time. There are only two orders to try. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
picarica Guru
Joined: 11 Aug 2018 Posts: 329
|
Posted: Mon Nov 04, 2019 10:24 am Post subject: |
|
|
NeddySeagoon wrote: | picarica,
You have Good thats normal and you have
only boot matters and looks good too.
I was also expecting to see device-mapper in the boot runlevel but it may be started by one of the other things.
Did my test appear to fix /home mounting?
It does the same thing as you logging in and running the command by hard.
I don't know how to determine the layer order except by trial and error and you can only do that once it works.
Then you can start all the layers one at a time. There are only two orders to try. |
and your test doesnt do anything for me, i still have to manually mount it like before :/
also what exacly do you mean by changing orders ? like editing files in init.d and changin need dependencies ? |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Mon Nov 04, 2019 2:26 pm Post subject: |
|
|
picarica wrote: | also what exacly do you mean by changing orders ? like editing files in init.d and changin need dependencies ? |
No, this will vanish as soon as the init.d is update
To do that, create a /etc/conf.d/nameofservice or update the file and add needed stuff you wish modify within it
ie:
Code: | cat /etc/conf.d/lvm
rc_need="udev"
rc_after="dmcrypt"
...
|
|
|
Back to top |
|
|
picarica Guru
Joined: 11 Aug 2018 Posts: 329
|
Posted: Fri Nov 08, 2019 1:48 pm Post subject: |
|
|
fixed it by adding
Code: |
mount /dev/mapper/vg0-home /home
|
in /etc/local.d/mnt_home.start |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54663 Location: 56N 3W
|
Posted: Fri Nov 08, 2019 7:15 pm Post subject: |
|
|
picarica,
That's a hack, not a fix. :)
The real fix is to address the service start up order. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|