LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxQuestions.org Member Success Stories
User Name
Password
LinuxQuestions.org Member Success Stories Just spent four hours configuring your favorite program? Just figured out a Linux problem that has been stumping you for months?
Post your Linux Success Stories here.

Notices

Reply
 
Search this Thread
Old 06-17-2013, 04:09 AM   #1
i_joh
Member
 
Registered: Apr 2005
Distribution: Debian
Posts: 82

Rep: Reputation: 5
Solve Lemote Fuloong slow boot problem in Debian Wheezy


If you own a Lemote Fuloong and run Debian Wheezy on it, you may have the problem that this wonderful little piece of machinery spends ten minutes loading the initrd. Don't get me wrong. I love this machine because it only consumes 11 watts of power or something while idling (while still loading GNU emacs in about five seconds and being able to run the Galaxy screensaver), but on the other hand it might be worthwhile getting it to boot faster than this. The solution is to compile GRUB 2.00.

This may work with other distros too of course with proper adjustments.

Note that this shouldn't damage your system. Your system isn't depending on GRUB to boot anyway, and all we're gonna do is remove GRUB completely and replace it with a newer version. We won't touch the kernel or the initrd or anything but GRUB and /boot/boot.cfg. The new version of GRUB ends up in /usr/local/, out of the way of your other system files.

First, back up /boot/boot.cfg and place it somewhere where you know you can access it with say the minimal command line that the Debian installation boot image will give you after you boot it from a USB flash drive. Note that you can't mount an external drive with that command line. You might want to boot the installation image (or whatever) and test that you can indeed restore the file to the boot partition before you even start this operation. Personally I'd back up everything else too that's important as a general precaution.

Now uninstall everything that has to do with GRUB to avoid conflicts with the new GRUB install. I purged everything that contained GRUB in its name and the dependencies of those packages and thus got rid of the default Debian configuration of GRUB as well. As it turns out, GRUB generates a working config file perfectly fine without any customization. Also it's nice to know that the config isn't full of references to missing files. Purge the remaining config files of uninstalled packages like this if you didn't do that:
Code:
aptitude purge ~c
Download the sources from ftp://ftp.gnu.org/pub/gnu/grub/, then install the following dependencies before trying to run ./configure:

build-essential (To compile programs)

GRUB dependencies:
bison
unifont
flex
gettext
libdevmapper-dev
libfreetype6-dev

Now, as a normal user, start compiling and installing:
Code:
cd <path to where you saved GRUB 2.00>
tar -zxf grub-2.00.tar.gz
cd grub-2.00
./configure
make
su
make install
At this point GRUB is installed. You must configure it as root:
Code:
grub-install --directory /usr/local/lib/grub/mipsel-loongson/
This should have generated the file /boot/grub.elf which is the file that will be loaded by PMON on boot instead of the Linux kernel. Now you need /boot/boot.cfg to make PMON do just that:
Code:
default 0
timeout 0
showmenu 0

title Boot with GRUB
        kernel (wd0,0)/grub.elf
        args nil
Finally you need /boot/grub/grub.cfg:
Code:
grub-mkconfig > /boot/grub/grub.cfg
This should generate a clean minimal boot configuration. Now your Fuloong should boot with GRUB 2.00. If you have any problems, check that you did uninstall everything that had to do with GRUB before starting. Hopefully you'll have a better experience with this machine from now on.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
/boot is on the wrong drive after re-installing Debian Wheezy. smells_of_elderberries Linux - Newbie 3 06-04-2013 03:12 PM
[SOLVED] Original Fuloong/Yeelong boot.cfg i_joh Debian 1 05-19-2013 10:29 PM
LXer: Debian Wheezy released, no support for secure boot LXer Syndicated Linux News 0 05-07-2013 02:01 PM
[SOLVED] Can't boot kernel Debian wheezy 3.2.0-4 krchat Linux - Newbie 2 01-09-2013 01:45 AM
Debian Wheezy fails to boot into GUI after POST sj061 Debian 16 05-31-2011 07:45 PM


All times are GMT -5. The time now is 05:10 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration