PDA

View Full Version : HowTo: Speed up ubuntu boot process - the way you can feel it.


Pages : [1] 2

i3dmaster
November 12th, 2005, 05:22 PM
This HowTo is for those who complaint ubuntu boot-up speed is pretty slow but not willing to install any alternative tools to speed up. The way I use here is not the altimate solution by any means but it does make differences and it does work. Everything done below is by tuning the boot process itself and because everyone's computer might be different, there is a little risk that something below might break your system. Take your own judgment before you perform a change and always good to do a backup for the /etc dir.

**This HowTo is mainly for laptops and desktops, not for servers.**

Due to Ubuntu Edgy Eft (6.10) is using upstart to manage the init process and it already has reducing boot time built in mind, many things have been changed. This thread is mainly for any ubuntu version older than 6.10. For how to customize upstart, please refer to upstart threads in this forum. The following is a very interesting and useful WiKi on how to further speed up the boot process by taking out some useless bootup/shutdown processes...

wiki.ubuntu.com/Teardown (http://wiki.ubuntu.com/Teardown)

Suggestions for this HowTo:
1. I hope you learn something from here but not just a simple copy. So please, **DO NOT** follow exactly what I did and copy to your box. Read the descriptions of services and use your own judgment to determine if you need to keep them on or not. For instance, I turned GDM off on mine to boot to console, but if you do not feel confortable to see console at all, you should keep GDM or KDM on to boot directly to GUI.
2. If you have a question about a boot up service and not really sure what it does, post a question here and see if anybody can help you. Ask before you do if you don't know. The bottom line to be safe is to leave a service on rather than turn it off if you do not understand.
3. If you see a boot up service that you have but not in here, let us know what it does just like what I did here - give some descriptions and suggestions on whether it should be on or off on a normal laptop or desktop environment.

Color reference : service I turned on
service I turned off

Screen shots contrib'ed by domino for the initial bootup settings. A great reference for those who mess up on runlevels... Thanks!!

Page 1:
http://img485.imageshack.us/img485/9814/14ub.th.png (http://img485.imageshack.us/my.php?image=14ub.png)

Page 2:
http://img485.imageshack.us/img485/4586/25cr.th.png (http://img485.imageshack.us/my.php?image=25cr.png)


I. Install a tool - sysv-rc-conf. It is a perl based boot process adjustment tool.

sudo apt-get update
sudo apt-get install sysv-rc-conf

It gives you a way to esaily config the boot process and runlevel configuration, but its not necessary if you want to do it manually by linking/unlinking the files... Its up to you.

II. Ok, that's all we need. Now let's fire it up by

sudo sysv-rc-conf

and analyze each service one by one. **Note:** Some services I have here you might not have, perfectly ok. If some you have but I don't, then you will need to investigate on your own or ask here... But this HowTo should cover most of them...

Throw a littel bit of runlevel knowledge here before we start messing them up.... All the boot processes are executed in sequence as following:
runlevel S: the first runlevel in boot process. /etc/init.d/rcS script will be invoked to start and all the processes underneath /etc/rcS.d will be executed.
runlevel 1: the single user mode. All processes underneath /etc/rc1.d will be executed.
runlevel 2,3,4,5: in debain system, the multi-user env, may not may not include GUI. The same, processes under each of the corresponding dirs will be run. **Note** this is different than RedHat, SuSE, and other RPM based systems.
runlevel 0: computer shutdown.
runlevel 6: computer reboot.

ok, back to sysv-rc-conf:

1. acpi-support - You'd better leave it on the default runlevel. The default is 2,3,4,5.
2. acpid - The acpi daemon. These two are for power management, quite important for laptop and desktop computers, so leave them on. The default is 2,3,4,5
3. alsa - If you use alsa sound subsystem, yes leave it on. But if you have the service below, its safe to be off. The default is off when alsa-utils is on.
4. alsa-utils - On my system, this service supercedes the alsa, so I turn off the alsa and turn this on at S level. **Note**, I mean "turn off" is to remove all "X" at all runlevels. If you don't have it on your system, no problem. Just keep going. The default is S runlevel.
5. anacron - A cron subsystem that executes any cron jobs not being executed when the time is on. Most likely you've probably turned your computer off when a certain cron job time is ready. For example, updatedb is scheduled at 2am everyday, but at that moment, you computer is off, then if anacron service is on, it will try to catch up that updatedb cron... I turn it off cause it didn't turn my laptop off very offen, but its totally up to you for this one. The default is 2,3,4,5
6. apmd - This is the one that confused me a quite bit. I have acpid on already and what's the benefits of having apmd on too? If you computer is not that old which can't even support acpi, then you may try to turn this off. I did anyway. The default is 2,3,4,5
7. atd - like cron, a job scheduler. I turned it off. The default is 2,3,4,5
8. binfmt-support - Kernel supports other format of binary files. I left it on. The default is 2,3,4,5
9. bluez-utiles - I turned it off. I don't have any bluetooth devices. The default is 2,3,4,5
10. bootlogd - Leave it on. The default is S.
11. cron - Leave it on. The default is 2,3,4,5
12. cupsys - subsystem to manager your printer. I don't have so I turned it off, but if you do, just leave it on. The default is 2,3,4,5
13. dbus - Message bus system. Very important, leave it on. The default is 2,3,4,5
14. dns-clean - Mainly for cleaning up the dns info when using dial-up connection. I don't use dial up, so I turn it off. The default is S.
15. evms - Enterprise Volumn Management system. I turned it off. The default is S.
16. fetchmail - A mail receving daemon. I turned it off. The default is 2,3,4,5
17. gdm - The gnome desktop manager. I turned it off anyway since I get use to boot to console first. This is up to you if you want to boot directly to GUI. The default is 2,3,4,5
18. gdomap - Actually I have no idea why this one should on. I didn't see any other systems have this daemon, so I turned it off and I don't feel I lose anything. Any benefits to have it on a loptop or desktop? The default is 2,3,4,5
19. gpm - Mouse support for console. If you feel you'd better have a mouse on console, go turn it on at runlevel 1 and 2. That's all you need. The default is 2,3,4,5
20. halt - Don't change it. The default is 0.
21. hdparm - tuning harddisk script. I removed the 2,3,4,5 runlevel but add it to S runlevel. I feel that opening DMA, 32bit I/O, etc eariler will benefit the rest of the processes. Also I changed the original script to a very simple one that I made myself. I feel useless to put all those redundant checks if I know what I am doing. The configuration file is /etc/hdparm.conf. The default is 2,3,4,5
22. hibernate - If your system support hibernate, leave it on. Otherwise, its useless for you. The default is S.
23. hotkey-setup - This daemon setup some hotkey mappings for Laptop. Manufacturers supported are: HP, Acer, ASUS, Sony, Dell, and IBM. If you have a laptop in those brands, you can leave it on, otherwise, this might not have any benefits for you. The default is 2,3,4,5
24. hotplug and hotplug-net #activating hotplug subsystems takes time. I'd consider to turn them off. I did some changes in my /etc/network/interfaces file. Instead of mapping my wireless card during hotplug process, I set it up to auto. So I can turn them off. I've tested even I turned them off, ubuntu can still detect my usb driver, my digital camera, etc. So I think its pretty safe to turn them off. **Note** If you find your sound card doesn't work after turning hotplug service off, you can turn it back. Or edit /etc/modules file to add your sound card's driver module. Tested out the later one is faster. The default is S.
25. hplip - HP printing and Image subsystem. I turned it off. The default is S.
26. ifrename - network interface rename script. Sounds pretty neat but I turned it off. Mainly for managing multiple network interfaces names. Since I have a wireless card and an ethernet card, they all assigned eth0 and ath0 from kernel, so its not really useful for me. The default is S.
27. ifupdown and ifupdown-clean - Leave it on. They are network interfaces activation scripts for the boot time. ifupdown default is 0,6,S and ifupdown-clean is S.
28. inetd or inetd.real - take a look your /etc/inetd.conf file and comment out any services that you don't need. If there aren't any services there, then its very safe to turn them off. The default is 2,3,4,5
29. klogd - Leave it on. The default is 2,3,4,5
30. laptop-mode - A service to tweak the battery utilization when using laptops. You can leave it on. The default is 2,3,4,5
31. linux-restricted-modules-common - You need to see if you really have any restricted modules loaded on your system. Since I need madwifi ath_pci module, so I left it on. The restricted modules can be found from /lib/linux-restricted-modules. If you find that you are not using any of the restricted modules, then its ok to turn it off. The default is 0,6, and S.
32. lvm - I don't use it so I turned it off. Leave it on if you *DO* have lvm. The default is S.
33. makedev - Leave it on. The default is 2,3,4,5
34. mdamd - Raid management tool. I don't use it so I turned it off. The default is 2,3,4,5
35. mdamd-raid - Raid tool. If you don't have Raid devices, turn it off. The default is S.
36. module-init-tools - Load extra modules from /etc/modules file. You can investigate your /etc/modules file and see if there is any modules that you don't need. Normally, this is turned on. The default is S.
37. mountvirtfs - mount virtual filesystems. Leave it on. The default is S.
38. networking - bring up network interfaces and config dns info during boot time by scaning /etc/network/interfaces file. Leave it on. The default is 0,6,S
39. ntpdate - Sync time with the ubuntu time server. The default is S. QUOTED: "If you are dual-booting with Windows, it is probably a good idea to leave ntpdate on. Windows can only deal with the hardware clock set to local (not UTC) and Linux needs ntpdate to correct this, otherwise your clock will increase an hour everytime you boot into Linux from Windows." Thanks dejitarob for the update!! I don't have dual boot, so I turned it off, but if you have multiple systems, suggestion is to turn it on.
40. nvidia-kernel - I compiled the nvidia driver by myself, so its useless for me now. If you use the ubuntu nvidia driver from the restrict modules, just leave it on. The default is 1,2,3,4,5
41. pcmcia - Active pcmcia device. I changed it to start on 0,6,S runlevel instead of on each 2,3,4,5 cause I feel its better to have hardware device ready at first. Also, useless if you are using desktop which doesn't have pcmcia card. So in that case, turn it off please. The default is 2,3,4,5
42. portmap - daemon for managing services like nis, nfs, etc. If your laptop or desktop is a pure client, then turn it off. The default is 2,3,4,5,0,6,S
43. powernowd - client to manage cpufreq. Mainly for laptops that support CPU speed stepping technology. Normally, you should leave it on if you are configuring a laptop, but for desktop, it might be useless. The default is 2,3,4,5
44. ppp and ppp-dns - Useless to me. I don't have dial-up. The default for ppp is 2,3,4,5 and pppd-dns is S.
45. readahead - **Thanks mr_pouit!** It seems readahead is a kind of "preloader". It loads at startup some libs on memory, so that some programs will start faster. But it increases startup time for about 3-4 seconds. So, you can keep it... or not . **update**, I tested and I just didn't feel difference loading programs. So I decided to turn it off. If you have a reason to keep it on, please do so. The default is S
46. reboot - Don't change it. The default is 6
47. resolvconf - Automatically configuring DNS info according to your network status. I left it on. The default is S.
48. rmnologin - Remove nologin if it finds it. It wouldn't happen on my laptop, so I got rid of it. The default is 2,3,4,5
49. rsync - rsync daemon. I don't use it on my laptop, so turned it off. The default is 2,3,4,5
50. sendsigs - send signals during reboot or shutdown. Leave it as it is. The default is 0,6
51. single - Active single user mode. Leave it as it is. The default is 1
52. ssh - ssh daemon. I need this so I turned it on. The default is 2,3,4,5
53. stop-bootlogd - stop bootlogd from 2,3,4,5 runlevel. Leave it as it is. The default is 2,3,4,5
54. sudo - check sudo stauts. I don't see any good to run it everytime on a laptop or desktop client, so I turned it off. The default is S
55. sysklogd - Leave it as it is. The default is 2,3,4,5
56. udev and udev-mab - Userspace dev filesystem. Good stuff, I left them on. The defaults are all S runlevels.
57. umountfs - Leave it as it is. The default is 0,6
58. urandom - Random number generator. Might not useful but I left it on. The default is 0,6,S
59. usplash - Well, if you really want to see the nice boot up screen, leave it as it is. I just turned it off anyway. If you want to turn it off, you also need to edit /boot/grub/menu. lst file to comment out the splashimage line and get rid of the splash kernel boot option. The default is 2,3,4,5
60. vbesave - video card BIOS configuration tool. Its able to save your video card status. I left it on. The default is 2,3,4,5
61. xorg-common - setup X server ICE socket. I moved it from starting at runlevel S to runlevel 2,3,4,5. Since I don't need this if I boot to single user mode. This way it wouldn't occupy time during the initial booting. The default is 2,3,4,5
============ My bootup services end up here============

============ Some services from others================
62. adjtimex - This is a kernel hw clock time adjusting too. Normally, you shouldn't see this on your boot up list. In very rare case if you do see its on your boot up process, then there might be a reason why it is on, so better leave it that way. In my case, it is off.
63. dirmngr - A certification lists management tool. Work with gnupg. You will have to see if you need it or not. In my case, I turned it off. Default runlevel 2,3,4,5
64. hwtools - A tool to optimize irqs. Not sure what's the benefits of turning it on. In my case, I turned it off.
65. libpam-devperm - A daemon to fix device files permissions after a system crash. Sounds pretty good, so I left it on.
66. lm-sensors - If you matherboard has builtin some sensor chips, it might be helpful to see hw status via userspace. I ran it and it said "No sensors found", so I turned it off.
67. screen-cleanup - A script to cleanup the boot up screen. Well, turn on or off is up to you. In my case, I left it on. The default is S
68. xinetd - A inetd super daemon to manage other damons. In my system, the xinetd is managing chargen, daytime, echo and time (find them from /etc/xinetd.d dir), I care none of them, so I turned it off. If you do have some important services configured under xinetd, then leave it on.

III. Alter the /etc/inittab file
vi /etc/inittabthen comment out tty4,tty5, and tty6. Just leave tty1, tty2, and tty3. Three vts should be enough for a laptop or desktop user. Save the file.

IV. Ok, now, we can reboot our box and see how it goes. From what I've tested, before I got tons of services stopped, the whole process is about 85 secs to 90 secs to boot to console. (At that time, I also has samba and nfs services turned on which I shouldn't. Apparently, I turned them off too). After this change, the whole boot up process took about 50 secs. I have a P4M 1.8G CPU laptop. Some of the high-end desktops or laptops should take even less time.

**UPDATE**: speed up/clean system reboot or shutdown process.
1. start sysv-rc-conf by issuing:sudo sysv-rc-conf
2. ok, open your eyes and look very carefully for those SERVICES THAT DO NOT HAVE A "X" ON ANY RUNLEVELS (Any runlevel means 1,2,3,4,5,6, and S), write them down one by one. Don't make mistakes here. Double check after you've done. Thanks ice60 for wording recommendation!
3. quit sysv-rc-conf.
4. cd /etc/rc0.d - This is for the system shutdown process.
5. ok, now, ls K* will list all links starting from UPPERCASE letter "K". Compare with your list, change each of the filename containing the service name in your list to start from a lowercase "k". For example, in your list, you have ppp service (which means ppp is turned off at all runlevels), then you can do like: sudo mv K00ppp k00ppp. You just change the UPPERCASE K to lowercase k, keep the rest the same. Do this on all of the services in your list.
6. cd ../rc6.d - This is for the system reboot process.
7. ok, you should see similar things here too. So do the same thing here as you did on rc0.d.
8. Now, you reboot and shutdown process should be cleaned up and faster.

The explanation for what you did is pretty simple. The /etc/rc and /etc/rcS scripts run start on each link on each runlevel by scaning if it is starting with a UPPERCASE "S" and run stop on each by scaning if it is starting with a UPPERCASE "K". So for reboot and shutdown runlevels, the most thing we care is the "K" links cause for those services not running on all runlevels, its just not needed to stop them. They are not runing at all. If some day you want to turn some of the services back on, just change the lowercase "k" to UPPERCASE "K". That's all.

Anyway, it is not intend to work on servers, but I did try on one of my servers has 2.7G P4 and 1.5G mem. It brought the boot process down to 31 secs. I calc'ed it with my watch. Besides, this is with my ftp server and nfs server started on boot time.

**Note**
For all of those that having HAL failure problem, try this:
1. change acpi-support from S to 2,3,4,5
2. change acpid from S to 2,3,4,5
3. change dbus from S to 2,3,4,5
4. Reboot. Go to the console and do ps -aef|grep hald. If hald service is up, then your dbus subsystem is running fine now. Try it.

Great comments added by bodhi.zazen. Thanks!!
First we should make sure we are left with a bootable system and have backups.

Since we are changing our boot process:

Step 1- Make a bootable GRUB floppy.

http://www.linuxjournal.com/article/4622

Step 2- Backup
Is there any need to back up more then menu.1st, /etc/init.d, /etc/rcS.d, and /etc/rc*.c ( *= 0,1,2,3,4,5,6)?
mkdir /~/bakup.files
sudo cp -P /etc/init.d /~/backup.files
sudo cp -P /boot/grub/menu.1st /~/backup.files
sudo cp -P /etc/rc*.d /~/backup.files
Although a backup of /etc is nice, is it not overkill for this exercise?

Setp 3- Know you Ubuntu Root device (hda1, hdb1, hda2,) and kernel (the numbers in "vmlinuz").
Location of kernel is /boot

Step 4- Modify runlevels.
DO NOT MODIFY DEFAULT RUN LEVELS 0,1, OR 6
MODIFY ONLY 1 RUN LEVEL AT A TIME
RUN LEVEL "S" IS RUN AT EACH RUN LEVEL PRIOR TO OTHERS
ie as system boots (at default) the scritps in rcS.d are run first, then rc2.d

Therefore, if you disable a script in "S", enable the script in runlevel 2
This should guarantee your system will remain bootable to the default run level (2)

In Ubuntu the default run level is 2
Modify only 1 test run level at a time. Choose a custom run level (I will use 3 for the rest of this post, you can use 3,4, or 5).
After modifying the runlevel test without re-booting
sudo init 3
This will change to run level 3
Now check your system.
Problems? Return to default run level and re-configure run level 3
sudo init 2
No problem -> Boot from floppy
No problem, boot from floppy.
When booting (from diskette) to the default run level, the "kernel" line looks like:
kernel=/boot/vmlinuz-2.6.8.1-3-386 root=/dev/hda1 ro quiet splash
In menu.1st this looks like this:
kernel /boot/vmlinuz-2.6.8.1-3-386 root=/dev/hda1 ro quiet splash
To boot to run 3 (from GRUB diskette), add a "3" at the end of the line
kernel=/boot/vmlinuz.... root=/dev/..... ro quiet splash 3
Note: the number 3 was added at the end (without quotes)
time boot process.
If OK boot again from floppy (to default run level)
kernel=/boot/vmlinuz..... root=/dev/....
Note: no number 3 at the end of this line
time boot process
This is the default boot and you can measure any time savings.
booting from a floppy to compair apples to apples
If OK you can now change the default run level (or not)
There is more then 1 way to do this
My preferance is to leave the default runlevel unmodified
This leaves the default boot process as a future referance
Change the default boot level
sudo nano /boot/grub/menu.1st
add init=3 to end of line

kernel /boot/vmlinuz-2.6.8.1-3-386 root=/dev/hda1 ro quiet splash 3

Or create 2 Ubuntu titles, one for each run level.

OR

Edit /etc/inittab

Step 4- Modify shutdown scripts if desired.

This process should guide users through a logical process of modifying boot scripts without generating a non-bootable system. Backups were made "just in case" but really should not be needed.

Jingo
November 13th, 2005, 12:26 PM
Try InitNG

i3dmaster
November 13th, 2005, 12:52 PM
InitNG is still needing some work, but its another way to try. The way I provided above is based on adjusting the native init process which I feel a little more confortable than replacing the whole thing.

mintcoffee
November 13th, 2005, 01:34 PM
Very nice! I've always wondered what each one of those processes were... and now i've learned a little bit more about the boot process!

Thanks! :KS

i3dmaster
November 13th, 2005, 02:13 PM
Very nice! I've always wondered what each one of those processes were... and now i've learned a little bit more about the boot process!

Thanks! :KS
Indeed! Its actually a way to learn how your system boots itself up and what you really need and what you don't.

MetalMusicAddict
November 13th, 2005, 02:19 PM
Nice guide. Reminds me of BlackVipers guide for windows services. :)

I would like to see it a little cleaner though. Maybe something like this?

OLD
1. acpi-support #You'd better leave it on "X" at S runlevel.

NEW
1. acpi-support - You'd better leave it on X at S runlevel.

2. acpid (The acpi daemon) - These two are for power management, quite important for laptop and desktop computers, so leave them on.

I wouldnt mind organizing it this way if you dont mind. Maybe something we could put up on the WIKI?

mohaham
November 13th, 2005, 03:24 PM
excellent job , Thanks.

Rob2687
November 13th, 2005, 03:33 PM
Nice work, I'll have to go through all this later.

Heliode
November 13th, 2005, 03:57 PM
Thanks for this guide. I didn't do any benchmarks, but I think its faster now. Plus it feels better to have services disabled that I'm not using anyway, like bluez and ppp... the descriptions and the sysv-rc-conf tool were very helpful as well.

i3dmaster
November 13th, 2005, 06:08 PM
Nice guide. Reminds me of BlackVipers guide for windows services. :)

I would like to see it a little cleaner though. Maybe something like this?

OLD
1. acpi-support #You'd better leave it on "X" at S runlevel.

NEW
1. acpi-support - You'd better leave it on X at S runlevel.

2. acpid (The acpi daemon) - These two are for power management, quite important for laptop and desktop computers, so leave them on.

I wouldnt mind organizing it this way if you dont mind. Maybe something we could put up on the WIKI?
Its a good idea. I will get it updated. Thanks very much!

sailor420
November 13th, 2005, 06:26 PM
III. Alter the /etc/inittab file
vi /etc/inittabthen comment out tty4,tty5, and tty6. Just leave tty1, tty2, and tty3. Three vts should be enough for a laptop or desktop user. Save the file.

I'm a bit confused about this part here... Are these the lines that look like:

l0:0:wait:/etc/init.d/rc 0
l1:1:wait:/etc/init.d/rc 1
l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 3
l4:4:wait:/etc/init.d/rc 4
l5:5:wait:/etc/init.d/rc 5
l6:6:wait:/etc/init.d/rc 6

Or the ones that look like this:


1:2345:respawn:/sbin/getty 38400 tty1
2:23:respawn:/sbin/getty 38400 tty2
3:23:respawn:/sbin/getty 38400 tty3
4:23:respawn:/sbin/getty 38400 tty4
5:23:respawn:/sbin/getty 38400 tty5
6:23:respawn:/sbin/getty 38400 tty6

Thanks for the help--looks like a great guide, and like was said, it's nice to know that there's nothing running you don't need.

benplaut
November 13th, 2005, 06:50 PM
you might want to green GDM... i know that some people will go down the list, doing exactly what you did, then reboot to CLI, not knowing what to do...

MetalMusicAddict
November 13th, 2005, 07:00 PM
i3dmaster. Can we list other services that "we" have that "you" may not and get them added to the guide?

ie:855resolu, mdamd-raid (I know related to mdamd), mountvirt, screen-cl and so on.

I dont really know what all of them are but we could get the definitions together for the list. :)

i3dmaster
November 13th, 2005, 07:51 PM
i3dmaster. Can we list other services that "we" have that "you" may not and get them added to the guide?

ie:855resolu, mdamd-raid (I know related to mdamd), mountvirt, screen-cl and so on.

I dont really know what all of them are but we could get the definitions together for the list. :)
Yes, definitely. That's something we all should do to get this list useful for more people.

i3dmaster
November 13th, 2005, 07:51 PM
I'm a bit confused about this part here... Are these the lines that look like:

l0:0:wait:/etc/init.d/rc 0
l1:1:wait:/etc/init.d/rc 1
l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 3
l4:4:wait:/etc/init.d/rc 4
l5:5:wait:/etc/init.d/rc 5
l6:6:wait:/etc/init.d/rc 6

Or the ones that look like this:


1:2345:respawn:/sbin/getty 38400 tty1
2:23:respawn:/sbin/getty 38400 tty2
3:23:respawn:/sbin/getty 38400 tty3
4:23:respawn:/sbin/getty 38400 tty4
5:23:respawn:/sbin/getty 38400 tty5
6:23:respawn:/sbin/getty 38400 tty6

Thanks for the help--looks like a great guide, and like was said, it's nice to know that there's nothing running you don't need.
The one with tty1,tty2... at the end. Don't touch the rc ones.

i3dmaster
November 13th, 2005, 07:54 PM
you might want to green GDM... i know that some people will go down the list, doing exactly what you did, then reboot to CLI, not knowing what to do...
hmm... ok. I can see what you mean on that... I will update the HowTo.

Jack_S
November 14th, 2005, 03:22 AM
Hi everybody,

In my case turning off Hotplug, sound and correct ATI driver modules are nor loaded. Fujitsu-Siemens Amilo A1630.

Regards,
Jack

mr_pouit
November 14th, 2005, 07:09 AM
It seems readahead is a kind of "preloader". It loads at startup some libs on memory, so that some programs will start faster. But it increases startup time for about 3-4 seconds. So, you can keep it... or not :lol:

i3dmaster
November 14th, 2005, 10:19 AM
Hi everybody,

In my case turning off Hotplug, sound and correct ATI driver modules are nor loaded. Fujitsu-Siemens Amilo A1630.

Regards,
Jack
Another way to load your sound card driver is to add the module to the /etc/modules (the module-init-tool boot up process will load modules in that file) file but you need to know the chip set name of your sound card. lspci -vshould tell you.
As far as the ATI driver, I am not quite sure why it need hotplug subsystem. Did you compile the driver yourself? If the driver is in the correct place (/lib/modules/$KERNEL-VER/kernel/drivers/video). If you see it, take a look the /etc/modprobe.d/alias file and see if it is added. Also, take a look another thread here talking about how to get ATI driver to work...

i3dmaster
November 14th, 2005, 10:25 AM
It seems readahead is a kind of "preloader". It loads at startup some libs on memory, so that some programs will start faster. But it increases startup time for about 3-4 seconds. So, you can keep it... or not :lol:
Yes, it looks that way. I will try and see if there is any benefits to load it on boot time. Thanks very much and I will update the HowTo on this.

GoA
November 14th, 2005, 10:53 AM
Here's my opinion. I had disabled some services through BUM which is easier method. With this thread I stopped few more services and the result was that I didn't have no sound (hotkey is needed for that, using regular computer). After fixing sound everything worked but the speed difference was so minimal with modern computer that the whole thing was quite a useless. I don't actually feel any difference with or wothout using the bum to disable services. Using athlon 2800+ and 1 gig of memory with sata hd.

i3dmaster
November 14th, 2005, 11:27 AM
Here's my opinion. I had disabled some services through BUM which is easier method. With this thread I stopped few more services and the result was that I didn't have no sound (hotkey is needed for that, using regular computer). After fixing sound everything worked but the speed difference was so minimal with modern computer that the whole thing was quite a useless. I don't actually feel any difference with or wothout using the bum to disable services. Using athlon 2800+ and 1 gig of memory with sata hd.
It may be a stupid question but what's BUM? Anyway, you should know there is always more than one way to do things in Linux, so I am glad you are satisfied with BUM, but knowing more of each daemon and what they are doing wouldn't be a bad thing all at. And I am pretty sure some will get a dramatic difference and some don't after adjusting it cause you might have already disabled most of the services that you don't need. I didn't say this will benefit for everyone.

GoA
November 14th, 2005, 01:21 PM
Bum is boot-up-manager. You can find a lot of information about it from here by using search. Actually, it's developing forum is in here. And like I said, I don't notice the difference with all the services on or most of them shutdown. Because they require so little power with modern computers. Of course with older ones this can effect a lot on the performance.

link to bum: http://www.ubuntuforums.org/forumdisplay.php?s=&daysprune=30&f=75

Caboto
November 14th, 2005, 02:04 PM
The first time i tried this howto, my sound didn't work anymore. Even if i turn alsa on. So i tried to turn on some other things, but it seems i put 'em to the wrong runlevel. My PC crashed everytime the x server started.
Happily i've got a backup from my /etc folder. This time I just turned off the things, which i was sure of, that i don't need 'em. Now it all works out.

But i would suggest before turning something completly off, write down what runlevel they are in.

And I've always wondered how I can modify the shutdown sequence. It tries to shut down things, which aren't even there anymore. This don't really reduce the shutdown-time (at least i guess so), but it would be nice to know and it would look a little bit nicer as when there are tons of red "failed".


Nevertheless, i always wanted to know what things are in the boot sequence. Thanks for your information! :)

Sionide
November 14th, 2005, 02:17 PM
Regardless of bootup speed gains, it seems worthwhile to get rid of any services you won't ever use. Thanks for this..

i3dmaster
November 14th, 2005, 04:05 PM
The first time i tried this howto, my sound didn't work anymore. Even if i turn alsa on. So i tried to turn on some other things, but it seems i put 'em to the wrong runlevel. My PC crashed everytime the x server started.
Happily i've got a backup from my /etc folder. This time I just turned off the things, which i was sure of, that i don't need 'em. Now it all works out.

But i would suggest before turning something completly off, write down what runlevel they are in.

And I've always wondered how I can modify the shutdown sequence. It tries to shut down things, which aren't even there anymore. This don't really reduce the shutdown-time (at least i guess so), but it would be nice to know and it would look a little bit nicer as when there are tons of red "failed".


Nevertheless, i always wanted to know what things are in the boot sequence. Thanks for your information! :)
Thanks for your feedback! The shutdown part is coming soon and its easier than configuring bootup processes.

i3dmaster
November 14th, 2005, 04:06 PM
Regardless of bootup speed gains, it seems worthwhile to get rid of any services you won't ever use. Thanks for this..
Yes indeed! Knowing what you need and what you don't is always better and safer.

adamb10
November 14th, 2005, 09:40 PM
A regular Ubuntu system boots in about 44 seconds to the logins screen for me on a Athlon XP 2100. After using this Howto, I feel it chopped 5 seconds off the boot time. :)

Good Work.

PS Is there a way to speed up the network part in the boot? It's the slowest for me.

GoldBuggie
November 15th, 2005, 12:12 AM
Really nice guide...I love the tool you recommended to use. I used the tool BUM(boot-up-mgr) before but I can't turn everything off and it isn't nearly as flexible. Thank you.

About readahead...the project is called readahead-list and it preloads files into the page cache to accelerate program loading. The files it caches are stored in /etc/readahead/readahead.

Maybe experimenting with it can make firefox load faster hmmm...something to check into for me I think.

Anyway...thx again for a nicely written guide. I like it cause it tweaks the existing system to your needs instead of replacing it with something new.

i3dmaster
November 15th, 2005, 12:31 AM
A regular Ubuntu system boots in about 44 seconds to the logins screen for me on a Athlon XP 2100. After using this Howto, I feel it chopped 5 seconds off the boot time. :)

Good Work.

PS Is there a way to speed up the network part in the boot? It's the slowest for me.
The way I changed was not let the hotplug system to detect my pcmcia card and activate the network but change it to auto from the /etc/network/interfaces file. You will see on the file there is a portion to mapping hotplug devices.. I commented that out and add my ath0 after the "auto lo", so its "auto lo ath0". Also, I changed the pcmcia service start runlevel from 2,3,4,5 to S, so it loads it first and then networking script loads my network configuration. Its faster than use the hotplug subsystem. If you don't use pcmcia and have an internal ethernet card, you don't even need to bother opening that service.

i3dmaster
November 15th, 2005, 12:33 AM
Really nice guide...I love the tool you recommended to use. I used the tool BUM(boot-up-mgr) before but I can't turn everything off and it isn't nearly as flexible. Thank you.

About readahead...the project is called readahead-list and it preloads files into the page cache to accelerate program loading. The files it caches are stored in /etc/readahead/readahead.

Maybe experimenting with it can make firefox load faster hmmm...something to check into for me I think.

Anyway...thx again for a nicely written guide. I like it cause it tweaks the existing system to your needs instead of replacing it with something new.
Yes, the readahead thing is something that I am not sure. I didn't feel a whole lot faster though by stopping or starting it... so I am not sure if it really that promising...

manicka
November 15th, 2005, 06:52 AM
I have added this how-to to the Ubuntu Document Storage Facility

http://doc.gwos.org/index.php/Speed_up_boot

i3dmaster
November 15th, 2005, 10:21 AM
I have added this how-to to the Ubuntu Document Storage Facility

http://doc.gwos.org/index.php/Speed_up_boot
Thank you very much sir!

crispingatiesa
November 15th, 2005, 11:37 AM
I made the suggested changes and it gave an error , unable to start halt, so I went bacjk and enable it and when rebooted happens that the process starts ok but after passing the part of "loading extra binaries" in the splash boot the computers goes off all the time. Bottom line is I cannot acces the ubuntu box anymore, any thoughs in how to rollback someway?

i3dmaster
November 15th, 2005, 12:57 PM
I made the suggested changes and it gave an error , unable to start halt, so I went bacjk and enable it and when rebooted happens that the process starts ok but after passing the part of "loading extra binaries" in the splash boot the computers goes off all the time. Bottom line is I cannot acces the ubuntu box anymore, any thoughs in how to rollback someway?
Ok, sounds like you enabled halt on all runlevels. The halt service can only be enabled at runlevel 0 which is to shutdown the computer. You can use Live CD to change it back but let's try to boot to single mode first. When you see the grub menu, hit "e" to edit the default boot line. After you hit "e", you will see the detail boot options. Go to the kernel line and hit "e" again, then you can edit the kernel options, at the end of the line, input "single", then "enter", after that hit "b" to boot. If you can boot to the single mode, then try to run sysv-rc-conf again to change the halt to only start at runlevel "0". Let me know if this works or not.

domino
November 16th, 2005, 11:51 AM
This was a good how-to and I'm sure it works for a lot of folks. But this is the only how-to I have gone through that actually broke gnome. Granted that it was partially my fault for not taking screenshots noting of all the runlevels I changed, it still should have been stated in the how-to about totally screwing up my perfect ubuntu install.

Now I'm stuck with this windows OS till I this ^%&% fixed. So damn frustrating. I thought I would safe at least 20 seconds of boot time, but ended up trying to fix what's broken for 5 damn hours.

Now to my problem, I back stepped the how-to and renamed all the k* back to K*, uncommitted this lines in the inittab file. The only thing I could not fix was the runlevel. I can boot all the way to gnome but the splash screen does not show and neither does the desktop. Only the brown Ubuntu background and the cursor. How do I set the runlevel back to default?

i3dmaster
November 16th, 2005, 01:22 PM
This was a good how-to and I'm sure it works for a lot of folks. But this is the only how-to I have gone through that actually broke gnome. Granted that it was partially my fault for not taking screenshots noting of all the runlevels I changed, it still should have been stated in the how-to about totally screwing up my perfect ubuntu install.

Now I'm stuck with this windows OS till I this ^%&% fixed. So damn frustrating. I thought I would safe at least 20 seconds of boot time, but ended up trying to fix what's broken for 5 damn hours.

Now to my problem, I back stepped the how-to and renamed all the k* back to K*, uncommitted this lines in the inittab file. The only thing I could not fix was the runlevel. I can boot all the way to gnome but the splash screen does not show and neither does the desktop. Only the brown Ubuntu background and the cursor. How do I set the runlevel back to default?
Sorry to hear that your box was broken by tuning the boot process. I want to help you out to get it back. I am sure there must have some misconfigurations in the runlevels. Ok, your default GUI runlevel should be at 2. So check your xorg-common service and make sure its up at runlevel 2. Also, check to make sure your /home/yourname dir is not residing in any lvm or raid devices cause in my HowTo, those services were turned off since I don't use them, but it might be a different case in your situation. If you didn't backup your /etc dir, its hard now to back step to the original status. Post your problems here and I will try to help out as much as I can. And I can tell you that this can be fixed.

domino
November 16th, 2005, 01:45 PM
I'm able to boot straight into user land by fallowing this how-to:

InitNG: http://ubuntuforums.org/showthread.php?t=80423&highlight=boot+process

Before that, I could only boot into root land via "recovery mode". I added InitNG to my boot menu. I still have the original boot options though. I'm having a lot of other issues with InitNG, more than I'd like to dedicate my time on. So, I just want to get my runlevels back to where they were and boot into user land as before.

Sorry to hear that your box was broken by tuning the boot process.

My luck had to run out sooner or later. :)

Ok, your default GUI runlevel should be at 2. So check your xorg-common service and make sure its up at runlevel 2.

My xorg-common service is set to S. I'll change to 2 and reboot. I'll post back with what ever happens.

Also, check to make sure your /home/yourname dir is not residing in any lvm or raid devices cause in my HowTo, those services were turned off since I don't use them, but it might be a different case in your situation.

My home dir is still where it is at. I don't have raid or lvm set up.

If you didn't backup your /etc dir, its hard now to back step to the original status. And I can tell you that this can be fixed.

That's the first thing I would have done had I known :(. I know better now.

If there is any information I can provide, let me know.

domino
November 16th, 2005, 02:05 PM
After setting xorg-common service from S to 2, I still couldn't get into user destop. Still stuck at the brown background with only a pointer. I know most of the names I had changed runlevels on. Is there a list of default runlevels? Or does it vary between boxes on evry fresh install?

acpid
alsa / alsa-utils
apmd
bluez-util
cupsys
dbus
dns-clean
evms
fetchmail
hotkey-se$
hotplug / hotplug-n$
hplip
lvm
mdadm / mdadm-raid
pcmcia
powernowd
ppp / pppd-dns
readahead
rsync
xorg-common (was set to S, but I never touched it)

i3dmaster
November 16th, 2005, 02:21 PM
After setting xorg-common service from S to 2, I still couldn't get into user destop. Still stuck at the brown background with only a pointer. I know most of the names I had changed runlevels on. Is there a list of default runlevels? Or does it vary between boxes on evry fresh install?

acpid
alsa / alsa-utils
apmd
bluez-util
cupsys
dbus
dns-clean
evms
fetchmail
hotkey-se$
hotplug / hotplug-n$
hplip
lvm
mdadm / mdadm-raid
pcmcia
powernowd
ppp / pppd-dns
readahead
rsync
xorg-common (was set to S, but I never touched it)

xorg-common turned on at runlevel S is fine. I just want to make sure its there. Also, turn on your favorite logon manger, either GDM or KDM, so that you can go directly to GUI. I don't see you cron daemon there, its bad to turn that off. I don't see any of your log daemons on, such as bootlogd, sysklogd, etc. If you don't have lvm and raid at all, no need to leave lvm and mdadm/mdadm-raid on. I don't see udev/udev-mtab on, that's not good. I don't see vbesave on. Please look carefully and make sure.

grizzly
November 16th, 2005, 02:53 PM
I think i configured too much.
Now it boots into a blank screen, both with the normal and recovery mode. Everything seems to go well then suddenly the three lights on my keyboard blink and and the harddisk goes dead.

Where exactly are the settings configured by sysv-rc-conf stored. I'll use a livecd to restore things.

Thanks for the nice tut by the way

i3dmaster
November 16th, 2005, 03:04 PM
I think i configured too much.
Now it boots into a blank screen, both with the normal and recovery mode. Everything seems to go well then suddenly the three lights on my keyboard blink and and the harddisk goes dead.

Where exactly are the settings configured by sysv-rc-conf stored. I'll use a livecd to restore things.

Thanks for the nice tut by the way
hmm... that's weird. Make sure you didn't touch the halt and reboot services. There are some services you shouldn't touch even just change the runlevels. All the boot up scripts are at /etc/init.d dir and they are also linked to /etc/rcx.d dir according to the sysv-rc-conf settings. If a certain service turned on at a certain runlevel, then you will see a Sxxname link, otherwise, you will see a Kxxname link.

grizzly
November 16th, 2005, 03:28 PM
Oh i think its some other problem since i couldn't mount ext3( bad superblock). I guess that wouldn't happen due to services.

domino
November 16th, 2005, 10:13 PM
I don't see you cron daemon there, its bad to turn that off. I don't see any of your log daemons on, such as bootlogd, sysklogd, etc. If you don't have lvm and raid at all, no need to leave lvm and mdadm/mdadm-raid on. I don't see udev/udev-mtab on, that's not good. I don't see vbesave on. Please look carefully and make sure.
I didn't list the other you mentioned because I didn't touch/change the values. But they are lised and working (I think). The values I did change I listed above.

Edit: Maybe images will help?

http://img83.imageshack.us/img83/8184/16rt.th.png (http://img83.imageshack.us/my.php?image=16rt.png) http://img83.imageshack.us/img83/2323/23xv.th.png (http://img83.imageshack.us/my.php?image=23xv.png)

crispingatiesa
November 16th, 2005, 10:44 PM
Ok, sounds like you enabled halt on all runlevels. The halt service can only be enabled at runlevel 0 which is to shutdown the computer. You can use Live CD to change it back but let's try to boot to single mode first. When you see the grub menu, hit "e" to edit the default boot line. After you hit "e", you will see the detail boot options. Go to the kernel line and hit "e" again, then you can edit the kernel options, at the end of the line, input "single", then "enter", after that hit "b" to boot. If you can boot to the single mode, then try to run sysv-rc-conf again to change the halt to only start at runlevel "0". Let me know if this works or not.

Sorry for not answering before but I was travelling I just make it home.

I figure out that that's was the problem and the fact that english is not my mother tongue so, words don't jump at me telling me IDIOT DON't DO IT :???:

I tried what you suggested but to no avail. There is something else I could do to fix it?

Thanks

crispingatiesa
November 16th, 2005, 11:07 PM
Hi, guys thanks for the support, I manage to boot by renaming the halt file in the run level s.

jrincon87
November 16th, 2005, 11:31 PM
2. ok, open your eyes and look very carefully for those SERVICES DO NOT HAVE "X" ON ALL RUNLEVELS (All runlevel means 1,2,3,4,5,6, and S), write them down one by one. Don't make mistakes here. Double check after you've done.

I'm confused about this part. It seems there is a small redaction mistake there. What do you mean: that I should write down all the services that has X in some runlevels, or those who have no X at all?

Thanks.

i3dmaster
November 16th, 2005, 11:44 PM
Hi, guys thanks for the support, I manage to boot by renaming the halt file in the run level s.
Great! You solved it by yourself. See, you just learned something.

i3dmaster
November 16th, 2005, 11:46 PM
I'm confused about this part. It seems there is a small redaction mistake there. What do you mean: that I should write down all the services that has X in some runlevels, or those who have no X at all?

Thanks.
You write down for services that has NO "X" at all runlevels. (NO "X" all all)

i3dmaster
November 17th, 2005, 12:14 AM
I didn't list the other you mentioned because I didn't touch/change the values. But they are lised and working (I think). The values I did change I listed above.

Edit: Maybe images will help?

http://img83.imageshack.us/img83/8184/16rt.th.png (http://img83.imageshack.us/my.php?image=16rt.png) http://img83.imageshack.us/img83/2323/23xv.th.png (http://img83.imageshack.us/my.php?image=23xv.png)
After you looked at you screen, I am getting confused. I am wondering if you are trying to configure a server or what? Can you tell me what you have some many server daemons turned on? Do you need to dial up to network? ... I am going to send you my laptop boot up process configuration. Ok, remember, its for laptop.

domino
November 17th, 2005, 12:27 AM
After you looked at you screen, I am getting confused. I am wondering if you are trying to configure a server or what?
This is not a production server. I use it as a sandbox (ISPConfig) and 70% of work done is in Ubuntu using wine and vmware. The rest is in native windows and OSx86, tri-boot.

When I changed the daemon settings, I was aware of what third party daemons were running and I didn't touch them. I listed the ones that I changed on page 5. I just need to figure out the default runlevel of those services prior to changing them. I'll checkout your config and see if anything possitive comes out of them.

Do you need to dial up to network?
I don't have a dialp modem, but if wre turned on by default, that's the way I want it. Again,I don't know if it was on by default. Damn myself. Should have taken screenies before I started this.

Thanks for your time

domino
November 17th, 2005, 01:55 AM
I visually diffed your config but it didn't work. So I pretty much got ballistic and just enable/disabled all kinds of tihs. I can't say I learned much from it because I didn't really know what I was doing. Luck was on my side the 3rd try. I think Hotplug or VMWare did the trick. I'm about 20% sure of it, and I'm not willing to test and see if it was the cause. Can you please look at the new visuals and see if something is out of wack?

http://img499.imageshack.us/img499/9544/w14qh.th.png (http://img499.imageshack.us/my.php?image=w14qh.png) http://img499.imageshack.us/img499/1214/w29jr.th.png (http://img499.imageshack.us/my.php?image=w29jr.png)

i3dmaster
November 17th, 2005, 02:01 PM
I visually diffed your config but it didn't work. So I pretty much got ballistic and just enable/disabled all kinds of tihs. I can't say I learned much from it because I didn't really know what I was doing. Luck was on my side the 3rd try. I think Hotplug or VMWare did the trick. I'm about 20% sure of it, and I'm not willing to test and see if it was the cause. Can you please look at the new visuals and see if something is out of wack?

http://img499.imageshack.us/img499/9544/w14qh.th.png (http://img499.imageshack.us/my.php?image=w14qh.png) http://img499.imageshack.us/img499/1214/w29jr.th.png (http://img499.imageshack.us/my.php?image=w29jr.png)
I've said at the beginning that this HowTo was not intend to work on Servers cause it trys to turn off all unnecessary server daemons... Anyway, looks like you are still not sure what stuff that you don't need. Let me get through all of them by asking you questions.
1. acpi-support - you turned it on at 2,3,4,5 and S, which is wrong. If you turned it on at S runlevel, you can safely turn them of at 2,3,4,5. Or you keep them on at 2,3,4,5 but turn off S level.
2. acpid - The same as above.
3. alsa - you can turn it off at all runlevels.
4. alsa-utils - This one supercedes the alsa daemon, so just turn it on at S runlevel.
5. anacron - fine.
6. apache2 - web server. Do you need it?
7. apmd - fine.
8. atd - fine
9. bind9 - DNS server. Do you need it?
10. bluez-utiles - bluetooth daemon. Do you need it? Again, S and other runlevels shouldn't be turned on at the same time.
11. bootlogd - fine.
12. clamav-fr$ - Not sure what that is... No comments.
13. courier-* - Not sure what they are doing ... No comments.
14. cron - fine.
15. cupsys - Not turned on, which is ok
16. dbus - fine
17. ddclient - Looks like its DHCP client. Do you need it?
18. dns-clean - Should be at S runlevel.
19. evms - Enterprise Volume manager. Do you need this?
20. fetchmail - Not turned on. ok
21. gdm - fine
22. halt - fine
23. hdparm - Turn on at S runlevel. Turn off on all the others.
24. Hotkey-setup - ok
25. hotplug - Either on 2,3,4,5 or on S runlevel. Same problem as before.
26. hotplug-net - ok
27. hplip - Not on, ok
28. ifrename - ok
29. ifupdown* - ok
30. ispconfig - 2,3,5. Should be ok
31. klogd - fine
32. linux-restrict-modules-common - ok
33. lvm - ok but do you use LVM at all?
34. makedev - ok
35. mdadm - RAID. Do you need it ?
36. mdadm-raid - Not on, ok. And you probably don't need mdadm either.
37. module-init-tool - ok
38. mountvirtfs - ok
39. mysql - database daemon. Do you need it?
40. networking - ok
41. ntpdate - sync time server. fine
42. pcmcia - Turned off. ok
43. postfix - MTA. Mail server. Do you need it?
44. powernowd - Not on, ok
45. ppp* - Not on. ok
46. proftpd - ftp server. Do you need it?
47. quota* - quota support. fine
48. readahead - fine
49. reboot - fine
50. rmnologin - fine
51. rsync and samba - All off. ok
52. saslauthd* - mail SASL auth daemon. fine
53. screen-cleanup - fine
54. sendsigs - fine
55. single - fine
56. ssh - fine
57. stop-bootlogd - fine
58. sudo - fine
59. sysklogd - fine
60. udev* - fine
61. umountfs - fine
62. urandom - fine
63. usplash - fine
64. vbesave - fine
65. vmware - fine
66. xorg-common - fine
Let me know what you think about..

GoldBuggie
November 17th, 2005, 07:49 PM
Just to give some info here on the other end of boot, that is shutdown. I issued the command sudo sysv-rc-conf -p which gives you a table mych like before but with 3 states instead of 2. These 3 states are as follows:

nothing: the process is never used
SXX: The process will start during boot and XX denotes when. XX=10 means it gets started before S20.
KXX: The proces will be shutdown during shutdown.

Since I have removed alot of processes during boot I wanted to look at the shutdown process and I noticed that ALOT of processes are beeing shutdown that never are started. So I basically removed all the lines containing only KXX and NO SXX. This made a huge difference on reboot and shutdown.

twigsby
November 17th, 2005, 08:38 PM
Originally Posted by domino
I visually diffed your config but it didn...

Completely offtopic, but where could I find that terminal background?

domino
November 18th, 2005, 12:37 AM
I've said at the beginning that this HowTo was not intend to work on Servers cause it trys to turn off all unnecessary server daemons...

I was fully aware that this how-to was geared towards non-servers. That's why I didn't touch the ones I knew I needed to develope websites. All of the web services, apache2, bind, clamav, dns, postfix, etc., ties in with ISPConfig. I didn't touch those. The only one which I "thought" I didn't touch was VMWare. The fonts is for the email server.

Let me know...

Since I did all my backups and screenies, I did what you suggested on your last post and the boot time was trully noticable. Thank you for the personal time to get me through this. Now i'm off to rename those reboot and startup files.

OT: @twigsby, the terminal is transparent. You can set this by executing Terminal: Edit -> Current Profile --> Effects

Thank you

i3dmaster
November 18th, 2005, 12:59 AM
I was fully aware that this how-to was geared towards non-servers. That's why I didn't touch the ones I knew I needed to develope websites. All of the web services, apache2, bind, clamav, dns, postfix, etc., ties in with ISPConfig. I didn't touch those. The only one which I "thought" I didn't touch was VMWare. The fonts is for the email server.


Since I did all my backups and screenies, I did what you suggested on your last post and the boot time was trully noticable. Thank you for the personal time to get me through this. Now i'm off to rename those reboot and startup files.

OT: @twigsby, the terminal is transparent. You can set this by executing Terminal: Edit -> Current Profile --> Effects

Thank you
Great! Glad to hear you've got things straighted out.

domino
November 18th, 2005, 01:01 AM
So I basically removed all the lines containing only KXX and NO SXX. This made a huge difference on reboot and shutdown.
Let me get this straight. For example, if alsa is disabled on startup, I can clear out 1,2,3,4,5,0,6,S? If not, please give an example. runlevels aren't something we see every day, and I get overwhelmed by these configurations.

Thanks

i3dmaster
November 18th, 2005, 01:52 AM
Let me get this straight. For example, if alsa is disabled on startup, I can clear out 1,2,3,4,5,0,6,S? If not, please give an example. runlevels aren't something we see every day, and I get overwhelmed by these configurations.

Thanks
Go to your sysv-rc-conf, if you see alsa does not have "X" on ANY runlevel (1,2,3,4,5,6,0,S), its safe to go to /etc/rc0.d and /etc/rc6.d to mv Kxxalsa to kxxalsa. (Uppercase K to lowercase k)

domino
November 18th, 2005, 02:22 AM
:) I read that on your original post. I just thought that comparing 2 term screens side by side, I would be less proned to making visual mistakes.

Edit: I see something strange with alsa and alsa-utils. Remember when you said this:

3. alsa - you can turn it off at all runlevels.
4. alsa-utils - This one supercedes the alsa daemon, so just turn it on at S runlevel.

I ran sysv-rc-conf and now both alsa and alsa-utils are cleared out, but can still listen to my internet radio though. I'm asuming that alsa is the sound server?

i3dmaster
November 18th, 2005, 11:50 AM
:) I read that on your original post. I just thought that comparing 2 term screens side by side, I would be less proned to making visual mistakes.

Edit: I see something strange with alsa and alsa-utils. Remember when you said this:



I ran sysv-rc-conf and now both alsa and alsa-utils are cleared out, but can still listen to my internet radio though. I'm asuming that alsa is the sound server?
alsa driver database is compiled in kernel, so normally if you are not having a rare sound card, you will have it enabled by default. The alsa or alsa-utils is the bootup process to restore the alsa configuration settings, such as mixer level, channel level, etc...

domino
November 18th, 2005, 01:58 PM
Gotcha. I'm done and very satisfied with my load time and runlevels. Cold boot dropped from 80sec. to 50secs. Shutdown dropped from 25sec. to 15sec. Thanks for all the assistance.

grizzly
November 18th, 2005, 05:09 PM
Me again!
This time i was carefull, but still managed to mess up :rolleyes: .
Now i can boot in the syatem, so all i want is info abt the default status of each services. Whether it was in runlevel 3 or S etc. That should be easy, i guess
And by default i mean original, that came with the installation, not after tweaking.
Then i can simply compare and correct.

Thanks

btw does it matter if a servcie say alsa starts in runlevel 2 or S?

i3dmaster
November 18th, 2005, 07:42 PM
Me again!
This time i was carefull, but still managed to mess up :rolleyes: .
Now i can boot in the syatem, so all i want is info abt the default status of each services. Whether it was in runlevel 3 or S etc. That should be easy, i guess
And by default i mean original, that came with the installation, not after tweaking.
Then i can simply compare and correct.

Thanks

btw does it matter if a servcie say alsa starts in runlevel 2 or S?
S is the first runlevel, then the runlevel defined in inittab. Typically, it shouldn't matter but the thing you need to consider is the sequence or dependency. Some services depend on other ones. For example, if you have a pcmcia network card, then the networking script MUST run after the pcmcia service. When you switch the runlevels, you need to be careful on this type of thing. From my point of view, runlevel S intends to be a level that enables all hardware related services, which means at this runlevel, all the hardware should be detected and modules loaded. When system goes to upper runlevels, it shouldn't worry about any hardware problems, then we can enable network, GUI, all different kind of server daemons, and such...

IdolizingStewie
November 22nd, 2005, 09:08 PM
I followed this How-To a couple days ago and, like an idiot, failed to note the specific changes I was making. I finally got around to rebooting today and when the computer starts back up it gives me an internal error "Failed to initialize HAL." Can anyone tell me which services I need for HAL and maybe what runlevels they need to be on? I suspect this is why I can no longer mount my external HDD which, while not vital, is extremely annoying since it has all my music.

i3dmaster
November 22nd, 2005, 10:02 PM
I followed this How-To a couple days ago and, like an idiot, failed to note the specific changes I was making. I finally got around to rebooting today and when the computer starts back up it gives me an internal error "Failed to initialize HAL." Can anyone tell me which services I need for HAL and maybe what runlevels they need to be on? I suspect this is why I can no longer mount my external HDD which, while not vital, is extremely annoying since it has all my music.
Enable hotplug at runlevel S and try again.

IdolizingStewie
November 23rd, 2005, 01:58 AM
Enable hotplug at runlevel S and try again.

Success! I had apparently left hotplug on, but when I looked at it again, I found a couple places where I'd goofed and started services in 2-5 and S. Fixing those fixed it.

Thanks for the how-to. The faster boot-up is nice, but given how rarely I reboot, I appreciate more what I've learned about the start-up process and the knowledge that services I'm not using are shut off.

mangocrazy
November 30th, 2005, 02:39 AM
Hi - absolute newbie alert...

I'v read this thread and am keen to try and reduce boot times on an older system I have, but when I try the first step in the process (i.e. getting and installing the package) I get the following response:

jackie@jackie:~$ sudo apt-get update
Get:1 http://security.ubuntu.com breezy-security Release.gpg [189B]
Get:2 http://gb.archive.ubuntu.com breezy Release.gpg [189B]
Get:3 http://gb.archive.ubuntu.com breezy-updates Release.gpg [189B]
Get:4 http://security.ubuntu.com breezy-security Release [19.6kB]
Hit http://gb.archive.ubuntu.com breezy Release
Get:5 http://gb.archive.ubuntu.com breezy-updates Release [19.6kB]
Hit http://security.ubuntu.com breezy-security/main Packages
Hit http://gb.archive.ubuntu.com breezy/main Packages
Hit http://gb.archive.ubuntu.com breezy/restricted Packages
Hit http://gb.archive.ubuntu.com breezy/main Sources
Hit http://gb.archive.ubuntu.com breezy/restricted Sources
Hit http://security.ubuntu.com breezy-security/restricted Packages
Hit http://security.ubuntu.com breezy-security/main Sources
Hit http://security.ubuntu.com breezy-security/restricted Sources
Hit http://gb.archive.ubuntu.com breezy-updates/main Packages
Hit http://gb.archive.ubuntu.com breezy-updates/restricted Packages
Hit http://gb.archive.ubuntu.com breezy-updates/main Sources
Hit http://gb.archive.ubuntu.com breezy-updates/restricted Sources
Fetched 39.6kB in 0s (85.5kB/s)
Reading package lists... Done
jackie@jackie:~$ sudo apt-get install sysv-rc-conf
Reading package lists... Done
Building dependency tree... Done
Package sysv-rc-conf is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package sysv-rc-conf has no installation candidate
jackie@jackie:~$

Does this mean that the tool is no longer available or has been moved, or am I doing something dumb?

Thanks,

Graham

dolson
November 30th, 2005, 05:01 AM
Hi - absolute newbie alert...

I'v read this thread and am keen to try and reduce boot times on an older system I have, but when I try the first step in the process (i.e. getting and installing the package) I get the following response:

jackie@jackie:~$ sudo apt-get update
Get:1 http://security.ubuntu.com breezy-security Release.gpg [189B]
Get:2 http://gb.archive.ubuntu.com breezy Release.gpg [189B]
Get:3 http://gb.archive.ubuntu.com breezy-updates Release.gpg [189B]
Get:4 http://security.ubuntu.com breezy-security Release [19.6kB]
Hit http://gb.archive.ubuntu.com breezy Release
Get:5 http://gb.archive.ubuntu.com breezy-updates Release [19.6kB]
Hit http://security.ubuntu.com breezy-security/main Packages
Hit http://gb.archive.ubuntu.com breezy/main Packages
Hit http://gb.archive.ubuntu.com breezy/restricted Packages
Hit http://gb.archive.ubuntu.com breezy/main Sources
Hit http://gb.archive.ubuntu.com breezy/restricted Sources
Hit http://security.ubuntu.com breezy-security/restricted Packages
Hit http://security.ubuntu.com breezy-security/main Sources
Hit http://security.ubuntu.com breezy-security/restricted Sources
Hit http://gb.archive.ubuntu.com breezy-updates/main Packages
Hit http://gb.archive.ubuntu.com breezy-updates/restricted Packages
Hit http://gb.archive.ubuntu.com breezy-updates/main Sources
Hit http://gb.archive.ubuntu.com breezy-updates/restricted Sources
Fetched 39.6kB in 0s (85.5kB/s)
Reading package lists... Done
jackie@jackie:~$ sudo apt-get install sysv-rc-conf
Reading package lists... Done
Building dependency tree... Done
Package sysv-rc-conf is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package sysv-rc-conf has no installation candidate
jackie@jackie:~$

Does this mean that the tool is no longer available or has been moved, or am I doing something dumb?

Thanks,

Graham

You need to enable the Universe repositories. I'd recommend you do so via Synaptic's UI.

veloct
November 30th, 2005, 01:21 PM
Great How-To I3dmaster!! I boot up about 5-10 secs faster and I'm not loading a bunch of things I'm not using. Also my reboots and shutdowns are much cleaner and quicker. Thanks for this. :)

i3dmaster
November 30th, 2005, 01:47 PM
Great How-To I3dmaster!! I boot up about 5-10 secs faster and I'm not loading a bunch of things I'm not using. Also my reboots and shutdowns are much cleaner and quicker. Thanks for this. :)
Glad it helps. :)

KermitJr
November 30th, 2005, 06:00 PM
InitNG is still needing some work, but its another way to try. The way I provided above is based on adjusting the native init process which I feel a little more confortable than replacing the whole thing.

What are the chances you could build an autoscripter like Automatix or EasyUbuntu to makes these changes via GUI?

THanks,
KJ

MetalMusicAddict
November 30th, 2005, 06:29 PM
Do you know what theres are?

bind9 (just related to network-manager?) Turned off. Stopped using network-manager
linux-res$ (is this "linux-restricted-modules-common"?)
mountvirt (looked but cant find what it is. Related to WINE or VNC?)
ntp-server (a time server sync?) Turned off.
samba (Know what it is just not how to define it. :))
sendmail (related to "fetchmail"? Just for mail servers?) Turned off.

otake-tux
November 30th, 2005, 09:55 PM
I hate it how at the boot up it searches for network connections. I'm dont know if using dissabeling it via the scrip you reccomend is the solution. Anyone know how to do this. of course I would like to start my connections manually.

btw-I use a laptop and for wireless I need ndiswrapper, just in case this affects anything.

arphe_el
November 30th, 2005, 11:43 PM
i just want to uncheck the ntpdate on bootup since during the internet connection is off it takes too long to boot-up. But when i'm on the system >administration>bootup manager

...startup and shutdown scripts and uncheck it it says "Editing in run level S is not allowed! Playing with rcS.d symlinks is an administration activity requiring deep knowledge of the runlevel system."

is there anyway to edit it?

also is there a way that my system is not dependent on updates over the internet and just update it manually if i want? so that whether connected online or offline my computer runs normally.

thanks any help are greatly appreciated. GODspeed!

i3dmaster
December 1st, 2005, 12:52 AM
What are the chances you could build an autoscripter like Automatix or EasyUbuntu to makes these changes via GUI?

THanks,
KJ
There is already a GUI app called services that you can use. Its simple and mainly for beginners. sysv-rc-conf can be considered a console GUI which is much more powerful. I don't see a need just for another GUI app. The most important thing is to learn and understand what those services are and what they do so that you can make up your mind whether you need it or not.

i3dmaster
December 1st, 2005, 12:58 AM
Do you know what theres are?

bind9 (just related to network-manager?) Turned off. Stopped using network-manager
linux-res$ (is this "linux-restricted-modules-common"?)
mountvirt (looked but cant find what it is. Related to WINE or VNC?)
ntp-server (a time server sync?) Turned off.
samba (Know what it is just not how to define it. :))
sendmail (related to "fetchmail"? Just for mail servers?) Turned off.
bind9 - The DNS server. If you don't provide DNS name resolution, there is no need to turn it on.
linux-restrict-modules-common - All linux restrict modules made by ubuntu team. They are under /lib/linux-restrict-modules. You will probably need it on.
mountvirtfs - maintain Linux virtual filesystems, such as devpts, sysfs, usbfs, shm..., you need it.
ntp-server - a time server. you don't need it.
samba - a windows smb sharing server. The conf file is under /etc/samba/smb.conf
sendmail - a unix MTA, mail server.

i3dmaster
December 1st, 2005, 12:59 AM
I hate it how at the boot up it searches for network connections. I'm dont know if using dissabeling it via the scrip you reccomend is the solution. Anyone know how to do this. of course I would like to start my connections manually.

btw-I use a laptop and for wireless I need ndiswrapper, just in case this affects anything.
If you don't need network up during the boot time, turn off networking, hotplug-network.

i3dmaster
December 1st, 2005, 01:02 AM
i just want to uncheck the ntpdate on bootup since during the internet connection is off it takes too long to boot-up. But when i'm on the system >administration>bootup manager

...startup and shutdown scripts and uncheck it it says "Editing in run level S is not allowed! Playing with rcS.d symlinks is an administration activity requiring deep knowledge of the runlevel system."

is there anyway to edit it?

also is there a way that my system is not dependent on updates over the internet and just update it manually if i want? so that whether connected online or offline my computer runs normally.

thanks any help are greatly appreciated. GODspeed!
Please refer to my first thread. There is a tool I listed there for editing all runlevels. Its call sysv-rc-conf and you will need to be root to edit it.

mangocrazy
December 1st, 2005, 08:08 AM
You need to enable the Universe repositories. I'd recommend you do so via Synaptic's UI.

Thanks for the pointer, Dolson, I'll try it tonight or tomorrow. I had heard of the 'Universe' but wasn't aware of how to get to it, or that the tool I needed was to be found there. Thanks again.

Graham

MetalMusicAddict
December 1st, 2005, 05:19 PM
bind9 - The DNS server. If you don't provide DNS name resolution, there is no need to turn it on.

So I would only need this if Im a server?

KermitJr
December 1st, 2005, 06:10 PM
Mangocrazy,

If you select "Add new programs", click on Settings, Repositories. Click on Advanced and "Show unused repositories" or something like that. I enable all of the binary and disable the source usually.

i3dmaster
December 2nd, 2005, 08:55 AM
So I would only need this if Im a server?
Yes, only if you provide a DNS service.

geearf
December 2nd, 2005, 10:15 AM
Thanks for this good howto, I'll reboot later to feel the difference :)

geearf
December 2nd, 2005, 04:18 PM
I had one problem with the hotplug : no sound and no network so I put it back, maybe later I'll do something like you I don't know.

Also, when I'm closing KDE / X like when shutting down, it stays a bit on a black screen before showing again the terminal.

Finally, when the computer is starting, after I see the alsa message, there is a little problem, the font thing is like written over the alsa message, and at the end I have like the beginning of the alsa message, some blank space, the end of the font message.

It's very strange, but it's way faster,

i3dmaster
December 4th, 2005, 01:18 AM
I had one problem with the hotplug : no sound and no network so I put it back, maybe later I'll do something like you I don't know.

Also, when I'm closing KDE / X like when shutting down, it stays a bit on a black screen before showing again the terminal.

Finally, when the computer is starting, after I see the alsa message, there is a little problem, the font thing is like written over the alsa message, and at the end I have like the beginning of the alsa message, some blank space, the end of the font message.

It's very strange, but it's way faster,
If you are using hotplug service to map the network devices (which is the default) then network wouldn't start. The same, sound card is probed by hotplug subsystem. For network, you can take a look your /etc/network/interfaces file, comment out the hotplug mapping section and put whatever the device to the "auto" line. For your sound card, find out what module it uses and put it into /etc/modules file. btw, Dapper will drop hotplug and only use udev.

geearf
December 4th, 2005, 08:46 AM
Hello,

well it's ok, it's already way faster, and maybe I'll need hotplug for a plug'n play thing later (like a mouse, camera, or else, maybe not )

metoo
December 4th, 2005, 11:11 AM
Good job, nice summary of the meaning of all the services.

mangocrazy
December 7th, 2005, 11:21 AM
KermitJr,

Thanks - I'm now "universe-aware" and my wife has a lot of new games to play on her machine... So that's alright.

In fact Ubuntu has effortlessly supplanted XP as my wife's choice of boot; there are more games and she can still surf/do email etc.

Result! :D

Graham

pachequin
December 8th, 2005, 09:40 PM
hi! everyone! I followed the instructions and the boot is faster but when I turn off my laptop asks me for the root passwd, do you know what service or what I did wrong?

Thank you so much!

petervk
December 9th, 2005, 12:47 PM
hi! everyone! I followed the instructions and the boot is faster but when I turn off my laptop asks me for the root passwd, do you know what service or what I did wrong?

I am getting the exact same problem. Does anyone know a fix?

Also, my laptop does not boot past the brown screen with a cusor (after login) unless I disconnect my network cable before booting. I think this has something to do with the "hotplug-networking" or "networking" service, but if I enable them, booting takes forever when I am not connected to a network. Any way to fix this?

zasf
December 9th, 2005, 01:06 PM
If you are using hotplug service to map the network devices (which is the default) then network wouldn't start. The same, sound card is probed by hotplug subsystem. For network, you can take a look your /etc/network/interfaces file, comment out the hotplug mapping section and put whatever the device to the "auto" line. For your sound card, find out what module it uses and put it into /etc/modules file. btw, Dapper will drop hotplug and only use udev.

I disabled hotplug and then sound and network wouldn't work any more. I normally deal with ifup/down, etc by myself, since the network GUI doesn't work (that is something i go proud since I'm a win user). Other than looking at /etc/network/interfaces and commenting hotplug out, is there a way to understand what fails with hotplug at startup?? It doesn't actually fails.. it takes a long time but no "fail" nor "ok" shows.

Thanks you for the nice howto

joergenlie
December 9th, 2005, 01:40 PM
:confused:
Allright, I think I messed up here. My Lap turns off during boot. tried the things listed above but without sucsess. Is it possible to change the settings through the Live CD? If yes, how?
The only thing i can manage is to get into the grub command line.

"I'm learning by doing it the hard way!"

Thanks!

Jørgen

i3dmaster
December 11th, 2005, 10:53 PM
I disabled hotplug and then sound and network wouldn't work any more. I normally deal with ifup/down, etc by myself, since the network GUI doesn't work (that is something i go proud since I'm a win user). Other than looking at /etc/network/interfaces and commenting hotplug out, is there a way to understand what fails with hotplug at startup?? It doesn't actually fails.. it takes a long time but no "fail" nor "ok" shows.

Thanks you for the nice howto
hotplug and hotplug-network are hotplug subsystems that used for enabling plug&play devices, such as pcmcia card, usb, 1394, sound card, etc. Its a pretty sophisticated system to explain, but in a short, hotplug will try to detect low level devices by using d-bus and udev message bus and load the necessary modules by scaning various module files. The udev will actually have the same type func as hotplug in the near future I think and that's why the hotplug will be replaced by udev... With these type of subsystems enabled, Linux is truly a plug&play OS. But, things always have two sides, the side effect of hotplug is known to be the slow loading during boot time. The way that I can think of to learn this subsystem is to look at the hotplug scripts.

i3dmaster
December 11th, 2005, 10:55 PM
I am getting the exact same problem. Does anyone know a fix?

Also, my laptop does not boot past the brown screen with a cusor (after login) unless I disconnect my network cable before booting. I think this has something to do with the "hotplug-networking" or "networking" service, but if I enable them, booting takes forever when I am not connected to a network. Any way to fix this?
Hmm... I am not sure about this. If you have chance to take a screenshot of your sysv-rc-conf output, I'd love to try.

i3dmaster
December 11th, 2005, 11:00 PM
:confused:
Allright, I think I messed up here. My Lap turns off during boot. tried the things listed above but without sucsess. Is it possible to change the settings through the Live CD? If yes, how?
The only thing i can manage is to get into the grub command line.

"I'm learning by doing it the hard way!"

Thanks!

Jørgen
I think you've probably touched some services that I emphasized NOT to touch at all. Most likely would be the "halt" service since you said your laptop turned off when booting. If you use live CD, go there and mount your root file system and go to the /mount_point_of_rootfs/etc/rc*.d dirs and change the Sxxhalt to only exist under /etc/rc0.d, meaning delete all other Sxxhalt in other rc*.d dirs. Be careful when you do any changes.

joergenlie
December 12th, 2005, 08:50 AM
Ok
How do I mount the root file system through the live cd? I get into root@ubuntu but the the only thing there is Desktop.
Is there som advanced way to do this through the live cd?

Jørgen

i3dmaster
December 12th, 2005, 11:08 AM
Ok
How do I mount the root file system through the live cd? I get into root@ubuntu but the the only thing there is Desktop.
Is there som advanced way to do this through the live cd?

Jørgen
ok, you will need to open a terminal and do a fdisk -l. In that list, you should see your local hard disk root filesystem. Then create a temp dir under /mnt and then mount the root filesystem underneath that temp dir.

Mr_J_
December 12th, 2005, 11:19 AM
I used this and I now can't get my network to boot at startup.
I don't mind it too much, except I have to remember to manually boot the network interface.
When i get home i will go over the things I turned off and post it around here.
If i'm not too mistakened I only turned things off like the howto. However i'm not too assured of it. I remember going over the things and starting them one by one booting and reebooting, and going over it over and over. Nothing worked and i gave up on it.

Only now to remember about it.

joergenlie
December 12th, 2005, 02:17 PM
ok, you will need to open a terminal and do a fdisk -l. In that list, you should see your local hard disk root filesystem. Then create a temp dir under /mnt and then mount the root filesystem underneath that temp dir.

Thanks alot man! som head scratching with the mount, but i got it at last!:D


Jørgen

yaaarrrgg
December 12th, 2005, 04:10 PM
also, here's a one line hack that worked good for me on breezy ... run startup scripts in parallel, merely by changing the startup script: /etc/init.d/rc

Changing the line:


startup $i start


to the following:


startup $i start &


from:
http://www.debian-administration.org/articles/199
http://www.hoeg.org/blog/2005/07/27/fast-booting-debian/

joergenlie
December 12th, 2005, 04:23 PM
Quote:
Originally Posted by IdolizingStewie
I followed this How-To a couple days ago and, like an idiot, failed to note the specific changes I was making. I finally got around to rebooting today and when the computer starts back up it gives me an internal error "Failed to initialize HAL." Can anyone tell me which services I need for HAL and maybe what runlevels they need to be on? I suspect this is why I can no longer mount my external HDD which, while not vital, is extremely annoying since it has all my music.

Enable hotplug at runlevel S and try again.

My hotplug runlevel is aat S, still I get "failed to initialize HAL" ?

Jørgen

i3dmaster
December 13th, 2005, 10:41 PM
I used this and I now can't get my network to boot at startup.
I don't mind it too much, except I have to remember to manually boot the network interface.
When i get home i will go over the things I turned off and post it around here.
If i'm not too mistakened I only turned things off like the howto. However i'm not too assured of it. I remember going over the things and starting them one by one booting and reebooting, and going over it over and over. Nothing worked and i gave up on it.

Only now to remember about it.
If you laptop wouldn't bootup, then one way to fix it is just like the other guy here to use the liveCD. Please refer to the thread. Also, in order to learn a bit more not just fixing, a better place to look at what the hell was wrong is the system log. Go to /var/log dir and look at message, bootlog, dmesg, faillog, kern.log files, etc... for the timeline closest to the accident time and see if there is anything indicating what went wrong during the last boot.

i3dmaster
December 13th, 2005, 11:19 PM
Quote:
Originally Posted by IdolizingStewie
I followed this How-To a couple days ago and, like an idiot, failed to note the specific changes I was making. I finally got around to rebooting today and when the computer starts back up it gives me an internal error "Failed to initialize HAL." Can anyone tell me which services I need for HAL and maybe what runlevels they need to be on? I suspect this is why I can no longer mount my external HDD which, while not vital, is extremely annoying since it has all my music.

Enable hotplug at runlevel S and try again.

My hotplug runlevel is aat S, still I get "failed to initialize HAL" ?

Jørgen
that's actually your dbus system. Check that out.

gilchris
December 14th, 2005, 09:05 PM
I want to translate this HowTo into Korean.

already finished translation.

I want to upload this translated Howto on Korean Ubuntu users group(http://ubuntu.or.kr) if you don't mind this translation is uploaded.

sailor420
December 15th, 2005, 03:26 AM
also, here's a one line hack that worked good for me on breezy ... run startup scripts in parallel, merely by changing the startup script: /etc/init.d/rc

Changing the line:


startup $i start


to the following:


startup $i start &


from:
http://www.debian-administration.org/articles/199
http://www.hoeg.org/blog/2005/07/27/fast-booting-debian/


Nice. That knocked a few seconds off my boot time, beyond all the tweaking here. I don't think much anything else other than InitNG (which isn't working for me) is gonna get my boot time below 1 minute though--damn slow laptop hard drive.

i3dmaster
December 15th, 2005, 01:45 PM
Nice. That knocked a few seconds off my boot time, beyond all the tweaking here. I don't think much anything else other than InitNG (which isn't working for me) is gonna get my boot time below 1 minute though--damn slow laptop hard drive.
That's acutally a pretty good point!

Sokraates
December 19th, 2005, 05:53 AM
also, here's a one line hack that worked good for me on breezy ... run startup scripts in parallel, merely by changing the startup script: /etc/init.d/rc

Changing the line:


startup $i start


to the following:


startup $i start &


from:
http://www.debian-administration.org/articles/199
http://www.hoeg.org/blog/2005/07/27/fast-booting-debian/

Great idea. The only annoyance is, that CLI appears for about a second or two before KDM starts.

Not even a minor prob, simply cosmetics, but does anyone have an idea, how runlevels could be tweaked to avoid this?

ashrack
December 19th, 2005, 03:29 PM
What was the original setting for "readahead"?

brainkilla
December 20th, 2005, 11:59 PM
@i3dmaster
You, Sir, are a genius. Very good how-to. I used to use rcconf and recently I've discovered BUM, which does more or less the same but within a GUI. But I could not get rid of that damn raid sh*t starting and LVM and crap... this is a life saver, booting is now shorter for like 10 sec or more... thanx!

ashrack
December 21st, 2005, 04:36 AM
What was the original setting for "readahead" deamon?
Ive disabled it. But now I would like to enable it again. But don't know on which INIT LEVEL

ShirishAg75
December 21st, 2005, 04:18 PM
Hi there,
First of all thanx to give such a guide. Would be reading the all the pages soon & if the questions that I've if not asked would ask. Couldn't just resist saying thank u. That's all. It's a pretty good tool. Much better than BUM, much more thorough or maybe I haven't checked out BUM quite enough. either way it's cool.

ShirishAg75
December 21st, 2005, 06:03 PM
Hi there,
Got an (Internal Error:Failed to initialize HAL) error. Here are my pics. Would try to first use the pictures themselves to see if I can see what I did wrong otherwise maybe u can point out.
http://img337.imageshack.us/img337/5424/screenshot4gk.th.png (http://img337.imageshack.us/my.php?image=screenshot4gk.png)
http://img276.imageshack.us/img276/3198/screenshot12wy.th.png (http://img276.imageshack.us/my.php?image=screenshot12wy.png)

Another thing I have a realtek 8139c+ Fast Ethernet card which in turn is connected to a D-Link Modem. As a noob, had taken an advice of an knowledgable friend & did the following config:-

ifconfig eth0 192.168.1.2
route add default gw 192.168.1.1 - this is this web interface to tweak the settings of the router/modem.
He also made couple of entries in /etc/resolv.conf
nameserver 61.1.96.69
nameserver 61.1.96.71 - These are DNS servers of our ISP here
looked at /etc/network/interfaces
& then gave /etc/init.d/networking restart

ShirishAg75
December 22nd, 2005, 09:59 AM
Hi there,
Got the Internal Error: HAL failed to initialize. First of all can u clean the 1st post little bit more. At the end when u have put some more services, it has become harder to follow the list. Can u change the order so it follows the order as we see on the screen.
Now for the services that I need to know/confirm more about :-

1. alsa - put them on at 2-5. Your recommendation was off
2. alsa-utils :- put them on S runlevel on.
3. binfmt-support :- This is not there. Should it be or it's specific to one's machine.
4. dns-clean :- on at S runlevel. Do I need this? Refer to the entry above.
5. fetchmail :- Put if off. Do I need it as would be using Thunderbird later.
6. firestart$ :- It's a GUI interface to IPtables. A firewall basically.
7. hdparm :- In /etc/hdparm.conf had put the following line in the script.
hdparm -d1 -X69 -C1 -M192 -A1 -a64 -M16 /dev/hda after
deselecting readahead remove -a64
8. hibernate :- How to know if the service is supported or not. Just run hibernate as
$:- hibenate or something else.
9. hotplug & hotplug-net :- Both are on S runlevel on. I wanna have the ability to use a thumbdrive or digital camera whenever I want. Other than that no printer, no scanner so is this correct.
10. linux-restricted-modules :- This isn't listed. Although the kernel I'm running is in linux-restricted-modules 2.6.12.10-686. Should this one be listed.
11. module-in$ :- Looking at /etc/modules there it lists
a. lp
b. mousedev
c. psmouse
I have a ps/2 mouse. So what should be done here. Right now its on runlevel S
12. mountvirt$ :- What is this & why it should be enabled. I didn't find any info. about this one. Have enabled it at Runlevel S
13. ppp & ppp-dns :- Don't use dial-up as said before but still await u'r instruction on this one. Right now ppp is on from 2-5 while ppp-dns on runlevel S14.
14. rmlogin :- This one is for remote logins or what. have disabled it.No info til yet.
15. rsync :- Remote synchronization. Is this for when I do an apt-get update or for what? Although have disabled it but would like to know more.
16. ssh :- Secure shell. This AFAIK is used than telnet. I don't know much about telnet itself. So would like to know of some link or something which explains where this is used & then can make up my mind.
17. udev & udev-mtab :- Both are on at runlevel S
18. sysklogd :- I have 3 services by this name. syslogd, syslogd~ & syslog_b$. While syslogd is on from 2-5 the rest are off.
19. x.org-common :- Put in on from 2-5. Saw domino putting at Runlevel S & u said fine to that. Could this be the problem?

How do I checkout my dbus system?

Thanx in advance.

i3dmaster
December 23rd, 2005, 12:30 AM
Ive disabled it. But now I would like to enable it again. But don't know on which INIT LEVEL
The default readahead is runlevel S.

i3dmaster
December 23rd, 2005, 01:34 AM
Hi there,
Got the Internal Error: HAL failed to initialize. First of all can u clean the 1st post little bit more. At the end when u have put some more services, it has become harder to follow the list. Can u change the order so it follows the order as we see on the screen.
Now for the services that I need to know/confirm more about :-

1. alsa - put them on at 2-5. Your recommendation was off. - See my note in the HowTo
2. alsa-utils :- put them on S runlevel on. - See my note in the HowTo
3. binfmt-support :- This is not there. Should it be or it's specific to one's machine. - Its strange you don't have this service. You probably need to manually install it. The pkg is binfmt-support.
4. dns-clean :- on at S runlevel. Do I need this? Refer to the entry above. - Yes if you use dial up, otherwise, you don't need it.
5. fetchmail :- Put if off. Do I need it as would be using Thunderbird later. - Absolutely not. Nothing related with Thunderbird and fetchmail.
6. firestart$ :- It's a GUI interface to IPtables. A firewall basically. - I don't have it. I'd rather use CLI
7. hdparm :- In /etc/hdparm.conf had put the following line in the script.
hdparm -d1 -X69 -C1 -M192 -A1 -a64 -M16 /dev/hda after
deselecting readahead remove -a64 - That's cool. I did this type of changes too
8. hibernate :- How to know if the service is supported or not. Just run hibernate as
$:- hibenate or something else. - Most likely depending on the hardware. I would assume that if your laptop supports acpi, then it should support hiernate. Anyway, /etc/hibernate has all the conf and module files that you can take a look.
9. hotplug & hotplug-net :- Both are on S runlevel on. I wanna have the ability to use a thumbdrive or digital camera whenever I want. Other than that no printer, no scanner so is this correct. - Yes, that's the default runlevel
10. linux-restricted-modules :- This isn't listed. Although the kernel I'm running is in linux-restricted-modules 2.6.12.10-686. Should this one be listed. - Another weird one. If you have restricted module installed, you should have it.
11. module-in$ :- Looking at /etc/modules there it lists
a. lp
b. mousedev
c. psmouse
I have a ps/2 mouse. So what should be done here. Right now its on runlevel S - Almost nothing. Leave as it is. BTW, if you want to load any modules during boot time, you may add here.
12. mountvirt$ :- What is this & why it should be enabled. I didn't find any info. about this one. Have enabled it at Runlevel S - Its important. Leave it on. It will mount all virtual fs's, such as sysfs, usbfs, shm, proc, pts, etc... Look at your df and you will see them.
13. ppp & ppp-dns :- Don't use dial-up as said before but still await u'r instruction on this one. Right now ppp is on from 2-5 while ppp-dns on runlevel S14. - Then turn them off. They are services to sync the network settings when dialing up or hanging up.
14. rmlogin :- This one is for remote logins or what. have disabled it.No info til yet. - Yes, if there is a /etc/nologin file in your box, then nobody other than root can get in. This will make sure there isn't such file existing.
15. rsync :- Remote synchronization. Is this for when I do an apt-get update or for what? Although have disabled it but would like to know more. - No, nothing to do with apt. Mainly for sync b/w servers. Quite useful but not for clients.
16. ssh :- Secure shell. This AFAIK is used than telnet. I don't know much about telnet itself. So would like to know of some link or something which explains where this is used & then can make up my mind. - In nowadays Linux, ssh will supercede all telnet services. They all provides remote login ability, but ssh is much much secure than telnet.
17. udev & udev-mtab :- Both are on at runlevel S - Fine.
18. sysklogd :- I have 3 services by this name. syslogd, syslogd~ & syslog_b$. While syslogd is on from 2-5 the rest are off. Fine and you should be able to delete syslogd~ safely since that's just a backup file.
19. x.org-common :- Put in on from 2-5. Saw domino putting at Runlevel S & u said fine to that. Could this be the problem? - No, either way is ok.

How do I checkout my dbus system? - See my note

Thanx in advance.
Thanks. HowTo has been updated. Some of the services were from the others which means my own box doesn't have them, so I am not sure the default runlevel on them. If someone can tell me, I would like to get them updated. For all of those that having HAL failure problem, try this:
1. change acpi-support from S to 2,3,4,5
2. change acpid from S to 2,3,4,5
3. change dbus from S to 2,3,4,5
4. Reboot. Go to the console and do ps -aef|grep hald. If hald service is up, then your dbus subsystem is running fine now. Try it.

AjaxDaKid
December 23rd, 2005, 08:51 AM
I tried to install and i get an error--
pbrown@plinux:~$ sudo apt-get install sysv-rc-conf
Reading package lists... Done
Building dependency tree... Done
Package sysv-rc-conf is not available, but is referred to by another package.This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package sysv-rc-conf has no installation candidate

Do you know why?

i3dmaster
December 23rd, 2005, 11:39 AM
I tried to install and i get an error--
pbrown@plinux:~$ sudo apt-get install sysv-rc-conf
Reading package lists... Done
Building dependency tree... Done
Package sysv-rc-conf is not available, but is referred to by another package.This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package sysv-rc-conf has no installation candidate

Do you know why?
You will need to enable your universe and multiverse repos.

ShirishAg75
December 23rd, 2005, 05:17 PM
Thanks. HowTo has been updated. Some of the services were from the others which means my own box doesn't have them, so I am not sure the default runlevel on them. If someone can tell me, I would like to get them updated. For all of those that having HAL failure problem, try this:
1. change acpi-support from S to 2,3,4,5
2. change acpid from S to 2,3,4,5
3. change dbus from S to 2,3,4,5
4. Reboot. Go to the console and do ps -aef|grep hald. If hald service is up, then your dbus subsystem is running fine now. Try it.
Thanx for the note. Was able to clear up the mess. Also understood small bit about ps. Here's the output from :-
ps -aef|grep hald
hal 6514 1 0 01:04 ? 00:00:00 /usr/sbin/hald
hal 6519 6514 0 01:04 ? 00:00:00 hald-addon-acpi
hal 6527 6514 0 01:04 ? 00:00:02 hald-addon-storage
1000 7812 7705 0 03:49 pts/1 00:00:00 grep hald

Seems to be o.k. I guess. Slightly OT which I'll scrub later but do u/anybody know/s how to show the thumbnails in the same side. I saw in the forum somewhere people able to conserve space by putting thumbnails next to each other.

domino
December 23rd, 2005, 07:51 PM
Thanks for adding the default values. This will be handy on my future installs. I'll make I post defaults on my desktop after I wipe the entire drive and re-install.

i3dmaster
December 23rd, 2005, 09:00 PM
Thanx for the note. Was able to clear up the mess. Also understood small bit about ps. Here's the output from :-
ps -aef|grep hald
hal 6514 1 0 01:04 ? 00:00:00 /usr/sbin/hald
hal 6519 6514 0 01:04 ? 00:00:00 hald-addon-acpi
hal 6527 6514 0 01:04 ? 00:00:02 hald-addon-storage
1000 7812 7705 0 03:49 pts/1 00:00:00 grep hald

Seems to be o.k. I guess. Slightly OT which I'll scrub later but do u/anybody know/s how to show the thumbnails in the same side. I saw in the forum somewhere people able to conserve space by putting thumbnails next to each other.
Cool. Glad it worked out for ya. But for the thumbnail thing, sorry I don't know.

i3dmaster
December 23rd, 2005, 09:01 PM
Thanks for adding the default values. This will be handy on my future installs. I'll make I post defaults on my desktop after I wipe the entire drive and re-install.
np. Good luck man.

John.Michael.Kane
December 24th, 2005, 11:45 AM
sudo mv Kxx to kxx did not seem to change the capatol K to lowercase.. any idea's why..

ShirishAg75
December 24th, 2005, 03:54 PM
That's weird because it did on mine atleast. My query is different though. These processes are there on the startup script but have no entry in the shutdown /etc/rc.0d or /etc/rc6.d

1. dns-clean
2. lm-sensors
3. ntpdate
4. ppp-dns
5. rmlogin
6. syslogd~

18. sysklogd :- I have 3 services by this name. syslogd, syslogd~ & syslog_b$. While syslogd is on from 2-5 the rest are off. Fine and you should be able to delete syslogd~ safely since that's just a backup file.
What is this backup file & what does it do? Till when does it backup & what do the other 2 similar services do. I know that's not the scope of the Howto but if u can :)

ShirishAg75
December 25th, 2005, 02:29 AM
The issue being was looking at /var/log/syslog.0 & the last entry there was of 22nd December. Nothing after that. Any ideas how to generate the logs again?

Brando569
December 28th, 2005, 11:15 PM
i have the same audio problem that everyone else has, but its wierder. i disabled hotplug and hotplug-net and set up eth0 to work w/o hotplug-net and the internet works fine, when i rebooted the sound didnt work. so i was just gonna replace hotplug and i thought everything was gonna be fine, but somehow hotplug misteriously disappeared. i didnt worry about it and used my dads pc which i also installed kubuntu on, and used that for a day or two. i think i installed something from synaptic and restarted linux, when i got back into kde the sound worked, which i thought was odd cuz i didnt do anything. so i installed 2 new kernels (2.6.14 from vanilla sources and 2.6.12-smp) and went into the 2.6.14 and the sound didnt work! tried it in the smp one, same thing. went back into my normal kernel, same thing. the wierd thing is in atleast one of the kernels it gives me an ALSA error or something that it cant find the soundcard (its integrated into my mobo [ac97] ) and on the other two usplash says "starting the hotplug subsystem" and loads it then it says "ALSA card0 ok ALSA card1 ok" then it says something about the network interface which i thought was wierd cuz i didnt enable hotplug again :confused: the best tool ive seen sofar for messing with the boot scripts is a program i found on kde-apps.org it was called debian services control panel or something liek that, and it allowed u to start/stop services and either add them or delete them from running at bootup. (im guessing it removed the links, i think thats what it did) but i cant find the .deb or anything on the site anymore and i have it saved on my hdd but it wont work :(

i3dmaster
December 30th, 2005, 10:30 AM
sudo mv Kxx to kxx did not seem to change the capatol K to lowercase.. any idea's why..
Not sure but it should. Try to specify the whole file name and see how it goes.

i3dmaster
December 30th, 2005, 10:36 AM
That's weird because it did on mine atleast. My query is different though. These processes are there on the startup script but have no entry in the shutdown /etc/rc.0d or /etc/rc6.d

1. dns-clean
2. lm-sensors
3. ntpdate
4. ppp-dns
5. rmlogin
6. syslogd~


What is this backup file & what does it do? Till when does it backup & what do the other 2 similar services do. I know that's not the scope of the Howto but if u can :)
Those are just running once when bootup. They don't need shutdown. As of syslogd~, sometimes it will be created when you are editing that file or the file has been updated. Do a diff -burN syslogd syslogd~ and also ls -latr on those two files and see what's the differences and access time on them. The syslogd~ would probably be older than syslogd which can just be del'ed.

i3dmaster
December 30th, 2005, 10:39 AM
The issue being was looking at /var/log/syslog.0 & the last entry there was of 22nd December. Nothing after that. Any ideas how to generate the logs again?
The current is always named syslog not syslog.0. That is the last saved file since the syslog files are log rotated.

i3dmaster
December 30th, 2005, 10:46 AM
i have the same audio problem that everyone else has, but its wierder. i disabled hotplug and hotplug-net and set up eth0 to work w/o hotplug-net and the internet works fine, when i rebooted the sound didnt work. so i was just gonna replace hotplug and i thought everything was gonna be fine, but somehow hotplug misteriously disappeared. i didnt worry about it and used my dads pc which i also installed kubuntu on, and used that for a day or two. i think i installed something from synaptic and restarted linux, when i got back into kde the sound worked