Showing posts with label dual boot. Show all posts
Showing posts with label dual boot. Show all posts

Friday, November 20, 2009

How to change the default OS Entry on Ubuntu 9.10 - Karmic Koala

Grub2, the new boot menu installed by default with Ubuntu 9.10

Ubuntu 9.10 ships with the new GRUB (Grand Unified Boot Loader 1.97 beta) in plain words its the software that boots the operating system you choose when you boot the computer. In earlier versions of Ubuntu / Grub to change the menu on the grub screen, one had to edit the /boot/grub/menu.lst file. In the new system this a little different from just editing the one file. 

  1. First be root sudo su
  2. Edit the file /etc/default/grub
  3. Change the GRUB_DEFAULT value to number your default operating system
    1. in My case
    2. 0. Linux kernel ******
    3. 1. Linux Recovery ****
    4. 2. Memory Test bla bla...
    5. 3. Memory Test bla bla bla...
    6. 4. Windows 7 Loader....
  4. I have set GRUB_DEFAULT = 4 for Windows 7
  5. Change GRUB_TIMEOUT to change the default timeout if you want to. 
  6. Run update-grub
-- output -- like
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.31-14-generic
Found initrd image: /boot/initrd.img-2.6.31-14-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Microsoft Windows XP Home Edition on /dev/sda1
done
You can verify your default boot entry changed or not by viewing the following file 
sudo cat /boot/grub/grub.cfg 


It showed set default="4" to me for my case .
Enjoy !!!

Thursday, July 10, 2008

How to save Linux Boot Loader

Needs to Reinstall Windows & wants to Save Your Linux Boot Loader....
Save your Linux boot loader for windows boot loader (for any linux Operating System)
  1. sudo su root
  2. dd if=/dev/sda of=/media/drive_c/ubuntu7.img count=1 bs=512
  3. now open windows c:\boot.ini file and append following line

    1. c:\ubuntu7.img="Load My Ubuntu boot Loader"
Note:
  • /dev/sda stands for your hard drive it might be different use according to your hard disk.
If you don't know you can get it from the following command
  • sudo su root
  • cfdisk
/media/drive_c is the mounted file system for your Drive C
If you are not able to mount, then use the path ~/home/ubuntu7.img and you can take back up of the file using any USB Device. and then switch to windows and put it into the boot.ini and modify it

  • Tested with Ubuntu 7.10 and 8.04 and Fedora 7, but it will work for any Linux OS
  • How it works? => This will generate a file named ubuntu7.img which contains starting 512 bytes of your hard disk.