Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: HOWTO: Fix usplash

  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.

  2. #2
    Join Date
    Feb 2005
    Location
    Canada
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: HOWTO: Fix usplash

    After following you're instructions. I've run into little problem. I get a message saying "/sbin/usplash_write" not found. However usplash_write does exist in the /sbin directory.

    Code:
    # Don't do log messages here to avoid confusing usplash
    run_scripts /scripts/init-top
    
    . /scripts/${BOOT}
    
    /sbin/usplash_write "TIMEOUT 120"
    
    log_begin_msg "Loading modules"
    load_modules
    log_end_msg
    Code:
    ls -l /sbin/usplash
    -rwxr-xr-x  1 root root 35764 2005-10-07 16:39 /sbin/usplash
    -rwxr-xr-x  1 root root  3032 2005-10-07 16:39 /sbin/usplash_write

  3. #3
    Join Date
    Oct 2005
    Beans
    8
    Distro
    Ubuntu Breezy 5.10

    Re: HOWTO: Fix usplash

    It is a bit easier to edit /usr/share/initramfs-tools/init
    and the do a :
    dpkg-reconfigure linux-image-$(uname -r)

  4. #4
    Join Date
    Feb 2005
    Location
    Canada
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: HOWTO: Fix usplash

    Quote Originally Posted by b34r
    It is a bit easier to edit /usr/share/initramfs-tools/init
    and the do a :
    dpkg-reconfigure linux-image-$(uname -r)
    This worked like a charm. I don't know why the previous method didn't but at least it's working now. Thanks.

    G.

  5. #5
    Join Date
    Apr 2005
    Beans
    45

    Re: HOWTO: Fix usplash

    Quote Originally Posted by b34r
    It is a bit easier to edit /usr/share/initramfs-tools/init
    and the do a :
    dpkg-reconfigure linux-image-$(uname -r)
    Much nicer, I've updated the HOWTO to show that method.

    Quote Originally Posted by gmc
    This worked like a charm. I don't know why the previous method didn't but at least it's working now. Thanks.

    G.
    Weird error you had. My only thought is that usplash_write might not have been in the current initrd image. Glad you got it fixed.

  6. #6
    Join Date
    Mar 2005
    Location
    Belgium
    Beans
    327
    Distro
    Xubuntu 13.04 Raring Ringtail

    Re: HOWTO: Fix usplash

    Disclaimer: running on a Mac, but ith same timeout problem.
    i followed the 'complex' approach because there seems to be no initramsf-tools for PPC in the repositories... (EDIT: Scrap that, there is... Must've been very confused... So disregard rest of post first method seems to work fine)(Edit #2: no it doesn't, seems to change nothing...)

    But when I do
    Code:
    sudo find * | cpio -o -H newc | gzip -9 -c > /boot/initrd.img-`uname -r`
    I got
    bash: /boot/initrd.img-2.6.12-9-powerpc: access denied
    So this is a case of privileges?
    Last edited by Rxke; October 15th, 2005 at 03:43 PM.

  7. #7
    Join Date
    Oct 2004
    Location
    Cupertino, CA
    Beans
    5,092
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Fix usplash

    rxke: that is a permissions issue. "sudo" does not help you in the case of escalating permissions to redirections. In other words:

    echo "hello" > /root-only
    -and-
    sudo echo "hello" > /root-only

    Work in the exact same way. echo is what's affected by the "sudo", so echo will be running as root (which is pointless because you don't need root to print hello on the screen ). The redirection part of the command is actually handled by the currently running shell, which is running under your username regardless of how many sudo's you use inside of it.


    You need to start a sudo shell:

    sudo sh


    then issue your commands.



    But then again, I don't own a Mac. I don't know if PPC uses initramfs or initrd. Is initrd-tools present?
    Quote Originally Posted by tuxradar
    Linux's audio architecture is more like the layers of the Earth's crust than the network model, with lower levels occasionally erupting on to the surface, causing confusion and distress, and upper layers moving to displace the underlying technology that was originally hidden

  8. #8
    Join Date
    Oct 2004
    Location
    Cupertino, CA
    Beans
    5,092
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Fix usplash

    Note that you should be editing /usr/share/initramfs-tools/init and dpkg-reconfiguring. The other method of blasting apart an initrd has the annoying side-effect that kernel updates (i.e. security patches) will revert the changes, while the first method is permanent.
    Quote Originally Posted by tuxradar
    Linux's audio architecture is more like the layers of the Earth's crust than the network model, with lower levels occasionally erupting on to the surface, causing confusion and distress, and upper layers moving to displace the underlying technology that was originally hidden

  9. #9
    Join Date
    Mar 2005
    Location
    Belgium
    Beans
    327
    Distro
    Xubuntu 13.04 Raring Ringtail

    Re: HOWTO: Fix usplash

    thank you, jdong for the explanation. turned out I was barking up the wrong tree anyways (see edit in original post) but now at least I know why sudo in non-root doesn't works heehee!

  10. #10
    Join Date
    Apr 2005
    Beans
    45

    Re: HOWTO: Fix usplash

    Fixed the sudo issue in the second method and the "initramsf-tools" typo, but I strongly advise people to use the first method not the second if at all possible.

    That's what you get for posting at 4am .
    Last edited by Curufir; October 15th, 2005 at 03:04 PM.

Page 1 of 3 123 LastLast

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
  •