Re: [lfs-support] Booting LFS with systemd

2018-07-06 Thread Bruce Dubbs

On 07/06/2018 01:20 AM, Frans de Boer wrote:

On 07/05/2018 11:56 PM, Bruce Dubbs wrote:

On 07/05/2018 02:48 PM, Frans de Boer wrote:

On 06/30/2018 01:29 PM, Hazel Russman wrote:

On Fri, 29 Jun 2018 01:25:29 -0400
Michael Shell  wrote:


On Thu, 28 Jun 2018 16:06:00 +0800
Xi Ruoyao  wrote:


Now I only use "initrd" directive to update CPU microcode and fix the
buggy ACPI DSDT of my laptop (another sad story).


.

And as there now seems to be several people who suffer with the
ACPI DSDT driver bug, you guys should make sure upstream is aware
of the problem, if they aren't already.


...

   Cheers,

   Mike

--
I did a git bisect on my system, but I couldn't make much sense of 
the result. The commit it finally settled on didn't seem to have 
anything to with acpi.


[quote]
Bisecting: 2 revisions left to test after this (roughly 1 step)
[9af9b94068fb1ea3206a700fc222075966fbef14] x86/cpu/AMD: Handle SME 
reduction in physical address size


Bisecting: 0 revisions left to test after this (roughly 1 step)
[33c2b803edd13487518a2c7d5002d84d7e9c878f] x86/mm: Remove 
phys_to_virt() usage in ioremap()


Bisecting: 0 revisions left to test after this (roughly 0 steps)
[7744ccdbc16f0ac4adae21b3678af93775b3a386] x86/mm: Add Secure Memory 
Encryption (SME) support

[unquote]

I sent the result to the kernel acpi development list but never got 
an answer. If someone else on this list wants to try, I can send him 
my complete bisect logs.


--
Hazel
This quite frustrating. After recompiling, following the book to the 
letter, I still get a frozen LFS system.
One thing I do note however is that the freezing always occurs after 
systemd has detected that it is on a virtual machine. A number of 
error messages is send, but due to ratelimiting I can't see them 
because they are suppressed.


I had even rebuild everything with systemd-232, and that worked as 
before. But after 232, things started to behave strange. Now way to 
debug systemd, whatever I do


Help?


I don't mean to be pedantic, but I really don't think you would run 
into these types of problems using System V.  Why not try that?


  -- Bruce


Hi Bruce,
With System V there is - of course - no problem. The thing is that 
systemd - if it runs well - is somewhat easier to use because of the use 
of .service files.


I'll have to disagree that service files are easier.  What I do agree 
with is that they are more consistent among distros.  The boot scripts 
for System V are really quite easy to read and, if needed, write.


 I also noticed that some packages are only shipping
.service(.in) files and have abandon the use of sysVinit files. 


Then they are abandoning those distros that do not use systemd such as 
the BSDs and Devuan.  But those distros can easily add their own boot 
scripts.  I'll note that all the BLFS packages that need boot scripts 
have them,


Combined 
with the fact that most distributions have embraced systemd as their 
primary or only init system let me believe that we are stuck with this 
piece of ever growing mutation. And as LFS is a teaching ground, it 
should - however reluctant - incorporated this too.


As a teaching tool, NOT using systemd is essential.  There is far too 
much done by systemd in an opaque manner that System V demonstrates and, 
if desired,implemented in custom ways.


Also, the goal is that someone fire-up their basic hardware with a LFS 
born OS, but for testing or use in VM's development is nowadays mostly 
within the VM realm.


When I teach LFS in class, I always have the students use real HW, 
There are too many things that VMs hide,


  -- Bruce

--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style


Re: [lfs-support] Booting LFS with systemd

2018-07-06 Thread Baho Utot



On 07/06/2018 02:46 AM, Xi Ruoyao wrote:

On 2018-07-05 17:05 -0400, Baho Utot wrote:

On 07/05/2018 03:48 PM, Frans de Boer wrote:

On 06/30/2018 01:29 PM, Hazel Russman wrote:

On Fri, 29 Jun 2018 01:25:29 -0400
Michael Shell  wrote:


On Thu, 28 Jun 2018 16:06:00 +0800
Xi Ruoyao  wrote:


Now I only use "initrd" directive to update CPU microcode and fix the
buggy ACPI DSDT of my laptop (another sad story).

.

And as there now seems to be several people who suffer with the
ACPI DSDT driver bug, you guys should make sure upstream is aware
of the problem, if they aren't already.

I don't know if it is a driver bug.  It seems to me a bug in DSDT itself.


I moved to FreebSD, but I am moving back to linux because of all the
non  sense going on with FreeBSD.  I'll be using the "old and proven"
init system.

Just curious, is there anything like "BSD From Scratch"?

Yes, but it doesn't work either

--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style


Re: [lfs-support] Booting LFS with systemd

2018-07-06 Thread Michael Shell
On Fri, 06 Jul 2018 15:44:19 +0800
Xi Ruoyao  wrote:


> There is message from systemd crash handler (showing a SIGABRT and dumping
> core), but there is no welcome message.  So the problem should be in
> mount_cgroup_controllers.
> 
> There IS a way to debug systemd - adding log_info into systemd source code
> to output key variables and debug messages.  I was one of the ACM/ICPC
> contestants who are very familiar with this ``debugging technique".  This
> technique often outperforms GDB in programming contests. :)


  Xi,

That is really good stuff to know! However, I don't understand what you
mean by "adding log_info into systemd source code". How exactly do you
do that? e.g., a debug option the source configure script, a manual
alteration of source code (and how/where), etc.

If it is a cgroup issue, it is required that the kernel be built with:

CONFIG_CGROUPS (it is OK to disable all controllers)


  Mike


-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style


Re: [lfs-support] Booting LFS with systemd

2018-07-06 Thread Xi Ruoyao
On 2018-07-06 08:23 +0200, Frans de Boer wrote:
> On 07/06/2018 05:32 AM, Michael Shell wrote:
> > On Thu, 5 Jul 2018 21:48:16 +0200
> > Frans de Boer  wrote:
> > 
> > > I had even rebuild everything with systemd-232, and that worked as
> > > before. But after 232, things started to behave strange. Now way to
> > > debug systemd, whatever I do
> > 
> > Frans,

I read some systemd-238 code (src/core/main.c:1820):

