1

I want to install Ubuntu 18.04 in a new drive (say /dev/sdb) in a machine that already has one drive (say /dev/sda) with Ubuntu 16.04 on it, making sure I don't lose any data. I also want to leave the Ubuntu 16.04 in disk sda as it is.

To do that, I have installed the new disk in the machine and run the Ubuntu installation process.

After a couple of steps, I click on Something else, and I reach a disk partition table.

On that screen I create three new partitions for the new drive, sdb, one ext4 with 30gb with a mount point /, for the operating system itself, one ext4 with 470gb with a mount point /home, and a 10GB one for swap. I am also specifying the new disk, sdb, as the place to install the boot loader.

The concern I have is that I can't see in the screen anywhere to specify in which drive and partition exactly the operating system needs to be installed, and I worry that could accidentally be installed in some partition of the old drive and destroy data.

How can I specify that the Ubuntu 18.04 should be installed in the 30GB partition of sdb mounted at /?

3
  • 2
    Installing an operating system is a risky operation. You should always backup everything, that you cannot afford to lose before doing it. If possible you should backup your whole drive(s) with Ubuntu (and other systems if dual or multi boot).
    – sudodus
    Jul 1, 2018 at 10:17
  • UEFI or BIOS? If UEFI, be sure to use gpt partitioning & include the ESP - efi system partition on new drive, even if not currently used. Grub seems to auto install to first ESP found, usually sda. Safest way is to unplug sda, so you only have sdb. But always best to use Something Else install option so you know exactly which partition is used for / & which for /home. UEFI/gpt partitioning in Advance: askubuntu.com/questions/743095/… Even if older BIOS system, you can use gpt, but then need a bios_grub partition 1MB unformatted.
    – oldfred
    Jul 8, 2018 at 18:18
  • thanks Sudodus. I am using BIOS. I just got it to work (see comments below if you are interested). I will read the question you link too as seems interesting
    – Joe
    Jul 9, 2018 at 5:54

3 Answers 3

1

If you unplug your 16.04 internal drive before proceeding, you can't do too much damage.

After installing 18.04 to the new disk, plug in the old drive and boot the computer.

If you wish to boot one drive as default, set it as first HDD in BIOS.

After OS boots, run sudo update-grub to include both drives in the grub menu.

3
  • Thanks C.S. Cameron. I did what you mentioned and mostly worked. Everything is working with the exception of the new swap. I created a swap partition in the new drive, and then updated fstab with the UUID of the swap partition in the new drive. However when I boot the computer and I go to system monitor > resources, the amount of swap showed is zero. Any idea on what can be driving this?
    – Joe
    Jul 9, 2018 at 5:59
  • @Joe: If you have enough RAM you won't use much swap. Are you able to hibernate? if so swap is working. Is anything lagging or frozen or greyed out screen on your computer? Jul 9, 2018 at 15:37
  • If you created your swap while in something else, you should not need to edit swap location in fstab, everything should be automatic, unless you want to use the swap space on the other drive, (sda). Jul 9, 2018 at 18:51
0

As abu_bua says, whatever partition you choose for / is where the OS is going to be installed and all system and OS related files will go.

Reg the bootloader, there is an option to select the specific partition the bootloader should go to. Example - sdb1 or sdb2 etc. I have always created a separate EFI partition of 250 MB as my first partition and assign the bootloader to be installed there.

0

What you have done is correct, regarding the partitioning.

On Linux OS all the system programs, or core programs are installed in the root directory /, (.e.g. /bin, /usr, /sbin). A good introduction can be found on this link.
From this root directory linux mounts other partitions (take a look at the /etc/fstab file) , which tells linux to include the home directory /home.The home directory contains only user specific data and configuration files. Per default this is the only directory the user has write access.

The swap is a partition where temporarily memory is stored, in order to free physical memory.

So you should not take much care about it, the installation program will make such things automatically.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .