Setting savedefault option for grub in Ubuntu 13.04

Technical, Technology

Thank to kstevens.

You need to have both of these lines in /etc/default/grub:

GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true

Then run sudo update-grub.

Check the entries in /boot/grub/grub.cfg and they should look something like:

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        savedefault
        insmod ext2
        set root='(hd0,5)'
        search --no-floppy --fs-uuid --set c23bb931-2d60-4f48-9086-c8dbdc7fdca6
        linux   /boot/vmlinuz-2.6.32-22-generic root=UUID=c23bb931-2d60-4f48-9086-c8dbdc7fdca6 ro splash vga=786  quiet splash
        initrd  /boot/initrd.img-2.6.32-22-generic
}

The most important line to note is savedefault.  It indicates that this menu entry will save itself as the default when selected.  Verify that this line appears under each menu entry.

Advertisements

Nice tool to control Linux service startup – sysv-rc-conf

Technical, Technology

The tool should come with the standard repos.  So, just do:
sudo apt-get update
sudo apt-get install sysv-rc-conf

Run it by:
sudo sysv-rc-conf

It gives you a nice UI that you could see all service setting vs. rc levels. You could also simply move by cursor to whatever service you would like to change the startup setting. Hitting space bar toggles the setting.

Good tool!

c.f. http://superuser.com/questions/266040/how-do-you-disable-an-upstart-service-in-ubuntu-10-10

Use Sun Java plugin in Firefox for Ubuntu 12.04

Technical, Technology
  1. Download and expand a JRE or JDK using root account.  Record the path, e.g. /usr/lib/jvm/jdk1.6.0_23 (we call it <java path>).
  2. sudo update-alternatives --install "/usr/bin/java" "java" "<java path>/bin/java" 1
  3. mkdir -v ~/.mozilla/plugins (skip this if the directory already exists)
  4. cd ~/.mozilla/plugins
  5. ln -s <java path>/jre/lib/amd64/libnpjp2.so

Quick Resolution – slow network using RTL8111/RTL8168B in Ubuntu 10.04 LTS

Technical

The slowness is due to the use of wrong kernel module (detected by the OS) for RTL8169.  To verify, issue a command:

sudo lsmod

We should be able to see a line starting with r8169.

Alternatively, another command could be used to generate the hardware profile of your machine:

sudo lshw -html > somefile.html

In that case, the resolution is simple.  Go to Realtek download site to get the appropriate Linux driver.  Expand it and follow the README inside.

After reloading the driver, use lsmod to verify if there is a line starting with r8168.