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
- 217 LFX Mentorship
- 217 LFX Mentorship: Linux Kernel
- 788 Linux Foundation IT Professional Programs
- 352 Cloud Engineer IT Professional Program
- 177 Advanced Cloud Engineer IT Professional Program
- 82 DevOps Engineer IT Professional Program
- 146 Cloud Native Developer IT Professional Program
- 137 Express Training Courses
- 137 Express Courses - Discussion Forum
- 6.1K Training Courses
- 46 LFC110 Class Forum - Discontinued
- 70 LFC131 Class Forum
- 42 LFD102 Class Forum
- 226 LFD103 Class Forum
- 18 LFD110 Class Forum
- 36 LFD121 Class Forum
- 18 LFD133 Class Forum
- 7 LFD134 Class Forum
- 18 LFD137 Class Forum
- 71 LFD201 Class Forum
- 4 LFD210 Class Forum
- 5 LFD210-CN Class Forum
- 2 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum - Discontinued
- 2 LFD233 Class Forum
- 4 LFD237 Class Forum
- 24 LFD254 Class Forum
- 693 LFD259 Class Forum
- 111 LFD272 Class Forum
- 4 LFD272-JP クラス フォーラム
- 12 LFD273 Class Forum
- 144 LFS101 Class Forum
- 1 LFS111 Class Forum
- 3 LFS112 Class Forum
- 2 LFS116 Class Forum
- 4 LFS118 Class Forum
- 4 LFS142 Class Forum
- 5 LFS144 Class Forum
- 4 LFS145 Class Forum
- 2 LFS146 Class Forum
- 3 LFS147 Class Forum
- 1 LFS148 Class Forum
- 15 LFS151 Class Forum
- 2 LFS157 Class Forum
- 25 LFS158 Class Forum
- 7 LFS162 Class Forum
- 2 LFS166 Class Forum
- 4 LFS167 Class Forum
- 3 LFS170 Class Forum
- 2 LFS171 Class Forum
- 3 LFS178 Class Forum
- 3 LFS180 Class Forum
- 2 LFS182 Class Forum
- 5 LFS183 Class Forum
- 31 LFS200 Class Forum
- 737 LFS201 Class Forum - Discontinued
- 3 LFS201-JP クラス フォーラム
- 18 LFS203 Class Forum
- 130 LFS207 Class Forum
- 2 LFS207-DE-Klassenforum
- 1 LFS207-JP クラス フォーラム
- 302 LFS211 Class Forum
- 56 LFS216 Class Forum
- 52 LFS241 Class Forum
- 48 LFS242 Class Forum
- 38 LFS243 Class Forum
- 15 LFS244 Class Forum
- 2 LFS245 Class Forum
- LFS246 Class Forum
- 48 LFS250 Class Forum
- 2 LFS250-JP クラス フォーラム
- 1 LFS251 Class Forum
- 150 LFS253 Class Forum
- 1 LFS254 Class Forum
- 1 LFS255 Class Forum
- 7 LFS256 Class Forum
- 1 LFS257 Class Forum
- 1.2K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 118 LFS260 Class Forum
- 159 LFS261 Class Forum
- 42 LFS262 Class Forum
- 82 LFS263 Class Forum - Discontinued
- 15 LFS264 Class Forum - Discontinued
- 11 LFS266 Class Forum - Discontinued
- 24 LFS267 Class Forum
- 22 LFS268 Class Forum
- 30 LFS269 Class Forum
- LFS270 Class Forum
- 202 LFS272 Class Forum
- 2 LFS272-JP クラス フォーラム
- 1 LFS274 Class Forum
- 4 LFS281 Class Forum
- 9 LFW111 Class Forum
- 259 LFW211 Class Forum
- 181 LFW212 Class Forum
- 13 SKF100 Class Forum
- 1 SKF200 Class Forum
- 1 SKF201 Class Forum
- 795 Hardware
- 199 Drivers
- 68 I/O Devices
- 37 Monitors
- 102 Multimedia
- 174 Networking
- 91 Printers & Scanners
- 85 Storage
- 758 Linux Distributions
- 82 Debian
- 67 Fedora
- 17 Linux Mint
- 13 Mageia
- 23 openSUSE
- 148 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 353 Ubuntu
- 468 Linux System Administration
- 39 Cloud Computing
- 71 Command Line/Scripting
- Github systems admin projects
- 93 Linux Security
- 78 Network Management
- 102 System Management
- 47 Web Management
- 63 Mobile Computing
- 18 Android
- 33 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 370 Off Topic
- 114 Introductions
- 173 Small Talk
- 22 Study Material
- 805 Programming and Development
- 303 Kernel Development
- 484 Software Development
- 1.8K Software
- 261 Applications
- 183 Command Line
- 3 Compiling/Installing
- 987 Games
- 317 Installation
- 96 All In Program
- 96 All In 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)