> if (arg_system) {
> /* Make sure we leave a core dump without panicing the 
> kernel. */
> install_crash_handler();
> 
> if (!skip_setup) {
> r = mount_cgroup_controllers(arg_join_controllers);
> if (r < 0) { 
> *ret_error_message = "Failed to mount cgroup 
> hierarchies";
> return r;
> }
> 
> status_welcome();

There is message from systemd crash handler (showing a SIGABRT and dumping
core), but there is no welcome message.  So the problem should be in
mount_cgroup_controllers.

There IS a way to debug systemd - adding log_info into systemd source code
to output key variables and debug messages.  I was one of the ACM/ICPC
contestants who are very familiar with this ``debugging technique".  This
technique often outperforms GDB in programming contests. :)
-- 
Xi Ruoyao 
School of Aerospace Science and Technology, Xidian University
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style


Re: [lfs-support] Booting LFS with systemd

2018-07-06 Thread Xi Ruoyao
On 2018-07-05 17:05 -0400, Baho Utot wrote:
> On 07/05/2018 03:48 PM, Frans de Boer wrote:
> > On 06/30/2018 01:29 PM, Hazel Russman wrote:
> > > On Fri, 29 Jun 2018 01:25:29 -0400
> > > Michael Shell  wrote:
> > > 
> > > > On Thu, 28 Jun 2018 16:06:00 +0800
> > > > Xi Ruoyao  wrote:
> > > > 
> > > > > Now I only use "initrd" directive to update CPU microcode and fix the
> > > > > buggy ACPI DSDT of my laptop (another sad story).
> > > > 
> > > > .
> > > > 
> > > > And as there now seems to be several people who suffer with the
> > > > ACPI DSDT driver bug, you guys should make sure upstream is aware
> > > > of the problem, if they aren't already.

I don't know if it is a driver bug.  It seems to me a bug in DSDT itself.

> I moved to FreebSD, but I am moving back to linux because of all the 
> non  sense going on with FreeBSD.  I'll be using the "old and proven" 
> init system.

Just curious, is there anything like "BSD From Scratch"?
-- 
Xi Ruoyao 
School of Aerospace Science and Technology, Xidian University
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style


Re: [lfs-support] Booting LFS with systemd

2018-07-06 Thread Frans de Boer

On 07/06/2018 05:32 AM, Michael Shell wrote:

On Thu, 5 Jul 2018 21:48:16 +0200
Frans de Boer  wrote:


I had even rebuild everything with systemd-232, and that worked as
before. But after 232, things started to behave strange. Now way to
debug systemd, whatever I do


Frans,

That's the whole point of being able to start the system with a shell
- so that systemd's startup, or failure thereof, can then be debugged
manually. What happened when you booted to shell and then tried to
start systemd manually?

init=/bin/bash
mount -o remount,rw /

Then, at the bash prompt, you want to try to start systemd manually.
You'll also want to first make sure you get a core file if/when it
crashes:

echo "core" > /proc/sys/kernel/core_pattern
ulimit -c unlimited

/usr/lib/systemd/systemd


With the above, does systemd crash and yield a core file?

Does

dmesg

show any relevant error messages?

If you get a core file, you can run gdb on systemd using the core
file:

gdb -c core /usr/lib/systemd/systemd

then what does the gdb backtrace reveal:

(gdb) bt


You can also try gdb on systemd without the core:

gdb /usr/lib/systemd/systemd
(gdb) run
(gdb) bt


If I had to bet at this point, my money would go on the theory that
your kernel is lacking support for something systemd (now) needs.
You can find a current list of systemd kernel config requirements
here:

https://cgit.freedesktop.org/systemd/systemd/tree/README

Note also, some kernel features must be *disabled*, e.g.,
CONFIG_SYSFS_DEPRECATED=n

Also, "systemd requires that the /run mount point exists.
systemd also requires that /var/run is a symlink to
/run "


Cheers,

Mike


Hi Mike,
I will follow your suggestions, of which few are new to me, and will 
come back with a report.


--- Frans
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style


Re: [lfs-support] Booting LFS with systemd

2018-07-06 Thread Frans de Boer

On 07/05/2018 11:56 PM, Bruce Dubbs wrote:

On 07/05/2018 02:48 PM, Frans de Boer wrote:

On 06/30/2018 01:29 PM, Hazel Russman wrote:

On Fri, 29 Jun 2018 01:25:29 -0400
Michael Shell  wrote:


On Thu, 28 Jun 2018 16:06:00 +0800
Xi Ruoyao  wrote:


Now I only use "initrd" directive to update CPU microcode and fix the
buggy ACPI DSDT of my laptop (another sad story).


.

And as there now seems to be several people who suffer with the
ACPI DSDT driver bug, you guys should make sure upstream is aware
of the problem, if they aren't already.


...

   Cheers,

   Mike

--
I did a git bisect on my system, but I couldn't make much sense of 
the result. The commit it finally settled on didn't seem to have 
anything to with acpi.


[quote]
Bisecting: 2 revisions left to test after this (roughly 1 step)
[9af9b94068fb1ea3206a700fc222075966fbef14] x86/cpu/AMD: Handle SME 
reduction in physical address size


Bisecting: 0 revisions left to test after this (roughly 1 step)
[33c2b803edd13487518a2c7d5002d84d7e9c878f] x86/mm: Remove 
phys_to_virt() usage in ioremap()


Bisecting: 0 revisions left to test after this (roughly 0 steps)
[7744ccdbc16f0ac4adae21b3678af93775b3a386] x86/mm: Add Secure Memory 
Encryption (SME) support

[unquote]

I sent the result to the kernel acpi development list but never got 
an answer. If someone else on this list wants to try, I can send him 
my complete bisect logs.


--
Hazel
This quite frustrating. After recompiling, following the book to the 
letter, I still get a frozen LFS system.
One thing I do note however is that the freezing always occurs after 
systemd has detected that it is on a virtual machine. A number of 
error messages is send, but due to ratelimiting I can't see them 
because they are suppressed.


I had even rebuild everything with systemd-232, and that worked as 
before. But after 232, things started to behave strange. Now way to 
debug systemd, whatever I do


Help?


I don't mean to be pedantic, but I really don't think you would run 
into these types of problems using System V.  Why not try that?


  -- Bruce


Hi Bruce,
With System V there is - of course - no problem. The thing is that 
systemd - if it runs well - is somewhat easier to use because of the use 
of .service files. I also noticed that some packages are only shipping 
.service(.in) files and have abandon the use of sysVinit files. Combined 
with the fact that most distributions have embraced systemd as their 
primary or only init system let me believe that we are stuck with this 
piece of ever growing mutation. And as LFS is a teaching ground, it 
should - however reluctant - incorporated this too.


Also, the goal is that someone fire-up their basic hardware with a LFS 
born OS, but for testing or use in VM's development is nowadays mostly 
within the VM realm.


Regards,
Frans
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style