You are not logged in.

#1 2022-12-03 13:37:23

freshscaped
Member
From: West Yorkshire
Registered: 2015-08-29
Posts: 85

[SOLVED] Systemd not working, Host is down

Is there a way to get systemd working until I can configure a direct bootloader?

Currently loading arch onto a brand new midi tower and using chroot into the installed system from the live system.

The problem is very similar to the one recently reported by mipi at https://bbs.archlinux.org/viewtopic.php?id=241969
The difference is that

systemctl preset-all 

hasn't helped with localectl, as in

# localectl status
System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down 

Listing *wants doesn't include localectl in the list.

I haven't been back through and tried all the other *ctl commands which have elicited the Host is down response. Hoping that, if somebody can tell me how to get localectl working I should be able to work any others out from that.

Edit corrected a typo

Last edited by freshscaped (2022-12-19 21:38:46)

Offline

#2 2022-12-03 14:39:18

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: [SOLVED] Systemd not working, Host is down

https://wiki.archlinux.org/title/Systemd-nspawn might be your weapon of choice there.


pkgshackscfgblag

Offline

#3 2022-12-04 02:58:31

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: [SOLVED] Systemd not working, Host is down

What are you trying to do exactly? The Installation Guide doesn't mention localectl, so it is not clear why you are trying to use it during the installation process. Why can't you just complete the installation?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#4 2022-12-04 03:00:54

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: [SOLVED] Systemd not working, Host is down

ayekat wrote:

https://wiki.archlinux.org/title/Systemd-nspawn might be your weapon of choice there.

How would this help to install and configure Arch on hardware?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#5 2022-12-04 10:18:22

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: [SOLVED] Systemd not working, Host is down

cfr wrote:

How would this help to install and configure Arch on hardware?

You can point nspawn at any directory containing a (systemd-based) OS tree and run it with --directory and --boot.
Assuming OP has installed a basic set of packages with pacstrap, a mostly complete userspace should be available.

Example of what this looks like here (sshd started inside the nspawn container):

[ayekat@arch ~]$ ps aux
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           1  0.0  0.6  21272 13200 ?        Ss   10:05   0:00 /usr/lib/systemd/systemd
root          18  0.0  0.9  49744 19976 ?        Ss   10:05   0:00 /usr/lib/systemd/systemd-journald
systemd+      28  0.0  0.5  20888 12028 ?        Ss   10:05   0:00 /usr/lib/systemd/systemd-resolved
dbus          30  0.0  0.2   8436  4488 ?        Ss   10:05   0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
root          31  0.0  0.3  10188  6624 ?        Ss   10:05   0:00 sshd: /usr/bin/sshd -D [listener] 0 of 10-100 startups
root          32  0.0  0.3  17392  8024 ?        Ss   10:05   0:00 /usr/lib/systemd/systemd-logind
root          34  0.0  0.0   6032  1896 pts/0    Ss+  10:05   0:00 /sbin/agetty -o -p -- \u --noclear --keep-baud - 115200,38400,9600 linux
root          35  0.0  0.4  13440  9372 ?        Ss   10:05   0:00 sshd: ayekat [priv]
ayekat        38  0.0  0.5  19100 10884 ?        Ss   10:05   0:00 /usr/lib/systemd/systemd --user
ayekat        39  0.0  0.1  23548  2880 ?        S    10:05   0:00 (sd-pam)
ayekat        45  0.0  0.3  13700  6360 ?        R    10:05   0:00 sshd: ayekat@pts/1
ayekat        46  0.0  0.2   8156  4340 pts/1    Ss   10:05   0:00 -bash
ayekat        90  0.0  0.1  10408  3088 pts/1    R+   10:12   0:00 ps aux

That being said, I agree that it's odd that this is needed. Enabling services is a matter of symlinking services, as noted in the linked thread.
freshscaped: Is there a particular reason why you need to invoke localectl?


pkgshackscfgblag

Offline

#6 2022-12-04 17:12:03

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: [SOLVED] Systemd not working, Host is down

ayekat wrote:
cfr wrote:

How would this help to install and configure Arch on hardware?

