After upgrading to Ubuntu 10.04, some get "init: ureadahead main process (329) terminated with status 4" error at startup. This can be fixed by directly remove the file:/Etc/init/ureadahead. conf.
Open terminal fromApplications-> accessoriesMenu and type this to do it:
sudo mv /etc/init/ureadahead.conf /etc/init/ureadahead.conf.disable |
Something about ureadahead written by Ubuntu developer:
All about ureadahead
Hey folks, we developers don't get the spare time to hang out on the forums for most of the release cycle, but in the past day I 've tried to keep up with various boot-related issues and I 've seen a few posts about ureadahead-and people recommending removing it.
I thought it might be a good idea to try and explain ain what it does, how it does it, and why "status 4" is a good thing.
Also I want to stress that I'm not going to tell you that there's nothing wrong with it, and that you haven't had a genuine issue, but just that I haven't heard about it if you have! I 'd really appreciate it if anybody who is having problems cocould help out with some debugging to understand the problem, then I'll be able to fix it for you and everyone else!
What does ureadahead do?
In order to boot Ubuntu, we need to read somewhere between 100 mb and 200 MB of data from the disk and into memory. unfortunately the slowest part of your otherwise awesome machine is its hard disk-that's why we want this data into memory in the first place.
Hard Disks aren't just slow to read data, they're slow to find it as well! So we can lose a time of time during boot just waiting for the hard disk to find the data we need, and then read it into memory.
What ureadahead does is figure out what pieces of which files we actually need, and read everything from the disk into memory in one go. by doing it at once we don't need to spend so much time finding everything, and because it's already in memory, we don't waste anywhere near as much time during boot.
It's just for SSD right, not rotational HDD?
No, quite the opposite. you're thinking of sreadahead ("super-readahead "). this was a similar tool written by Intel for their moblin project, and is very unashamedly optimised for SSDS.
We tried it for a while, but found that its performance was simply terrible on rotational hard drives.
I sat down, drank a large amount of tea, and wrote ureadahead ("U Ber-readahead") to replace it. ureadahead from the get go was unashamedly optimised for Rotational hard drives, that's not to say it's poor on SSD either, it uses mas at least as well as sreadhead there.
But ureadahead takes several seconds of my boot!
Yes it does; it's reading all the data in one go. if you didn't have it, those several seconds wocould be simply spread out every SS everything else, and probably last two or three times longer!
I looked at bootchart, and ureadahead doesn't get full Throughput
Even though ureadahead reads everything in one go, and is heavily optimised to read everything in the actual order it's on the disk, it still has to skip over the BITs it doesn' t need.
This "seek time" is the same performance penalty as finding data in the first place.
The only way to avoid this is defragmenting your disk.
But Linux filesystems don't need defragmenting!
Whoever told you that is deeply mistaken, this is one of the most common myths of Linux.
What is true is that Linux filesystems avoid, where possible, fragmenting their inode tables. this means that the index of how files are split up (fragmented) into ss the disk, and where those parts are, tends to be kept together as a whole.
That's a good thing; fragmentation of inode tables is a big problem for other filesystems (fats in that filesystem, etc.) So by keeping them together, it wins a lot of performance.
But the data itself is still fragmented, and spread all over your disk in a random order. And unfortunately during boot, it's the data we need.
One of the future things we want to do is use the ureadahead analysis of what we need during boot to feed into a Defragmenter, so everything we need is in one big block on the disk.
When does ureadahead reprofile?
Any time a package is installed or upgraded that contains a file in/etc/init or/etc/init. d; this is a bit brute-force, and means we're re probably reprofiling a bit more than we 'd like.
To force a reprofile, simply remove the "pack" files in/var/lib/ureadahead and reboot.
In a future version we intend to move to each boot Improving the pack file by identifying things read that were never used, and new things that weren't read last time.
When does ureadahead stop profiling?
Ureadahead slightly assumes you're using auto-login; so waits about 45 s after the Display Manager starts before it stops reprofiling. if you're logging in with a password, and want your desktop files stored in the pack, type quickly
(This will be addressed in a future version too ).
Ureadahead slows down my boot!
I want to hear from you! It really shouldn't; To give you an example of the savings, my trusty laptop boots in about 1m30s without ureadahead-and only 30 s with it.
Make sure you have the bootchart package installed. remove the ureadahead pack files, and move the/etc/init/ureadahead. CONF file to something like ureadahead. disabled. reboot, login, etc. and wait for the bootchart to appear ("Watch Status bootchart" until stop/waiting ).
Now put the ureadahead CONF file back, reboot and login again and wait for bootchart to appear.
Finally reboot and login once more, and wait for bootchart to appear.
You'll now have three bootcharts. One is without ureadahead, one is when ureadahead is profiling, and the final one is with ureadahead behaving normally.
File a bug report on ureadahead (Ubuntu-bug ureadahead) and attach these three files along with the output of "sudo ureadahead-dump" (this is quite a bit, so capture it in a file ).
I'll take a look, and we'll see if we can fix that bug for you!
Ureadahead exits with status 4!
This isn' t actually a bug
Status 4 (usually ureadahead-other exits with this) means that you had a mountpoint in your fstab that didn't have any files on it needed during boot. probably that drive with all those MP3s and movie files on it.
It still reads everything needed during boot, the status is just there for me to debug other issues.
The real bug here is that upstart spams the console with that message, even though the ureadahead-other.conf file has "normal exit 4" in it!
(In other words, if your boot fails, this message is completely unrelated to that! It's more likely that there is an issue with the X server starting, or an issue with init scripts not being run-a good clue might be whether you see a login: screen after pressing Alt + F2)
Last edited by keybuk; March 22nd, 2010 at am ..
Related posts:
- Howto enable ThinkPad hotkeys in Ubuntu 10
- Howto change Plymouth themes (initial splash screen) in Ubuntu 10.04
- Fix network connection icon disappear on top-right panel
- Howto expand swap space by adding a swap file in Ubuntu
- Speed up Firefox by moving cache into RAM in Ubuntu
Reader comments
Your website is trying to install malware. NoScript shows scripts trying to run from kdjkfjskdfjlskdjf.com. Might have to clear out cookies as well to see it.
[Reply]
#1 written by Nolan on May 6th, 2010 @ AM
After upgrading to 10.04, my machine seemed to totally lock up, and this message from ureadahead was the last thing displayed on the screen. SSH wouldn't work, nothing wowould work-only CTRL-ALT-DEL wowould reboot.
However, as has been said, the "Exit 4" code is a normal status message from ureadahead. ureadahead is not what's locking up.
I 'd removed the "quiet splash" from the kernel boot parms in/boot/GRUB/menu. LST, planning to actually * See * All the boot messages (which I much prefer), instead of some splash screen, regardless if it flickers or not (upstart, the new boot system from fedora and adopted now in Ubuntu 10.04, claims its major purpose is to prevent boot screen flicker; that's such a non-worthy goal, IMO ). anyway...
Turns out there was a problem with my raid setup and/etc/fstab wasn' t reflecting all the correct drive assignments, so the boot process (which formerly wowould have printed in text something about broken/etc/fstab and hit Ctrl-D or type root pass to get a shell and fix the problem) froze up, attempting to display the problem message on the flashy, * Non-flickering * upstart screen (which wasn't displaying, because I 'd turned it off in the grub kernel parms ), so the system sat there, not running SSH or anything else, waiting for keyboard input, displaying the last known output from the last thing to run properly, which had been ureadahead.
Now, see all this problem from changing the way it's been for decades? Upstart doesn't really do what I want anymore (It doesn't show the text output from the bootup processes) and it in fact appears to cause lock ups and confusion that take days to figure out. and then It ripples out into ss the globe. judging from the amount of problems reported on this single issue, I know I'm not alone.
I propose upstart be either totally removed, especially from the server version of ubuntu, or else modified so that it can properly support text-only mode (I. E ., "quiet splash" removed from kernal boot parms) and properly show errors and accept keyboard input while in this text-only, non-graphic mode.
[Reply]
Bret JordanReply:
September 24th, 2010 at pm
My frustration with the whole ureadahead and upstart and for that matter the New Grub 2.0 crap is that the developers and marketing sessions are talking about how much time we are saving and how much faster things will boot. but what they are forgetting to put in to their magic formula is how much time it takes to troubleshoot a problem when one of these three things does not work just right. so I save 60 seconds on booting a server with ureadahead and I save a few minutes here and there due to alleged easy of use for the 2% use case with upstart and grub 2.0. but I loose hour upon hour of troubleshooting when one of these three things does not work right. so in the server case, I have a server that does not boot right because of ureadahead, upstart, or grub2.0. how many hours is this se Rver off line while I try to troubleshoot the problem and fix it? I have more then lost any value in these tools when historically for the 98% Use Case, I cocould easily just edit a file here and there and recover a system. in the server offering it needs to be just brain dead simple. stop trying to think for the admin and anticipate what they may or may not need. give us a simple text file of the order that things shoshould load (think slackware) and be done with it.
[Reply]
#2 Written by michaelbrden on May 13th, 2010 @ pm
All I find in/var/lib/ureadahead $ is
Debugfs
Is this the "pack" file?
[Reply]
#3 Written by ethnopunk on May 20th, 2010 @ 8:03 AM
I 've installed kubuntu 10.04 twice, and both times the system boots up fine the first time, but as soon as I reconfigure it to my taste and reboot, it fails with ureadahead status 5. on both occasions, the kubuntu installer has also installed grub in such a way that I can't boot into the other distributions on my hard disc. that is no doubt a different bug, but it does render the first one more Ser IOUs, as I can't get back in to reinstall Lilo !!
On all my systems, I maintain three pairs of partitions for/(8 GB) And/var (4 GB) of three distros. at the time of upgrade, these contain the current version of ubuntu before upgrade, the new version to which I am upgrading, and a previous version no longer in use. one of the first things I will do in my new installation is manually alter/etc/fstab to mount the other distributions (in this case, upgrading to lucid, they will mount at/distro/karmic and/distro/jaunty), so I can copy files into ss. at this stage I will also add the other _ big _ partitions, which mount at/home/users and/home/photos (and a few others ). to support editing these files, I hack/etc/APT/sources. list and add a few packages, including kde3-kedit. after this, rebooting reveals the ureadahead problem.
Now an Ubuntu version lasts six months, which means, if I am deeply unlucky, I will reboot my system a dozen times, but mostly, it wowould be less. saving five minutes on boot time will thus save less than an hour during the life of the distro, whereas a single failure to boot will cost me a more than that. for my desktop machines, I want to tick a box that says "bombproof safe" rather than "fast to boot ". for laptops, I may make a different choice (although installing lucid on my laptop seems to have worked OK ).
At the end of all this, I still have no idea how to get my system to boot into lucid ....
[Reply]
EthanReply:
June 21st, 2010 at AM
I installed 10.04 and ran it without issue for a few weeks, then last night installed the latest stable kernel 2.6.33 and did a sudo Update-grub. everything seemed fine until I rebooted this morning when I got the ureadahead error with "status 5"-and some other errors. I rebooted again and saw some more errors, but then it booted normally. any ideas?
[Reply]