PDA

View Full Version : HOWTO: Reducing boot time in Breezy using InitNG


Pages : [1] 2

temcat
October 22nd, 2005, 07:15 AM
Attention: The latest info in InitNG can be found on https://wiki.ubuntu.com/InitNG.

This HOWTO is outdated. I stopped to maintain it, since I was running Windows exclusively for some time, and then decided I can live with classical init as it is.

Frustrated with the long boot time in Breezy and want to do something about it? Here comes the remedy! Meet InitNG - a new generation init program that is able to reduce your boot time by a third to a half. Below are step-by-step instructions how to do it on your system.

IMPORTANT: InitNG is pretty much work in progress, and not all things may work. Currently it does everything I personally want, but it may not be the case for you - your success depends on the combination of hardware and software you use. Suggestions, fixes, hacks and workarounds offered by people will be incorporated in this HOWTO.

1. Download InitNG version 0.3.3-2 from http://alioth.debian.org/download.php/1230/initng_0.3.3-2_i386.deb

2. Install it:

sudo dpkg -i initng_0.3.3-2_i386.deb

3. Change the content of dbus.i file in /etc/initng/daemon to this:

http://bugzilla.initng.thinktux.net/attachment.cgi?id=69

4. Change the content of hald.i file in /etc/initng/daemon to this:

http://bugzilla.initng.thinktux.net/attachment.cgi?id=70

5. Set up gdm/kdm to load on default runlevel. To do that, run

sudo ng-update add daemon/gdm default

if using Gnome, or

sudo ng-update add daemon/kdm default

if using KDE.

6. Set up coldplug to run on system runlevel (we need this to have working sound - thanks Bitmastro!):

sudo ng-update add system/coldplug system

7. OPTIONAL: Set up various things that you may or may not need.

7.1. Start ADSL modem on boot (when using eciadsl driver)

7.1.1. Create a file called eciadsl.i with the following content:

service system/eciadsl {
need = system/initial system/mountfs system/usb

start {
/usr/local/bin/eciadsl-start
}

stop {
/usr/local/bin/eciadsl-stop
}
}

7.1.2. Put this file in /etc/initng/system directory.

7.1.3. Set ADSL service to start on default runlevel:

sudo ng-update add system/eciadsl default

7.2. Start Jack audio daemon on boot (if you don't know what it is, you most likely don't need it).

7.2.1. Create a file called jackd.i with the following content:

service daemon/jackd {
need = system/initial system/mountfs system/coldplug system/alsasound
daemon = /usr/bin/jackd
daemon_args = -R -d alsa -d hw:0
}

Note that parameters (daemon_args) listed here are only an example - you should set them according to your needs.

7.2.2. Put this file in /etc/initng/daemon directory.

7.2.3. Set Jack daemon to start on default runlevel:

sudo ng-update add daemon/jackd default

7.3. Start wireless connection on boot (thanks Manny C!).

http://ubuntuforums.org/showpost.php?p=441841&postcount=55

This worked for a specific configuration mentioned in the post referenced above. Let me know if it works for you.

7.4. More scripts for setting up other useful things can be found here (thanks Samuel!):

http://forum.initng.thinktux.net/viewforum.php?f=9&sid=1f418ad14fc6157bcf8855c0184409a7

8. Set up GRUB for booting with InitNG. To do that, edit /boot/grub/menu.lst. Find an entry that looks like

title Ubuntu, kernel 2.6.12-9-686
root (hd0,8)
kernel /boot/vmlinuz-2.6.12-9-686 root=/dev/sda9 ro quiet splash
initrd /boot/initrd.img-2.6.12-9-686
savedefault
boot

Your actual entry may look slightly different, but it must be the option that you normally choose to boot into Ubuntu.

Insert an identical entry below. Remove the word 'splash' from the 'kernel' line in the newly created entry and append 'init=/sbin/initng' to that line (without quotes). Replace 'Ubuntu' word in the 'title' line with something like 'Ubuntu (InitNG)'.

9. Reboot and choose 'Ubuntu (InitNG)' in Grub boot menu.

After that, the system should correctly boot, and you should be able to login to Gnome/KDE. In my case the actual boot time reduced by 25 sec (from 65 sec to 40 sec). Your results may vary, depending of your configuration.

If something does not work, you can always boot into your normal configuration - just choose the boot option that you cloned in the Grub menu. Meanwhile, here's some fixes suggested by the kind people in this thread:

* If you have problems with ACPI, frequency scaling etc., try these quick links:

http://ubuntuforums.org/showpost.php?p=434971&postcount=27 (thanks Maecenas!)
http://ubuntuforums.org/showpost.php?p=435518&postcount=30 (thanks Rob2687!)

If you don't need ACPI, you can turn it off altogether:

sudo ng-update delete daemon/acpid default

* To make NVidia modules load (by mounting volatile kernel modules), do as prescribed here:

http://ubuntuforums.org/showpost.php?p=435346&postcount=29 (thanks Meralon!)

Have Fun.

DoeRayMe
October 22nd, 2005, 07:58 AM
I had my adsl modem start up everytime i start my computer before, now its stopped, how do i get that working again? thanks though, its really fast now

temcat
October 22nd, 2005, 08:02 AM
I had my adsl modem start up everytime i start my computer before, now its stopped, how do i get that working again? thanks though, its really fast now

Someone has to create .i file for running this service or adjust the existing /etc/initng/net/net.i file. Maybe I'll do it later for eciadsl.

blakken
October 22nd, 2005, 08:06 AM
thanx very much for the tip ,it's really nice although my internet interface had to be manually started with ifup eth1 command!any idea how to make this little script?
;)

DutchR_PW
October 22nd, 2005, 08:11 AM
This looks great, but I have two little questions:

- Does it still have the splash screen (USplash or whatever it's called)?
- Does it also work in Hoary?

DoeRayMe
October 22nd, 2005, 08:14 AM
Someone has to create .i file for running this service or adjust the existing /etc/initng/net/net.i file. Maybe I'll do it later for eciadsl.

Thanks i would appriciate that, as i use eciadsl

temcat
October 22nd, 2005, 08:15 AM
- Does it still have the splash screen (USplash or whatever it's called)?


I disbled usplash by removing the word 'splash' from 'kernel' line, because it didn't worked (switched to console somewhere in the middle).


- Does it also work in Hoary?


No idea - I have only Breezy :-)

DoeRayMe
October 22nd, 2005, 08:21 AM
Problem, I get this error when i reboot

failed to initialize HAL!

btw, found out its to do with my usb modem being plugged in, hope the eciadsl thing gets sorted soon, not rushing of course

temcat
October 22nd, 2005, 08:23 AM
thanx very much for the tip ,it's really nice although my internet interface had to be manually started with ifup eth1 command!any idea how to make this little script?
;)

1) Look at the content of /etc/initng/net/net.i

2) Read the relevant socuments in /usr/share/initng

3) Edit net.i file

4) Run

sudo ng-update add net/net default

5) Post your net.i file here if you had success!

temcat
October 22nd, 2005, 08:26 AM
Problem, I get this error when i reboot

failed to initialize HAL!


Have you changed the dbus.i and hald.i files as prescribed? Check again, do it if you haven't and run

sudo ng-update add daemon/dbus default
sudo ng-update add daemon/hald default

just in case.

DoeRayMe
October 22nd, 2005, 08:29 AM
I get this when i try to do the hal one

will@ubuntu:~$ sudo ng-update add daemon/hal default
Warning: "daemon/hal" isn't a script or a runlevel, it's being removed from listError: you didn't specify any script


thanks in advance

heimo
October 22nd, 2005, 08:31 AM
Problem, I get this error when i reboot

failed to initialize HAL!

btw, found out its to do with my usb modem being plugged in, hope the eciadsl thing gets sorted soon, not rushing of course

Do as temcat says. I also got this error at first attempt as my copy-paste from forum to text editor broke hald.i lines.

heimo
October 22nd, 2005, 08:33 AM
I get this when i try to do the hal one



thanks in advance

hald

BLTicklemonster
October 22nd, 2005, 08:37 AM
I've sat here with a dull look on my face fighting my inner deamons (daemons?) for a while now. I said I wouldn't do it. But I can't help myself.

Please forgive me.



" I want a fast Ubuntu boot, too!!!"




There. I did it. Sorry.

:rolleyes:

:cool:

DoeRayMe
October 22nd, 2005, 08:37 AM
When i reboot it goes back to the old way, shouldnt it set as default?

BLTicklemonster
October 22nd, 2005, 08:39 AM
Problem, I get this error when i reboot

failed to initialize HAL!

btw, found out its to do with my usb modem being plugged in, hope the eciadsl thing gets sorted soon, not rushing of course


Are you kidding? Do you know how long it took Dave to get HAL not to initialize?

anyway, I found that booting into recovery mode and typing startx does the same thing. I wonder if that's just a bug they'll fix or not. My mouse is usb, and it works fine in recovery mode.

DoeRayMe
October 22nd, 2005, 08:57 AM
Fixed, i commented out the boot process and just have the current one

It now works, just modem that needs sorting out

johannes
October 22nd, 2005, 09:59 AM
Really nice speed. But I couldn't get it working with jackd (audio) in realtime mode so I can't use it.

temcat
October 22nd, 2005, 10:03 AM
Fixed, i commented out the boot process and just have the current one

It now works, just modem that needs sorting out

Please see the updated HOWTO - now eciadsl works, too.

temcat
October 22nd, 2005, 10:04 AM
Really nice speed. But I couldn't get it working with jackd (audio) in realtime mode so I can't use it.

I'll look into it. Meanwhile, what is the command to start and stop jack daemon in realtime mode?

temcat
October 22nd, 2005, 10:30 AM
Really nice speed. But I couldn't get it working with jackd (audio) in realtime mode so I can't use it.

OK, please see update HOWTO - now jack is started at boot time with realtime scheduling.

johannes
October 22nd, 2005, 11:11 AM
Wow, that was fast. :) Now it's working great!

DoeRayMe
October 22nd, 2005, 11:13 AM
thanks alot for the eciadsl part, i really appriciate it

Samuel
October 22nd, 2005, 11:19 AM
i tried this and my system booted super fast... into console mode :(

anyway this is the output when i install it with dpkg

Setting up initng (0.3.3-2) ...
Automatically generating system,runlevel,default.runlevel and up.runlevel
sed: can't read /etc/X11/default-display-manager: No such file or directory
Adding daemon/acpid to default.runlevel
Adding daemon/dbus to default.runlevel
Adding daemon/hald to default.runlevel
Adding daemon/vixie-cron to default.runlevel
Adding net/eth0 to default.runlevel
Adding system/alsasound to default.runlevel
Adding system/laptop-mode to default.runlevel
Adding daemon/syslogd to default.runlevel
Done generating files.


im using the nvidia-glx drivers from apt-get, what do i need to change to beable to use initNG?

DoeRayMe
October 22nd, 2005, 01:00 PM
one more quick question, it has eth0 enabled but when its shutting down, it says its not configured

How can i turn this off?

Rob2687
October 22nd, 2005, 01:08 PM
no more frequency scaling on my laptop with this :(
(piii 1ghz)

Took off about 30 seconds from my boot time though

maecenas
October 22nd, 2005, 01:36 PM
Nice HowTo!

But I think Just turning ACPI off because it throws errors on startup isn't a good solution, especially for laptop users like me.

I had a litle Problem with frequency scaling too.
On my thinkpad the following seems to work:

1. delete cpufreqd from default.runlevel if it exists
# ng-update delete daemon/cpufreqd
2. add powernowd to default.runlevel
# ng-update add daemon/powernowd
3. replace the content of /etc/initng/system/speedstep.i with

service system/speedstep {
need = system/initial system/modules system/mountroot
use = system/static-modules system/coldplug
#depends = system/initial system/modules
start {
modprobe cpufreq-ondemand &> /dev/null
modprobe cpufreq_userspace
modprobe cpufreq_stats
modprobe cpufreq_powersave
modprobe cpufreq_conservative
modprobe speedstep_centrino
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor > /tmp/origgovanor
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
exit 0
}

stop {
echo `cat /tmp/origgovanor` > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
exit 0
}
}

The line

modprobe speedstep_centrino

could vary from system to system.
If doesn't work you can try deleting the line.
Otherwise you have to find out which module controls speedstep on your system an insert it there.

4. replace the content of /etc/initng/daemon/powernowd.i with

service daemon/powernowd {
need = system/initial system/mountfs system/speedstep
#use =
daemon = /usr/sbin/powernowd
daemon_args = "-q"
}

And that should do the trick.

I've got still some problems with ACPI though.
I get those errors on boot time:

FATAL: Error inserting asus_acpi (/lib/modules/2.6.12-9-386/kernel/drivers/acpi/asus_acpi.ko): No such device

FATAL: Error inserting toshiba_acpi (/lib/modules/2.6.12-9-386/kernel/drivers/acpi/toshiba_acpi.ko): No such device

But I don't know if these modules are really needed by my system anyway?
The ibm module gets loaded.
At least I encountered no misbehaviour so far.

joakim2
October 22nd, 2005, 01:54 PM
Certainly shaved startup time... But it doesn't mount the volatile kernel modules dir so nvidia module is not available and GDM fails to start.

meralon
October 22nd, 2005, 04:22 PM
Certainly shaved startup time... But it doesn't mount the volatile kernel modules dir so nvidia module is not available and GDM fails to start.

I have replaced /etc/initng/system/initial.i with the following:

service system/initial {
use = system/readahead
critical
start {
/etc/init.d/mountvirtfs start
/etc/init.d/udev start
/etc/init.d/udev-mtab start
/sbin/lrm-manager --quick
exit 0
}
}

The line /sbin/lrm-manager mounts the volatile-directory.

Rob2687
October 22nd, 2005, 05:30 PM
The line

modprobe speedstep_centrino

could vary from system to system.
If doesn't work you can try deleting the line.
Otherwise you have to find out which module controls speedstep on your system an insert it there.


How could I find out which module to use? My laptop is a PentiumIII-M.

Edit: Figured it out. It's acpi_cpufreq :)

Samuel
October 22nd, 2005, 07:07 PM
I have replaced /etc/initng/system/initial.i with the following:

service system/initial {
use = system/readahead
critical
start {
/etc/init.d/mountvirtfs start
/etc/init.d/udev start
/etc/init.d/udev-mtab start
/sbin/lrm-manager --quick
exit 0
}
}

The line /sbin/lrm-manager mounts the volatile-directory.

worked a treat, thankyou meralon :)
20 seconds to boot from power on to gui, very nice

souled
October 22nd, 2005, 11:15 PM
I followed this howto exactly, but something went horribly wrong. When I boot up, the GDM is loaded with like 16 bit color or something, and it looks all ugly. When I try to log in, I get an error message saying my "session lasted less than 10 seconds, if I didn't log out then there could be an installation problem or I may be out of diskspace. Try logging in with the failsafe session. View details ~/.xsession-errors."

I tried logging in with the failsafe session, but the same message comes up.

When I switch to terminal and cat .xsession-errors, I get some stuff
/etc/gdm/PreSession/Default: Registering your session with wtmp and utmp
/etc/gdm/PreSession/Default: running: /usr/bin/X11/sessreg -a -w /var/log/wtmp - (bunch more stuff)
Then it has a bunch of errors about IceTrans.

_IceTransTransNoListen: unable to find transport: tcp
_IceTransmkdir: ERROR: euid != 0,directory /dev/X will not be created.

And about 10 more lines of _IceTrans errors.

Help please!

EDIT: I didn't see the end part about adding stuff to grub. Will try that now.

Ok I edited the boot stuff and it still happens. Maybe something else is wrong with my system?

Manny C
October 23rd, 2005, 03:06 AM
Great HOWTO! Worked perfectly for me! ACPI and Sound work perfectly. Not sure about the Net config. Will let you know! :)

Great work!

Manny C
October 23rd, 2005, 03:12 AM
1) Look at the content of /etc/initng/net/net.i

2) Read the relevant socuments in /usr/share/initng

3) Edit net.i file

4) Run

sudo ng-update add net/net default
5) Post your net.i file here if you had success!
Step 2 is deficient. No directory under /usr/share/ called initng. Must look under /usr/share/doc/initng.

And wireless doesn't start up automatically. I need to issue the following command after startup to get it working:
sudo ifup eth1
and then it works. Will look at how to get this integrated in one of the .i files in a couple of weeks.

Snakey
October 23rd, 2005, 05:55 AM
After I've applied these changes, I always have to restart the following script to make my printer work:
sudo /etc/init.d/cupsys restart

Samuel
October 23rd, 2005, 11:21 AM
http://forum.initng.thinktux.net/viewforum.php?f=9&sid=1f418ad14fc6157bcf8855c0184409a7

some good scripts here to get various things working

berserker
October 23rd, 2005, 11:44 AM
I've gotta ask. How many times do you reboot your Linux box that you really need to shave 30-40 seconds off the boot time?

"Why does anyone climb a mountain? Because it's there!"

"Incoming missile! Is the linux computer still rebooting? OMG! I knew I should have followed that InitNG thread!"

:p

Snakey
October 23rd, 2005, 12:40 PM
I've gotta ask. How many times do you reboot your Linux box that you really need to shave 30-40 seconds off the boot time?

"Why does anyone climb a mountain? Because it's there!"

"Incoming missile! Is the linux computer still rebooting? OMG! I knew I should have followed that InitNG thread!"

:p
We always want a faster boot! :p LOL
Sometimes it's very handy, when I've turned my pc off to go to bed, but I've forgotten to print some documents, it's faster ;) I managed to get from grub to the login screen in ~15-18 seconds, after logon, it takes ~4-8 sec to load everything; the panel, nautilus, (gaim)...

GeneralZod
October 23rd, 2005, 01:45 PM
I haven't dared try this myself, but I thought I'd chime in and say "Thanks!" for writing up this HOWTO and for sticking around to support it. Nice work! :)

Hopefully, in a few releases time, this will be used by default!

exparrot
October 23rd, 2005, 07:26 PM
I'm going to try and install this after upgrading to Breezy this afternoon, but first a question or two:

1) What is Jackd and is it necessary? I don't see it being used on my current Hoary install even though the binary for it is installed.

2) What is coldplug? How/why is it different to hotplug?

3) Can I leave ACPI enabled? Is it likely to work? I'm on a laptop.


Thanks!

Manny C
October 23rd, 2005, 09:07 PM
I'm going to try and install this after upgrading to Breezy this afternoon, but first a question or two:

1) What is Jackd and is it necessary? I don't see it being used on my current Hoary install even though the binary for it is installed.

2) What is coldplug? How/why is it different to hotplug?

3) Can I leave ACPI enabled? Is it likely to work? I'm on a laptop.


Thanks!

1) Dunno. Didn't need to fiddle with this. Sound works for me.
2) Dunno
3) Left it enabled on my laptop. Suspend to RAM works just as well as it did before INITNG.

evs
October 23rd, 2005, 09:26 PM
I've gotta ask. How many times do you reboot your Linux box that you really need to shave 30-40 seconds off the boot time?

"Why does anyone climb a mountain? Because it's there!"

"Incoming missile! Is the linux computer still rebooting? OMG! I knew I should have followed that InitNG thread!"

:p

I usually boot up several times a day, considering it's a laptop. On a server, or even a workstation, I wouldn't be too concerned, especially since InitNG still needs some work. I can't wait to give this a try on my laptop though.

Manny C
October 24th, 2005, 02:54 AM
I usually boot up several times a day, considering it's a laptop. On a server, or even a workstation, I wouldn't be too concerned, especially since InitNG still needs some work. I can't wait to give this a try on my laptop though.

Why do you need to boot up a laptop several times a day? Is ACPI not working for you?

prasys
October 24th, 2005, 03:13 AM
xparrot

1. Dunno

2. coldplug is mainly used for to detect devices which are not hotplug (a good example of hotplug is USB thumbdrive , they get detected automaticly when you plug it and plug out. Mainly , you need coldplug to detect some devices in your lappie. Keep it on , don't try to disable it

3. Yeah of course you would. It depends , if your BIOS is blacklisted (thank god , there are few) then it should work

skyboy
October 24th, 2005, 04:01 AM
Woo, works like a nice Formula 1 now, thanks.

evs
October 24th, 2005, 09:12 AM
Why do you need to boot up a laptop several times a day? Is ACPI not working for you?

Pretty much. I fixed my DSDT so that I can get my battery status, and hibernate was working out of the box. Suspend to ram would suspend fine, but the screen stayed black after resuming, and when I tried to fix it, I broke hibernate as well. I don't care too much about hibernate because it took almost as long to resume as a fresh boot. But yes, if I could get suspend to work properly then I wouldn't be shutting my laptop down very much, although a faster boot would still be welcome.

sailor420
October 24th, 2005, 12:11 PM
If I install this and it borks itself, would I be able to boot normally using the other Grub option, the one we clone the InitNG one from?

I'd love to try this out, but I just got done with a somewhat hairy dist-upgrade and am a little hesitant to tank my system :)

sailor420
October 24th, 2005, 12:15 PM
And wireless doesn't start up automatically. I need to issue the following command after startup to get it working:
sudo ifup eth1
and then it works. Will look at how to get this integrated in one of the .i files in a couple of weeks.

Is this working now? Wireless is my primary internet connection, so having to issue this everytime on boot is somewhat annoying :(

joakim2
October 24th, 2005, 01:12 PM
Is this working now? Wireless is my primary internet connection, so having to issue this everytime on boot is somewhat annoying :(

I'd tend to say that if you're not a fiddler/tester/adventurous, initng is not for you right now. It takes a little patience getting it the way you want it in its current state.

sailor420
October 24th, 2005, 03:17 PM
I don't mind tinkering; that's one of the things I like most about Linux. I just don't want to make my system unbootable since my Windows install isn't working at the moment :)

temcat
October 24th, 2005, 04:37 PM
The HOWTO is updated! Nothing new basically, just made an overall rewrite and inserted direct links to some helpful posts in this thread.

mathjazz
October 24th, 2005, 07:05 PM
Thanks man, it works great!

Now we only need something similar for GNOME startup ...

temcat
October 25th, 2005, 04:26 AM
Thanks man, it works great!

Now we only need something similar for GNOME startup ...

This is coming soon, too: http://nat.org/2005/october/#Keep-It-Simple-Stupid

BLTicklemonster
October 25th, 2005, 06:40 AM
6 pages... how stable is this now? I'm on my like 6th install of breezy, more of hoary, and I've got what I want out of it finally, except for ripping and burning archival dvds... I don't want to set it to boot faster and loose anything.

Manny C
October 25th, 2005, 09:59 AM
Ok. Got my wireless connection working. I have my IPs dynamically allocated. No fixed IPs. So I modified this (http://forum.initng.thinktux.net/viewtopic.php?t=44&sid=8d08d42ee04d4932cadadbfd2af48069). Create a file /etc/initng/daemon/eth1.i with the following contents
service net/eth1 {
depends = system/initial system/checkroot system/modules
start {
echo "Starting net/eth1 now"
ifup eth1
}
stop {
echo "Stopping net/$NAME now"
ifconfig $NAME down
}
}

Then issue the following command to ensure this script is run on boot up.
sudo ng-update add net/eth1 default

This doesn't bring the connection up after suspending laptop. Will look into this later.

temcat
October 25th, 2005, 10:07 AM
6 pages... how stable is this now? I'm on my like 6th install of breezy, more of hoary, and I've got what I want out of it finally, except for ripping and burning archival dvds... I don't want to set it to boot faster and loose anything.

I wouldn't suggest putting InitNG on "production" machines just yet. You'd better wait for it to enter stable status. Having everything working with no fuss is more important that cutting those 20-30 sec. However, even if you installed it and something went wrong, you can always boot the traditional way - just use your normally chosen option in Grub menu.

temcat
October 25th, 2005, 10:08 AM
Ok. Got my wireless connection working.

Thanks man! I'm updating the HOWTO with this.

crypto178
October 25th, 2005, 01:11 PM
Thanks for the great HOW-TO.

There is just one thing not working for me, inetd doesn't start (I need it to get hotway to work, see http://ubuntuforums.org/showthread.php?t=73763).
I saw there was a script for xinetd on those forums : http://forum.initng.thinktux.net/viewtopic.php?t=98 but I didn't succeed in modifying it to work with inetd. Does anyone know how to make inetd start with initng ?

squibbon
October 26th, 2005, 03:18 AM
hufff, to many steps. can't do i think. any alternatives?

heimo
October 26th, 2005, 03:58 AM
hufff, to many steps. can't do i think. any alternatives?
install InitNGJust one step. ;) ;) ;) If you run into trouble, you can try the original - I think temcats version is very nice, very detailed and pretty much works just because it's so detailed. Other alternative would be to wait until it gets included in the default install of Ubuntu (I believe making boot process faster was goal for Breezy, but didn't get included, not sure about Dapper, after all its main goal is stability).

EDIT: Of course, unless someone packs this into single script / makes a deb package.

mathjazz
October 26th, 2005, 06:20 PM
VMWare stopped working for me. I receive an error message, telling me to make sure that kernel module "vmmon" is loaded.

Any hints?

Heliode
October 27th, 2005, 07:41 PM
Thanks for your very well worded and easy-to-use howto, temcat. I've tried it in a virtual machine first, and it worked perfectly, turning a 53 second boottime into a 38 second one. This encouraged me to try it on my two physical machines (laptop and workstation)

They were both largely successful, but it seems a few modules fail to load. On my laptop, my wireless card isn't loaded at all. (the device isn't initialized, I don't see it in network management or with 'ifconfig -a')

On my workstation, there seems to be a problem with Portmapper. I have a couple of NFS shares in my fstab which I automatically mount at boottime. With InitNG however, they don't. When I try to mount them manually, it takes a really, really long time (like 5 minutes per mount). This led me to conclude a problem with portmap. However, I've added 'portmap' to both 'default' and 'system' runlevels, but in both cases NFS mounts don't seem to mount at boot time.
I also have the problem with VMWare's 'vmmon' kernel module not being loaded, but I believe this to be related to the network card driver on the laptop failing to load (since I had to compile that module manually).
[[Edit: If I do 'sudo /etc/init.d/portmap start' and then do 'mount -a', all my nfs shares are mounted in about three seconds, so the problem is indeed in portmapper not starting]]

Any light you would be able to shed on the situation would be hightly apperciated.

Heliode
October 27th, 2005, 08:33 PM
Ok, I figured out the VMWare part, and made some progress on the other two...

For VMWare:

fist of all, you need to add vmware to the default runlevel with:
sudo ng-update add vmware default
However, there is a path hardcoded in the InitNG config file for VMWare that probably isn't valid, namely the path to the executable 'vmnet-bridge'. To figure out where you have it on your system, open a terminal and type "which vmnet-bridge". For me the path was "/usr/bin/vmnet-bridge".

Now open "/etc/initng/daemon/vmware.i" in your favorite editor. Look for the line that says
exec /opt/vmware/bin/vmnet-bridge /dev/vmnet0 eth0
and replace it with the correct path, which in my example is:
exec /usr/bin/vmnet-bridge /dev/vmnet0 eth0
Also note that if you want vmware to bridge over a device other than eth0, this is the place to change it.

Now reboot, and it should work!

For the laptop wireless interface; it uses the 'rt2500' module, but manually modprobing that after InitNG-bootup doesn't activate the device either, still looking into that.

As for Portmap, the problem seems to be in the '/etc/initng/daemon/portmap.i' file, which says the following:
service daemon/portmap {
need = system/mountroot virtual/networking
start {
[[ -f /etc/conf.d/portmap]] && . /etc/conf.d/portmap
/sbin/portmap ${PORTMAP_OPTS}
# If we don't sleep then applications needing on portmap
# will not successfully connect
sleep 5
}
}

I won't claim to know exactly what this does, but it seems to check if /etc/conf.d/portmap is there, which it isn't. However, even after manually creating this file (and even hashing the check out) portmap stil isn't started. I'd like some help with this from somebody with more experience with this sort of thing than me.

I'll keep you posted ;-)

bradroger
October 28th, 2005, 12:51 AM
Step 6 - I get this error:

brad@bradubuntu:~/Downloads$ sudo ng-update add system/colplug system
Warning: "system/colplug" isn't a script or a runlevel, it's being removed from list
Error: you didn't specify any script

Is there something blatantly obvious I skipped or missed or is this a bug?

bradroger
October 28th, 2005, 12:54 AM
oh sorry...I tried it again and got
Success: added "system/coldplug" to runlevel "system"
I'll try to be a little less trigger happy!!

gluon
October 28th, 2005, 12:58 AM
I really love the speed boost given by InitNG, but I'm having a problem with it. When I boot using InitNG, I cannot use Matlab fully.
In the start-up (starting in console-mode), I get following:

$ matlab
/opt/matlab/bin/util/oscheck.sh: line 134: /lib/libc.so.6: Lupa evätty
??? MATLAB was unable to open a pseudo-tty: No such file or directory [2,1]
The unix() and ! commands will not work in this MATLAB session. Other
commands which depend upon unix() and ! will also fail. Your system may
be running low on resources. If the problem persists after a reboot,
check with your system administrator and confirm that your pty subsystem
is properly configured.

Does anyone have an idea how this could be resolved?

graabein
October 28th, 2005, 06:01 AM
Other alternative would be to wait until it gets included in the default install of Ubuntu (I believe making boot process faster was goal for Breezy, but didn't get included, not sure about Dapper, after all its main goal is stability).

EDIT: Of course, unless someone packs this into single script / makes a deb package.

Oh that would be great. A script is perfect. Hope they put a high priority on snappy boot time in Dapper.

BLTicklemonster
October 28th, 2005, 06:19 AM
http://www.restrainingbolt.com/otherprops/pics/misc/dapperdan.jpg

smootherest linux ever

parpic2002
October 28th, 2005, 06:25 AM
This is my net.i file.



service net/eth0 {
need = system/mountfs system/modules system/hostname system/ifupdown-debian
use = system/static-modules system/coldplug daemon/cardmgr
start = /sbin/ifup
start_args = -a
stop = /sbin/ifdown
stop_args = -a
}

service net/eth1 {
depends = system/initial system/checkroot system/modules
start {
echo "Starting net/eth1 now"
ifconfig eth1 192.168.1.74 netmask 255.255.248.0 broadcast 192.168.1.32
}
stop {
echo "Stopping net/$NAME now"
ifconfig $NAME down
}
}

service net/lo {
# */
need = system/mountfs system/modules system/hostname system/ifupdown-debian
use = system/static-modules system/coldplug
start = /sbin/ifup
start_args = lo
stop = /sbin/ifdown
stop_args = lo
}

service net/* {
# */
need = system/mountfs system/modules system/hostname system/ifupdown-debian
use = system/static-modules system/coldplug daemon/cardmgr
#provide = virtual/networking
start = /sbin/ifup
start_args = $NAME
stop = /sbin/ifdown
stop_args = $NAME
}


Just work ok

snowpalmer
October 28th, 2005, 04:16 PM
I tried to install this on mine. I'm on an amd64 machine so there wasn't a deb but I downloaded the latest source and created a deb by using checkinstall. Everything installed just fine but I get this when it boots.

** "initng_common.c", load_to_active():
08:05:46 -- line:105 FAIL: load_to_active(default): Can't get service!
SEGFAULTED!

Anyone have any dieas? I'm not expert, so I'm pretty stumped. Has anyone successfully used this on a 64 bit system? A comment here (http://triggerit.tr.funpic.de/blog/?p=7) sounds like people are using it on amd64.

snowpalmer
October 28th, 2005, 06:24 PM
Ok. I got it working now. This is what I did.

I downloaded

https://alioth.debian.org/download.php/1226/initng_0.3.3.orig.tar.gz
https://alioth.debian.org/download.php/1224/initng_0.3.3-1.dsc
and
https://alioth.debian.org/download.php/1223/initng_0.3.3-1.diff.gz

Executed

dpkg-source -x initng_0.3.3-1.dsc
cd initng-0.3.3/
dpkg-buildpackage -rfakeroot

That gave me a .deb file to install. Once I uninstalled my previous one and installed this one things came up just fine (except for wireless.. I will have to look at that)

Joshua Hesketh
October 28th, 2005, 08:55 PM
Excellent tutorial!, had nearly no troubles.

The only thing that I am stuck on is getting my fglrx drivers to work. I have an ATI radeon 9600xt and followed this (http://ubuntuforums.org/showthread.php?p=423589) tutorial to install the drivers which used the module-assistant.

I don't know much about loading modules but when I booted in with init.d the drivers worked 100%, but with initNG fglrxinfo displays correct information, glxgears work fine too, but apps like fgl_glxgears and ppracer display FGL errors and try and process the graphics with the CPU and lags.

Any help would be good. Thanks.

XQC
October 29th, 2005, 05:39 AM
Works fine for me, too.

Only thing there's left is that GDM now starts in English and I would prefer German ;)
How can I change this?

parpic2002
October 29th, 2005, 03:28 PM
Only webcam on GYACHE won`t work with initng.

sailor420
October 29th, 2005, 05:09 PM
Installed it, and everything looked to be working except my wireless. I used the script that the one here was adapted off of, since I do use fixed IPs... But no go.

Would I have to specify the SSID/WEP through an iwconfig command in that eth1.i file to make it work?


EDIT: Just tried it, no go. I've got no idea here, folks.

sailor420
October 29th, 2005, 05:21 PM
OK, this might help yall... I don't know what to make of it, but some of yall might...

ifconfig eth1 when running under initd:


eth1 Link encap:Ethernet HWaddr 00:02:8A:78:71:CF
inet addr:192.168.7.63 Bcast:192.168.7.255 Mask:255.255.255.0
inet6 addr: fe80::202:8aff:fe78:71cf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1587 errors:19936 dropped:0 overruns:0 frame:19936
TX packets:1181 errors:0 dropped:0 overruns:0 carrier:0
collisions:388 txqueuelen:1000
RX bytes:1282461 (1.2 MiB) TX bytes:204028 (199.2 KiB)
Interrupt:11 Base address:0x8000


When running under initNG:


eth1 Link encap:UNSPEC HWaddr 00-02-8A-78-71-CF-00-84-00-00-00-00-00-00-00-00
inet addr:192.168.7.63 Bcast:192.168.7.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:2312 Metric:1
RX packets:127 errors:1925 dropped:0 overruns:0 frame:1925
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:5575 (5.4 KiB) TX bytes:0 (0.0 b)
Interrupt:11 Base address:0x8000



Any ideas?


EDIT: Here's my eth1.i file:


service net/eth1 {
depends = system/initial system/checkroot system/modules
start {
echo "Starting net/eth1 now"
ifconfig eth1 192.168.7.63 netmask 255.255.255.0 broadcast 192.168.7.255
}
stop {
echo "Stopping net/$NAME now"
ifconfig $NAME down
}
}

sailor420
October 29th, 2005, 06:04 PM
Hmmm, looks like it was spitting a bunch of errors when loading the eth1.i file, but I couldn't catch them because they flew by so fast... I assume all those messages are logged; anyone know where? I couldn't find them from a cursory glance through /var/log :confused:

berserker
October 29th, 2005, 10:27 PM
I gave this a whirl with the latest deb package (0.3.4-1) and enjoyed a remarkably faster boot.

However, cupsd wouldn't load even after I tried the init script and the biggest problem was that I couldn't get a bash prompt after launching a konsole terminal within KDE (I couldn't type anything in even though my keyboard works).

Also, when trying to launch Kate with kdesu I received a "No SU found" error.

Things that make you go hmmmmm....

Rob2687
October 29th, 2005, 10:34 PM
Booting with this method makes my sound break sometimes. Sometimes there is no sound at all and sometimes everything that uses ALSA plays super fast. Like chipmunks talking kind of fast.

Sound card is an onboard ESS Allegro card in my laptop.

Btw is anybody else getting error messages when they have a terminal window open? I keep seeing this in my terminal windows:

Message from syslogd@localhost at Sat Oct 29 23:18:13 2005 ...
localhost InitNG: "initng_common.c", load_to_active() #105 FAIL:

Message from syslogd@localhost at Sat Oct 29 23:18:13 2005 ...
localhost InitNG: load_to_active(runlevelU): Can't get service!

Message from syslogd@localhost at Sat Oct 29 23:18:13 2005 ...
localhost InitNG: "initng_handler.c", start_new_service_named() #322 FAIL:

Message from syslogd@localhost at Sat Oct 29 23:18:13 2005 ...
localhost InitNG: Unable to load active for service runlevelU

Message from syslogd@localhost at Sat Oct 29 23:18:13 2005 ...
localhost InitNG: "initng_common.c", load_to_active() #105 FAIL:

Message from syslogd@localhost at Sat Oct 29 23:18:13 2005 ...
localhost InitNG: load_to_active(runlevelu): Can't get service!

Message from syslogd@localhost at Sat Oct 29 23:18:13 2005 ...
localhost InitNG: "initng_handler.c", start_new_service_named() #322 FAIL:

Message from syslogd@localhost at Sat Oct 29 23:18:13 2005 ...
localhost InitNG: Unable to load active for service runlevelu

cwf
October 29th, 2005, 11:35 PM
Thanks a lot for the great HOWTO. I need help with setting up InitNG to do one more thing that my normal boot does.

I followed this HOWTO: http://www.ubuntuforums.org/showthread.php?t=42737&highlight=fancontrol

in order quiet down my PC.

What I need to do now is adapt the init.d startup script given in that HOWTO to work with initNG.

I tried to write a script 'daemon/fancontrol' and add it to InitNG but it didn't work. I'm sure one of you experts could write up an initNG script in seconds by looking at that init.d script.

Any help is greatly appreciated. Thanks!

sailor420
October 30th, 2005, 02:14 PM
OK, well I looked some more at other init scripts, and it seemed all the other ones were using "needs" rather than "depends"... Changed that and it fixed some of the errors, but its still not working. Not working as in I can't even get the device up manually once booted. I've gotta be missing some module or other dependancy... Any way of figuring out what? I guess the first step would be finding the log of those error messages...

RubenGonc
October 30th, 2005, 06:53 PM
How can I initialize my speedtouch connection given by this script:

#!/bin/bash
modprobe ppp_generic
modprobe pppoatm
modprobe br2684
count=0
while [[ $count -lt 40 ]]
do
sync=$(dmesg | grep 'ADSL line is up')
if [ ! -z "$sync" ]
then
br2684ctl -b -c 0 -a VP.VC
sleep 3
ifconfig nas0 192.168.0.1 netmask 255.255.255.0 up
sleep 10
pppd call speedtch
exit 0
fi
sleep 1
let "count += 1"
done
echo "The Speedtouch firmware didn't load"

Thanks

sailor420
November 1st, 2005, 04:51 AM
Yikes... This thread kinda dropped off... Anyone?

sailor420
November 6th, 2005, 05:08 AM
*bump*

This thread died pretty suddenly...

Bitmastro
November 6th, 2005, 12:45 PM
Ok... let's bring some instability :-)

There is a new version out.., you can grab it here
http://alioth.debian.org/download.php/1245/initng_0.3.5-1_i386.deb

but, watch out.. it gave me some trouble (i.e. the system won't boot at first)
so here's what I've done..
(this will remove all your previous initng scripts)

boot with the old init
in a console type: sudo apt-get remove --purge initng
install the new version with: sudo dpkg -i initng_0.3.5-1_i386.deb


now edit (with root privileges) /etd/initng/daemon/dbus.i
to have this

daemon daemon/dbus {
need = system/initial system/mountfs system/bootmisc

pid_file = /var/run/dbus/pid
daemon {
DAEMON=/usr/bin/dbus-daemon
NAME=dbus
DAEMONUSER=messagebus
PIDDIR=/var/run/dbus
PIDFILE=$PIDDIR/pid
DESC="system message bus"

if [ -e /etc/default/dbus ]; then
. /etc/default/dbus
fi

if [ ! -d $PIDDIR ]; then
mkdir -p $PIDDIR
chown $DAEMONUSER $PIDDIR
chgrp $DAEMONUSER $PIDDIR
fi
if [ -e $PIDFILE ]; then
PIDDIR=/proc/$(cat $PIDFILE)
if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then
echo "$DESC already started; not starting."
else
echo "Removing stale PID file $PIDFILE."
rm -f $PIDFILE
fi
fi
echo -n "Starting $DESC: "
$DAEMON --system $PARAMS
echo "$NAME."
}
}


add hald to the default runlevel
at your discretion add readahead (it should load some files from the hd to the ram, to have a faster access... in my case it added ~3 sec to the startup process... but who knows :-) )
you try to cut down times installing mingetty ("sudo apt-get install mingetty") instead of getty (it should be a little faster), then remove getty from the default runlevel and replace it with mingetty
for the same reason install dash (a lighter bash) with "sudo apt-get install dash"
edit the file /etc/initng/daemon/instant-gdm.i and change the path from /usr/bin/gdm to /usr/sbin/gdm

#To get this working, remove consolefont from system.runlevel
#This is just a test (for now)
#make this a plugin, make it hold all services except from what we need (and what that needs) and sleep 2 seconds after starting gdm. Should make it start FAST.
#we can use /proc/bus/pci (lspci) to find out which modules we need to load.
#fix gdm? :p, it's sloooow.
daemon daemon/instant-gdm {
need = system/initial system/mountfs system/hostname
#do we need system/modules?
nice = -4;
daemon {
echo "STARTING INSTANT-GDM"
modprobe mousedev 2>&1 >/dev/null
modprobe nvidia 2>&1 >/dev/null
modprobe fglrx 2>&1 >/dev/null
if [ -e /sys/class/input/mice/dev ]; then
mkdir -p /dev/input
mknod /dev/input/mice c 13 63 &>/dev/null
fi
echo "STARTING INSTANT-GDM-DAEMON"
exec /usr/sbin/gdm -nodaemon
}
}

then cd to /lib/modules/your kernel version/kernel/drivers/acpi
and rename (again, you must have root privileges) the modules you don't use to module_name.not, in this way the acpi script won't load them and show the error "FATAL: Error inserting blah, blah" at boot time (this is only a cosmetic change)

here's my dafault runlevel

system
daemon/acpid
daemon/dbus
daemon/vixie-cron
net/eth0
system/alsasound
system/speedstep
system/laptop-mode
daemon/syslogd
daemon/klogd
system/readahead
daemon/mingetty
daemon/hald
daemon/instant-gdm


btw... if you need something particular.. you can try to load it from the old init.d...
make a file in /etc/initng/system/
and call it, for example myscript.i

service system/myscript {
#add all the things that you need, for example net/eth0 or system/modules or whatever
need = system/initial system/mountfs


start {
#call you old script
/etc/init.d/oldscript start
}

stop {
/etc/init.d/oldscript stop
}
}

and add it to your runlever

I hope i didn't forget anything... :rolleyes:
bye :-)

telmo
November 6th, 2005, 07:13 PM
I've got still some problems with ACPI though.
I get those errors on boot time:

FATAL: Error inserting asus_acpi (/lib/modules/2.6.12-9-386/kernel/drivers/acpi/asus_acpi.ko): No such device

FATAL: Error inserting toshiba_acpi (/lib/modules/2.6.12-9-386/kernel/drivers/acpi/toshiba_acpi.ko): No such device

But I don't know if these modules are really needed by my system anyway?
The ibm module gets loaded.
At least I encountered no misbehaviour so far.

Neither have i, but i would like to remove those errors. I have an ibm and the module is loaded alright, but i just hate errors... And it would increase mu boot speed about a nano second... :D

Ideas anyone?

EDIT: GOT IT! Thax for this last post. I should of read all the posts. Dumb me!

Trigger|Debian
November 7th, 2005, 06:09 PM
Hi guys!

The alioth packages are created by me. It's nice to see that you are quite happy, but I have to mention something: If you write new scripts please send them to the Initng mailinglist (initng@initng.thinktux.net) and Initng will ship these scripts with the next release.
If you find bugs, report them on http://bugzilla.initng.thinktux.net and we will try to fix the bug upstream.
If you want to talk to us, come to #initng on freenode.
If you have a problem with the Debian package (not with Initng) you can drop me a mail if you want (but ask here first ;) ). You'll find my address on the alioth site.
You can drop me a comment in my blog anyway, if you want...

Bye
Trigger

PS: I will release a package for 0.4.0 tonight.

trinaryouroboros
November 8th, 2005, 03:32 PM
Installed Dapper Drake, tried InitNG 4.0 - Segfaulted.

InitNG does not work well with dragons...

On the brighter side of things, since Dapper I've had an increase in boot time. It takes roughly 12 seconds to boot! Then again I'm using AMD64.

Bitmastro
November 9th, 2005, 05:20 AM
Well, I'm using drake, and I've got the 0.4.0-1 version from alioth... and everything is running fine (some trouble in shutdown, but nothing critical) but I'm on x86, so maybe that's the problem... (I had some trouble with segmentation fault too, at first)

cerberos
November 9th, 2005, 08:02 AM
Ok I think I understand how to edit the config files for this, but I can't work out which extra dependency is needed to fix things. My eth1 is not being brought up properly at the moment, requiring a:
sudo ifup eth1
after boot to get me on the net properly. Can anyone suggest how I can work out what I need to add to the eth dependencies so that it will load correctly first time?

Relevant info:
eth0 is onboard network on nforce mobo
eth1 is add in intel card as the onboard tends to overheat during summer.

Bitmastro
November 9th, 2005, 08:17 AM
try this
sudo ng-update add net/eth1
I hope it works.
bye!

cerberos
November 9th, 2005, 08:21 AM
Ahh, thats how that * in the net.i file works, thats a pretty neat way to do things.

gonna reboot right now

opera118
November 9th, 2005, 09:30 PM
I've gotta ask. How many times do you reboot your Linux box that you really need to shave 30-40 seconds off the boot time?

"Why does anyone climb a mountain? Because it's there!"

"Incoming missile! Is the linux computer still rebooting? OMG! I knew I should have followed that InitNG thread!"

:p

I'm not alone to getting tired of these twisted ideas that just because Linux is somewhat stable (or rather Was stable), then boot time is not an issue.

There are those, like me, who actually turn off the computer while not using it (sleeping is one good reason), to save energy and money. Open your eyes. 24/7 usage was leet 10 years ago.

But the fact is that a new init system can fix systematic problems that we've had for years now, by that, initng is truly one giant step ahead. I'm quite susprised no one has replaced the old init long ago.

To me, this is easily a nominee for lpoty - linux project of the year ;)

O

berserker
November 9th, 2005, 10:12 PM
Open your eyes.

Lighten up. It was a joke.

I'm quite susprised no one has replaced the old init long ago.

Good point. I tried BeOS about five or six years ago. AMAZING bootup time!

Benjamin_Lebsanft
November 10th, 2005, 12:27 AM
Doesn't seem to work on amd64. I tried everything from compiling 0.3.3 0.3.5 and even 0.4.0. They all segfault. The deb magic posted some pages before doesn't work either. Is there something I do wrong or does initNG simply not work on my platform ?

Edit: Got it working, but reboot causes my BIOS to stop booting again without pushing the reset button.

sailor420
November 10th, 2005, 10:47 AM
Should all of the previous scripts and tweaks from the tutorial here still work?

UbuWu
November 10th, 2005, 07:25 PM
You can see the difference by installing
http://people.ubuntu.com/~scott/packages/bootchart_0.8-0ubuntu1_all.deb it will create a png in /var/log/bootchart with all boot details.

Benjamin_Lebsanft
November 11th, 2005, 12:10 AM
I get the following error on my desktop when shutting down:

shutdown: timeout opening/writing control channel /dev/initctl
init: timeout opening/writing control channel /dev/initctl

Jingo
November 12th, 2005, 07:04 AM
I have been using version 3.3 , but now installed version 4.0.

Now all my partitions gets mounted on boot. Normally my Windows partitions doesn't get mounted but show up in Nautilus. They don't show up in Nautilus but are already mounted... don't get it. I don't want them mounted!!!

Where should I look?

/Jingo

domino
November 17th, 2005, 02:09 AM
Just wanted to say thanks to this script, I was able to use it as a "Safe Mode" GUI for Ubuntu. I fallowed a how-to that didn't quite turn out the way I had planned. I couldn't log in gnome either in root or user mode. Something with the runlevels. Anyway, I booted InitNG and was able to repare the problem. It's just too bad that I don't have enough time to get all my hardware and 3rd party apps to work with this how-to.

Thanks

bekamyn
November 17th, 2005, 08:29 AM
Thank you.

Panasonic Toughbook CF-45
266Mhz
160MB RAM


From Grub to Login
Without InitNG 1:10
with InitNG 0:48

There's a newer version out that seems to work much better. It's available through SVN


Get the latest version
svn checkout https://svn.initng.thinktux.net/initng

NOTE:
Due to a bug in the 0.4.2 release tarball, it might be necessary to run
./autogen.sh before you run ./configure.
./configure is atomatically invoced by ./autogen.sh, but if you want to pass
additional oprions to configure [eg --with-splash], you need to run configure again.
To run autogen.sh, you need to have automake, autoconf, and libtool installed.


To get it working on my laptop I had to:
ng-update del daemon/acpid <-- Remove acpi
edit daemon/hald.i and comment out
# use = daemon/acpid

Code:

#nano /etc/initng/system/pcmcia.i append to the "need = " system/coldplug


Make Pcmcia and Cardmgr play nice.

ng-update add system/pcmcia system
ng-update add daemon/cardmgr default
ng-update add net/net default

foxy123
November 17th, 2005, 03:15 PM
tried to install from svn and got an error:

$ sudo dpkg -i initng_0.42-1_i386.deb
Selecting previously deselected package initng.
(Reading database ... 127505 files and directories currently installed.)
Unpacking initng (from initng_0.42-1_i386.deb) ...
dpkg: error processing initng_0.42-1_i386.deb (--install):
trying to overwrite `/etc/hotplug/net.agent', which is also in package hotplug
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
initng_0.42-1_i386.deb


any idea what this net.agent is?

Manny C
November 18th, 2005, 06:56 AM
New version (http://alioth.debian.org/project/shownotes.php?group_id=30760&release_id=628) of InitNG out. Trying it out now. Here are the changes that need to be made with your initial post temcat:

Point 1: New link location here (http://alioth.debian.org/download.php/1251/initng_0.4.0-1_i386.deb).
Point 2: Update with this:
sudo dpkg -i initng_0.4.0-1_i386.deb
Point 3: Not needed anymore
Point 4: Should stay.
Point 5: Kdm already setup (step unneeded)
Point 6: Coldplug already setup (step unneeded)
Point 7: Only checked 7.3: Still needed.
Point 8: Still required.
Point 9: Still the same.

Can confirm that this worked.

cerberos
November 19th, 2005, 06:37 AM
so does anyone know how to use initNG and not cause the loading of DRI to fail with the FGLRX drivers?

Trigger|Debian
November 19th, 2005, 08:15 AM
so does anyone know how to use initNG and not cause the loading of DRI to fail with the FGLRX drivers?
Hehe, I'm interested in this issue, too. Are there more people with this problem?
On my Debian box everything is fine.

BTW: I'm working on the packages for 0.4.4 now :)

cerberos
November 19th, 2005, 04:29 PM
I've been trying version 0.4.0-1 as described just above to try and see if that could be some chance fix the driver issue and I'm getting broken HAL message, and yes my hald.i looks like it should from the howto.

curtis
November 19th, 2005, 05:40 PM
I get the same error message with HAL as well...
That is with the newest version 0.4.4
I did try the hald.i and dbus.i files you had on page 1.
Both failed with some sort of syntax error.
My guess is the new version is slightly different with the .i files.

Trigger|Debian
November 19th, 2005, 06:09 PM
Ok guys, 0.4.4-2 is out - try this one. Maybe you should read my blog entry before installing: http://triggerit.tr.funpic.de/blog/?p=28
Dbus should now start Hal automatically (0.4.4-1 didn't do it) - please forgett the hald.i script and remove it from your runlevels.
You slightly need to modify dbus.i. Open it and replace "DAEMON=/usr/bin/dbus-daemon-1" with "DAEMON=/usr/bin/dbus-daemon".
If you have problems with the nVidia/fglrx/... module add the following at the end of system/initial.i: "/sbin/lrm-manager --quick"
Please tell me if my proposed fixes work - I'm on Debian Sid and not Ubuntu.

If you have any other problems: Tell me here.
If you have .i files which are not shipped by the package please mail them to mailinglistenATonline.de. I will add them upstream.

curtis
November 19th, 2005, 07:06 PM
I did install the latest one though, 0.4.4-2
I'll see if I can get HAL to work.

Bitmastro
November 19th, 2005, 07:07 PM
in gdm.i and instant-gdm.i the path should be /usr/sbin/gdm instead of /usr/bin/gdm. in laptop-mode.i I put /usr/sbin/laptop-mode start instead of laptop_mode. hald seems to be running.
bye

curtis
November 20th, 2005, 05:32 AM
in gdm.i and instant-gdm.i the path should be /usr/sbin/gdm instead of /usr/bin/gdm. in laptop-mode.i I put /usr/sbin/laptop-mode start instead of laptop_mode. hald seems to be running.
bye
That is what I needed to do...
Still can't get hald to work though.

Trigger|Debian
November 20th, 2005, 05:34 AM
in gdm.i and instant-gdm.i the path should be /usr/sbin/gdm instead of /usr/bin/gdm. in laptop-mode.i I put /usr/sbin/laptop-mode start instead of laptop_mode.
Gr, why can't Ubuntu use the Debian paths? I'll investigate if I can find a solution for this.

hald seems to be running.

:)

That is what I needed to do...
Still can't get hald to work though.
Are you sure you have the latest dbus.i installed?
It should contain these lines, which start hal:
if [ -d $EVENTDIR ]; then
run-parts --arg=start $EVENTDIR
fi

curtis
November 20th, 2005, 06:23 AM
I fixed it,
Issue was in dbus.i

Needed to turn:

DAEMON=/usr/bin/dbus-daemon-1
NAME=dbus-1


Into:


DAEMON=/usr/bin/dbus-daemon
NAME=dbus


Works fine now.

Trigger|Debian
November 20th, 2005, 06:36 AM
Hehe, http://www.ubuntuforums.org/showpost.php?p=505443&postcount=108 mentions this ;)
Good to see it working :)

I think you need to change the paths in
if [ -e /etc/default/dbus-1 ]; then
. /etc/default/dbus-1
fi
too if you want your settings to be sourced.

curtis
November 20th, 2005, 06:45 AM
Hehe, http://www.ubuntuforums.org/showpost.php?p=505443&postcount=108 mentions this ;)
Good to see it working :)
Yea...
I do remember seeing that post now that you have mentioned it again.

berserker
November 20th, 2005, 10:32 AM
After tweaking the dbus and adding the cupsd and samba scripts to the default runlevel, initng is working great.

I think it's almost ready for prime time.

It decreased my boot time from 72 to 42 seconds.

Great work, guys!

Benjamin_Lebsanft
November 20th, 2005, 11:19 AM
I think it's almost ready for prime time.
I'll second that. Would make more people trying ubuntu the first time say "wow that's fast". As boot time is one of the biggest complaint my windows using friends have this would be great.

foxy123
November 20th, 2005, 01:31 PM
thanks a lot for the How-To and a new version of initng. I have finanlly set it up on my laptop. I am not sure that the gain is significant (from 55 sec to 48 sec), but at least it is something. Hopefully, the boot time will eventually decrease, though I doubt if we ever catch up with Window, which is not obviously the aim.

cerberos
November 21st, 2005, 02:54 AM
0.4.4-2 is all good, pre-emtivly did all the mods suggested in the last few days, and everything worked nice (after adding gdm & my other network cards to the run level)
In fact everything is working better than it was under 3.3-2, as now the FGLRX drivers are working :)

tuke81
November 22nd, 2005, 04:26 PM
great how to thanks. It really boost up my boot time :D .

I had little script that make my mice working smoothly. I get it here:
http://ubuntuforums.org/showthread.php?t=4357
:confused: :( :mad: :???:
So when I get this finally boot, mine script was gone and mice was veryvery sticky. But I thinked that it cant be so hard to make that script work again. So I did my best and get it working by adding few lines to /etc/initng/system/bootmisc.i:

#!/bin/sh
echo "Tunning Logitech mouse..."
lmctl -8 --sms

at the end before lines wait and exit 0, and vóila it works as smoothly as before. :D :cool:

sailor420
November 23rd, 2005, 04:12 AM
I think it's almost ready for prime time.

I'm not sure about that, but it's definitely an incredible piece of software, and I've been very impressed with the speed of development. It's still probably a year or more away from being able to be included in distros, though...

Trigger|Debian
November 23rd, 2005, 09:25 AM
Doesn't seem to work on amd64. I tried everything from compiling 0.3.3 0.3.5 and even 0.4.0. They all segfault. The deb magic posted some pages before doesn't work either. Is there something I do wrong or does initNG simply not work on my platform ?

Edit: Got it working, but reboot causes my BIOS to stop booting again without pushing the reset button.
Now I got a package for AMD64 on Alioth - maybe you want to test it.
If it doesn't work and you want the problem to be solved open a bug on http://bugzilla.initng.thinktux.net

sailor420
November 25th, 2005, 07:53 AM
Anyone had any luck getting the newest version, 0.4.4-2 running? It's hanging on me, just before starting GDM...

Edit: ngc -s revealed that system/laptop-mode had failed to start... I don't really know where to go from here though... Anyone have any ideas?

berserker
November 25th, 2005, 08:26 AM
Anyone had any luck getting the newest version, 0.4.4-2 running? It's hanging on me, just before starting GDM...

Did you try the fix below?

in gdm.i and instant-gdm.i the path should be /usr/sbin/gdm instead of /usr/bin/gdm. in laptop-mode.i I put /usr/sbin/laptop-mode start instead of laptop_mode. hald seems to be running.
bye

sailor420
November 25th, 2005, 01:38 PM
Did you try the fix below?

Just tried that, and it fixed the hang with laptop-mode... Now everything seems to be started, but its still hanging. Oddly enough, I can get to TTY2-6, but the first one just hangs there after everything is done--no prompt, no "Runlevel default up in X seconds", nothing. :(

JimmyJazz
November 25th, 2005, 06:21 PM
honesty, WOW this is great very good work I'm loving my new boot time this marks a heavy blow to any thoughts I was having of ever going back to windows.

JimmyJazz
November 25th, 2005, 06:25 PM
also is it me or are shutdown times much faster as well

Trigger|Debian
November 25th, 2005, 07:15 PM
Just tried that, and it fixed the hang with laptop-mode... Now everything seems to be started, but its still hanging. Oddly enough, I can get to TTY2-6, but the first one just hangs there after everything is done--no prompt, no "Runlevel default up in X seconds", nothing. :(
You will never get a login on tty1 per default - but if ou have no "Runlevel default up in X seconds" something is wrong.
Which service fails? Login on tty2 and have a look at "ngc -s".

also is it me or are shutdown times much faster as well
For sure they are - Initng stops services parallel if possible. SysVinit doesn't.

jcmkk3
November 26th, 2005, 01:47 AM
This is coming soon, too: http://nat.org/2005/october/#Keep-It-Simple-Stupid

I was wondering if you were meaning that you were working on implementing Nat's idea, or that it was just generally coming soon to gnome? Of course it's easy enough to use that little script to log into gnome, the problem is logging out. Anyone know how to get gnome to log out properly when starting with Nat's script? It would be great to get this thing working right because it makes things just that much speedier.

sailor420
November 26th, 2005, 04:47 AM
You will never get a login on tty1 per default - but if ou have no "Runlevel default up in X seconds" something is wrong.
Which service fails? Login on tty2 and have a look at "ngc -s".

Yes, but tty1 should be launching GDM, correct? It just hangs there. And I forgot to add to the previous post, I did just what you suggested and checked ngc -s, and didn't see anything that had failed to start.

EDIT:

OK, I was stupid and forgot to add GDM to the startup, which is why it wasnt starting. I did that, and it worked fine. Still lots of errors (CPU frequency scaling, HAL, and wireless not working), but I'll play with those a bit later and see what I can get going.

Trigger|Debian
November 26th, 2005, 07:14 AM
Don't forget to edit daemon/dbus.i as proposed above to get dbus/hal working.

foxy123
November 26th, 2005, 07:16 AM
what about splash? will it work in initng?

sailor420
November 26th, 2005, 09:06 AM
Don't forget to edit daemon/dbus.i as proposed above to get dbus/hal working.

Got it, that fixed the HAL error.

So, problems remaining:

1) CPU Scaling. I did the fix mentioned in the HOWTO, and it now works, but is throwing all sorts of errors at the start and adding about 8-10 seconds to the boot time as it times out. Any ideas? Has anyone gotten CPU scaling to work on 4.4?
2) Wireless. Eth1 is my primary connection (wireless), and is static. I setup the eth1.i file as it was on the Gentoo forums (linked to in the post about setting up eth1 for DHCP), but it won't work. It's configured on boot, and when I open the network config tool, everything is as it should be (SSID, WEP key, IP address, gateway, DNS, etc), but it's still not working. It's seeing the access point, but won't connect despite my tinkering. I also made sure that eth1 is set as the default gateway device, to no avail. Any ideas?

foxy123
November 26th, 2005, 09:17 AM
Scaling and wi-fi work fine for me.

sailor420
November 26th, 2005, 10:04 AM
Scaling and wi-fi work fine for me.

Is wifi your primary connection? Is it static IP or DHCP? What did you do to get scaling working?

foxy123
November 26th, 2005, 10:38 AM
Is wifi your primary connection? Is it static IP or DHCP? What did you do to get scaling working?
no, wi-fi is not my primary connection, though I use it quite often when I need to work downstairs) and it uses DHCP.

I just edited the script from the link in the how-to.
That's my wlan0.i
service net/wlan0 {
depends = system/initial system/checkroot system/modules
start {
echo "Starting net/wlan0 now"
ifup wlan0
}
stop {
echo "Stopping net/$NAME now"
ifconfig $NAME down
}
}


oh, for scaling I followed another lonk from HOW-TO, but add
modprobe acpi_cpufreq

instead
modprobe speedstep_centrino

sailor420
November 26th, 2005, 01:43 PM
no, wi-fi is not my primary connection, though I use it quite often when I need to work downstairs) and it uses DHCP.

Hmm... That's exactly what I have, except for the wifi script being set to my connection and my using speedstep_centrino because that's what my machine uses... :( Back to tinkering...

sailor420
November 26th, 2005, 01:58 PM
An ifconfig eth1 while in an InitNG boot is returning this:


eth1 Link encap:UNSPEC HWaddr 00-02-8A-78-71-CF-00-00-00-00-00-00-00-00-00-00
inet addr:192.168.7.63 Bcast:192.168.7.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:2312 Metric:1
RX packets:153 errors:1975 dropped:0 overruns:0 frame:1975
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:9753 (9.5 KiB) TX bytes:0 (0.0 b)
Interrupt:11 Base address:0x8000


Link encap should be Ethernet and the HW Address clearly shouldn't have all those extra zeroes on the end... Any idea whats going on?

tariqf
November 27th, 2005, 06:30 AM
Hi I've gone through this howto and everything works fine on my thinkpad r50e except I get the following error on boot;

localhost daemon/hald: /dev/mem: Permission denied

Any ideas what I can do?

rogeriovinhal
November 27th, 2005, 09:03 AM
I managed to fix things and get everything to work fine, but at shutdown I get this error:
Nov 27 11:47:10 localhost InitNG: "initng_kill_handler.c", handle_killed_daemon() #157 FAIL: daemon daemon/klogd, Returned with exit 1.

I also made splash work with InitNG, but the progress bar remains empty until the end.
As there is a percentage shown by InitNG, I think there may be a way to syncronize that with splash status bar. But how?

EDIT I am using 0.4.4-2

foxy123
November 27th, 2005, 09:07 AM
I also made splash work with InitNG, but the progress bar remains empty until the end.
As there is a percentage shown by InitNG, I think there may be a way to syncronize that with splash status bar.
hey, please keep us posted about your progress with splash, I am quite interested in this as well. BTW, how did you manage to make it work at all?

Trigger|Debian
November 27th, 2005, 10:15 AM
Maybe you can get the splash working maybe not. Someone wrote a usplash plugin for Initng, but I don't know if it works.
Do the following: Get the sources of the package, edit debian/rules - configure must be run with --with-usplash, build the package with dpkg-buildpackage or whatever, add system/usplash to system.runlevel.

Tails
November 27th, 2005, 10:31 AM
in laptop-mode.i I put /usr/sbin/laptop-mode start instead of laptop_mode. hald seems to be running.

what line I should put the "start" in??? cos, I dun see I fit that in to the script...


# description: Starts and stops "laptop-mode" - tweaks system behavior
# to extend battery life.
#
# config: /etc/laptop-mode/laptop-mode.conf

service system/laptop-mode {
need = system/initial system/mountfs
start {
/usr/bin/touch /var/run/laptop-mode-enabled

# Run it with "force" so that syslog.conf and hdparm settings
# are set correctly at system bootup.
if [ -e /usr/sbin/laptop_mode ]; then
/usr/sbin/laptop_mode auto force > /dev/null
else
/bin/echo "/usr/sbin/laptop_mode not found!"
exit 1
fi
exit 0
}
stop {
rm -f /var/run/laptop-mode-enabled
if ! ( /usr/sbin/laptop_mode stop > /dev/null ) ; then
exit 1
fi

exit 0
}

}

Trigger|Debian
November 27th, 2005, 10:33 AM
Replace every laptop_mode with laptop-mode and you'll be fine.

rogeriovinhal
November 27th, 2005, 01:36 PM
hey, please keep us posted about your progress with splash, I am quite interested in this as well. BTW, how did you manage to make it work at all?

Just eliminate all the "FATAL" warnings in bootup (you can see them in /var/logs/syslog) and put splash in grub. That should work without the progress bar.

It used to go back to verbose mode because of the errors, if there aren't any, it shouldn't.

benplaut
November 27th, 2005, 02:22 PM
acpi is broken, and ath0 wifi won't configure at boot (only ethX :( ), but for 13second boot, this is worth it!!!

souled
November 27th, 2005, 07:08 PM
Ok I need a little help with some scripts. I want to run privoxy and tor. The script for privoxy is
service daemon/privoxy {
need = system/initial system/localmount net/lo
use = net/eth0
daemon = /usr/sbin/privoxy
daemon_args = "/etc/privoxy/config"
pid_file = /var/run/privoxy.pid
}



And my script for tor is
service daemon/tor {
need = system/mountfs net/lo virtual/networking daemon/privoxy
daemon = /usr/sbin/tor
daemon_args = --chuid tor
pid_file = /var/run/tor/tor.pid
HOME=/var/lib/tor
}


When I start up, I can see some errors about privoxy and tor (but it goes by too fast). It says something about stuff not being found; I just know that they aren't being started. I added daemon/privoxy and daemon/tor to the default.runlevel which is what I'm supposed to do, right? Can anyone help me out?

alvinblank
November 27th, 2005, 08:29 PM
If I wanted to remove InitNG, I just remove the deb packages and leave everything as it it? or do I need to change the files that were edited pior to InitNG?

ltmon
November 27th, 2005, 09:39 PM
If I wanted to remove InitNG, I just remove the deb packages and leave everything as it it? or do I need to change the files that were edited pior to InitNG?

If you want to stop using initng all you have to do is revert your /boot/grub/menu.lst entry to what it was previously.

If you really need to save the disk space (and initng doesn't take up much at all) just remove the package.

L.

benplaut
November 27th, 2005, 10:20 PM
how do i get nvram to load at startup? messing up ThinkpadButtons

souled
November 28th, 2005, 01:10 AM
Ok, I discovered the ngc command. When I try sudo ngc -u daemon/tor, I get this output Message from syslogd@localhost at Sun Nov 27 21:41:26 2005 ...
localhost InitNG: "initng_i_parser.c", parse_opt() #749 FAIL: parse_opt(daemon/tor): line: "daemon = /usr/sbin/tor"!

Message from syslogd@localhost at Sun Nov 27 21:41:26 2005 ...
localhost InitNG: "initng_i_parser.c", parse_opt() #752 FAIL: sleeping 2 seconds......

Message from syslogd@localhost at Sun Nov 27 21:41:28 2005 ...
localhost InitNG: "initng_i_parser.c", parse_file() #256 FAIL: PARSE ERROR parse_file(daemon/tor): sleeping 2 seconds, then ABORT......
Got an response from initng, version: 0.4.4
Starting service:
Failed to start service, daemon/tor (NOT_FOUND)
Command u, daemon/tor - Bad result!


The output is basically the same for privoxy. WHat do these errors mean?

foxy123
November 28th, 2005, 04:39 AM
Maybe you can get the splash working maybe not. Someone wrote a usplash plugin for Initng, but I don't know if it works.
Do the following: Get the sources of the package, edit debian/rules - configure must be run with --with-usplash, build the package with dpkg-buildpackage or whatever, add system/usplash to system.runlevel.
compiling and installing with checkinstall gives me the same error
dpkg: error processing initng_0.44-1_i386.deb (--install):
trying to overwrite `/etc/hotplug/net.agent', which is also in package hotplug
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:

I wonder what it means?

Anyway splash works fine (apart from progress bar) with 0.44 deb. I guess it is already compiled with usplash.

Trigger|Debian
November 28th, 2005, 07:45 AM
I wonder what it means?

Anyway splash works fine (apart from progress bar) with 0.44 deb. I guess it is already compiled with usplash.
You should download the sources of the Debian packages and you won't have these problems. It is not compiled with --usplash. That's what you need to change.

foxy123
November 28th, 2005, 07:51 AM
You should download the sources of the Debian packages and you won't have these problems. It is not compiled with --usplash. That's what you need to change.
where can I find it? All I see are either source without deb-config or precompiled debs.

Trigger|Debian
November 28th, 2005, 08:23 AM
On Alioth - *.dsc *.diff and *.orig.tar.gz are your friends.

foxy123
November 28th, 2005, 10:27 AM
On Alioth - *.dsc *.diff and *.orig.tar.gz are your friends.
i really do not know what to do with them. Are you planning to make next version with usplash enebled?

Trigger|Debian
November 28th, 2005, 11:14 AM
Ok, so forgett it.
If it has no disatvantages I will build it with usplash enabled - but I think it should be no problem.

EDIT: 0.4.6 is out - I hope I'll buildthe package soon. Have very less time ATM.

Benjamin_Lebsanft
November 29th, 2005, 08:32 AM
Now I got a package for AMD64 on Alioth - maybe you want to test it.
If it doesn't work and you want the problem to be solved open a bug on http://bugzilla.initng.thinktux.net
working fine, thanks! Although I managed to compile it somehow on my old ubuntu version ^^

qaqa
November 30th, 2005, 11:03 AM
I followed the directions for InitNG - it shaves off more than 10 secs off my startup time!!

I have a strange problem though :
Each time I start a console (konsole, gnome-terminal or even xterm) , I get an error message "Unable to launch child process". KDE su complains "the program su is not found" "Please check your PATH".
In KDM/GDM, if I select the "failsafe terminal" option, it immediately exits back to KDM/GDM..
So, I'm basically unable to get the command line!!

Has anyone else faced the same problems?

nim278
November 30th, 2005, 11:37 AM
Are you able to get a command line via CTRL+ALT+F1 ?

qaqa
November 30th, 2005, 02:05 PM
Are you able to get a command line via CTRL+ALT+F1 ?

Nope, no command line..infact, ctrl-alt-F1 doesnt do anything for me - not even an error message..

foxy123
November 30th, 2005, 06:59 PM
found a way to recompile it with usplash and progress bar works now... in a way..

Triton
December 2nd, 2005, 10:11 AM
NE1 have or could build me a script to launch apache2. :D

curtis
December 3rd, 2005, 01:55 PM
NE1 have or could build me a script to launch apache2. :D
apache2 is built in...
ng-update add apache2 default

lucas
December 3rd, 2005, 02:30 PM
apache2 is built in...
ng-update add apache2 default
Doesn't work for me though, i have to start it manually later, aswell mpdscribble (i downloaded a script for it from the forums)

reet
December 3rd, 2005, 04:28 PM
Hi,
I have finally found the time to try this out, however I have run into a problem and cannot boot using InitNG. I have Ubuntu using 2 partitions: one partition for / and one partition for /home/. Both partitions are ReiserFS. Here is the error I get when booting:

Target filesystem does not have /sbin/initng
I don't understand this error because....YES IT DOES. I have checked and everything has been installed correctly according to this HowTo. My GRUB configuration for InitNG looks like this:

title Ubuntu, kernel 2.6.12-10-k7 (InitNG)
root (hd0,3)
kernel /boot/vmlinuz-2.6.12-10-k7 root=/dev/hda4 ro nolapic quiet init=sbin/initng
initrd /boot/initrd.img-2.6.12-10-k7
savedefault
boot
Where hda4 is the partition mounted as /. What have I done wrong?

mw99
December 3rd, 2005, 07:42 PM
Hi,

I'm trying to hack together a replacement for the postgres.i which ships with InitNG 0.4.7 as it won't start the server, and doesn't appear to use the best postgres scripts available (uses pg_ctl when pg_ctlcluster is available as a more sophisticated wrapper to it).

I figure I've done something dumb but just can't spot it, so any pointers much appreciated. I've tried it using both script and exec formats - the "su..." code in the script statements starts postgres fine from a root terminal:

service daemon/postgres {
need = system/initial system/mountfs net/lo;
script start = {
su postgres -c "/usr/bin/pg_ctlcluster 8.0 main start 2>&1 > /dev/null"
};
script stop = {
su postgres -c "/usr/bin/pg_ctlcluster 8.0 main stop 2>&1 > /dev/null"
};
}

OR

service daemon/postgres {
need = system/initial system/mountfs net/lo;
suid = postgres;
sgid = postgres;
exec start = /usr/bin/pg_ctlcluster;
exec_args start = 8.0 main start;
exec stop = /usr/bin/pg_ctlcluster;
exec_args stop = 8.0 main stop;
}

However, when I try to start deamon/postgres:

root@thinkpad:/etc/initng# ngc -u daemon/postgres
Next Generation init Control. version: 0.4.7
written by Jimmy Wennlund <jimmy.wennlund@gmail.com>

Got an response from initng, version: 0.4.7
Starting service:
Failed to start service, daemon/postgres (FAIL_STARTING)
Command u, daemon/postgres - Bad result!

As I said, any pointers will be really appreciated!

reet
December 3rd, 2005, 08:34 PM
Target filesystem does not have /sbin/initng
I don't understand this error because....YES IT DOES. I have checked and everything has been installed correctly according to this HowTo.
I've looked into this a little further. After I get the error, I am kicked to an "ash" command line. From here, I went into the /sbin directory, and sure enough there was no initng file. There were only a few contents and they are as follows:

udev
mdrun
modprobe
vgechange
udevstart
mdadm
rmmod
depmod
evms_activate

reet
December 3rd, 2005, 08:44 PM
Got it working. I missed the "/" before "sbin" in my grub configuration. Everything is working now.

Limulus
December 4th, 2005, 04:07 PM
Frustrated with the long boot time in Breezy and want to do something about it? Here comes the remedy! Meet InitNG - a new generation init program that is able to reduce your boot time by a third to a half. Below are step-by-step instructions how to do it on your system.

IMPORTANT: InitNG is pretty much work in progress, and not all things may work. Currently it does everything I personally want, but it may not be the case for you - your success depends on the combination of hardware and software you use. Suggestions, fixes, hacks and workarounds offered by people will be incorporated in this HOWTO.

[snip]

Have Fun.

Here's my experience using a Toshiba Satellite A25 laptop running Breezy.

First, following the instructions is important ^_-; I browsed Alioth and downloaded the most recent version of InitNG... which didn't work (it stopped at 100%).

The version linked from the instruction post did work though. From when I press Enter in the GRUB menu until all the applets are loaded in Gnome, the boot time went from ~125 seconds down to ~95; nice!

I rebooted later and there was a glitch; Ubuntu was mounting my HD for the 30th time and so it did its little check... which ran, but the display was wacky; instead of nicely sitting at the bottom of the page, it took up the whole screen, displaying each percentage with the bar graph as a separate entry. When it finished, insetead of completing the boot, it tried to reboot; there was some sort of mention about a hot reboot (?) but it didn't work. I manually powered down and then back up again and it worked fine again.

So still a little rough around the edges, but wow, what speed! =D

Edit: I also tried 0.4.0-1 as per the post (http://ubuntuforums.org/showthread.php?t=80423&p=501661#103), but it had the same problem as 0.4.4-2, even after modifying laptop-mode.i

Limulus
December 4th, 2005, 05:52 PM
there was some sort of mention about a hot reboot (?) but it didn't work.
My memory of it was almost right; as per http://initng.thinktux.net/index.php/Main_Page it was a "really warm reboot" :)

Edit: Another glitch: I wanted to go into the printer settings (System -> Administration -> Printing) using initng 0.3.3-2 but I got the error: The CUPS server could not be contacted. Rebooting without using initng worked fine.

Jingo
December 10th, 2005, 12:00 PM
InitNG 0.4.7 is out...

Will there be an .deb package soon, or should I just compile this myself?

How do I create a .deb package if I compile this?

Trigger|Debian
December 10th, 2005, 12:25 PM
Wait till tomorrow - maybe I'll find the time. Don't have mutch at the moment.
If not: compile it yourself. For 0.4.8 i'll definitely create a package as soon as it's out.

Trigger|Debian
December 11th, 2005, 11:02 AM
The package for 0.4.7 is finally there. Read http://triggerit.funpic.de/blog/?p=32 for some notes about it.
Feedback is very welcome!

curtis
December 11th, 2005, 11:54 AM
The package for 0.4.7 is finally there. Read http://triggerit.funpic.de/blog/?p=32 for some notes about it.
Feedback is very welcome!
Will try now and post if it works.

curtis
December 11th, 2005, 04:00 PM
Just tried it now.
Had some issues with acpid and hald starting, at least it booted up ;)

reet
December 11th, 2005, 04:07 PM
I've just tried 0.4.7 with much success. In the version changes it reads:

* Should be fully compatible to Ubuntu now - no more changes needed

Very nice. This is the first version where HAL has loaded without errors. The only change I actually had to make to the scripts was to add lrm-manager to "system/initial.i" to make sound work.

Trigger|Debian
December 11th, 2005, 04:15 PM
The only change I actually had to make to the scripts was to add lrm-manager to "system/initial.i" to make sound work.
That's strange - lrm-manager should be started in system/modules.
Ah, I know - alsasound.i doesn't depend on modules.i. Will fix this with the next release.

Trigger|Debian
December 11th, 2005, 04:16 PM
Just tried it now.
Had some issues with acpid and hald starting, at least it booted up ;)
At least the acpid problem is fixed with the last bugfix release I made - there's missing a ';' ath the end of one of the first lines.
What's the problem with hal? Do you know how to fix it?

souled
December 11th, 2005, 05:17 PM
With 0.47, I'm getting the "HAL failed to initialize" error when I log in to gnome. Do I have to modify a file to get this to stop?

curtis
December 11th, 2005, 05:18 PM
I will look into fixing the issue with HAL, if I do find a way I'll post here.

Edit: the APCID bug must of caused HAL not to work... it works perfect with the newest package, good work :)

Trigger|Debian
December 11th, 2005, 05:26 PM
Puh, can anyone compare /etc/initng/daemon/dbus.i and /etc/init.d/dbus and tell me what could be the difference which causes this error on some boxes?

souled
December 11th, 2005, 06:48 PM
I will look into fixing the issue with HAL, if I do find a way I'll post here.

Edit: the APCID bug must of caused HAL not to work... it works perfect with the newest package, good work :)

How do I go about fixing this bug?

Trigger|Debian
December 11th, 2005, 06:59 PM
Use 0.4.7-2 and the acpid bug is fixed.

souled
December 11th, 2005, 07:35 PM
Thanks it works now. How come when I try and run the command "sudo ngc -u privoxy," I get this output:
Got an response from initng, version: 0.4.7
Starting service:
Failed to start service, daemon/privoxy (NOT_FOUND)
Command u, privoxy - Bad result!

I have it in the default.runlevel file... I'm trying to use the default privoxy.i that the deb comes with. Does it matter if I don't have privoxy.pid file in /var/run even though the privoxy.i file points to that?

Limulus
December 11th, 2005, 07:41 PM
I just tried 0.4.7-2, letting it overwrite the modifications in the .i files I had made for 0.3.3-2; it booted up beautifully without me needing to modify anything. Very nice! (hopefully this can be included on the Dapper disks :-)

I wanted to go into the printer settings (System -> Administration -> Printing) using initng 0.3.3-2 but I got the error: The CUPS server could not be contacted. Rebooting without using initng worked fine.
Just FYI, I still get this CUPS error after booting with InitNG.

souled
December 11th, 2005, 07:50 PM
I just tried 0.4.7-2, letting it overwrite the modifications in the .i files I had made for 0.3.3-2; it booted up beautifully without me needing to modify anything. Very nice! (hopefully this can be included on the Dapper disks :-)


Just FYI, I still get this CUPS error after booting with InitNG.

You have to start the CUPS daemon. add daemon/cupsd to your default.runlevel file. To start it without rebooting type "sudo ngc -u cupsd" in the terminal after you add daemon/cupsd to the runlevel file.

reet
December 11th, 2005, 07:58 PM
...and just in case you are unfamiliar with adding/removing daemons with initng, type the following command to add cups daemon so that it will start with every boot:

sudo ng-update add daemon/cupsd

Wow, this entire howto could probably be changed to 3 steps:
1) install initng 0.4.7
2) edit grub menu
3) reboot

berserker
December 11th, 2005, 09:09 PM
Everything works here except when I open a Konsole terminal inside KDE I have no prompt. I can use the terminal at TTY2 (Ctrl-Alt-F2) with no problems.

Any ideas?

Limulus
December 11th, 2005, 09:19 PM
reet, souled: confirmed that running the two commands:

sudo ng-update add daemon/cupsd
sudo ngc -u cupsd
got it working in the current InitNG session and it worked after I rebooted without any further intervention.

Trigger|Debian: Will CUPS be added to future versions of InitNG by default? (I note for example that I no longer need to run "sudo ng-update add daemon/gdm default" as I had to using 0.3.3-2)

foxy123
December 12th, 2005, 06:51 AM
The new version does not work for me. Firstly I tried to install it over 0.44 and it did not start cpu frequency scaling and samba and gave a bunch of errors during booting. I tried to fix it but without any luck. Then I decided to emove initng completely and start over again. Now it des not boot and gave a lot of errors.

Where is a boot log file, so I could post some errors here?

Noahod
December 12th, 2005, 07:30 AM
I followed the directions for InitNG - it shaves off more than 10 secs off my startup time!!

I have a strange problem though :
Each time I start a console (konsole, gnome-terminal or even xterm) , I get an error message "Unable to launch child process". KDE su complains "the program su is not found" "Please check your PATH".
In KDM/GDM, if I select the "failsafe terminal" option, it immediately exits back to KDM/GDM..
So, I'm basically unable to get the command line!!

Has anyone else faced the same problems?

Yes! I have exactly the same problem, only with a kernel I compiled myself. However, the same kernel works fine without initng. Does anyone know how to fix this?

foxy123
December 12th, 2005, 08:34 AM
Yes! I have exactly the same problem, only with a kernel I compiled myself. However, the same kernel works fine without initng. Does anyone know how to fix this?
ah, that was it! I was wondering why I could not start some apps with sudo...

berserker
December 12th, 2005, 11:30 AM
InitNG 0.4.4.2 worked fine for me but the latest creates the "no prompt in Konsole" and "kdesu not found" errors that others are experiencing.

Trigger|Debian
December 12th, 2005, 03:30 PM
Maybe it's a little bug in the package - please have a look at system/initial.i and start mountvirtfs a second time after udev (last package did this - accidentially removed this in 0.4.7) - just copy the line from above.
I can't verify this cause I'm not on my box... Will have a look tomorrow.

foxy123
December 12th, 2005, 06:54 PM
I have managed to make it work, though not everything:

I had to add gdm to a defaul runlevel.
The typo (laptop_mode vs laptop-mode) is still in laptop-mode.i

I did not manage to make ACPI work. I changed speetstep.i and powernowd.i according to the post in this topic but it does not work with 0.47. It is my biggest problem at the moment.

what about samba daemon and cups? Should I add them manually to the default runlevel?

berserker
December 12th, 2005, 07:09 PM
Maybe it's a little bug in the package - please have a look at system/initial.i and start mountvirtfs a second time after udev (last package did this - accidentially removed this in 0.4.7) - just copy the line from above.
I can't verify this cause I'm not on my box... Will have a look tomorrow.

That did the trick! Konsole and su now work normally.

I do receive an error on startup when dbus tries to load but hotplugging works normally so it doesn't seem to affect anything.

berserker
December 12th, 2005, 07:10 PM
what about samba daemon and cups? Should I add them manually to the default runlevel?

I had to add samba and cups manually.

sudo ng-update add samba
sudo ng-update add cupsd

Trigger|Debian
December 12th, 2005, 07:16 PM
Services are only added automatically onthe first start - if you want to do it later execute "/sbin/gen_system_runlevel overwrite".
Does this add your missing files?

I will make a release in some minutes - please tell me which problems are not removed with it. I'll work on them!

idlewild
December 12th, 2005, 07:17 PM
It's all working here, just had to apply the changes mentioned previously to