0

I have installed grub on USB stick. I now want to add "linux.iso" file to the USB, so that on boot I could run linux from USB.

On boot the grub menu opens, but after trying to load external linux, an error message

casper/vmlinuz not found

appears.

I believe it's due to one of the following:

  1. .iso file is not in the correct directory. It can be found at:

    /mounted_usb/ubuntu-13.04-desktop-i386.iso
    
  2. grub.cfg file is not correctly edited. The cfg file currently looks like this:

    set timeout=10 set default=0
    
    menuentry "Run Ubuntu" {
        loopback loop /ubuntu-13.04-desktop-i386.iso 
        linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/ubuntu-13.04-desktop-i386.iso splash --
        initrd (loop)/casper/initrd.lz
    }
    

    and is stored at /mounted_usb/boot/grub/grub.cfg

  3. Grub was not succesfully installed. I can't locate a file called vmlinuz one the USB. The way I installed GRUB was following this link.

  4. The Ubuntu operating system actually needs to be installed on USB. Currently only iso file is present.

Any help? Essentially what I'm struggling is to how create a boot menu on the USB stick? I want to be able flexibly add several Operating Systems to the USB and get them appear on the menu when trying to power on my laptop from USB. The menu itself appears on boot, but the pointer to the operating system is invalid.

1
  • See this link which is updated to the newest Ubuntu Desktop iso files (23.04 and 23.10). This is implemented in mkusb when using dus-iso2usb.
    – sudodus
    Nov 1, 2023 at 9:55

1 Answer 1

1

A very simple way of creating a GRUB menuentry for a bootable ISO file is to use grml-rescueboot.

The package does the following:

Creates a /boot/grml folder.

Automatically adds menuentries to the GRUB menu for any ISO files located in the /boot/grml folder. This is accomplished whenever the update-grub command is executed. The created menuentry, when selected, provides submenu options on how to boot the ISO, including the "Try Ubuntu" and "Install" options.

To use the grml-rescueboot option:

1. Install grml-rescueboot sudo apt-get install grml-rescueboot

2. Place bootable ISO files in the /boot/grml folder. Since this is a system folder, the operation must be conducted as "root". For example, if the ISO is located in the user's Downloads folder, the command would be:

sudo mv ~/Downloads/<filename.iso> /boot/grml/

3. Update GRUB

sudo update-grub

Since you want to boot from USB, I would suggest that you install a Light version of Ubuntu like xubuntu to the USB drive, boot it and then follow the instructions above installing grub and updating on the USB drive. If this is unclear, leave me a comment regarding any confusion and I'll attempt further clarification.

Sources:

Experience

https://help.ubuntu.com/community/Grub2/ISOBoot

2
  • A question: are you installing grub and placing .iso file to /boot/grml/ system's directory (i.e on the hard disk of the laptop)? I need to place everything on the USB... Or am I missing something? One thing I am still not sure is whether grub should be installed on a laptop itself, or on the USB. Mar 31, 2016 at 14:25
  • I've done both. If you intend to have the iso boot from USB of course you'll need to place it there. and install grub there. I'll edit my answer for clarity.
    – Elder Geek
    Mar 31, 2016 at 15:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .