Installing Ubuntu on one partition

Hi there,

I know there’s been topics of this kind before, but I really just need some very basic guidelines on how to install Ubuntu in parallel to my PureOS.

I downloaded an Ubuntu iso file at https://ubuntu.com/download/desktop and placed it on a 16 GB USB drive. When rebooting the computer, I enter the boot menu with the esc key (before entering the encryption password) and select ‘2’ to boot from the USB. However here is where I get stuck as PureOS claims a “Disk error”:

Screenshot%20from%202020-01-21%2015-08-22

And pressing any key doesn’t restart, it just gives another Disk error.

Some questions:

  • am I using the wrong iso file? Or is here something I should do to it?
  • should I decrypt my hard disk (or one partition of it) before rebooting from the USB?

Thanks,
Karen

How did you “place” it on the USB drive? As far as I know, you would not just cp the .iso file, from wherever you downloaded it, to the USB drive.

Under Ubuntu, you would use Startup Disk Creator. Yeah, that gets a bit circular. Do you have another computer already running Ubuntu that you could use to process the .iso file? Or maybe something functionally equivalent is already available in PureOS?

However “Disk error” doesn’t give us much to go on. Do you have another computer that you could use to verify the usefulness of USB drive?

You can use Etcher to create a bootable USB drive with the Ubuntu ISO you downloaded. Ubuntu’s installer will let you install alongside PureOS with no problems.

1 Like

Depending on the intended usage, installing a second distro in a separate partition can be a hassle. For example, the first problem may be that there is no spare partition or insufficient space in a spare partition or insufficient unallocated space, depending on how the original partitions were sized.

If you just want to give Ubuntu a try, but actually install it, then installing on a separate disk / external disk can be easier - and easier to blow it away once you have finished trying it out. However if you just want to give Ubuntu a try then there is no need to install it at all. Just use it LiveBooted off the USB drive.

Anyways, first things first. Got to get it to boot from the USB drive.

1 Like

Thanks a lot for the quick replies.

I used Etcher to process the .iso file (flashing it) onto my USB drive. Now it looks different in my file system and I can no longer open it, “No object for D-Bus interface”.

I want to install UBUNTU alongside PureOS, and it seems like I already have a partition to do so, see partition 2 below from my disk layout:

  • Partition 1: 1.2 GB Ext4 (sda1)
  • Partition 2: 249 GB LUKS (sda2, unlocked)
  • Filesystem: 249 GB Ext4 (Filesystem root, used 15%)

Can I just use Partition 2? And will I be given the option to change the partition size to >249 GB as described here?:
https://help.ubuntu.com/community/Installation/FromUSBStickQuick

As you most likely noticed, I’m a newbie at this, so this is extremely helpful!

Absolutely not. That is your encrypted drive parrition. It looks like pureos was installed to occupy the entire drive with encryption. Not sure how to proceed. I would just nuke pureos, reinstall making sure to only use the amount of space needed. And then install Ubuntu along side.

In Ubuntu’s installer, is there not an option to install Ubuntu along side pureos? Like an automated option that handles all the partitioning for you?

I use dd to create my live USBs:
You’ll want to know the USB size so you can tell which block device you want to overwrite.

~]$ lsblk
sr0                        11:0    1  1024M  0 rom
sda                       252:0    0    20G  0 rom
|-sda1                    252:1    0   500M  0 part /boot
|-sda2                    252:2    0  19.5G  0 part /
sdb
|-sdb1                    252:2    0  7.6G  0 part /something/if/its/mounted

In this example my USB is 8Gb, which means sdb is the block device I’m looking for.
Note that sdb1 is the first partition on the drive, we will be overwriting that in a sec (AKA deleting permanently)

Now that we know that sdb can be safely used. The command to create the live USB shold look something like:

~]$ sudo dd if=/home/username/Downloads/Ubuntu-version-whatever.iso of=/dev/sdb bs=4M status=progress

“dd” is a block copying tool
“if” sand for input file, in this case that would be the Ubuntu iso image.
“of” sand for output file, in this example we want to output the raw block data to sdb, which lives in /dev/
“bs” is bullshit
“status=progress” makes the output look nice

It always good practice to sync your file-system before you remove a drive. So before you remove the USB run:

~]$ sync

Try booting the resulting USB.
If that works, and you want to install on the disk you have. you’ll want to shrink Partition 2, leaving the free space on the right of the drive.
Note, You’ll be removing available disk space from PureOS and giving it to Ubuntu here.
Then simply install in the free space.

2 Likes

Thanks all, now I reinstalled PureOS, deleting the previous version (having only had the laptop for a couple of weeks, I didn’t have much to back up).

Now, there’s no encryption and I’m left with just two partitions + som free space:

1.2 GB in /dev/sda1 (ext4)
249 GB in /dev/sda2 (ext4)
2.6 MB in /dev/sda (Unallocated Space)

My questions is: If I try to install Ubuntu from a bootable USB now, where should I install it? In /dev/sda? And will I be given the option to increase the partition for Ubuntu (decreasing the one of PureOS)?

wouldn’t it be simpler to just install GParted inside PureOS and tidy everything up ?

I’m using gparted now to re-size the partition holding PureOS and create a new ext4 from the unallocated space. Will keep you posted on how that goes!

just tried shrinking another non-encrypted partition from withing an encrypted os partition … it’s slow as a turtle …

I think it’s actually working! With your help, here are the steps I ended up going though:

  1. Made a bootable PureOS USB drive.
  2. Re-installed PureOS, wiping all my previous data, but making sure to NOT encrypt the hard disk this time.
  3. Made a bootable Gparted live USB drive.
  4. Installed and booted Gparted live to reduce the partition with PureOS on it and format a new ext4 type partition
  5. Made a bootable Ubuntu USB drive.
  6. Installed Ubuntu on the new ext4 partition along side PureOS, leaving as much space as possible to the Ubuntu OS.

A good days work for my USB drive…

And so far so good! I’ll report any problems…

2 Likes

Pop!_OS is ubuntu(ish) with encription by default … and a few other nice stuff …

Ubuntu’s installer will let you install alongside PureOS with no problems.

I don’t know if this is the case with Ubuntu 19.10, but it is not the case with Ubuntu 18.04 LTS. The Live image does not detect PureOS if set up with the standard partitioning from the PureOS Live image (wipe all option). It may have been because the PureOS partition was LUKS encrypted, but that wouldn’t matter because the Boot partition was not encrypted.
Edit: There was unallocated space on the disk when I tried to do this so Ubuntu would have somewhere to install to, so that was not the issue. The Ubuntu installer simply wouldn’t detect PureOS as an operating system.

You are probably right. When I was first messing around with installing different distros, I didn’t waste time configuring encryption initially. So I was only ever dealing with existing non-encyrpted linux distros on the disk. But I really messed with PureOS and Ubuntu a lot. I kept going back and forth with the two distros.

Thanks for pointing out that the installer doesn’t give you the option to install alongside with an encrypted PureOS install. I guess it really depends on whether or not the installer is able to access and modify current partitions.

:+1:

the next LTS of ubuntu 20.04 is in alpha right now - don’t know when feature freeze happens (or if it happened already) Pop!_OS is surely following suit …

i will test as soon as i figure out how to download and install offline the “network-manager-gnome” for “nm-connection-editor” since i connect through the ethernet cable not the wifi (which most modern distros seem to assume about most people) … debian 10 has this already installed and ubuntu 18.04 is workable through the CLI … anyway this hasn’t been the case with ubuntu 19.10 and last Pop!_OS (i have been stuck in offline mode since they don’t come with this package by default and they require an internet connection to apt install network-manager-gnome

i thought about manually downloading the package from debian - after i have it stored on a usb-thumb drive - and when i’m in a fresh install of either ubuntu or pop_OS i will get it installed offline … but i don’t know if that will happen (if at all?)

The only time I’ve run into this is if I tried to install a UEFI OS alongside a BIOS one. Perhaps you’re making the same oversight I did? Encryption shouldn’t matter because, as you said, /boot isn’t encrypted, and the encrypted partition itself is just a partition.