Installing Debian From Ubuntu or any other GNU/Linux

This post is about how to install Debian GNU Linux from your hard disk, with the help of your Ubuntu GNU Linux operating system and without using CDrom, floppy, or any other removeable media.

I have tried a few Linux distros and of course Microsoft Windows and I can say confidently that Ubuntu’s installation is the easiest and the best. All my hardware works out of the box like they were made for Ubuntu (They were not actually my hardware is very Windowish). This time, I was now trying to install Debian (testing) on one of the remaining partitions on my hard disk. Debian’s net install cd booted just fine but failed to deal with my CD-ROM drive. I was asked to provide drivers for it or manually select a driver. I didn’t have a floppy with drivers and none of the Debian drivers worked. After spending a few hours to get the installation media work, I finally gave up and opted to install from USB flash drive. Once again for some unknown reasons I failed to boot from USB.

Then I tried to install Debian from hard disk and it worked smoothly. I think you can install Debian from any operating system but not from an NTFS partition. In my case, I installed it from Ubuntu and it was much easier this way because Ubuntu itself is a GNU/Linux/Debian based operating system. Instructions to do that are available on the official Debian Installer Manual (Debian Installer Manual’s instructions are not Ubuntu specific but it does not matter). I would just try to make it a little more simpler. Please note that there are many other ways to do this, it will be a good idea to review other methods before trying this one.

In this example we are trying to Install Debian tesing. You need to download:

Place these three files in /boot/newinstall directory. Now open Grub menu.lst located at /boot/grub/menu.lst with your favorite text editor.

Scroll down until you see something like this:


title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,6)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=3599efe8-de32-4c9f-aed1-33c1c61d4bdf ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet

Note the root (hd0,6) line this is the partition where your Ubuntu is installed. It could be different for you depending your partition location. And now, we are going to boot Debian Installer from here. Add the following lines to your Grub.lst file.

title New Install
kernel (hd0,6)/boot/newinstall/vmlinuz
initrd (hd0,6)/boot/newinstall/initrd.gz

Now save the file and reboot your computer and you will see Grub showing you “New Install” as an option in the menu. Select it to boot Debian Installer and install it.

There is a similar way to install Ubuntu from a GNU/Linux based operating system. You can also Install Ubuntu, Debian and many other Linux distributions from your Windows or anyother operating system by using UNetbootin. To be very honest, I am kind of surprised to find out the many ways to install freedom for my computing needs.

Fixing Grub From Within Windows

Grub is the GRand Unified Bootloader that comes as the default boot loader in most modern linux ditributions including all flavors of Ubuntu. In easy words it is the software that shows you the operating systems you have installed on your computer and allows you to choose one when you start your computer.

Many new users of Ubuntu often come across situations where they need to re-install boot loader. It happens particularly when you attempt to install or re-install Microsoft windows on a computer that already has Ubuntu installed. Windows wipes out Grub boot record, making user unable to boot other operating systems at start up. But don’t worry there are many ways to solve this problem easily. Visit the Ubuntu Community Docs “Recovering Ubuntu after installing Windows” help page for all these solutions. You will also find many threads about this on Ubuntu Forums.

Right now, I would like to talk about the solution that I found easiest and I think that most new Ubuntu users would also find this solution easier and helpful. This solution also applies to any Linux distribution using Grub.

UNetbootin is the software that allows you to fix your Grub Boot Loader from with in Windows. It allows you to use Super Grub Disk with out floppy, usb, or CD.

  1. Download UNetbootin for Windows(download .exe file) and install it. Once the installation is finished you will be asked to reboot your computer. On rebooting you see a menu similar to Grub that asks you whether you would like to boot Windows or UNetbootin Supergrubdisk. Select Unetbootin SuperGrubDisk.
  2. Now you will be presented with a menu where you will find following two options among others:
    Super Grub disk (With Help)
    Super Grub disk (No Help)

    Select Super Grub Disk with help because as the developers of the project say that Super Grub Disk is also an educational tool that teaches you a little about how boot loaders work. It will not take more than five minutes to read help text. Scroll or skip the help text by pressing enter key until you are presented with another menu to choose Language. We see help text again and then we are presented with the menu.
  3. Select Gnu/Linux from the menu. You are then asked what you want to do.
    Fix the boot of Gnu/Linux (Grub)
    Boot Gnu/Linux
    Boot Gnu/Linux directly
    Gnu/Linux (Advanced)

    Select fix the boot of Gnu/Linux (Grub). It then presents you with a list of Gnu/Linux installed on your system and you have to choose a /boot/grub/stage1 file. You will see Ubuntu listed, select it and press enter. Super Grub Disk will now try to fix your boot loader and at the end you see “SGD has succeeded”. You are done now, press any key and then select the option to reboot your computer.
  4. You will see Grub at the start up, select Windows as we need to perform one last action. Once logged in you will be asked if you would like to remove UNetbootin and all its components. Select Yes and UNetbootin will be uninstalled.

Even if somehow Super Grub Disk fails to restore your Grub, you can still boot into your Ubuntu by selecting “Boot GNU/Linux or Boot GNU/Linux directly” options mentioned in step 3. You can then attempt to fix Grub from with in Ubuntu.