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
- 167 LFX Mentorship
- 219 LFX Mentorship: Linux Kernel
- 795 Linux Foundation IT Professional Programs
- 355 Cloud Engineer IT Professional Program
- 179 Advanced Cloud Engineer IT Professional Program
- 82 DevOps Engineer IT Professional Program
- 127 Cloud Native Developer IT Professional Program
- 112 Express Training Courses
- 112 Express Courses - Discussion Forum
- 6.2K Training Courses
- 48 LFC110 Class Forum - Discontinued
- 17 LFC131 Class Forum
- 35 LFD102 Class Forum
- 227 LFD103 Class Forum
- 14 LFD110 Class Forum
- 39 LFD121 Class Forum
- 15 LFD133 Class Forum
- 7 LFD134 Class Forum
- 17 LFD137 Class Forum
- 63 LFD201 Class Forum
- 3 LFD210 Class Forum
- 5 LFD210-CN Class Forum
- 2 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum - Discontinued
- 1 LFD233 Class Forum
- 2 LFD237 Class Forum
- 23 LFD254 Class Forum
- 697 LFD259 Class Forum
- 109 LFD272 Class Forum
- 3 LFD272-JP クラス フォーラム
- 10 LFD273 Class Forum
- 152 LFS101 Class Forum
- 1 LFS111 Class Forum
- 1 LFS112 Class Forum
- 1 LFS116 Class Forum
- 1 LFS118 Class Forum
- LFS120 Class Forum
- 7 LFS142 Class Forum
- 7 LFS144 Class Forum
- 3 LFS145 Class Forum
- 1 LFS146 Class Forum
- 3 LFS147 Class Forum
- 1 LFS148 Class Forum
- 15 LFS151 Class Forum
- 1 LFS157 Class Forum
- 33 LFS158 Class Forum
- 8 LFS162 Class Forum
- 1 LFS166 Class Forum
- 1 LFS167 Class Forum
- 3 LFS170 Class Forum
- 2 LFS171 Class Forum
- 1 LFS178 Class Forum
- 1 LFS180 Class Forum
- 1 LFS182 Class Forum
- 1 LFS183 Class Forum
- 29 LFS200 Class Forum
- 736 LFS201 Class Forum - Discontinued
- 2 LFS201-JP クラス フォーラム
- 14 LFS203 Class Forum
- 102 LFS207 Class Forum
- 1 LFS207-DE-Klassenforum
- 1 LFS207-JP クラス フォーラム
- 301 LFS211 Class Forum
- 55 LFS216 Class Forum
- 48 LFS241 Class Forum
- 42 LFS242 Class Forum
- 37 LFS243 Class Forum
- 15 LFS244 Class Forum
- LFS245 Class Forum
- LFS246 Class Forum
- 50 LFS250 Class Forum
- 1 LFS250-JP クラス フォーラム
- LFS251 Class Forum
- 154 LFS253 Class Forum
- LFS254 Class Forum
- LFS255 Class Forum
- 5 LFS256 Class Forum
- 1 LFS257 Class Forum
- 1.3K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 111 LFS260 Class Forum
- 159 LFS261 Class Forum
- 41 LFS262 Class Forum
- 82 LFS263 Class Forum - Discontinued
- 15 LFS264 Class Forum - Discontinued
- 11 LFS266 Class Forum - Discontinued
- 20 LFS267 Class Forum
- 24 LFS268 Class Forum
- 29 LFS269 Class Forum
- 1 LFS270 Class Forum
- 199 LFS272 Class Forum
- 1 LFS272-JP クラス フォーラム
- LFS274 Class Forum
- 3 LFS281 Class Forum
- 9 LFW111 Class Forum
- 260 LFW211 Class Forum
- 182 LFW212 Class Forum
- 13 SKF100 Class Forum
- 1 SKF200 Class Forum
- 1 SKF201 Class Forum
- 782 Hardware
- 198 Drivers
- 68 I/O Devices
- 37 Monitors
- 96 Multimedia
- 174 Networking
- 91 Printers & Scanners
- 83 Storage
- 743 Linux Distributions
- 80 Debian
- 67 Fedora
- 15 Linux Mint
- 13 Mageia
- 23 openSUSE
- 143 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 348 Ubuntu
- 461 Linux System Administration
- 39 Cloud Computing
- 70 Command Line/Scripting
- Github systems admin projects
- 90 Linux Security
- 77 Network Management
- 101 System Management
- 46 Web Management
- 64 Mobile Computing
- 17 Android
- 34 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 371 Off Topic
- 114 Introductions
- 174 Small Talk
- 19 Study Material
- 507 Programming and Development
- 285 Kernel Development
- 204 Software Development
- 1.8K Software
- 211 Applications
- 180 Command Line
- 3 Compiling/Installing
- 405 Games
- 309 Installation
- 97 All In Program
- 97 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)