You can point nspawn at any directory containing a (systemd-based) OS tree and run it with --directory and --boot.
Assuming OP has installed a basic set of packages with pacstrap, a mostly complete userspace should be available.

Thanks for the explanation. I think I understand how that might work now, but there must be a less cumbersome way to do whatever it is the OP wants to do with localectl? This just feels like an XY problem to me.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#7 2022-12-19 16:57:31

freshscaped
Member
From: West Yorkshire
Registered: 2015-08-29
Posts: 85

Re: [SOLVED] Systemd not working, Host is down

Hi and sorry for the delay in responding. Thanks for your comments. @cfr has hit the nail on the head. I simply want a system that boots. No other users, no other OSs, no VMs, just a single Arch installation to work without jumping through hoops to get it started every day. Or for that matter building in additional future potential failure points.

The problem has changed again. Grub installed without errors and booting starts the same as my old machine and my laptop, with two lines:

Starting systyemd-udevd version 252.3-1-arch
/dev/sda2: clean, 66944/2293760 files,996685/9175040 blocks 

The system then reports not being able to find a device by UUID - citing a UUID I don't recognise, either from the notes I took when first installing or from running

 ls -l /dev/disk/by-uuid/ 

Here is the actual output from the console when booting - more accurately, failing to boot:

[ TIME ] Timed out waiting for device /dev/disk/by-uuid/2b988d1c-2120-4612-ab1a-2a4352fe46f4.
[DEPEND] Dependency failed for /dev/disk/by-uuid/2b988d1c-2120-4612-ab1a-2a4352fe46f4.
[DEPEND] Dependency failed for Swaps.
[ TIME ] Timed out waiting for device /dev/disk/by-uuid/8C5E-D04A.
[DEPEND] Dependency failed for /boot.
[DEPEND] Dependency failed for Local File Systems.
You are in emergency mode. After logging in, type [i]{various options given}[/i] to boot into default mode.
Give root password for maintenance (or press Control-D to continue): 

Any pointers on how to fix this, please? Is the false UUID the actual problem or just another red herring? Happy to run any commands you may suggest and report the outcomes here or to start another thread under a more appropriate title.

I've been in this interminable loop for weeks now. It really is getting too much for a one-off job, as I'm now in my mid-70s, unlikely ever to be repeated. TIA.

Last edited by freshscaped (2022-12-19 16:59:43)

Offline

#8 2022-12-19 17:04:32

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,540

Re: [SOLVED] Systemd not working, Host is down

Check /etc/fstab

Offline

#9 2022-12-19 17:28:54

freshscaped
Member
From: West Yorkshire
Registered: 2015-08-29
Posts: 85

Re: [SOLVED] Systemd not working, Host is down

Did so earlier, just double-checked. It shows the UUIDs I have including for / (/dev/sda2) rather than the wrong one the system shows on boot.

Just noted, though, /etc/fstab has two entries each for /dev/sda1 (/boot) /dev/sda3 (swap) and /dev/sda4 (/home) - I'llgoback and check whether any of the duplicates match the boot error output.

Last edited by freshscaped (2022-12-19 17:37:21)

Offline

#10 2022-12-19 17:35:28

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,540

Re: [SOLVED] Systemd not working, Host is down

Do you have anything under /etc/systemd/system/local-fs.target.wants or /usr/lib/systemd/system/local-fs.target.wants?

Offline

#11 2022-12-19 17:44:54

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [SOLVED] Systemd not working, Host is down

freshscaped wrote:

Grub installed

We need more information than that. Please share the full commands used (from arch-chroot onwards) along with the full content of /boot/grub/grub.cfg

frshscaped wrote:

It shows

Don't do that. https://bbs.archlinux.org/viewtopic.php?id=57855

Offline

#12 2022-12-19 17:56:50

freshscaped
Member
From: West Yorkshire
Registered: 2015-08-29
Posts: 85

Re: [SOLVED] Systemd not working, Host is down

No such file or directory response in /etc/systemd/system/local-fs.target.wants

#ls /usr/lib/systemd/system/local-fs.target.wants 

shows a file, tmp.mount with contents, omitting the license stuff which is commented out:

[Unit]
Description=Temporary Directory /tmp
Documentation:=https://systemd.io/TEMPORARY_DIRECTORIES
Documentation=man:file-hierarchy(7)
Documentation=https://freedesktop.org/wiki/Software/systemd/APIFileSystems
ConditionPathIsSymbolicLink=!/tmp
DefaultDependencies=no
Conflicts=umount.target
Before=local-fs.target. umount.target
After=swap.target

[Mount]
What=tmpfs
Where=/tmp
Type=tmpfs
Options=mode=1777,strictatime,nosuid,nodev,size=50%%,nr_inodes=1m 

Offline

#13 2022-12-19 18:02:22

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,540

Re: [SOLVED] Systemd not working, Host is down

Without mount units, they're dynamically generated from fstab. Post yours.

Offline

#14 2022-12-19 18:22:57

freshscaped
Member
From: West Yorkshire
Registered: 2015-08-29
Posts: 85

Re: [SOLVED] Systemd not working, Host is down

/dev/sda2 /
/dev/sda1 /boot
/dev/sda3 none swap
/dev/sda4 /home 

Is that what you meant? Read from /etc/fstab (cat command)

Offline

#15 2022-12-19 18:25:35

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,540

Re: [SOLVED] Systemd not working, Host is down

How in the world did you end up with that? That's not even close to what genfstab creates. How did you set this system up?

Offline

#16 2022-12-19 18:39:39

freshscaped
Member
From: West Yorkshire
Registered: 2015-08-29
Posts: 85

Re: [SOLVED] Systemd not working, Host is down

Simply copied them from fstab. The full entries contain, in this order, <file system><dir><type><options><dump><pass>. I'm typing this out because I haven't yet worked out how to copy and paste using the options in @cfr's signature. fstab was set up with genfstab. I set the system up following the installation guidelines, apart from installing grub, for which I followed the links in the mailing list archives. Grub hardly gets a mention, let alone any guidance, in the installation notes.

Tell me exactly what from the fstab entries you require and I'll copy them over. Here's the root entry to get us started:

# /dev/sda2 UUID=6bb62a4e-777f-4c0c-9eb3-1fb1f66a22361 / ext4 rw,relatime 0 1 

As you can see, a completely different UUID to the one printed out by the system on boot.

Offline

#17 2022-12-19 18:41:17

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,540

Re: [SOLVED] Systemd not working, Host is down

So you're still paraphrasing and posting partial output.

I'm done. Good luck.

Offline

#18 2022-12-19 18:59:01

freshscaped
Member
From: West Yorkshire
Registered: 2015-08-29
Posts: 85

Re: [SOLVED] Systemd not working, Host is down

I was typing,here's the full fstab output:

# /dev/sda1 UUID=8C5E-D04A /boot/vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
# /dev/sda4 UUID=87161f43-6ae4-4426-be17-d5deb5416a3c /home ext4 rw,relatime 0 2
# /dev/sda3 UUID=2b988d1c-2120-4612-ab1a-2a4352fe46f4 none swap defaults 0 0
# /dev/sda2 repeated with exactly the same inputs as printed in previous post
# /dev/sda1 UUID=C5A6-CA1C /boot/vfat/ rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
# /dev/sda4 repeated with same entries as above
# /dev/sda3 UUID=926d3e3d-7c07-47ac-aa57-7135ddcd2d5a none swap defaults 0 0 

and for completeness, here is the / line, which is repeated in fstab:

# /dev/sda2 UUID=6bb62a4e-777f-4c0c-9eb3-1fb1f66a22361 / ext4 rw,relatime 0 1 

All of the partitions are repeated, with the /boot and swap partitions having changed UUIDs, the / and /home partitions retaining their original ones.

Last edited by freshscaped (2022-12-19 19:02:02)

Offline

#19 2022-12-19 19:08:57

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [SOLVED] Systemd not working, Host is down

Are those hash symbols present in the actual file? If so they will comment-out those lines so you should remove them.

And we still don't know if the bootloader is correctly configured or which commands you're actually using. If that doesn't change soon I will also take my leave.

freshscaped wrote:

I haven't yet worked out how to copy and paste

curl -F 'file=@-' 0x0.st < /etc/fstab

Then share the returned URL.

freshscaped wrote:

Grub hardly gets a mention, let alone any guidance, in the installation notes

GRUB has it's own page. Read it.

Offline

#20 2022-12-19 19:41:22

freshscaped
Member
From: West Yorkshire
Registered: 2015-08-29
Posts: 85

Re: [SOLVED] Systemd not working, Host is down

Thanks for the pointers, @Head_on_a_Stick. Here is how the fstab is laid out. Whether or not the bootloader is configured correctly is the biggest question in  my mind just now other than the one of how to correct the fstab file for those entries where it offers two conflicting results and to delete the duplicate entries. Is it simply a matter of deleting the file and running genfstab again?

# /dev/sda2 
UUID=6bb62a4e-777f-4c0c-9eb3-1fb1f66a22361 / ext4 rw,relatime 0 1 
# /dev/sda1 
UUID=8C5E-D04A /boot/vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
# /dev/sda4 
UUID=87161f43-6ae4-4426-be17-d5deb5416a3c /home ext4 rw,relatime 0 2
# /dev/sda3 
UUID=2b988d1c-2120-4612-ab1a-2a4352fe46f4 none swap defaults 0 0
# /dev/sda2 
UUID=6bb62a4e-777f-4c0c-9eb3-1fb1f66a22361 / ext4 rw,relatime 0 1 
# /dev/sda1 
UUID=C5A6-CA1C /boot/vfat/ rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
# /dev/sda4 
UUID=87161f43-6ae4-4426-be17-d5deb5416a3c /home ext4 rw,relatime 0 2
# /dev/sda3 
UUID=926d3e3d-7c07-47ac-aa57-7135ddcd2d5a none swap defaults 0 0  

My next steps will be to rerun the boot sequence and see what I can copy and paste from the responses and log files. I'll also try to copy the fstab file as suggested to see for myself how that works.

Offline

#21 2022-12-19 19:45:04

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [SOLVED] Systemd not working, Host is down

freshscaped wrote:

how to correct the fstab file for those entries where it offers two conflicting results and to delete the duplicate entries. Is it simply a matter of deleting the file and running genfstab again?

Yes. or just edit the file directly to remove the duplicates. Have you checked the (filesystem) UUIDs to see if they all match?

Offline

#22 2022-12-19 19:47:12

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Systemd not working, Host is down

freshscaped wrote:

Is it simply a matter of deleting the file and running genfstab again?

No, run blkid and ensure that the correct UUIDs are in the file and delete the ones that are irrelevant. And then, after reading the Grub wiki page, makes sure that Grub is configured to use the same correct UUID.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#23 2022-12-19 20:06:48

freshscaped
Member
From: West Yorkshire
Registered: 2015-08-29
Posts: 85

Re: [SOLVED] Systemd not working, Host is down

When I saw an unexpected UUID I ran "ls -l /dev/disk/by-uuid" then "lsblk" as well as "blkid" to be doubly sure my version, i.e. the UUIDs I'd noted during installation, was correct. It was.

I can go back through the commands used (copied them from the grub arch-wiki page) to install grub. I don't remember mention of any UUIDs but will check and report back.

Thanks for the tips, @jasonwryan.

Offline

#24 2022-12-19 21:35:32

freshscaped
Member
From: West Yorkshire
Registered: 2015-08-29
Posts: 85

Re: [SOLVED] Systemd not working, Host is down

The system has logged me out - again. Having solved the problem,, with grateful thanks to all who have helped not only on this thread but others too, it has been a  long and sorry saga.

Cutting it short so I don't get logged (timed) out again, correcting the fstab entries, reinstalling grub (I did that because the "ls /boot" command simply returned me to the command prompt so I assumed it had all been wiped) seemed to do the trick.

[root@mingus ~]# grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB2
Installing for x86_64-efi platform.2
Installation finished. No error reported.

[root@mingus ~]# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image:  /boot/amd-ucode.img  /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  amd-ucode.img initramfs-linux-fallback.img
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be addedto the GRUB boot configuration.
Check GRUB_DISABE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done 

Offline

Board footer

Powered by FluxBB