Skip to main content

Posts

Showing posts with the label grub

How to Restore grub in ubuntu remix 9.10 karmic koala

I recently installed Windows 7 on my laptop which already had ubuntu remix installed in it. The problem i faced was, the GRUB was lost. But i had trouble getting your GRUB boot loader since the process of restoring GRUB has changed. Follow these instructions to restore your GRUB. 1. Boot from your UBUNTU LIVE from which you installed Ubuntu 2. Now open up the terminal. 3. Now find out the drive in which you installed Ubuntu. print the "Partition table" and find out the drive. $ sudo fdisk -l 4. Now mount the drive. $ sudo mount /dev/sd D P /mnt ' D ' is the drive number and ' P ' is the partition number. In my case, It was 'sudo mount /dev/sda3 /mnt' 5. Now install GRUB. $ sudo grub-install --root-directory=/mnt /dev/sd D ' D ' is your drive. For me it was 'sda'. 6. Now unmount the drive and reboot. $ sudo umount /mnt You should have your GRUB restored by now.

Protect your grub by applying a password to it (grub-md5-crypt is broken)

Maybe you want the user to enter a password in order to boot the Recovery Mode or your secondary OS. You have to set that password in the /boot/grub/menu.lst - for higher security you should crypt your password with md5. You have two ways to do that. The first one might-not work for all. 1. You can use the utility 'grub-md5-crypt' to generate the md5. So type at terminal: $ grub-md5-crypt enter your desired password twice and copy the generated crypt-hash into the menu.lst, for example: title Ubuntu (Kernel 2.6.12-9-386) - Recovery Mode password --md5 $1$HSX1$JYNyfBY0pVizk5kyMQOqn/ root (hd0,2) kernel /boot/vmlinuz-2.6.12-9-386 root=/dev/hda3 ro single initrd /boot/initrd.img-2.6.12-9-386 boot Now reboot and try to start the protected boot-option, enter your password. 2. Reboot your machine and enter the grub-menu. Now press "c" key on your keyboard to enter the command line of grub. Now type: md5crypt Enter your desired 'password' and write d...

Restore grub boot loader

I installed ubuntu and then vista, i found that my ubuntu grub was lost.. I followed these steps to "restore" the " grub boot loader" of ubuntu. Here are the steps 1. Boot from the ubuntu Live CD. 2. Now open a terminal from Applications -> Accessories -> Terminal. 3. Now you need to start grub as root $ sudo grub Following was the output for me [ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename. ] grub> 5. Now find the disk location of your ubuntu installation grub> find /boot/grub/stage1 i got it as (hda0,2) 6. Now you will need to set the root device with the help of the above result. grub> root (hd0,2) 7. Now setup the grub grub> setup (hd0) 8. Exit grub grub> quit Now restart the system. Your ubuntu grub will be back.