1

I've tried to install ubuntu on my pen drive several times and always get the same error during installation that says "Attempt to mount a filesystem with type ext4 at '/' failed", or something like it. I've tried to work around this problem for some time, tried all possible ways to install ubuntu and the result was always the same. I wnat to know if there's a way to just copy the files from a machine with ubuntu full installed to the removable device, and then make the device bootable. Like a direct install, copy the necessary files to pen drive and make it work. Is there any way to do that ? Any help would be appreciated

3 Answers3

2

It is not possible to do it the way you have tried and, no, it won't work to just copy files from a computer to a USB stick and make it work. There is a way to install Ubuntu (or whichever distribution you choose) but it is tricky. There is a recipe in the accepted answer on:

How to Create a Full Install of Ubuntu 20.04 to USB Device Step by Step

Be sure to follow it to the letter.

Serafim
  • 515
1

Copy Ubuntu from Desktop to USB drive

It is quite easy to copy Ubuntu from your desktop computer to a USB drive, so that It boots both BIOS and UEFI modes.

  • Start by creating a Persistent USB using mkusb with default settings.

  • Delete partitions 4 and 5. Keep partition 1 if you want a Linux/Windows data partition.

  • Confirm that there is enough empty space on the USB for your desktop's Ubuntu system partition, (/). Shrink the NTFS partition if necessary.

  • Boot computer from a second Live USB.*

  • Open GParted, select the internal drive, right click the system partition and select copy.

  • Select the USB drive, right click the empty space and select paste.

  • Run GParted, when done copy grub.cfg from the new root partition /boot/grub/ to the Partition 2 /boot/grub/, overwriting the existing grub.cfg file.

  • If you plan on using the drive on your desktop. it is a good idea to use GParted to change the USB's UUID. GRUB and fstab UUIDs would also need to be updated.

*If you only have one USB, you can boot the mkusb install toram and then continue to delete it's partitions 4 and 5 and clone the desktop's system partition to it.

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

Thanks everybody, sorry for my delay on answering. The problem really was the usb. O got a new one and things just worked out. I really appreciate the help =)