7

Background: I installed Ubuntu 20.04 successful to the pen drive. Everything works fine. Nvidia drivers and AMD drivers install without a problem and the system works fine. I want to use this drive to take around with me as my own personal OS.

Problem: After I restart my PC and boot from the pen drive on my own PC the drivers for NVIDIA will not load and I am left with a black screen with an X as my cursor. Upon going into recovery mode I can login and see the screen again. However, this is with the open source drivers and I need the NVIDIA drivers for some compute tasks at home (mainly faster GPU mining).

What I tried: I tried editing the grub file to load the Nvidia driver and it still would give me a black screen with an X as my cursor. I tried editing the boot parameters to no avail. Probably lack of knowledge on my end. I don't want this to be a problem if I were to switch systems say to and AMD another NVIDIA system or something else.

What I would like: I'd like to make 3 boot options. One for NVIDIA, one for AMD and one that will load the open source drivers. I know it's possible but the question is how?

Thanks for taking the time to read this!

3 Answers3

8

Ubuntu 20.04 USB that boots both BIOS and UEFI with Nvidia, AMD and Standard GPU Drivers. Step by Step

  1. Create Full Install of Ubuntu 20.04 to USB that works in both BIOS and UEFI modes using the procedure at this link: https://askubuntu.com/a/1217839/43926.

  2. Create the Data and two boot partitions as shown. Make the / partition about 20GB. Be sure to use the option for separate /home partition. Make it about 50GB. Leave remaining space empty.

  3. After installation set up OS as desired with all programs and apps needed. Do not install any proprietary graphics drivers.

  4. Boot Live Ubuntu USB, (or GParted USB), and start GParted.

  5. Right click the / partition of the USB and select Copy.

  6. Right click the empty space and select Paste. Repeat to create the third OS partition. Click Apply All Operations.

  7. Expand the NTFS or Fat32 Data partition(s) for sharing with Windows or Apple. Click Apply All Operations.

  8. Right click one of the OS partitions and select New UUID. Repeat to change the next OS partition UUID. Click Apply All Operations.

GParted

  1. Close GParted and reboot.

  2. In Terminal run sudo update-grub.

  3. Open Gnome-Disks and mount the partitions with new UUID's.

  4. Start Nautilus using sudo -H nautilus.

  5. Edit /etc/fstab of each OS partition to change the UUID as shown in Disks.

  6. Edit sdx4 boot/grub/grub.cfg to correct the UUID's on the linux ... lines if needed.

  7. Copy grub.cfg to sdx3 boot/grub/grub.cfg one more time.

  8. Boot each OS and install proprietary GPU drivers as you wish.

  9. Test.

Check completed.

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

Sharing /home Partition

As Irsu85 noted, you can install the same version of Ubuntu to a pendrive multiple times.

You can also create a /home partition and share it between all of the installs as long as they are the same flavour and version. The experience with each install should then be the same.

I would start with a minimum of 20GB for each / partition and about 50GB for the /home partition.

Use any remaining space for an NTFS Data partition, if you will be sharing data with a Windows computer or FAT32 if sharing with an Apple computer.

Installation should be straight forward. GRUB from the final install should include each Ubuntu install in the boot menu, if not, just run sudo update-grub.

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

You can install multiple instances of Ubuntu by just running the installer again and make the partition for the other ubuntu installation smaller. Then install grub customizer on one instance to rename the different ubuntu installation in GRUB.

If you need more info, please comment

Thanks

Irsu85

Irsu85
  • 611