Restoring Burg After Windows 8
I recently got a free copy of Windows 8 through my university. The desktop interface is better than Windows 7 (except for the insane touchpad / mouse regression - a touch-optimized OS shouldn't break my mouse and touchpad!). But more importantly, there are still many programs that only work on Windows. My hard drive is big so free is free.
Unfortunately, Windows overwrote the boot sector. This isn't a very big deal. The first time I saw my computer not boot, and then drop down into text GRUB, I sweated. This time, things were as smooth as butter. I'll tell you what to do, but first I'll list the important details of my setup (which might be too much info - Windows 8 and Linux Mint 14 are the only actually important bits):
- Linux Mint 14 as primary OS (and an older Mint 10 as backup)
- Using BURG, a graphical GRUB
- Installed Windows 8 after Linux Mint
- Hard drive on /dev/sda, USB drive on /dev/sdb
- Mint 10 on /dev/sda1, Mint 14 on /dev/sda3, Windows 8 on /dev/sda2, swap on /dev/sda4
- Both Mint OSes are ext4, Windows is NTFS
- Intel x86-64, T9600 (Core 2 Duo - quite the aging chip!)
- Discrete GPU: HD4650 (ATI Mobility Radeon), using amdcccle non-free driver
This is most likely too many details, but included just for completeness. The OSes matter (though mostly just that they are Debian-based and Windows 8), the order of installation matters, the drive names matter for my commands but yours may be different, the filesystems shouldn't matter, and the hardware almost certainly doesn't matter at all. But let's get to it!
First, create a live boot USB of your Linux Mint (or a live disk). I like to use
Unetbootin to make a bootable USB. I get the ISO from their official torrent. You'll need this to execute linux commands on your currently Windows machine. You can google Unetbootin, and you can find the ISO on the distro's official website, and creating the bootable USB is trivial. You should have at least 2GB free, though today you'll most likely have 8GB or more on a modern USB drive. I like to use the ISO for the same version of the OS I'll be using, but it really shouldn't matter.
Next, reboot with the USB drive plugged in, watch it boot into linux, open up the terminal, and enter the following commands. Please make sure to replace /dev/sda3 with the location of your linux OS, and /dev/sda with your primary hard drive to which you're trying to restore BURG.
12345678910 | sudo su
mount /dev/sda3 /mnt
mount -t proc none /mnt/proc
mount --rbind /sys /mnt/sys
mount --rbind /dev /mnt/dev
chroot /mnt /bin/bash
source /etc/profile
grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg
reboot
|
What you've done here is this: you've mounted your OS, accessed it, and restored GRUB onto the main hard drive. At this point, you should reboot the system and boot into GRUB (remove the USB after the computer turns off!). You should then verify you can boot into your Linux distro(s) as well as your shiny new Windows partition. If you can, you can take a breather - you've restored your computer! (Mostly). If not, google is your friend, and I can't help further.
Note: grub-mkconfig found the other operating systems (/dev/sda1 and /dev/sda2) , but it didn't say it found the main OS on /dev/sda3. I checked /boot/grub/grub.cfg to make sure, and it did properly note /dev/sda3. In short: don't worry if you don't see it being located, since it appears to be assumed that it is located, but do check the config file to make sure.
Now you want to restore BURG. Thankfully, this is easy. You most likely already have Super-Boot-Manager, but if not:
123 | sudo add-apt-repository ppa:ingalex/super-boot-manager
sudo apt-get update
sudo apt-get install super-boot-manager
|
Super-Boot-Manager is a nifty program that lets you play with GRUB, BURG, and Plymouth (which I think is another boot utility). It'll let you install and configure each. You don't need it but I like it.
If you use Super-Boot-Manager (launched simply by super-boot-manager), click Burg-Manager, then burg-install. If you're doing things from the command line:
123 | sudo add-apt-repository ppa:n-muench/burg
sudo apt-get update
sudo apt-get install burg burg-themes
|
At this point, burg will be installed, but not yet up and running. There are a few things you may want to configure. I like to make the BURG screen time out after 10 seconds instead of 5, I like to set my main OS as the default OS, I like to set a theme (minimal for me), and I like to remove menu entries I don't care to see (such as older kernels and . The first three are doable through super-boot-manager, or through the command line (you care about /boot/burg/, /boot/burg/burg.cfg, and /etc/burg.d/). The last one is command-line only: back up /boot/burg/burg.cfg, and edit the original by commenting out menuentry blocks you don't want to see.
Once you think you're done configuring, either run burg-emu or use the burg-emu button in super-boot-manager.
Once you are actually done configuring, either run sudo burg-install /dev/sda or click "Restore Burg into MBR" in super-boot-manager. This will actually cause your changes to take place. (In case a kernel update happens and your BURG gets overwritten, simply run the same command again!)
Reboot, and you should be golden. If not, google! This process was perfect for me, and took no more than ten minutes. Happy restoring!
Ches Koblents
September 12, 2013