Linux – How to Read Boot Log in Rescue Mode

bootlinuxlog-filesubuntu-16.04

I have a remote server running Ubuntu 16.04 server that hangs on boot. In order to find the error I booted it in rescue mode, mounted devices to /mnt and chrooted to /mnt.

Here's what I did so far:

root@rescue ~ # mount /dev/md2 /mnt
root@rescue ~ # mount /dev /mnt/dev
root@rescue ~ # mount /dev/pts /mnt/dev/pts
root@rescue ~ # mount /proc /mnt/proc
root@rescue ~ # mount /sys /mnt/sys
root@rescue ~ # chroot /mnt

Now when I try to read the boot log using journalctl I get

root@rescue ~ # journalctl
No journal files were found.
-- No entries --

Any suggestions how to get the boot log entries? Btw. there is no /var/log/boot.log

Best Answer

If the server hangs before filesystem is mounted (ie, early in boot stage), you are not likely to find anything in log file. Looking at error messages during normal boot process can give you clues

In your specific case, the error was in /etc/fstab which can lead to "unable to mount root filesystem" error if you boot without rescue mode.