You are not logged in.

#1 2007-04-13 19:46:35

matiit
Member
From: Poland
Registered: 2007-04-13
Posts: 141
Website

SpeedUP boot procces

Hello.
I am totally newbie at archlinux and my english is broken sad
My arch is (IMO) to slow - boot start
It's starts more than 35s - my slack started <15s
I know that i need to delete udev and I need to load modules.
But How?
Have got I edit MODULES in mkinitcpio.conf or in rc.conf ?
and have got I delete udev from HOOKS in mkinitcpio.conf
And what modules have got I load?
It's to hard for me, now.
I now you are thinking "you start computer only one of day, and this some of seconds not happy you"
But it is very important for me.
Please Help me.

Last edited by matiit (2007-04-14 15:28:55)

Offline

#2 2007-04-13 21:02:23

Zer0
Member
From: Windsor, ON, Canada
Registered: 2006-08-25
Posts: 299

Re: SpeedUP boot procces

Some things I do..

1) See the wiki on mkinitcpio and read up on hooks and modules to find out what is safe to remove.   My HOOKS are like this..

HOOKS="base udev autodetect pata filesystems fbsplash"

I don't need to boot the kernel from sata, scsi, or usb devices so I removed them.  Once you change your /etc/mkinitcpio.conf file you have to do mkinitcpio -g [your kernel] for the new changes to be in the kernel image.

in rc.conf..
2) the modules line I don't have much because I use MOD_AUTOLOAD.  I imagine that you may be able to speed things up by manually setting the modules you need in this line and shutting off MOD_AUTOLOAD.  I don't know if it's worth the constant hassle though.

3) Use static address assignment for your NIC's (if you can),  you can save some time instead of waiting for the DHCP server to give an addy.  It shaved like 2-3 seconds for me.

4) the daemons line drop whatever you dont need.  I never use network filesystems (other then Samba/SMB) so I drop netfs.  You can background daemons also by prefixing them with the @ symbol.   Don't background something that is a dependancy for another daemon as they might not load in order.  Also overlooked is the hal daemon autoloads the dbus daemon so no need to explicitly put it in there if your using hal.  here's my line

DAEMONS=(syslog-ng network @hal @crond @alsa @sensors @keytouch @samba @vmware)

5) in rc.sysinit  add & to this line and modules will load in a backgrounded way like the @ in the daemons line.

                /sbin/modprobe $mod

to

                /sbin/modprobe $mod &

6) edit /etc/inittab and comment out some of the agetty terminals.. Most users don't need that many.. I only use 2

c1:2345:respawn:/sbin/agetty 38400 vc/1 linux
c2:2345:respawn:/sbin/agetty 38400 vc/2 linux
#c3:2345:respawn:/sbin/agetty 38400 vc/3 linux
#c4:2345:respawn:/sbin/agetty 38400 vc/4 linux
#c5:2345:respawn:/sbin/agetty 38400 vc/5 linux
#c6:2345:respawn:/sbin/agetty 38400 vc/6 linux

7) If you use a DE you can have it load background style via the daemons line (eg.. @kdm).  I still use the inittab method myself but have been thinking about going this route.


Much like Slack users.. Arch users like to boot fast also..  do a search for bootchart in the forums and you can find lots of tips wink  I'll post my bootchart in a min.. after I reboot wink

Offline

#3 2007-04-13 21:11:40

Zer0
Member
From: Windsor, ON, Canada
Registered: 2006-08-25
Posts: 299

Re: SpeedUP boot procces

Ok bootchart says 18 seconds (grub to kdm) on my system.

Details..
Kernel: 2.6.19-beyond
Dual Core Pentium D 820 (2.8 ghz)
1 gig DDR400
PATA-100 harddrive (ext3)

The timeframe was pretty much the same on my Athlon XP 3200 Barton like last month.  (18-20) seconds

If I remember correctly before I did everything above my bootchart was 25-27 seconds.

Good luck

Offline

#4 2007-04-13 21:26:49

matiit
Member
From: Poland
Registered: 2007-04-13
Posts: 141
Website

Re: SpeedUP boot procces

I used bootchart and it is png file:
bootchartkg4.th.png
The uDev is starting very long.
My PC is:
Sempron 2400+
Radeon 9200SE
Motherboard - AsRock K7vt4a+
Sound-card -integred
HDD - Samsung ATA 80 gb and Samsung ATA 250 Gb
768 RAM


My rc.conf:

# HARDWARE
# -----------------------------------------------------------------------
#
# Scan hardware and load required modules at bootup
MOD_AUTOLOAD="yes"
# Module Blacklist - modules in this list will never be loaded by udev
MOD_BLACKLIST=()
#
# Modules to load at boot-up (in this order)
#   - prefix a module with a ! to blacklist it
#
MODULES=(mii via-rhine)
# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

#
# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
#   - prefix a daemon with a ! to disable it
#   - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(@kdm network @alsa @syslog-ng @hal)

My mkinitcpio.conf:

# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES="piix ide_disk reiserfs"
MODULES="pata_via ata_generic ext3"

#    This setup loads an lvm2 volume group on a usb device.
#    HOOKS="base udev usb lvm2 filesystems"
HOOKS="base udev usb filesystems"

Last edited by matiit (2007-04-13 21:27:59)

Offline

#5 2007-04-13 21:49:08

Zer0
Member
From: Windsor, ON, Canada
Registered: 2006-08-25
Posts: 299

Re: SpeedUP boot procces

my chart
bootcharttf9.th.png

Wow.. 29 seconds does seem long considering how little daemons you have loading.
Like I said.. my old system was Athlon XP 3200 on an Asrock k7s41gx and after all the optimizations I posted above I had it down to the 18-20 second range.

Last edited by Zer0 (2007-04-13 21:49:49)

Offline

#6 2007-04-13 21:50:47

skale
Member
From: Atlanta, GA
Registered: 2006-08-04
Posts: 146

Re: SpeedUP boot procces

Forget modules in mkinitcpio.conf, you can remove modules that you absolutely don't need from rc.conf.  Each module doesn't take much, so don't worry about it too much.

In mkinitcpio.conf, messing with the hooks helps a lot.

Offline

#7 2007-04-13 22:07:11

matiit
Member
From: Poland
Registered: 2007-04-13
Posts: 141
Website

Re: SpeedUP boot procces

skale i don't understand what have I got to do.
Have I delete udev from HOOKS ?
When have I add the modules in rc.conf or mkinitcpio.conf ?

Offline

#8 2007-04-14 14:49:34

matiit
Member
From: Poland
Registered: 2007-04-13
Posts: 141
Website

Re: SpeedUP boot procces

please answer my post

Offline

#9 2007-04-14 16:33:31

matiit
Member
From: Poland
Registered: 2007-04-13
Posts: 141
Website

Re: SpeedUP boot procces

I tried something to delete udev but udev is still started hmm
My rc.conf:

#
# /etc/rc.conf - Main Configuration for Arch Linux
#

#
# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="pl_PL"
HARDWARECLOCK="localtime"
TIMEZONE="Europe/Warsaw"
KEYMAP="pl"
CONSOLEFONT=lat2-16.psfu.gz
CONSOLEMAP=
USECOLOR="yes"

#
# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# Scan hardware and load required modules at bootup
MOD_AUTOLOAD="no"
# Module Blacklist - modules in this list will never be loaded by udev
MOD_BLACKLIST=()
#
# Modules to load at boot-up (in this order)
#   - prefix a module with a ! to blacklist it
#
MODULES=(mii via-rhine) 
# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

#
# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
HOSTNAME="xmat"
#
# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available
# interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
#   - prefix an entry in INTERFACES with a ! to disable it
#   - no hyphens in your interface names - Bash doesn't like it
#
# Note: to use DHCP, set your interface to be "dhcp" (eth0="dhcp")
#
eth0="eth0 192.168.1.10 netmask 255.255.255.0 broadcast 192.168.1.255"
lo="lo 127.0.0.1"
INTERFACES=(lo eth0)

gateway="default gw 192.168.1.1"
# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   - prefix an entry in ROUTES with a ! to disable it
#
ROUTES=(gateway)
#
# Enable these network profiles at boot-up.  These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
#   - set to 'menu' to present a menu during boot-up (dialog package required)
#   - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network-profiles
#
#NET_PROFILES=(main)

#
# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
#   - prefix a daemon with a ! to disable it
#   - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(@kdm network @alsa @syslog-ng @hal)


# End of file

My mkinitcpio.conf

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES="piix ide_disk reiserfs"
MODULES="pata_via ata_generic ext3 cdrom agpgart via-agp rtc evdev pcspkr 
psmouse serio_raw tsdev radeonfb 
fb_ddc snd-via82xx soundcore slhc usbcore ehci-hcd uhci-hcd sd_mod sr_mod"

# BINARIES
# This setting includes, into the CPIO image, and additional
# binaries a given user may wish.  This is run first, so may
# be used to override the actual binaries used in a given hook.
# (Existing files are NOT overwritten is already added)
# BINARIES are dependancy parsed, so you may safely ignore libraries
BINARIES=""

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in anyway.  This is useful for config files.
# Some users may wish to include modprobe.conf for custom module options,
# like so:
#    FILES="/etc/modprobe.conf"
FILES=""

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'modload' may be used in place of 'udev', but is not recommended
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
#    This setup specifies all modules in the MODULES setting above.
#    No raid, lvm2, or encrypted root is needed.
#    HOOKS="base"
#
#    This setup will autodetect all modules for your system and should
#    work as a sane default
#    HOOKS="base udev autodetect ide scsi sata filesystems"
#
#    This setup will generate a 'full' image which supports most systems.
#    No autodetection is done.
#    HOOKS="base udev ide scsi sata usb filesystems"
#
#    This setup assembles an ide raid array with an encrypted root FS.
#    Note: See 'mkinitcpio -H raid' for more information on raid devices.
#    HOOKS="base udev ide raid encrypt filesystems"
#
#    This setup loads an lvm2 volume group on a usb device.
#    HOOKS="base udev usb lvm2 filesystems"
HOOKS="base autodetect"

this is my bootchart:
przeddodaniemautodetectfh0.th.png
what files you need to see else?
What should I do else?
I know that I can to speedUp my boottime more.
Please help me

Offline

#10 2007-04-14 23:05:14

matiit
Member
From: Poland
Registered: 2007-04-13
Posts: 141
Website

Re: SpeedUP boot procces

Please look on my post

Offline

#11 2007-04-14 23:36:23

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,045

Re: SpeedUP boot procces

Udev takes a long time, that simple. It's started from /etc/rc.conf, by the way.
I use udev module autoloading and a simple HOOKS="base udev autodetect pata filesystems" in mkinitcpio.conf, together with persistent block device naming.
So far I could live with the boot time, I have less than 5 modules I don't need in lsmod and the configuration files stay small and readable.

Last edited by byte (2007-04-14 23:37:28)


1000

Offline

#12 2007-04-15 09:23:46

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: SpeedUP boot procces

disable MOD_AUTOLOAD
then pick the modules you want loaded in the MODULES=() line.

James

Offline

#13 2007-04-15 10:14:30

matiit
Member
From: Poland
Registered: 2007-04-13
Posts: 141
Website

Re: SpeedUP boot procces

I have MOD_AUTOLOAD - no in rc.conf
And i added  modules to mkinitcpio.conf to section modules
but udev is still started

Offline

#14 2007-04-15 14:09:45

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: SpeedUP boot procces

You could try turning off uevents and loading all your modules manually.

Offline

#15 2007-04-17 18:10:46

matiit
Member
From: Poland
Registered: 2007-04-13
Posts: 141
Website

Re: SpeedUP boot procces

YEs I want to do this but i don't know how

Offline

#16 2007-04-21 15:03:10

skale
Member
From: Atlanta, GA
Registered: 2006-08-04
Posts: 146

Re: SpeedUP boot procces

How would somebody go about figuring out which modules are needed, and which are not?

Offline

#17 2007-04-21 15:11:20

matiit
Member
From: Poland
Registered: 2007-04-13
Posts: 141
Website

Re: SpeedUP boot procces

I am still asking:
"what I have got to do, to delete uevents from bootstart" !!
Please answer me

Offline

#18 2007-04-21 16:03:49

Mikko777
Member
From: Suomi, Finland
Registered: 2006-10-30
Posts: 837

Re: SpeedUP boot procces

matiit wrote:

I am still asking:
"what I have got to do, to delete uevents from bootstart" !!
Please answer me

http://bbs.archlinux.org/viewtopic.php?id=29305

Offline

#19 2007-04-21 19:34:01

matiit
Member
From: Poland
Registered: 2007-04-13
Posts: 141
Website

Re: SpeedUP boot procces

Mikko777 I can't find in your link how to disable uevents from boot

Offline

#20 2007-04-21 20:33:54

Mikko777
Member
From: Suomi, Finland
Registered: 2006-10-30
Posts: 837

Re: SpeedUP boot procces

I think it says, you dont disable udev 'cos it leaves you with cripled system, best way to reduce boot-time is to custom compile a kernel.

Also theres 3 more threads where that came from and all point to the custom kernels as best option for speedy boot.

Offline

#21 2007-04-21 20:40:58

matiit
Member
From: Poland
Registered: 2007-04-13
Posts: 141
Website

Re: SpeedUP boot procces

but what will give me compile a kernel when the loading uevents takes near 10s ?
I have not got udev in mkinitcpio.conf in HOOKS and I have MOD_Autoload-"no" in rc.conf but Uevents still starts and takes 10s !:/

Offline

#22 2007-04-22 17:43:25

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: SpeedUP boot procces

udev should not take 10s
get rid of hal from rc.conf unless you really need automounting of removable devices.

re-compiling kernel may help to some extent. It might cut time considerable if there are some timeouts on devices that to not work anyway. But no guarantee.

Offline

#23 2007-04-27 20:10:04

matiit
Member
From: Poland
Registered: 2007-04-13
Posts: 141
Website

Re: SpeedUP boot procces

Should I compile standard method?
unpack to /usr/src/name
cd /usr/src/name
make menuconfig
make
make install
make modules_install
?
Or something else way?

Offline

#24 2007-04-27 21:22:20

dreamer289
Member
Registered: 2007-04-19
Posts: 8

Re: SpeedUP boot procces

The best method is probably to use either ABS to compile one of the kernels in extras (/var/abs/extras/kernels - my personal preference is the beyond patchset). Or put together your own PKGBUILD and makepkg, along with your customised .config.

For info on ABS, look in the wiki: http://wiki.archlinux.org/index.php/ABS … ild_System

Offline

#25 2007-04-28 01:55:12

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: SpeedUP boot procces

matiit wrote:

Should I compile standard method?
unpack to /usr/src/name
cd /usr/src/name
make menuconfig
make
make install
make modules_install
?
Or something else way?

yup, almost
this works for me
1) compile
make bzImage && make modules && make modules_install
2) copy and make it work
cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.x-custom-name
cp System.map /boot/System.map-2.6.x-custom-name

mkinitcpio -g /boot/kernel-2.6.x-custom-name.img -k 2.6.x-custom-name

where custom_name is whatever you have entered in
#
# General setup
#
CONFIG_LOCALVERSION="-custom_name"

of /usr/src/linux-2.6.x/.config

3) enter new entry to /boot/grub/menu.lst
assuming that you are using grub

Offline

Board footer

Powered by FluxBB