Welcome to the Linux Foundation Forum!
Hanging on a boot while checking a file system
Hi.
Last time my system starts to hang on boot. It occurs while the "Checking file systems..." process. I noticed that it happens only when I wait established time in GRUB. If I press the "Enter" key in the GRUB menu the system will boot without any errors.
What is the reason of the bug? How can I fix it?
Thanks.
Debian 5.0.3;
GRUB 0.97.
0
Comments
-
I wouldn't necessarily jump to the conclusion that it is a bug, it may be the result of a problem with your bios, motherboard or a single hard drive. Does it freeze when checking a specific partition or is the freeze always at a random point?0
-
I was a Debian user for many years. Debian sets a disk check after you boot up a partition after a certain number of times. I used Debian sid which allowed you to see what was happening during the boot, i.e., during the boot scroll. After 30 or so boots, Debian would perform an fsck (disk check), which, depending on the size of the partition, could take from 5 to 20 minutes. This could be what is going on. You boot isn't actually frozen, it's just checking the disk partition.
One simple way to check is to look at the disk access light on you computer. If it's constantly on, or on and flashing, it is probably performing that disk check. It shouldn't happen every boot, and, whether you hit enter or let it time out during grub shouldn't make a difference.
Let us know if you see that disk light flashing or not during that time, and, let it sit and finish (even if it takes 15 minutes). If you allow it to finish, it may not hang again for some time, or whatever your disk check is set for.
One can always extend the amount of time that the disk check is set for, but, lets see if that's what is happening first.0 -
Actually the disk check is based upon the filesystem, not the distro. If you are using ext3 or ext4 that is probably the reason for the apparent stall.0
-
Ah, my bad, I've only noticed it when using Debian.0
-
Here's what I think about the situation.
I'm sure, I haven't got any problems with BIOS, the motherboard or other hardware. Also, I think that the problem is in the fsck utility. It seems, it can't perform an HDD check. Early when I started my system, fsck worked correctly and performed the check regulary after 26 system boots. It said something like /dev/sda3 was mount 26 times without checking, bla-bla-bla, check forced after that it showed me a progress bar and I could see the progress of checking.
Now the situation has changed. I push the “Power” button, the system starts, I see the boot operation sequence on the screen and sometimes when the boot process goes to the “Checking file systems…” stage the system just hang. The HDD's led is off and it doesn't blink. The system is in that state five, ten, fifteen minutes and nothing happens. I push the “Reset” button, the system reboot and if I push the “Enter” key in GRUB the system boot without problems, “Checking file systems…” returns some info that I think relevant to the last successful check. But if I don't push “Enter” the system hangs again.
I have to notice also I performed partitions size change about month ago. I reduced the partition where the root directory was and increased the partition with the “home” directory. I performed this operation booting with Ubuntu live CD and using the GParted utility. Partition size changing completed without any errors or warnings.0 -
Well, if there is no disk light activity, fsck has a problem. Have you tried doing an fsck from terminal? I think it's strange that if you don't wait for the timeout in grub that it boots, but doesn't otherwise. Try (as root) "fsck /dev/sda3" without quotes, and see if it blows up from terminal. I'm assuming sda3 is your root, let us know. If it's not root, what is it?0
-
I am thinking about this a little more. Is your bootloader set to go to the intended boot entry by default (the one you enter into manually), or could it be trying to enter and invalid boot entry?0
-
I tried to make an fsck disk check. I made it for both partitions: /dev/sda2 where my root directory is and /dev/sda3 where my home is.
Here's the output:
# begin code
# fsck /dev/sda2
fsck 1.41.3 (12-Oct-2008)
e2fsck 1.41.3 (12-Oct-2008)
/dev/sda2 is mounted.
WARNING!!! Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.
Do you really want to continue (y/n)? yes
/dev/sda2: recovering journal
Clearing orphaned inode 57245 (uid=1000, gid=1000, mode=0140755, size=0)
/dev/sda2: clean, 191656/1283632 files, 1211592/5120718 blocks
# fsck /dev/sda3
fsck 1.41.3 (12-Oct-2008)
e2fsck 1.41.3 (12-Oct-2008)
/dev/sda3 is mounted.
WARNING!!! Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.
Do you really want to continue (y/n)? yes
/dev/sda3: recovering journal
/dev/sda3 has been mounted 29 times without being checked, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda3: 316061/8372224 files (1.9% non-contiguous), 24838247/33463395 blocks
# end code
As far as I can understand fsck works correctly. If so, may be there's a script which contains the fsck launch command. It might be this script must execute the check disk command with some options at the boot time. I assume if this script exist may be the bug is in it.
What about to push or not to push the “Enter” button in GRUB for successful loading I checked it and it simply was coincidence. My system hang on the check stage regardless of my actions in GRUB.
I changed /etc/fstab. This file contains the partitions which have to check at boot. It includes the strings:
# begin code
…
/dev/sda2 / ext3 errors=remount-ro 0 1
/dev/sda3 /home ext3 defaults 0 2
…
# end code
I changed the values of the last two parameters from 1 and 2 to 0 for preventing the HDD check at boot. Now my system doesn't hang but you know this doesn't solve the problem.0 -
If the problem is not related to the boot method and it is intermitten then I would start looking at the potential of a hardware problem as the cause. Please run a memory test using memtest86+ to see if the problem is related to your memory (this could explain the random nature of it). If that does not show a problem then you may want to push other limits on your system like testing the HD speeds and maxing out connections to see if you can find other issues and errors that happend with specific operations related to hardware.
I am leaning toward an issue with the RAM or motherboard as the cause for the freezing.0
Categories
- All Categories
- 177 LFX Mentorship
- 177 LFX Mentorship: Linux Kernel
- 750 Linux Foundation IT Professional Programs
- 373 Cloud Engineer IT Professional Program
- 169 Advanced Cloud Engineer IT Professional Program
- 74 DevOps IT Professional Program - Discontinued
- 4 DevOps & GitOps IT Professional Program
- 99 Cloud Native Developer IT Professional Program
- 7.6K Training Courses & Learning Paths
- 1 AI & ML Training
- 1 Blockchain & Decentralized Identity Training
- 3 Cloud & Containers Training
- 1 Cybersecurity Training
- 2 DevOps & Site-Reliability Training
- 1 Linux Kernel Development Training
- 1 Networking Training
- 1 Open Source Best Practice Training
- 1 System Administration Training
- 1 System Engineering Training
- 1 Web & Application Development Training
- 792 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 95 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 87 Storage
- 769 Linux Distributions
- 81 Debian
- 68 Fedora
- 22 Linux Mint
- 13 Mageia
- 24 openSUSE
- 150 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 465 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 98 Linux Security
- 78 Network Management
- 101 System Management
- 46 Web Management
- 106 Mobile Computing
- 18 Android
- 73 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 392 Off Topic
- 121 Introductions
- 181 Small Talk
- 29 Study Material
- 955 Programming and Development
- 310 Kernel Development
- 627 Software Development
- 983 Software
- 375 Applications
- 182 Command Line
- 5 Compiling/Installing
- 68 Games
- 317 Installation
- Archived
- 2 LFD140 Class Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)