Re: [systemd-devel] Antw: [EXT] [systemd???devel] starting networking from within single user mode?

2022-11-11 Thread Mantas Mikulėnas
On Fri, Nov 11, 2022 at 4:19 PM Brian Reichert  wrote:

> On Fri, Nov 11, 2022 at 08:02:00AM +0100, Ulrich Windl wrote:
> > >>> Brian Reichert  schrieb am 10.11.2022 um
> 23:04 in
> > Nachricht <20221110220426.ga17...@numachi.com>:
> > > I've managed to hose a SLES12 SP5 host; it starts to boot, then hangs.
> >
> > And what did you do to mess it up? And what do the boot messages say?
>
> A good question, and not specific to systemd, so I don't want to
> pollute the list archives too much on this matter.
>
> 'All' I did was remove many RPMs that I arbitrarily deemed
> unnecessary.
>
> I came up with a heavily trimmed-down list of SLES RPM for my SLES12
> Sp5 environment.
>
> I successfully installed a server using just that trimmed-down list;
> yay me!
>
> I then explored 'upgrading' a running (slight older) SP5 box, using
> this trimmed-down list.  A purposeful side effect was to uninstall
> RPMs not in that trimmed-down list.
>
> This latter box begins to boot, and gets at least as far as loading
> the initrd image, before hanging.
>

Boot with "systemd.debug-shell" and use tty9 to investigate from the inside.

-- 
Mantas Mikulėnas


Re: [systemd-devel] Antw: [EXT] [systemd???devel] starting networking from within single user mode?

2022-11-11 Thread Brian Reichert
On Fri, Nov 11, 2022 at 08:02:00AM +0100, Ulrich Windl wrote:
> >>> Brian Reichert  schrieb am 10.11.2022 um 23:04 in
> Nachricht <20221110220426.ga17...@numachi.com>:
> > I've managed to hose a SLES12 SP5 host; it starts to boot, then hangs.
> 
> And what did you do to mess it up? And what do the boot messages say?

A good question, and not specific to systemd, so I don't want to
pollute the list archives too much on this matter.

'All' I did was remove many RPMs that I arbitrarily deemed
unnecessary.

I came up with a heavily trimmed-down list of SLES RPM for my SLES12
Sp5 environment.

I successfully installed a server using just that trimmed-down list;
yay me!

I then explored 'upgrading' a running (slight older) SP5 box, using
this trimmed-down list.  A purposeful side effect was to uninstall
RPMs not in that trimmed-down list.

This latter box begins to boot, and gets at least as far as loading
the initrd image, before hanging.

I'm pretty certain there's something mismanaged with replacing the
kernel, but not properly managing all of the related boot files
(kdump? device probing? etc.)

Anyway, that's my mess.  Not at all related to systemd, near as I
can tell.  I just have to methodically narrow down on where my
process jumps the tracks.

-- 
Brian Reichert  
BSD admin/developer at large


Re: [systemd-devel] starting networking from within single user mode?

2022-11-11 Thread Lennart Poettering
On Fr, 11.11.22 09:05, Brian Reichert (reich...@numachi.com) wrote:

> On Fri, Nov 11, 2022 at 08:08:58AM +0200, Mantas Mikul??nas wrote:
> > Boot with either "s" (aka "single" aka "rescue") or "-b" (aka "emergency")
> > for two variants of single-user mode with init. The former starts some
> > basic stuff (it's the real single-user mode) including udev so that modules
> > for your network interfaces still get loaded automatically, while the
> > latter doesn't start anything except init and a shell (emergency mode is
> > *almost* like init=/bin/sh but in theory might at least let you `systemctl
> > start` something).
>
> I was able to get into the emergency target, using these notes:
>
>   https://suay.site/?p=1681=noscript
>
> The speed bump this article helped me with was to overcome systemd's
> misconception that the root account was locked.

systemd doesn't manage your root user. That's between you and
"shadow-utils" really.

Lennart

--
Lennart Poettering, Berlin


Re: [systemd-devel] starting networking from within single user mode?

2022-11-11 Thread Lennart Poettering
On Do, 10.11.22 17:04, Brian Reichert (reich...@numachi.com) wrote:

> I've managed to hose a SLES12 SP5 host; it starts to boot, then hangs.
>
> If I get it into single-user mode (getting into the grub menu, and adding
> init=/bin/bash) I can at least review the file system.

