1

I want installed a complete Ubuntu 20.04.2.0 on a USB Flash Drive, according to this guide, using 64GB USB Flash Drive

I wonder is it enough space or should I use larger USB?

And how many space allocate to each partiton?

FAT32 partition, EXT4 partition, Swap partition.

Is the allocation order matters?

  1. FAT32 partition

  2. EXT4 partition

  3. Swap partition

(I did not understand the purpose of each of them).

In the meantime, ZOOM and VSCode is required, I do not need a lot of memory but I want it to be enough.

SPM OR
  • 11
  • 1
    There is no answer to this question because it depends on what you are going to do with this installation. Ubuntu will probably be about 10GB with a few apps added so is about 50GB left enough? Don’t worry about the partitions, let the installer sort it out. Ubuntu uses a swap file by default so you don’t need a swap partition. The EFI (FAT32) partition will not be more than 500MB. To maximise the flexibility of the space you have don’t opt for a separate /home partition. – PonJar Mar 01 '21 at 10:05
  • 2
  • Thank you PonJar, what do you mean you said, dont worry about the partitons? the instruction in the guide is to allocate partitions. – SPM OR Mar 01 '21 at 10:38
  • @PonJar, 10GB is not enough, recommended is 25GB. If you want to install some heavy programs, you might want to have 30GB or so, but yes, 64GB is more than enough. – pLumo Mar 01 '21 at 10:58
  • @pLumo naah 10Gb is more than enough. But you do not install your website or database or log files on those 10Gb. Personal data goes to the personal partition :) – Rinzwind Mar 01 '21 at 11:13

2 Answers2

1

Is the computer a modern one using Secure Boot (UEFI)? If so, you might need to create a GPT partition table (instead of an MDOS one) on the USB device. You can use GParted to do that — beware! doing this will instantly erase all data on the drive, so be very sure that you've chosen your USB and not your computer's drive. But if your computer doesn't use Secure Boot, don't worry about this.

I don't know the purpose of the 4Gb FAT partition in the tutorial. Maybe it's spare space to be able to port files to a different computer.

So, I suggest the following.

  1. If your computer uses Secure Boot, you'll need a small FAT32 partition. Size 500Mb is about right. Tell the installer to use this for its EFI System Partition. (If your computer doesn't use Secure Boot, skip this partition altogether.)

  2. If you need Windows to access some files, create a partition for transferring the files. Instead of FAT32, I suggest NTFS. Make it only as large as you'll need for transferring files; it doesn't have to be 4Gb if you don't need that. Tell the installer not to use this partition. (If you don't need to share with Windows, skip this partition altogether.)

  3. For the Linux system, use all of the remaining space and format it to ext4. Tell the installer to use this as the root partition.

  4. Don't create a swap partition. Ubuntu 20.04 uses a swap file by default, though you probably want to avoid using swap on a USB stick — it will slow your system to a crawl.

EDIT: The tutorial doesn't mention that you must change the target bootloader installation (compare steps 6 and 7 (Phase 2) at the bottom of each image). Please remember to do this, otherwise your USB won't boot on a different machine, and you could have problems on your machine when the USB isn't plugged in.

EDIT: To change the target bootloader.

  • In the guide, scroll down to Phase 2, step 6. Look at the bottom of the image, where it says, "Device for boot loader installation". Notice that it shows /dev/sda.
  • Compare that to the image in Phase 2, step 7. There, it shows /dev/sdb. This should have been mentioned in the guide, but wasn't.
  • You must set this to whatever your USB device is, otherwise it'll overwrite the bootloader on your internal disk — you don't want that to happen!
  • Be aware that this is the device (e.g. /dev/sdb) and not a partition (e.g. /dev/sdb2).
Paddy Landau
  • 4,548
  • Thank you, @Paddy Landau, I have a few knowledge on OS and on howto install it, Could you explain me what do you mean: "change the target boot loader installation"? – SPM OR Mar 03 '21 at 07:11
  • @SPMOR — I've added my answer to the end of my solution. – Paddy Landau Mar 03 '21 at 12:45
1

Full Install USB that boots Legacy or UEFI

As Paddy indicates, that link will produce a USB that only boots in Legacy mode, it will not boot on modern computers.

The easiest way to create a Full install USB that boots both BIOS and UEFI modes is to just Flash a pre-built image file to USB. See: Easy Full Install USB that Boots both BIOS and UEFI

The image fits on a 16GB USB but can be expanded and modified as desired using GParted.

After using the USB for a while and are ready to build one from scratch see: How to Create a Full Install of Ubuntu 20.04 to USB Device Step by Step

C.S.Cameron
  • 19,519