0

I'm new to Linux and I've been trying to install it to an external NVME M2 (USB) drive with partial success about 3 times now, but still can't figure out how to proceed with certain steps of How to Create a Full Install of Ubuntu 20.04 to USB Device Step by Step

I'm stuck at these steps specifically:

  1. Copy the boot and the EFI folders from the Ubuntu ISO file to the boot,esp partition sdx3.
  2. If there any problems with permissions, etc, open Nautilus using sudo -H nautilus and try copying again.
  3. Copy grub.cfg from partition sdx4 /boot/grub/ to partition sdx3 /boot/grub/ overwriting the grub.cfg file.

The reason I'm stuck is that I can't seem to be able to access the sdx3 (in my case sdb3) partition. It shows up in Gparted and it's FAT32 as indicated, but I can't access via the file system to copy the contents, unfortunately :(

Can anyone shed a light on this, please? I'm using the exact same version of Ubuntu described in the guide and the EXACT external device described in another article (which led me to this one) found here: https://www.58bits.com/blog/2020/02/28/how-create-truly-portable-ubuntu-installation-external-usb-hdd-or-ssd

muru
  • 197,895
  • 55
  • 485
  • 740
newtolinux
  • 13
  • 6
  • Alternatively, you should be able to right click the disk in GParted and mount from the context menu there. – galexite Aug 02 '21 at 16:53
  • The thing is, the EFI System Partition is considered a ‘system’ partition and is not automatically mounted unless it is in /etc/fstab. – galexite Aug 02 '21 at 16:54
  • 1
    Thank you all so very much!! That did the trick, and I'm now able to copy the contents over. It's just taking forever for a few MBs, but I suspect it may have to do with the FAT32 file system.

    Thank you all once again!

    – newtolinux Aug 03 '21 at 01:46
  • 1
    I have created an answer to your question from the relevant parts of the other answer. If you think this answer is correct, then accept the answer by clicking on the gray check mark and turn it green ✅. this will mark the question as answered and help others. – user68186 Aug 03 '21 at 19:41

1 Answers1

1

Within the the Ubuntu still running from the installation ISO open the app "disks" and select the USB drive from the left panel:

enter image description here

Note the device name, /dev/vda. This is different from the the /dev/sdx as I am using a Virtual Machine. Also note that:

  • /dev/vda1 is the equivalent of /dev/sdx3 in the answer you are following.
  • /dev/vda5 is the equivalent of /dev/sdx4 in the answer you are following.

Note the size of Partition 3 and Partition 4, in this case 537 MB and 767 MB respectively. This will help us find these partitions later.

Mount these two partitions by clicking on the black triangles and turning them into squares.

Open the Files app (AKA Nautilus) in the VM, and navigate to +Other Locations > Computers > cdrom. This is the Ubuntu installation ISO we have booted from.

Open another instances of the Files app in the VM and and navigate to +Other Locations > 537 MB Volume. This is Partition 3.

Resise and move the two opened Files window so that you can see both as shown below.

Copy the folder boot and EFI from the cdrom to Partition 3:

enter image description here

Now navigate to +Other Locations > 767 MB Volume > grub in the top Files window.

And to +Other Locations > 537 MB Volume > boot > grub in the bottom Files window as shown below:

enter image description here

Copy the grub.cfg file from /media/ubuntu/f31c1dbd-ea5c-487c-a14a-90b6edcea385/grub to /media/ubuntu/4281-A2FB/boot/grubas shown above.

Open the app disks again and unmount partition 3 and partition 4. close the disks app.

Open the terminal app and mount partition 3 in /mnt and install grub with the two commands:

sudo mount /dev/vda1 /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/vda

Note here we refer to the USB drive as /dev/vda and the first partition as /dev/vda1, but your partition 3 will be /dev/sdx3 or something similar.

enter image description here

Note, you won't need any password for sudo in the Live install boot.

Close the terminal and power off the computer. Hit Enter when prompted.

hope this helps

user68186
  • 33,360
  • Sorry, I'm new to the forum and didn't know how to select the right choice, so I added all the options that helped me do what I wanted to an "answer" which I've now deleted in lieu of this one.

    Now I know what happened. The comments that helped me couldn't be chosen as answers, but the above and super well detailed explanation could, so I've chosen that as the answer as it covers EXACTLY what I was trying to achieve. Thanks again.

    – newtolinux Aug 04 '21 at 00:04
  • @newtolinux Welcome to Ask Ubuntu! – user68186 Aug 04 '21 at 02:34