why and how does ubuntu boot so fast

Asked by linuxrules

my machine boots in 1 second literally
how and why is this possible?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu upstart Edit question
Assignee:
No assignee Edit question
Solved by:
Eliah Kagan
Solved:
Last query:
Last reply:
Revision history for this message
Best Eliah Kagan (degeneracypressure) said :
#1

Assuming your computer is really booting up, rather than being restored from hibernation or suspend mode, it is likely that you have a SSD (solid state disk). At SSD's access much faster than traditional hard drives.

Over the years Ubuntu has implemented a number of techniques to increase boot speed and efficiency, like adoption of the upstart daemon and transition from bash to dash for /bin/sh. However, without your computer being able to access storage very fast, that still wouldn't produce the extremely fast booting you're talking about.

Revision history for this message
linuxrules (linuxrules) said :
#2

What's weirder is that the computer as three magnetic hard drives (Which should make a system boot slower), and my other desktop boots in a second too!
PS. Using a SSD might "scare" me because the system already boots too fast :-)

Revision history for this message
linuxrules (linuxrules) said :
#3

Thanks Eliah Kagan, that solved my question.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#4

That is weird. But of course, only the magnetic drive or drives that are actually part of your Ubuntu installation could slow down your booting process (which typically would be the containing the root filesystem, i.e. /, but if you have a separate /boot partition on a separate drive, then the drive containing that could be a factor in your system's boot time).

I don't know how fast Ubuntu would boot if you installed it on a RAID-0 of two 15,000 rpm SCSI-320 drives. Perhaps that would only take a second. Do you have something like that?

*If* you're interested in investigating this further, please post complete specs on your computer, as well as the output of the commands:

df -h
mount
sudo fdisk -l

Revision history for this message
linuxrules (linuxrules) said :
#5

df -h

Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ubuntu-root
                      146G 3.3G 135G 3% /
none 241M 320K 241M 1% /dev
none 248M 384K 248M 1% /dev/shm
none 248M 304K 248M 1% /var/run
none 248M 0 248M 0% /var/lock
none 248M 0 248M 0% /lib/init/rw
/dev/sda1 228M 22M 195M 10% /boot
/home/mitch/.Private 146G 3.3G 135G 3% /home/mitch
/dev/sdd 1.9G 732M 1.2G 38% /media/9E06-B138

mount

/dev/mapper/ubuntu-root on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
/dev/sda1 on /boot type ext2 (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
/home/mitch/.Private on /home/mitch type ecryptfs (ecryptfs_sig=120dfea045d231ec,ecryptfs_fnek_sig=87f6bc341c86ce9c,ecryptfs_cipher=aes,ecryptfs_key_bytes=16)
gvfs-fuse-daemon on /home/mitch/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=mitch)
/dev/sdd on /media/9E06-B138 type vfat (rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,flush)

fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0000c1e4

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 32 248832 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 32 19458 156039169 5 Extended
/dev/sda5 32 19458 156039168 8e Linux LVM

Disk /dev/sdc: 20.0 GB, 20020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000dbb92

   Device Boot Start End Blocks Id System
/dev/sdc1 1 2434 19551073+ fd Linux raid autodetect

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003b94c

   Device Boot Start End Blocks Id System
/dev/sdb1 1 2434 19551073+ fd Linux raid autodetect

Disk /dev/sdd: 4022 MB, 4022337024 bytes
124 heads, 62 sectors/track, 1021 cylinders
Units = cylinders of 7688 * 512 = 3936256 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xb0bcd68e

This doesn't look like a partition table
Probably you selected the wrong device.

   Device Boot Start End Blocks Id System
/dev/sdd1 ? 419273 451359 123339962 78 Unknown
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(518, 102, 15) logical=(419272, 58, 50)
Partition 1 has different physical/logical endings:
     phys=(743, 0, 62) logical=(451358, 103, 15)
Partition 1 does not end on cylinder boundary.
/dev/sdd2 ? 56305 157201 387841909+ 10 OPUS
Partition 2 has different physical/logical beginnings (non-Linux?):
     phys=(205, 7, 0) logical=(56304, 96, 14)
Partition 2 has different physical/logical endings:
     phys=(920, 235, 50) logical=(157200, 21, 34)
Partition 2 does not end on cylinder boundary.
/dev/sdd3 ? 243180 492820 959615034 8b Unknown
Partition 3 has different physical/logical beginnings (non-Linux?):
     phys=(260, 125, 54) logical=(243179, 38, 56)
Partition 3 has different physical/logical endings:
     phys=(893, 46, 60) logical=(492819, 2, 35)
Partition 3 does not end on cylinder boundary.
/dev/sdd4 ? 448779 449861 4161539+ a OS/2 Boot Manager
Partition 4 has different physical/logical beginnings (non-Linux?):
     phys=(269, 111, 50) logical=(448778, 48, 17)
Partition 4 has different physical/logical endings:
     phys=(0, 0, 0) logical=(449860, 123, 29)
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order

cpuinfo

processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 3
model name : Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping : 4
cpu MHz : 2992.693
cache size : 1024 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc pebs bts pni dtes64 monitor ds_cpl cid xtpr
bogomips : 5985.38
clflush size : 64
cache_alignment : 128
address sizes : 36 bits physical, 32 bits virtual
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 15
model : 3
model name : Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping : 4
cpu MHz : 2992.693
cache size : 1024 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 1
initial apicid : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc pebs bts pni dtes64 monitor ds_cpl cid xtpr
bogomips : 5985.46
clflush size : 64
cache_alignment : 128
address sizes : 36 bits physical, 32 bits virtual
power management:

Revision history for this message
linuxrules (linuxrules) said :
#6

by the way if this matters on this machine it has 6 fans, but the other desktop boots just as fast and only has two fans

Revision history for this message
linuxrules (linuxrules) said :
#7

I have a very ackward raid setup because I only have a 20 GB(other 160 GB died before raid) drive & 160 GB drive which equals a 20 GB Raid 1 system

Revision history for this message
linuxrules (linuxrules) said :
#8

Ubuntu is ROCK hard stable!

Revision history for this message
linuxrules (linuxrules) said :
#9

Drives are encrypted by the way

Revision history for this message
linuxrules (linuxrules) said :
#10

all drives are ATA/IDE