How to Fix Booting Issues in Linux

The Linux framework boots are so quickly that most of the yield scrolls by as well rapidly to examine the content (appearing administrations being begun) sent to the comfort. Subsequently watching boot issues/errors gets to be a small challenge for us.

In this article, we’ll briefly clarify the distinctive stages in a Linux system boot process, at that point learn how to set up and get to the foot of boot issues: in terms of records to see into or commands to see framework boot messages.

Outline Of Linux Boot Handle

In outline, once we press the Control On button, the BIOS (Essential Input Yield Framework) a program coordinates in a motherboard performs a POST (Control on Self Test) – where equipment such as disks, Smash (Irregular Get to Memory), console, etc are checked. In case of a blunder (missing/malfunctioning equipment), it is detailed on the screen.

The BIOS to look for the boot gadget, the disk to start up from (more often than not the primary difficult disk, in any case, we may arrange it to be a DVD, USB, Arrange Card, etc. instep).

At that point, the framework will interface to the disk and explore for the Ace Boot Record (512 bytes in estimate) which stores the boot loader (446 bytes in measure), and the rest of the space stores data almost disk segments (four greatest) and the MBR itself.

The boot loader will distinguish and point to, as well as stack the Part and the initrd record (initialization smash disk – gives the part get to to the mounted root filesystem and modules/drivers put away in /lib registry), which are by and large put away within the /boot catalog of the filesystem.

After the part is stacked, it executes init (or systemd on more current Linux distros), the primary prepare with PID 1, which in turn begins all other forms on the framework. It is additionally the final handle to be executed on framework shutdown.

/var/log/boot.log – Logs System Boot Messages

Usually likely the primary record you need to see into, to see all that unfurled amid the framework boot.

Instead of attempting so difficult to take after the yield on the screen amid boot, able to see this record after the boot handle has completed to help us in deciding and settling boot issues/errors.

We utilize the cat command for that reason as takes after (underneath could be a test of this record):

# cat /var/log/boot.log

See Linux Boot Logs

[  OK  ] Started Load/Save RF Kill Switch Status.
[ TIME ] Timed out waiting for device dev-disk-by\x2duuid-53e41ce9\x2ddc18\x2d458c\x2dbc08\x2d584c208ed615.device.
[DEPEND] Dependency failed for /dev/disk/by-uuid/53e41we9-dc18-458c-bc08-58sc208ed615.
[DEPEND] Dependency failed for Swap.
[  OK  ] Reached target System Initialization.
[  OK  ] Listening on UUID daemon activation socket.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Listening on CUPS Scheduler.
[  OK  ] Started Daily apt activities.
[  OK  ] Reached target Timers.
[  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[  OK  ] Started ACPI Events Check.
[  OK  ] Started Trigger resolvconf update for networkd DNS.
[  OK  ] Started CUPS Scheduler.
[  OK  ] Reached target Paths.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Listening on ACPID Listen Socket.
         Starting Console System Startup Logging...
[  OK  ] Listening on Cockpit Web Service Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting LSB: Set the CPU Frequency Scaling governor to "ondemand"...
[  OK  ] Started ACPI event daemon.
[  OK  ] Started mintsystem.service.
         Starting Detect the available GPUs and deal with any system changes...
         Starting LSB: daemon to balance interrupts for SMP systems...
         Starting Bluetooth service...
[  OK  ] Started ClamAV virus database updater.
         Starting LSB: Starts syslogd...
[  OK  ] Started Regular background program processing daemon.
         Starting Modem Manager...
         Starting Accounts Service...
......

From the yield over, we are able to see that there’s a boot issue shown by the lines underneath.

[DEPEND] Dependency failed for /dev/disk/by-uuid/53e41ce9-dc18-458c-bc08-584c208ed615.
[DEPEND] Dependency failed for Swap.

Issue: Issue with the swapped segment; the framework either fizzled to examine the swap file/device/partition or it’s not displayed.

Let’s check on the off chance that the framework is utilizing swap space with free command.

# free

total           used        free      shared      buff/cache   available
Mem:         3742792     2421060      433696      287376          888036      967000
Swap:             0            0           0

Then again, we may run the swapon command to see the framework swap space utilization outline (we’ll not get any yield).

# swapon -s

Ready to resolve this issue, by making a swap space in Linux.

Note: The substance of this record is cleared at framework shutdown: unused information is put away in it on an unused boot.

/var/log/messages – General System Logs

To see it, sort:

# cat /var/log/messages

See Framework Log Messages

Jun  4 13:04:44 tecmint syslogd (GNU inetutils 1.9.4): restart
Jun  4 13:19:55 tecmint -- MARK --
Jun  4 13:39:55 tecmint -- MARK --
Jun  4 13:59:55 tecmint -- MARK --
Jun  4 14:19:55 tecmint -- MARK --
Jun  4 14:20:17 tecmint vmunix: [ 4945.388740] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
Jun  4 14:20:17 tecmint vmunix: [ 4945.388837] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
Jun  4 14:20:17 tecmint vmunix: [ 4945.388903] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
Jun  4 14:20:17 tecmint vmunix: [ 4945.388930] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
Jun  4 14:20:17 tecmint vmunix: [ 4945.389334] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
Jun  4 14:20:17 tecmint vmunix: [ 4945.389402] pcieport 0000:00:1c.0: BAR 15: assigned [mem 0xdfa00000-0xdfbfffff 64bit pref]
.....

Since this record may be generally long, ready to see it in pages utilize the more command (which indeed appears a rate) like this.

# more /var/log/messages

The substance of /var/log/messages not at all like the past record isn’t cleared shutdown since it does not as it were contain boot messages but messages concerning other framework exercises as well. So more seasoned records are compressed and kept on the framework for afterward assessment as appeared underneath.

# ls -l message*

-rw-r--r-- 1 root root 1206127 Jun 10 14:20 messages
-rw-r--r-- 1 root root 1419494 Jun  4 13:00 messages.1
-rw-r--r-- 1 root root  153011 May 28 09:30 messages.2.gz

dmesg – Appears Part Messages

The dmesg command can appear operations once the boot handle has completed, such as command-line alternatives passed to the bit; equipment components recognized, occasions when an unused USB gadget is included, or mistakes like NIC (Organize Interface Card) disappointment and the drivers report no connect action recognized on the organization and so much more.

# dmesg

Appear Part Messages

[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.4.0-21-generic (buildd@lgw01-21) (gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2) ) #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 (Ubuntu 4.4.0-21.37-generic 4.4.6)
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.4.0-21-generic root=UUID=57b36d48-1938-43c2-bf85-e97bc9f423ea ro quiet splash
[    0.000000] KERNEL supported cpus:
[    0.000000]   Intel GenuineIntel
[    0.000000]   AMD AuthenticAMD
[    0.000000]   Centaur CentaurHauls
[    0.000000] x86/fpu: xstate_offset[2]:  576, xstate_sizes[2]:  256
[    0.000000] x86/fpu: Supporting XSAVE feature 0x01: 'x87 floating point registers'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x02: 'SSE registers'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x04: 'AVX registers'
[    0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.
[    0.000000] x86/fpu: Using 'eager' FPU context switches.
[    0.000000] e820: BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000008ffff] usable
[    0.000000] BIOS-e820: [mem 0x0000000000090000-0x00000000000bffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000001fffffff] usable
[    0.000000] BIOS-e820: [mem 0x0000000020000000-0x00000000201fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000020200000-0x0000000040003fff] usable
[    0.000000] BIOS-e820: [mem 0x0000000040004000-0x0000000040004fff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000040005000-0x0000000080b2ffff] usable
[    0.000000] BIOS-e820: [mem 0x0000000080b30000-0x0000000080d31fff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000080d32000-0x00000000ce3eefff] usable
[    0.000000] BIOS-e820: [mem 0x00000000ce3ef000-0x00000000ce5eefff] type 20
[    0.000000] BIOS-e820: [mem 0x00000000ce5ef000-0x00000000daeeefff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000daeef000-0x00000000daf9efff] ACPI NVS
....

journalctl – Query Contents of Systemd Journal

Typically valuable in most current Linux distros utilizing systemd: the most up-to-date framework and benefits director. Beneath it, framework logging is done by means of the diary component – a centralized area for all messages logged by distinctive components. 


 These messages incorporate part and boot messages; messages from Syslog or different administrations. We are able to utilize it to audit boot messages and set up boot issues by perusing through the yield and recognizing lines of intrigued (mistakes pointed out by ruddy lines depending on terminal content color settings).

# journalctl

Appear Substance of SystemD

Jun 13 16:35:32 tecmint mtp-probe[963]: checking bus 2, device 5: "/sys/devices/pci0000:00/0000:00:1d.0/u
Jun 13 16:35:32 tecmint mtp-probe[963]: bus: 2, device: 5 was not an MTP device
Jun 13 16:35:54 tecmint systemd[1]: dev-disk-by\x2duuid-53e41ce9\x2ddc18\x2d458c\x2dbc08\x2d584c208ed615.
Jun 13 16:35:54 tecmint systemd[1]: Timed out waiting for device dev-disk-by\x2duuid-53e41ce9\x2ddc18\x2d
Jun 13 16:35:54 tecmint systemd[1]: Dependency failed for /dev/disk/by-uuid/53e41ce9-dc18-458c-bc08-584c2
Jun 13 16:35:54 tecmint systemd[1]: Dependency failed for Swap.
Jun 13 16:35:54 tecmint systemd[1]: swap.target: Job swap.target/start failed with result 'dependency'.
Jun 13 16:35:54 tecmint systemd[1]: dev-disk-by\x2duuid-53e41ce9\x2ddc18\x2d458c\x2dbc08\x2d584c208ed615.
Jun 13 16:35:54 tecmint systemd[1]: dev-disk-by\x2duuid-53e41ce9\x2ddc18\x2d458c\x2dbc08\x2d584c208ed615.
Jun 13 16:35:54 tecmint systemd[1]: Reached target System Initialization.
Jun 13 16:35:54 tecmint systemd[1]: Started ACPI Events Check.
Jun 13 16:35:54 tecmint systemd[1]: Listening on CUPS Scheduler.
Jun 13 16:35:54 tecmint systemd[1]: Starting Console System Startup Logging...
Jun 13 16:35:54 tecmint systemd[1]: Started Daily Cleanup of Temporary Directories.

The over could be a test of the command yield appearing a blunder we as of now recognized by seeing /var/log/boot.log: the swap segment blunder. To see more yield lines, essentially press the [Enter] button.

In this article, we clarified, in brief, the diverse stages within the Linux framework boot preparation as well as learned how to set up and conceivably resolve boot issues. To include any thought to this direct, utilize the comment shape underneath.

If you liked this article, Please donate to us!

Thanks!!!

Leave a Reply

Your email address will not be published. Required fields are marked *




Enter Captcha Here :