That's not single-user mode. That's not running an init system at all.

To boot into single-user mode specify "1" or "single" on the kernel
cmdline. Has been that way since sysvinit times.

> What I want to do is get networking running, so that I can at least gather
> logs, etc.
>
> When I try to start networking with 'systemctl', I see this error:
>
> systemd "failed to connect to bus; No such file or directory"
>
> What can I do to minimally bring up the networking service? I don't even
> have any network devices at this point...

You can't have systemd services without systemd. Sorry.

Lennart

--
Lennart Poettering, Berlin


Re: [systemd-devel] starting networking from within single user mode?

2022-11-11 Thread Brian Reichert
On Fri, Nov 11, 2022 at 08:08:58AM +0200, Mantas Mikul??nas wrote:
> Boot with either "s" (aka "single" aka "rescue") or "-b" (aka "emergency")
> for two variants of single-user mode with init. The former starts some
> basic stuff (it's the real single-user mode) including udev so that modules
> for your network interfaces still get loaded automatically, while the
> latter doesn't start anything except init and a shell (emergency mode is
> *almost* like init=/bin/sh but in theory might at least let you `systemctl
> start` something).

I was able to get into the emergency target, using these notes:

  https://suay.site/?p=1681=noscript

The speed bump this article helped me with was to overcome systemd's
misconception that the root account was locked.

- it was not locked; verified with 'passwd -S root'
- root did have a password (known to me)

Anyway, I now am at a more functional command line, and I appreciate
everyone's patience.

> If udev is not running, try to `modprobe` whichever drivers you need for
> the Ethernet interface. (The name can be found by PCI ID, e.g. for
> 10ec:8136 "grep -i 10EC.*8136 /lib/modules/`uname -r`/modules.alias") Then
> manually bring eth0 up, add the IP address, add a default route (dhclient
> or dhcpcd will also work without udev, while systemd-networkd probably
> won't).
> 
> ip link set eth0 up
> ip addr add 192.168.1.55/24 dev eth0
> ip route add default via 192.168.1.1

These, in isolation, are useful notes.  It's been way too many years since
I had to rescue a failing-to-boot Linux server...

> -- 
> Mantas Mikul??nas

-- 
Brian Reichert  
BSD admin/developer at large


Re: [systemd-devel] BUG: kworker + systemd-udevd memory leaks found in 6.1.0-rc4

2022-11-11 Thread Mirsad Goran Todorovac

On 10.11.2022. 9:28, Thorsten Leemhuis wrote:


This bug is confirmed in 6.1-rc4, among the "thermald" and "systemd-dev"
kernel memory leaks, potentially exposing race conditions or other more
serious bug.

Maybe, but that sadly is also true for a lot of other known issues, for
example those in this quite long list:
https://syzkaller.appspot.com/upstream#open

It would help if you could pinpoint the problem, then we know who should
look into this. You CCed me and the regression list, so I assume it's a
regression. Hence: Could you try to bisect it?

Ciao, Thorsten


Hi, Thorsten!

I am taking this task, however, it might not be a relatively easy bisect 
like the past

two or three (probably were beginner's luck).

It appears to predate 4.19:

$ head -13 memleak-kwork-4.19.0-08-84df9525b0c2-memlk-menu-al.log
unreferenced object 0x8ff917c79c40 (size 16):
  comm "kworker/u12:4", pid 422, jiffies 4294672757 (age 380.342s)
  hex dump (first 16 bytes):
    6d 65 6d 73 74 69 63 6b 30 00 00 00 00 00 00 00 memstick0...
  backtrace:
    [<4f7bc99c>] kobject_set_name_vargs+0x1e/0x90
    [] dev_set_name+0x57/0x70
    [<1fd9518e>] memstick_check+0x99/0x330 [memstick]
    [<8c797991>] process_one_work+0x1a7/0x3a0
    [<405c5133>] worker_thread+0x30/0x390
    [<60a58c2e>] kthread+0x112/0x130
    [<4b138871>] ret_from_fork+0x35/0x40
    [<29f3e0aa>] 0x
$

Cheers,
Mirsad

--
Mirsad Todorovac
System engineer
Faculty of Graphic Arts | Academy of Fine Arts
University of Zagreb
Republic of Croatia, the European Union
--
Sistem inženjer
Grafički fakultet | Akademija likovnih umjetnosti
Sveučilište u Zagrebu