The issue you are experiencing involves two aspects: the crash of systemd-journald with a SIGABRT signal and the boot behavior of your system when Ubuntu is installed on an external HDD. Here's how you can address both problems:
1. Resolving the systemd-journald Crash
The crash of systemd-journald with SIGABRT during a restart could be related to file system synchronization issues or corrupted journal files. To resolve this:
-
Check for corrupted journal files: Corrupted journal files can cause systemd-journald to crash. You can remove the journal files and let the system recreate them:
sudo systemctl stop systemd-journald
sudo rm -rf /var/log/journal/*
sudo systemctl start systemd-journald
This will delete all existing journal logs, so ensure you don't need them before proceeding[8].
-
Inspect the health of the external HDD: Since Ubuntu is installed on an external HDD, ensure the drive is healthy. Use tools like fsck to check for file system errors:
sudo fsck /dev/sdX
Replace /dev/sdX with the appropriate device identifier for your external HDD.
-
Update systemd: If the issue persists, ensure you are running the latest version of systemd, as bugs causing crashes may have been fixed in newer releases[3][7].
2. Configuring Boot Behavior
You want the system to boot into Windows by default after restarting Ubuntu, without encountering issues. The problem arises because the GRUB bootloader installed by Ubuntu may interfere with the boot process. Here's how to address this:
-
Set Windows as the default boot option:
Use the efibootmgr command to configure the boot order in UEFI:
sudo efibootmgr
sudo efibootmgr -o 0000,XXXX
Replace 0000 with the boot entry for Windows (e.g., Windows Boot Manager) and XXXX with the entry for Ubuntu. This ensures Windows boots first unless you manually select Ubuntu[2].
-
Install a boot manager like rEFInd:
Installing rEFInd on the internal drive's EFI partition can provide a more flexible boot menu. It allows you to select the OS to boot without relying on GRUB. You can install rEFInd using the following steps:
- Boot into Ubuntu.
- Install rEFInd:
sudo apt install refind
- Follow the on-screen instructions to configure rEFInd.
-
Reinstall GRUB correctly:
If Ubuntu's GRUB bootloader is installed on the internal drive's EFI partition, it can cause boot issues when the external HDD is disconnected. To fix this:
- Boot into Ubuntu using the external HDD.
- Reinstall GRUB on the external HDD:
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ubuntu --removable
sudo update-grub
This ensures GRUB is only on the external drive, avoiding interference with the internal drive's boot process[2].
-
BIOS/UEFI settings:
Configure the BIOS/UEFI to boot from the internal drive by default. When you want to boot Ubuntu, manually select the external HDD from the boot menu.
By addressing the systemd-journald crash and configuring the bootloader properly, you can achieve a stable system where Windows boots by default, and Ubuntu is accessible when needed.