Ade Malsasa Akbar contact
Senior author, Open Source enthusiast.
Tuesday, August 20, 2019 at 21:39

 (Bootloader, Debian, and Ubuntu)

Ubuntu 19.04, or Disco Dingo, and Debian 10, or Buster, are two latest versions in 2019 of two most popular GNU/Linux distros I already wrote about here and here. This tutorial explains dualboot installation procedures in simple way for Ubuntu Disco Dingo and Debian Buster computer operating systems onto a portable USB Flash Drive. There are 2 advantages of this kind of portable dualbooting; first, it's safer for your data in internal HDD and second, you can bring both OSes with you everywhere you go. You will prepare the partitions first, then install Ubuntu, and then install Debian, and finally finish up the GRUB bootloader, and enjoy. Go ahead!

Subscribe to UbuntuBuzz Telegram Channel to get article updates directly.

The Plan


  • 1) Prepare 3 USB drives, one as Debian installation media, one more as Ubuntu installation media, and last one as the storage of both OSes.
  • 2) Prepare the 32GB drive 3 partitions, one later for Debian system, one for Ubuntu system, and one for swap space.
  • 3) First, install Ubuntu to the Ubuntu partition.
  • 4) Second, install Debian to the Debian partition.
  • 5) Install GRUB Bootloader to the 32GB USB stick.

Recommendations


  • Read full installation tutorials of Ubuntu Disco here and Debian Buster here. This tutorial will not explain every single step but only the partitioning one for each system.   
  • I recommend 32GB or more capacity of USB stick to store both systems. 16GB is too small for dualbooting.
  • I recommend you to use Debian Live Edition instead of Debian Regular as it's now featured with Calamares easy installer. 
  • I recommend in this article EXT2 Filesystem for both main system partitions. 
  • I recommend small size partition under 1GB for swap.
  • I suggest you (if you can) to detach your internal hard disk drive before doing this. I did it while practicing this today.

1. USB Preparation


My example is:
  • First, 16GB USB stick as Ubuntu bootable installer
  • Second, 16GB USB stick as Debian bootable installer
  • Third, 32GB USB stick as storage target (treated as external HDD)
Use the program GNOME Disk Utility to burn the ISO of Ubuntu and ISO of Debian to USB sticks.

This is important: create the partitions before you install the OS. For the third USB stick, format it into 3 partitions:
  • First, 15GB FAT, for Ubuntu.
  • Second, 14GB FAT, for Debian.
  • Third, the rest, for swap partition.
See picture below.


(The preparation: target USB stick divided into UBUNTU, DEBIAN, and SWAP partitions before installation being performed)

3. Installing Ubuntu


First task is to install Ubuntu. As I said above, I don't show all steps, but only the partitioning. You need to do:
  • - select the second 14GB partition
  • - format it as filesystem: EXT2
  • - select its mount point: /
  • - select the third ~500MB partition
  • - format it as: SWAP
  • - select bootloader location: the location of the USB stick (here, /dev/sda)
Anyway, this bootloader of Ubuntu will be replaced by Debian's on next section.

Then proceed the rest of installation until its finished.



2. Installing Debian


Second task is to install Debian. Once again, I don't show all steps here but the partitioning only, as it's the most important. You need to do:
  • - select the first 15GB partition
  • - format it as filesystem: EXT2
  • - select its mount point: /
  • for bootloader, see next section
 
(Calamares partition editor: editing second 14GB partition to be Debian system partition)

(Partition editor dialog: pay attention to format, ext2, and /)

4. Installing Bootloader


Third step is installing final bootloader. Still on the Debian installation, now it's the thing:
  • - select bootloader location: the drive name of 32GB USB stick (here, it's /dev/sda)



Bootloader will show selection of 2 OSes every time you boot the USB stick. It will show you Debian logo there instead of Ubuntu logo (see picture on next section).

Then once again finish the installation process for about 30 minutes. 

5. Enjoying the Results


Finally, you will be able to run Ubuntu Disco and Debian Buster from USB stick. Your USB stick is now like a portable HDD with dualbooted OSes. You can boot the USB on other computers as well. And, every time it boots up, it shows selection between both OSes so you can select any one every time you need it. How can it be not convenient?

Bootloader looks like this:



Ubuntu and Debian desktops look like these:


They run fast and well on old laptops: ASUS X44C 2GB and Acer Aspire One 756 4GB. Yes, they run from a USB stick. Thanks to my brother Tegar for lending me his laptop.

Useful Tips


If you see closer, the partition names of both systems are not distinct. We better rename them to "UBUNTU" and "DEBIAN" respectively. Simply use GNOME Disk Utility to rename each partition. Run it > select the USB stick name > select partition of Ubuntu > click options button below it > Edit Filesystem > type the name UBUNTU > OK. Do it "DEBIAN" for partition of Debian.

(Where to click the option button)

 (Final result: see bottom-left corner for names of partitions; see top toolbar of each view panel showing "DEBIAN" and "UBUNTU" respectively)



This article is licensed under CC BY-SA 3.0.