2

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

digijay
  • 1,074
  • 3
  • 9
  • 22
  • ist this helpful? https://askubuntu.com/questions/91286/how-to-see-log-to-find-a-boot-problem – marsh-wiggle Oct 30 '18 at 15:21
  • no, the only helpful answer is that of Pierz but I already tried the answer he linked before. These guys do not seem to be in rescue mode – digijay Oct 30 '18 at 15:28
  • 1
    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 – bgtvfr Oct 30 '18 at 15:30
  • @bgtvfr thanks, that might be an explanation. How would I check error messages during boot on a remote server? – digijay Oct 30 '18 at 15:44
  • @bgtvfr aah great, that put me on the tracks: I had an error in `/etc/fstab` – thanks! – digijay Oct 30 '18 at 15:48

1 Answers1

2

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.

bgtvfr
  • 1,224
  • 10
  • 19