GUIDE TO BOOTING LIVE UBUNTU IMAGE FROM AN SSD WITH NVMe INTERFACE SPECIFICATIONS
This guide was tested with GRUB version 2.12-1ubuntu7.3 installed on a solid-state drive with NVMe interface specifications. System changes were made using the Ubuntu 24.04.3 LTS operating system.
Please read the text carefully and make a bootable USB stick/CD/DVD before applying any system changes.
Disclaimer: This guide was written for research purposes. The author have no responsibility for any consequences, including potential device brick, violating manufacturer licenses, lose device warranty etc.
Step 1. Create a 10GB Ext4 partition named "Image" via gnome-disks (optionally)
$ gnome-disks
Note: Creating a partition is optional. Learn more by clicking on the following link.
Step 2. Mount the partition manually
Step 3. Save the Live image (ISO file) in the target partition
Note: You can get the image you need by clicking on the following link.
Step 4. Use blkid command to display UUID identifiers
$ sudo blkid
Example:
/dev/nvme0n1p5: LABEL="Image" UUID="55555555-5555-5555-5555-555555555555" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Image" PARTUUID="11111111-1111-1111-1111-111111111111"
Step 5. Use lsblk or fdisk -l command to display partitions
$ sudo lsblk
$ sudo fdisk -l
Example:
nvme0n1 xxx:x 0 x,xT 0 disk
├─nvme0n1p1 xxx:x 0 xxxM 0 part /boot/efi
├─nvme0n1p2 xxx:x 0 xx,xG 0 part /
├─nvme0n1p3 xxx:x 0 xxx,xG 0 part
├─nvme0n1p4 xxx:x 0 xxG 0 part
└─nvme0n1p5 xxx:x 0 x,xG 0 part
Note: For the nvme0n1p5 partition on the nvme0n1 disk, you will need to enter the text (hd0,5).
Step 6. Create a bootloader entry then save the changes
$ sudo nano '/etc/grub.d/40_custom'
Insert the following content:
# Live Image
menuentry "Live Image" {
set isofile="/ubuntu-xx.xx.x-desktop-amd64.iso"
set partition="/dev/disk/by-uuid/00000000-0000-0000-0000-000000000000"
loopback loop (hdx,x)$isofile
linux (loop)/casper/vmlinuz boot=casper layerfs-path=minimal.standard.live.squashfs iso-scan/filename=$isofile
initrd (loop)/casper/initrd
}
Note: You will need to replace the text fragments ubuntu-xx.xx.x-desktop-amd64.iso, 00000000-0000-0000-0000-000000000000, hdx,x with the correct ones.
Example:
# Live Image
menuentry "Live Image" {
set isofile="/ubuntu-24.04.3-desktop-amd64.iso"
set partition="/dev/disk/by-uuid/55555555-5555-5555-5555-555555555555"
loopback loop (hd0,5)$isofile
linux (loop)/casper/vmlinuz boot=casper layerfs-path=minimal.standard.live.squashfs iso-scan/filename=$isofile
initrd (loop)/casper/initrd
}
Step 7. Update GRUB
$ sudo update-grub
Step 8. Edit the grub file then save the changes (optionally)
$ sudo nano /etc/default/grub
Add the following line: GRUB_SAVEDEFAULT=true
Replace the following lines: GRUB_DEFAULT=0, GRUB_TIMEOUT_STYLE=hidden, GRUB_TIMEOUT=0 with GRUB_DEFAULT=saved, GRUB_TIMEOUT_STYLE=menu, GRUB_TIMEOUT=3
Example (fragment of the final text):
GRUB_SAVEDEFAULT=true
GRUB_DEFAULT=saved
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=3
GRUB_DISTRIBUTOR=`( . /etc/os-release; echo ${NAME:-Ubuntu} ) 2>/dev/null || echo Ubuntu`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
Note: Changes are necessary for easy access and use of the GRUB menu.
Step 9. Update GRUB
$ sudo update-grub
Step 10. Reboot your system
Step 11. Select the Live Image option in the GRUB menu then press Enter.
TROUBLESHOOTING
Problem: Screen tearing occurs during video playback.
Action:
Edit the custom.conf file
$ sudo nano /etc/gdm3/custom.conf
Comment (#) the line “WaylandEnable=false”
Restart the GNOME Display Manager
$ sudo systemctl restart gdm3
Try using Wayland instead of Xorg.
ADDENDUM
Bootloader entries for Kali Linux Live image
For normal mode:
# Kali Linux Live
menuentry "Kali Linux Live" {
set isofile="/kali-linux-xxxx.x-live-amd64.iso"
loopback loop (hdx,x)$isofile
linux (loop)/live/vmlinuz boot=live components quiet splash findiso=$isofile
initrd (loop)/live/initrd.img
}
For a mode similar to “Forensics”:
# Kali Linux Live (toram noswap noautomount)
menuentry "Kali Linux Live (toram noswap noautomount)" {
set isofile="/kali-linux-xxxx.x-live-amd64.iso"
loopback loop (hdx,x)$isofile
linux (loop)/live/vmlinuz boot=live components quiet splash findiso=$isofile toram noswap noautomount
initrd (loop)/live/initrd.img
}
Note: Was tested with kali-linux-2025.2-live-amd64.iso. You can get the image you need by clicking on the following link.
Note: You will need to replace the text fragments kali-linux-xxxx.x-live-amd64.iso, hdx,x with the correct ones.
REFERENCES