Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
e4rat-lite-collect is not initialized on boot
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
LnX_Archer
n00b
n00b


Joined: 15 Sep 2017
Posts: 4

PostPosted: Fri Sep 15, 2017 11:52 am    Post subject: e4rat-lite-collect is not initialized on boot Reply with quote

With an audit enabled kernel, the auditd service disabled and grub kernel parameters:
Code:
GRUB_CMDLINE_LINUX_DEFAULT="kernel /vmlinuz-linux-audit root=/dev/sda2 init=/usr/bin/e4rat-lite-collect rw 5"


the e4rat-lite-collect is simply not run at start up. Running
Code:
$ sudo e4rat-lite-collect -k

just after boot, to stop the process gives this message:
Code:
Cannot read pid from file /dev/.e4rat-lite-collect.pid: No such file or directory

indicating that e4rat-lite-collect was never started.

I have e4rat configured with:
Code:
; e4rat-lite configuration file

[Global]

; Path to the main initialization process
init_file=/sbin/init

; Default location for the boot log
startup_log_file=/var/lib/e4rat-lite/startup.log

; Verbosity and loglevel
verbose 31
loglevel 31

; ------------------

[Collect]

; Collect files only on ext4 devices [true/false]
ext4_only=false

; Ignore opened files (already running processes) [true/false]
exclude_open_files=false

; Time (in seconds) to wait before finalizing the collect
timeout=240

; ------------------

[Realloc]

; Defragmentation method [auto/pa/tld/locality_group]
defrag_mode=auto


It does not start with these settings or the default settings. I have reinstalled e4rat-lite and tried running out of the box with the same result.
Of course no startup.log is created either, since e4rat-lite-collect is actually never run.

I found this old thread, but the solution there is apperently to compile a kernel with no initramfs. Shouldn't e4rat work with initramfs?

I'm kinda new at this, so let me know what you need to look at to help me out.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21602

PostPosted: Sat Sep 16, 2017 12:06 am    Post subject: Reply with quote

When you use an initramfs, it is responsible for doing early system setup, then switching to the long term root filesystem and running your next-stage init. Does your existing initramfs understand to run e4rat instead of the regular init process?
Back to top
View user's profile Send private message
LnX_Archer
n00b
n00b


Joined: 15 Sep 2017
Posts: 4

PostPosted: Sat Sep 16, 2017 6:37 am    Post subject: Reply with quote

Hu wrote:
When you use an initramfs, it is responsible for doing early system setup, then switching to the long term root filesystem and running your next-stage init. Does your existing initramfs understand to run e4rat instead of the regular init process?


Uh, I don't think so. I have only set the kernel to run e4rat-lite-collect instead of the init process. That is all, any e4rat guide has ever told me to do. And I have checked at least 10 of them at this point. Do they all assume that there is no initramfs?

So, which is easier then, setting up the initramfs to run e4rat or compile a kernel without initramfs? I'm not really comfterble with either, but seems I have no other choice at this stage, right?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21602

PostPosted: Sun Sep 17, 2017 1:02 am    Post subject: Reply with quote

I don't know what guides you have read, but my understanding of the early boot process is that yes, those guides must be assuming either no initramfs or that the initramfs understands how to pass control to an alternate init. If you use an initramfs that does not understand that, then those instructions will not work.

I don't know how hard it would be to modify your initramfs, but that would be my preference. If you require an initramfs to boot, then customizing it is almost certainly less work than making the system boot without it.
Back to top
View user's profile Send private message
LnX_Archer
n00b
n00b


Joined: 15 Sep 2017
Posts: 4

PostPosted: Sun Sep 17, 2017 5:14 am    Post subject: Reply with quote

Hu wrote:
I don't know what guides you have read, but my understanding of the early boot process is that yes, those guides must be assuming either no initramfs or that the initramfs understands how to pass control to an alternate init. If you use an initramfs that does not understand that, then those instructions will not work.

I don't know how hard it would be to modify your initramfs, but that would be my preference. If you require an initramfs to boot, then customizing it is almost certainly less work than making the system boot without it.


Alright. I didn't actively choose to have an initramfs. Could be I don't need it at all. Don't know enough about it to know whether I need it or not. I guess I'll look into it and see what I prefer.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21602

PostPosted: Sun Sep 17, 2017 5:35 pm    Post subject: Reply with quote

If you don't know whether you need one, you might not. Try building a kernel without one and installing it under a separate name. (Or, if your initramfs is not embedded in the kernel, add a bootloader entry that loads that kernel without an initramfs.) Either way, the important point is to retain the ability to boot using the kernel+initramfs that you have, so that if your initramfs is mandatory, you do not get locked out of the system when the kernel-without-initramfs fails. Once you have a way to try to boot without an initramfs, try it to see if it works. Usually, people who use an initramfs did so because it was required to make the system work: encrypted disks, software RAID, or something else too complicated to explain to the kernel with a simple command line tweak. You might get lucky and find you do not need one. While it's possible that you need one and the boot will still work without it (but something will be broken later), it's much more common that if you need an initramfs and do not have it, then the system will be broken in some very obvious way.
Back to top
View user's profile Send private message
LnX_Archer
n00b
n00b


Joined: 15 Sep 2017
Posts: 4

PostPosted: Sun Sep 17, 2017 8:08 pm    Post subject: Reply with quote

Hu wrote:
If you don't know whether you need one, you might not. Try building a kernel without one and installing it under a separate name. (Or, if your initramfs is not embedded in the kernel, add a bootloader entry that loads that kernel without an initramfs.) Either way, the important point is to retain the ability to boot using the kernel+initramfs that you have, so that if your initramfs is mandatory, you do not get locked out of the system when the kernel-without-initramfs fails. Once you have a way to try to boot without an initramfs, try it to see if it works. Usually, people who use an initramfs did so because it was required to make the system work: encrypted disks, software RAID, or something else too complicated to explain to the kernel with a simple command line tweak. You might get lucky and find you do not need one. While it's possible that you need one and the boot will still work without it (but something will be broken later), it's much more common that if you need an initramfs and do not have it, then the system will be broken in some very obvious way.


Alright, thanks! I'll look into this and return with my solution or for further help.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum