Posts Tagged ‘grub’
Ubuntu Linux: Install BURG bootloader
BURG is a bootloader just like GRUB (the screen that you see after booting your machine where you choose which operating system to boot) besides that it comes with a graphical environment that you can choose themes for instead of the usual black screen with a few lines on it.
To install BURG you need to add the appropriate PPA…
sudo add-apt-repository ppa:n-muench/burg
…, update your sources…
sudo apt-get update
… and finally install it:
sudo apt-get install burg
Your boot menu will look different the next time you reboot your machine. If you need help configuring, press F1 to get a list of shortcuts that will help you. To change themes, press F2. You will still be able to access the classic styled menu with one of the shortcuts.
Customize Grub bootloader menu
Grub is the bootloader most Linux operating systems use at the moment – you most likely only interact with it while choosing the operating system you want to use if you are on a multi-boot system. But although you only see it for a short time, why not spice it up a bit? With what we are going to do, we can change font and background color or even use a background picture, change boot order and other handy stuff. You might think about that especially if you don’t like Ubuntu’s purple background color – so here’s how:
To do what we want to, you need the Grub Customizer which is available by ppa. To install it, run the following commands in a terminal:
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer
Now open Grub Customizer from a terminal or the menu, go to Preferences and customize your Grub menu to your likings:
Restore GRUB bootloader after Windows installation on multi-boot system
Windows operating systems have the habit of installing their own bootloader on every installation – this wouldn’t be a problem, if they would recognize all present operating systems. But unfortunately, they only recognize other Windows systems.
Apart from installing EasyBCD and other tools on your Windows partition to set things right, you can also just reinstall the lost GRUB boot manager with the help of a live CD (I used Ubuntu 11.10 for that). Insert the CD and boot from it. Open a terminal. If you have no idea what the name of your partitions is, use
fdisk -l
to get an overview. My output looks like this:
christian-main christian # fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000587d5
.
Device Boot Start End Blocks Id System
/dev/sda1 63 629147647 314573792+ 83 Linux
/dev/sda2 * 629147648 775948287 73400320 7 HPFS/NTFS/exFAT
/dev/sda3 775948288 968380415 96216064 7 HPFS/NTFS/exFAT
/dev/sda4 968382196 976768064 4192934+ 5 Extended
/dev/sda5 968382198 976768064 4192933+ 82 Linux swap / Solaris
christian-main christian #
My first partition, /dev/sda1, has Linux installed and is the partition I want to have GRUB on – what I need is its identifier, sda1. Replace every following instance of that identifier with the one of your partition’s identifier. Become root by typing
sudo -i
Afterwards mount your partition and install grub (replace sda1):
mount /dev/sda1 /mnt
grub-install –root-directory=/mnt/ /dev/sda
If there is no grub.cfg in /boot/grub, create one using
mount –bind /proc /mnt/proc
mount –bind /dev /mnt/dev
mount –bind /sys /mnt/sys
chroot /mnt update-grub
umount /mnt/sys
umount /mnt/dev
umount /mnt/proc
Afterwards you can restart your system, remove the Live CD and boot into GRUB.
Change grub default boot option on Linux Ubuntu/Mint
Grub’s default boot option is stored within a config file found on the partition where your Master Boot Record is located (if you had it installed previously, there may also be grub.cfg files on other partitions, but these won’t effect boot sequence). Its direct path is /boot/grub/grub.cfg and it has to be opened as root, so enter following into a terminal:
sudo gedit /boot/grub/grub.cfg
The important parts of the file is the line saying set default=”0″ and the blocks beginning with menuentry:
[...]
menuentry ‘Linux Mint 12 64-bit, 3.0.0-12-generic (/dev/sda5)’ –class linuxmint –class gnu-linux –class gnu –class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root=’(hd0,msdos5)’
search –no-floppy –fs-uuid –set=root 7df91f6c-5351-4336-a3c5-eac1cf58efca
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=7df91f6c-5351-4336-a3c5-eac1cf58efca ro quiet splash vt.handoff=7
initrd /boot/initrd.img-3.0.0-12-generic
}
[...]
These blocks are the entries that are displayed in the boot menu – they are indexed from 0 to n-1, n being the number of entries. To set the default entry, take its index and enter it into the set default=”0″ line, replacing 0 with the desired index. Afterwards save the file.
Reset account password (Ubuntu Linux) without CD
Resetting an account password on Ubuntu Linux is unexpectedly easy to do, you don’t even need any tools or anything for it. To start, go into the GRUB menu by pressing Shift while booting. In the menu, enter the Recovery Mode option:
You will be presented a window with quite a few options of which the root command line is what we want. Go down to the menu item named root and hit Enter.
If the command line opens without problems, proceed with the following command (if it prompts you for a root password which you don’t have, see here):
mount -o remount,rw /
passwd [your_user_name]
Replace [your_user_name] with the name of the user you want to change the password of. Enter and confirm a new password on the next prompts and reboot your computer afterwards.



