Download your favorite Linux distribution at LQ ISO.
Go Back > Blogs > flshope
User Name


Rate this Entry

Ubuntu+Debian Installation for Dual-Boot from Two Hard Drives

Posted 07-22-2017 at 12:53 PM by flshope
Updated 07-29-2017 at 07:18 AM by flshope (Update on Thunderbird/gmail problem)

Machine Description

I have a six year old desktop machine from Pogo Linux (my hostname: "Pogo2011"). The machine has been running Ubuntu since it was new and is now at 16.04.2 LTS. The machine has an AMD Athlon(tm) II X3 450 Processor, 64 bit, 8 GB RAM, and two 500 GB SATA hard disks. One drive contains the OS and the other, my own data files. This is my primary desktop, though I have a 14 year old desktop ("Pogo2003" running Debian 8.8) and a 9 year old HP laptop ("HP2008" running Ubuntu 14.04 LTS) as backups.

The Problem

There are two age-related issues that worry me about this machine:
- Eventually a hard disk will fail.
- Eventually Ubuntu will drop support for some of my hardware, probably the display. This has already happened with my two other machines (Pogo2003 and HP2008), and it occurred momentarily on Pogo2011 when Unity and then Gnome Fallback stopped running.

Since the machine is completely adequate for my needs, I decided I did not need to buy a new one and did not want to wait for it to die. So I decided to try to install a third hard drive and to install Debian on the new drive with the intention of dual booting. I have never done either of those two things before (installing a new drive and installing dual boot). However, my Pogo2003 machine, kept alive with Debian, is anecdotal evidence that Debian is better suited to older hardware.

In this blog entry, I am reporting my second Debian install on this machine. The first, with Debian 8.7, eventually worked OK; but I trashed it later by clumsily executing chown and chmod with sudo on my Debian home directory rather than the data disk. To clean up that mess and with Debian 9 just released, I decided to do a clean install of Debian 9.

Installation of the New Hard Drive

I bought a Seagate 1 TB SATA drive (ST1000DM003) and cabling from Walmart. These internal drives don't come with any other hardware (e.g., screws) or cables; but, luckily, my machine had some screws in the unused bays.

Before starting to mess around with the machine's interior, I attached a bare-wire wrist bracelet with a ground wire (per Seagate's instructions) connected with an alligator clip to my old desktop case. I had verified that both machine cases were grounded by using a multimeter (set to resistance measurement) to pass a small current from one case to the other.

I connected the new drive to the cables without placing the drive in a bay and booted the machine with the case open. I wanted to be able to hear and feel that the new drive was actually spinning. If your hearing is off due to age (as mine is), a stethoscope makes it overwhelmingly clear whether the drive is spinning. You can also feel a slight vibration of the drive with your finger tips. I let the machine boot into Ubuntu and ran some hardware commands (lsblk, fdisk, and the GUI Disks), which recognized that a third drive now was present on the machine and identified the currently assigned device name (in my case, sdc).

Then I finished the drive installation and partitioned it (with gparted) into two 500 GB ext4 partitions. I planned to immediately start using the second partition as an additional backup for the original 500 GB data drive, leaving the first partition for Debian. The backup function is not critical as I run weekly backups to two external Western Digital USB My Passport drives.

Before you access the new drive with applications software, you need to create root directories on the boot disk to serve as mount points for each partition. Then make entries in the /etc/fstab file to associate each new partition with its mount point. At this point, you will only have device names (in my case, sdc1 and sdc2) for the partitions; but after you reboot, you can use lsblk -O /dev/sdc to obtain the UUID designations for the new partitions. It is recommended to identify the partitions in fstab with UUID= instead of device names because the device names can change if more disks are added. UUIDs are stored on the disk and will not change.

If you are new to editing fstab, note that you must be the root user to edit it. Make a backup copy of the original fstab. If you screw up the edit, your machine may fail to boot. In that case, you can use the Grub menu to boot to a text-only shell where you can fix the screwed up fstab or restore the original. I have used the editor nano (under Ubuntu, sudo nano fstab) to get out of this jam.

Since my desire was to insure a Debian installation completely independent from the existing boot disk, before starting the Debian install, I physically disconnected the the original drives from both their power cables and signal cables. That way, Debian would install without knowing about or altering the existing Ubuntu installation or its disks.

Dual Boot Pre-Installation Tasks

Before attempting the OS installation, I spent a fair amount of time reading about dual booting:

Debian jessie -- Installation Guide:
Wikipedia Multi-booting:
Dual boot with two Linux distributions:

To obtain the Debian installer software, working under Ubuntu 16.04, I downloaded debian-9.0.0-amd64-netinst.iso from the following link:
Click on amd64 to download debian-9.0.0-amd64-netinst.iso

I burned this iso to a CD-RW using k3b.

Before actually attempting the install, I made a test run with the installer CD with intent to install nothing just to see what it did and what information was displayed for my various hard disks. To start this, I used the BIOS boot-device menu (on my machine, I press F12 repeatedly when the motherboard puts up an opening screen). To choose to boot from a CD or DVD, I choose the obscurely named "ATAPI iHAS124" menu item, which I recognized from previous viewing of output from the lshw command. Be aware that booting from CDs and DVDs is very slow compared to booting from a hard disk.

After I learned that the installer wants to do its own disk formatting, I rebooted to Ubuntu and used gparted to delete the 500 GB partition I had created for Debian on the new 1 TB drive.

Dual Boot Installation

I have made it a habit during installs and upgrades to keep running handwritten notes of what happens and what actions I have taken. I have found these notes to be useful next time I must go through such a procedure.

To proceed with the Debian installation, I shut down the machine, disconnected the two original hard disks (both the signal and power cables), and then booted with the Debian install CD. I selected the graphical install option. After making a few initial selections (language, location, keyboard), the installer reported that no network was detected, and that proprietary firmware (not included on the install disk) was needed to proceed with a net install. Expecting this, I did have firmware for my ethernet card on a USB flash drive, which the installer used. The install then proceeded with entry of a root user password and setting up of a user account. Next, I was presented with options for partitioning the disk. I chose "Guided -- use the largest free space" and to put all files in one partition. The installer then proceeded to create two partitions of the unused 500 GB space, one a large ext4 partition and the other a smaller swap partition. The installer then offered a list of software to install. I accepted three defaults (Debian desktop environment, print server, and standard system utilities) and additionally selected Gnome and xfce. It also offered KED, Cinnamon, Mate, LXDE, web server, and SSH server. It took about 25 minutes to download 1664 files at my internet speed of 1 MB/s (maximum) and another 35 minutes to complete the install. It did install Grub to the Master Boot Record (MBR) and reported the installation finished. The CD was auto-ejected and the system rebooted on its own.

Post-Installation Configuration

At the Debian log-on GUI, I noted the following desktop and window managers available for selection: System X11 Default, GNOME, GNOME Classic, GNOME on Wayland, Default X Session, and xfce session. My preferred window manager is gnome-session-flashback, which I installed later using Synaptic.

After that initial log-on test, I shut down, reconnected the two original disk drives, and test booted Ubuntu, where I ran update-grub. Grub recognized that the machine now also contained a Debian 9 installation and added it to its menu, which appeared during reboot. I also ran update-grub under Debian, which recognized an Ubuntu 16.04 installation and included it on its own Grub boot menu.

The first serious problem I encountered was that Thunderbird was unable to configure my gmail account. With some internet searching, I learned that this is a well-known problem with Thunderbird 45.8.0 and gmail. After entering the gmail address and password, a new screen asks the user to log on to Google by entering the email address again, but nothing happens after that. This problem was fixed in a later Thunderbird update (~version 52.1), but Debian 9 doesn't have it.

As Plan B, I configured Evolution Mail, which works with gmail. I did have a bit of trouble importing my address book from my Ubuntu Thunderbird installation. Thunderbird can generate several address-book export file formats, but the only one that worked satisfactorily with Evolution was the vcard (.vcf) format.
Debian 9.1 included an update of Thunderbird to 52.2.1, which resolved the above problem that prevented Thunderbird from configuring gmail accounts. [FLS-20170729]

The second serious problem was getting my Brother HL-2140 black and white laser printer to work. The default driver chosen by Debian didn't work: the printer just generated endless blank pages. My fix is another blog entry:

Compared with my previous experiences with Debian installs, this was a textbook-smooth install. However, it is important to read the install manual with sufficient care to understand what is important for your situation. For the Debian 9 install, I had spent considerable time figuring out what firmware for my ethernet card was needed by the installer. Without the firmware for my previous Debian 8 install, I got a very minimal installation with no window manager. At first log on through a virtual console, I did have internet access, but I only had enough of an installation to download more software. However, I did not have a list of the standard software and probably never achieved an adequate installation under Debian 8. So I knew the consequences of not having the firmware when I did the Debian 9 install, and it proceeded without incident.
Posted in Uncategorized
Views 642 Comments 0
« Prev     Main     Next »
Total Comments 0




All times are GMT -5. The time now is 12:25 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration