1

sorry if this is a silly question, I am new to Ubuntu.

I have an external HDD, and would like to create Ubuntu Live on a 20GB Ext4 partition of that system. I tried going to Disks, selecting the Ext4 partition and chose "Restore Disk Image".

After selecting the .iso file, the dialog warned me that the Disk size was 5TB. Does that mean, that the disk image will overwrite the other partitions?

Thanks

1 Answers1

1

Persistent install to USB HD Partition

I have not encountered a tool for installing Live Ubuntu to an external data HDD/SSD without overwriting the data on it.

UNetbootin will do a frugal install to a HDD partition but only to C drive. The install is meant to be temporary and is used for installing Ubuntu.

It is possible to make a Full install of Ubuntu to Partitions on a data SSD or HDD using 'Something else" however most data disks have a msdos partition table which makes it necessary to create a new EFI partition table to boot in UEFI mode. this destroys the data on the drive.

It is easy to make a Live Ubuntu Install to a partition on a USB HDD/SSD as long as Non-Persistent BIOS mode boot is acceptable.

  • Boot a Live USB with target USB drive plugged in.

  • Start GParted and Resize/Move existing partition to create 20GB unallocated space.

  • Apply all operations.

  • Create a New ext4 partition in this space.

  • Apply all operations and exit GParted.

  • Open Terminal and type sudo -H nautilus.

  • Open the Ubuntu ISO file using Archive Manager.

  • Extract the ISO to the new ext4 partition.

  • In Terminal run:

    sudo mount /dev/sdx2 /mnt

    sudo grub-install --boot-directory=/mnt/boot /dev/sdx

Where sdx2 is the New ext4 partition and sdx is the target USB drive.

Edit Boot/grub/grub.cfg adding:

set root=(hd0,2)

after the "Try Ubuntu ..." line.

If you want persistence or to multiboot ISO files or ability to boot in either BIOS or UEFI, or do a Full install, etc. let me know and I will edit this answer

C.S.Cameron
  • 20,530
  • 12
  • 78
  • 125