Results 1 to 10 of 23

Thread: HOWTO: Fix usplash

Threaded View

  1. #1
    Join Date
    Apr 2005
    Beans
    45

    HOWTO: Fix usplash

    The timeout is set pretty low on usplash. Because of this people with slower computers will get kicked from the "pretty" usplash loading screen into the text style boot. The fix is pretty simple, but is made slightly more complicated by having to deal with the initrd image.

    First make sure you have installed whichever kernel is suitable for your processor. I use an athlon-xp processor, so I use the "linux-image-2.6.12-9-k7" package.

    Before we do anything we're making a backup of the initrd image.
    Code:
    sudo cp /boot/initrd.img-`uname -r` /boot/initrd.img-`uname -r`.bak
    Now there are two way to fix this problem. The first method (which was pointed out by b34r in this thread) is very simple and feels a lot more "Ubuntu". The second method involves some direct manipulation of the initrd image and is a little more involved. If you can then use the first method.

    The First Method

    Edit the initramfs init file with your favourite text editor(If, for some reason, you don't have this file then run 'sudo apt-get install initramfs-tools').
    Code:
    sudo vim /usr/share/initramfs-tools/init
    Replace this section:
    Code:
    . /scripts/${BOOT}
    
    log_begin_msg "Loading modules"
    With this:
    Code:
    . /scripts/${BOOT}
    
    /sbin/usplash_write "TIMEOUT 120"
    
    log_begin_msg "Loading modules"
    Build a new initrd image.
    Code:
    sudo dpkg-reconfigure linux-image-`uname -r`
    ***

    The Second Method

    We'll work in a temporary dir, so make one.
    Code:
    mkdir ~/temp
    cd ~/temp
    Now we'll decompress the contents of the current initrd image in this directory.
    Code:
    gunzip -c /boot/initrd.img-`uname -r` | cpio -i
    Now edit the init file with your favourite text editor.
    Code:
    vim init
    Replace this section:
    Code:
    . /scripts/${BOOT}
    
    log_begin_msg "Loading modules"
    With this:
    Code:
    . /scripts/${BOOT}
    
    /sbin/usplash_write "TIMEOUT 120"
    
    log_begin_msg "Loading modules"
    Now we'll rebuild the initrd image.
    Code:
    find * | cpio -o -H newc | gzip -9 -c > initrd.img-`uname -r`
    sudo mv initrd.img-`uname -r` /boot/initrd.img-`uname -r`
    ***

    Reboot and you should have the usplash screen working properly.

    NOTE: If something goes horribly wrong then use GRUB to edit the entry for booting Ubuntu (Press 'e' on the boot screen). Add .bak to the end of the 'initrd= ...' part of the GRUB entry then press 'b' to boot. Once ubuntu has booted you can overwrite the broken initrd with the backup initrd for a permanent fix.

    NOTE2: I just noticed that tildes don't show up well on the forum code sections. It's ~/temp NOT -/temp. Copy/paste would show up the difference, but it's best to be clear about it.

    CREDIT: Thanks to b34r for pointing out a more elegant way to edit the initrd image.
    Last edited by Curufir; October 15th, 2005 at 03:08 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •