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.

Make Changes to Grub Boot Loader

People often ask about how they can make changes to their Grub boot loader menu. This is one of the most commonly asked question that comes from newbies who have a dual/multi boot Ubuntu with some other operating system(s) like Windows, Kubuntu,Xubuntu or some other Linux distro installed. Open Source software are about Freedom, so basically all open source software are easy to modify. In most cases the settings are saved somewhere in a text file and all you need to do is to open it up and modify these settings.

  1. Open Nautilus with root privileges by typing this:
    gksudo nautilus
  2. Now go to /boot/grub/
  3. Open the file menu.lst in Text Editor of your choice.

This is where you can make changes to your Grub menu. You can change the timeout before Grub automatically loads the default operating system. You can also change the default operating system to boot.

Suppose if you have Ubuntu and then you install Kubuntu to a different partition on your hard disk. The later installed OS Kubuntu would either ask you to install or not to install Grub boot loader or simply install the Grub. Now if you want to make changes to your Grub menu then you will make these changes in Kubuntu, you will have a menu.lst file in your Ubuntu installation but its not functioning anymore.

Ubuntu Documentation also has a page about how to change default operating system.

Giving Back to The Community

Once you have Ubuntu GNU/Linux installed and you find it useful then it is the time for you to consider ways to contribute in Ubuntu. Ubuntu Wiki now has a detailed page Contribute to Ubuntu.

Ubuntu is most of all a community. All of the software, artwork and documentation in Ubuntu has been created, tested, used and discussed openly by people around the world participating in the Open Source community made possible by the Internet. Anyone who uses Ubuntu is part of this global community, and we invite you to help shape Ubuntu to better meet your needs. To make it yours!

Here is a list of how I am contributing to Ubuntu GNU/Linux. It is not much comparing to what so many others are doing for the community. But I think showing off contributions is one way to inspire others specially those who are un-familiar with open and free software philosophy.

  • The easiest way to contribute is to use Ubuntu. I am using it for five months now.
  • I have distributed Ubuntu Linux CDs to some friends. Successfully convinced one of them to use Ubuntu at home.
  • I am spreading the word on Ubuntu by blogging and writing about my Ubuntu experience on various local forums.
  • Currently I am trying to improve the out of box Urdu support in Ubuntu. I am trying to get in touch with MOTU’s and Developers.

I am also a member of Urdu Translators and Ubuntu Pakistan Teams. Not much progress going on in both of these teams I think we don’t have good leaders to motivate rest of the team members. We need to organize small events in Pakistan to promote Ubuntu particularly for schools, Internet Cafes, small businesses and home users. We also need translators for Urdu translation of Ubuntu. I want to do lots of things but it seems like may be I am over excited or the other community members are busy somewhere else.

Free Software in Pakistan

I was asking myself, if Linux and GNU based software are so good, free and legal then why Pakistanis don’t go for them. Some reasons are pretty obvious and others, we will have to figure those out.

  1. Pakistanis who spend their time in front of computers at work are forced to work in a Microsoft Windows environment.
  2. Home users in Pakistan demand full multimedia support so that they could watch pirated videos on their computers and enjoy pirated music. So who cares about using a free legal software.
  3. Young computer users prefer to spend their time playing games and most such games are made for Windows. They also don’t like the way Linux based distros treat Instant Messaging. You can not show or view web cam of your MSN Buddies using Gaim.
  4. Small Businesses, aren’t they aware of the fact that Linux has tools which could increase their productivity.
  5. What about schools? Does any body ever tried to sell thin clients running on Linux to any local school? Like that $100 laptop thingie, can’t we do such a thing in Pakistan? May be we can not create a laptop but we can atleast equip schools with low price, highly reliable and better learning machines. Reading about edubuntu I think that it has so many learning oppurtunities, it is a great tool for schools.

There is a lot more to it. Please add your reasons in comments. Why you think Linux is not catching up in Pakistan?