Appendix: Ubuntu 22.04 Installation Guide¶
Complete guide for installing Ubuntu 22.04 LTS for SimToFly tutorials.
Choose your installation method:
- Virtual Machine (Recommended for Beginners)
- Dual Boot (Better Performance)
- Native Installation (Best Performance)
Virtual Machine Installation¶
Best for: Beginners, trying before committing, keeping current OS
Pros:
- Safe - doesn't modify your current system
- Easy to snapshot and restore
- Can run alongside Windows/macOS
- Easy to delete if you change your mind
Cons:
- Slower performance (especially Gazebo)
- Requires powerful host computer
- Shared resources with host OS
Step 1: Install VirtualBox¶
Download VirtualBox:
- Visit: https://www.virtualbox.org/wiki/Downloads
- Download for your OS (Windows, macOS, or Linux)
- Install VirtualBox
Verify installation:
- Open VirtualBox
- Should see main window with no VMs
Step 2: Download Ubuntu 22.04 ISO¶
Download:
- Visit: https://ubuntu.com/download/desktop
- Click "Download Ubuntu 22.04.x LTS"
- Save ISO file (~4GB download)
File name: ubuntu-22.04.x-desktop-amd64.iso
Step 3: Create Virtual Machine¶
In VirtualBox, click "New":
Basic settings:
Memory (RAM):
Hard disk:
Disk settings:
File size: 50 GB minimum (80 GB recommended)
Hard disk file type: VDI (VirtualBox Disk Image)
Storage: Dynamically allocated
Click "Create"
Step 4: Configure VM Settings¶
Before starting VM, adjust settings:
Right-click VM → Settings
System:
Motherboard tab:
Base Memory: 8192 MB (or more)
Boot Order: Hard Disk first, Optical second
Processor tab:
Processors: 4 CPUs minimum (6-8 if available)
☑ Enable PAE/NX
Display:
Storage:
Click "Empty" under Controller: IDE
Click disk icon on right → "Choose a disk file"
Select downloaded Ubuntu ISO
Network:
Click "OK"
Step 5: Install Ubuntu¶
Start VM:
- Select VM → Click "Start"
- VM boots from Ubuntu ISO
Ubuntu installer:
- Language: Select English (or your language)
- Install Ubuntu: Click "Install Ubuntu"
- Keyboard layout: Select your layout
-
Updates:
-
☑ Normal installation
- ☑ Download updates while installing
-
☑ Install third-party software
-
Installation type:
- ☑ Erase disk and install Ubuntu (safe - only affects VM disk)
- Time zone: Select your location
-
User setup:
-
Your name: (your name)
- Computer name: simtofly-vm
- Username: (your username)
- Password: (create strong password)
- ☑ Require password to log in
Installation takes: 15-30 minutes
Restart when prompted
Step 6: Install Guest Additions¶
After Ubuntu boots:
VirtualBox menu → Devices → Insert Guest Additions CD
In Ubuntu terminal:
sudo apt update
sudo apt install build-essential dkms linux-headers-$(uname -r)
sudo mkdir /media/cdrom
sudo mount /dev/cdrom /media/cdrom
cd /media/cdrom
sudo ./VBoxLinuxAdditions.run
Reboot:
Benefits:
- Better screen resolution
- Shared clipboard
- Drag and drop files
- Better mouse integration
Step 7: Take Snapshot¶
Before starting tutorials:
VM menu → Machine → Take Snapshot
Why? If something breaks, restore to this point.
VM Performance Tips¶
If VM is slow:
-
Allocate more resources:
-
More RAM (if host allows)
- More CPU cores
-
More video memory
-
Enable 3D acceleration:
-
Settings → Display → Enable 3D Acceleration
-
Use SSD for VM:
-
Store VM on SSD, not HDD
-
Close other applications:
-
On host OS while running VM
-
Disable visual effects in Ubuntu:
Dual Boot Installation¶
Best for: Users wanting better performance while keeping current OS
Pros:
- Full hardware performance
- Native GPU acceleration
- Better Gazebo performance
- Keep existing OS
Cons: - Requires disk partitioning (some risk) - More complex setup
⚠️ Warning: Back up important data before proceeding!
Prerequisites¶
Before starting:
- Back up all important data
- 50GB+ free disk space
- USB drive (8GB+)
- Stable power (laptop: plug in charger)
- BIOS/UEFI access knowledge
Step 1: Create Ubuntu USB¶
On Windows:
- Download Rufus: https://rufus.ie/
- Insert USB drive (will be erased!)
- Open Rufus
- Select your USB drive
- Select Ubuntu ISO
- Click "Start"
- Wait for completion (~5-10 minutes)
On macOS/Linux:
- Download Etcher: https://etcher.balena.io/
- Insert USB drive
- Select Ubuntu ISO
- Select USB drive
- Flash!
Step 2: Free Up Disk Space¶
Windows:
- Open "Disk Management" (search in Start menu)
- Right-click your largest partition (usually C:)
- Select "Shrink Volume"
- Shrink by: 50000 MB (50 GB) or more
- Click "Shrink"
- Should see "Unallocated" space
macOS:
- Open "Disk Utility"
- Select main disk
- Click "Partition"
- Add partition: 50GB+ for Ubuntu
- Format: Free Space
- Apply
Step 3: Boot from USB¶
Enter BIOS/UEFI:
- Restart computer
- Press key during startup:
- Dell/HP: F2 or F12
- Lenovo: F1 or F2
- ASUS: F2 or Del
- Acer: F2 or Del
Change boot order:
- Find "Boot" menu
- Move USB drive to top
- Save and exit (usually F10)
Computer boots from USB:
- Shows Ubuntu logo
- Select "Try or Install Ubuntu"
Step 4: Install Ubuntu¶
Important: Choose "Install Ubuntu alongside [Windows/macOS]"
Installation steps:
- Language: English
- Install Ubuntu: Click Install
- Keyboard: Select layout
-
Updates:
-
Normal installation
- Download updates
- Install third-party software
-
Installation type:
-
☑ Install Ubuntu alongside [your OS] ← Important!
- Ubuntu will use free space created earlier
- Review partition changes
- Time zone: Select location
-
User setup:
-
Name, username, password
- Computer name: simtofly
Installation: 15-30 minutes
Restart when complete
Step 5: Configure Bootloader¶
After reboot:
- Should see GRUB menu
- Options: Ubuntu, Windows (or macOS)
- Default: Ubuntu
To change default OS:
Change:
Update:
Step 6: Verify Both OS Work¶
Test Ubuntu:
- Boot into Ubuntu
- Verify everything works
Test other OS:
- Reboot → Select Windows/macOS from GRUB
- Verify it still works
✅ Both work? Dual boot successful!
Dual Boot Tips¶
Switch between OS:
- Restart → Choose from GRUB menu
- Default selection after 10 seconds
If GRUB doesn't show:
If Windows doesn't appear:
Native Installation¶
Best for: Dedicated machine for drone development, best performance
Pros:
- Maximum performance
- Full hardware access
- No compromises
- Best for serious development
Cons:
- Erases existing OS
- Requires dedicated hardware
Use this if:
- You have spare computer
- You don't need Windows/macOS on this machine
- You want best performance
Installation Steps¶
Same as dual-boot, but:
At "Installation type":
- Choose: "Erase disk and install Ubuntu"
- Warning: This deletes everything on disk!
Make absolutely sure:
- You backed up important data
- You selected correct disk (if multiple disks)
- You're okay losing current OS
Otherwise: Same as dual-boot installation above
✅ Verify Installation¶
After installing Ubuntu (any method), verify:
Ubuntu version:
Should show: Ubuntu 22.04.x LTSSystem resources:
Internet:
Graphics (if VM):
All working? ✅ Ready for Phase 1!
Common Issues¶
VirtualBox: "VT-x is not available"¶
Cause: Virtualization disabled in BIOS
Solution:
- Restart computer → Enter BIOS
- Find "Virtualization Technology" or "VT-x" or "AMD-V"
- Enable it
- Save and exit BIOS
- Try VirtualBox again
Dual Boot: GRUB not showing¶
Cause: GRUB didn't install properly
Solution: Boot Ubuntu USB → Try Ubuntu → Open terminal:
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt update
sudo apt install boot-repair
boot-repair
Dual Boot: Windows won't boot¶
Cause: GRUB installed over Windows bootloader
Solution:
- Use Boot Repair (above)
- Or: Boot from Windows recovery USB
- Run:
bootrec /fixmbrandbootrec /fixboot - Reinstall GRUB from Ubuntu live USB
Screen resolution wrong in VM¶
Cause: Guest Additions not installed
Solution: Install Guest Additions (see VM Step 6 above)
Ubuntu installer crashes¶
Cause: Bad ISO or USB
Solution:
- Verify ISO checksum
- Re-download ISO
- Re-flash USB drive
- Try different USB drive
Additional Resources¶
Official Ubuntu Guides:
- Installation: https://ubuntu.com/tutorials/install-ubuntu-desktop
- Dual boot Windows: https://help.ubuntu.com/community/WindowsDualBoot
- VirtualBox: https://www.virtualbox.org/manual/
Video Tutorials:
- Search YouTube: "Install Ubuntu 22.04"
- Filter: Last year
Community Help:
- Ubuntu Forums: https://ubuntuforums.org/
- Ask Ubuntu: https://askubuntu.com/
Quick Decision Guide¶
Choose installation method:
Do you have spare computer?
YES → Native installation (best performance)
NO ↓
Are you comfortable with disk partitioning?
YES → Dual boot (good performance + keep current OS)
NO ↓
Is your computer powerful? (16GB+ RAM, 8+ cores)
YES → Virtual Machine (safe + easy)
NO → Consider dual boot or upgrade hardware
← Back to Prerequisites | Continue to 1.2 Environment Setup →