2

The issue I'm having is that my bootable usb I have only works with certain boot images, to be more specific it will boot Ubuntu desktop iso images but not Ubuntu server. If I try to boot Ubuntu server iso images, the screen just turns a dark redish color, and then restarts the computer. I'm using grub's menu and below are my menu entries.

Here is part of my grub.cfg:

#
# Brians options
#
menuentry "Brian - ubuntu 14.04.2 Desktop i386" {
         set isofile="/bootImg/ubuntu-14.04.2-desktop-i386.iso"
         loopback loop (hd0,1)/bootImg/ubuntu-14.04.2-desktop-i386.iso
         linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject
         initrd (loop)/casper/initrd.lz
}
menuentry "Brian - ubuntu 15.04 Server x64_32" {
         set isofile="/bootImg/ubuntu-15.04-server-amd64.iso"
         loopback loop (hd0,1)/bootImg/ubuntu-15.04-server-amd64.iso
         linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject
         initrd (loop)/casper/initrd.lz
}
menuentry "Brian - ubuntu 14.04.2 Server i386" {
         set isofile="/bootImg/ubuntu-14.04.2-server-i386.iso"
         loopback loop (hd0,1)/bootImg/ubuntu-14.04.2-server-i386.iso
         linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject
         initrd (loop)/casper/initrd.lz
}
menuentry "Brian - Ubuntu 14.04.2 Server i386 Test" --class ubuntu {
   set isoname="ubuntu-14.04.2-server-i386.iso"
   set isofile="/bootImg/${isoname}"
   loopback loop (hd0,10)$isofile
   linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=${isofile} quiet splash
   initrd (loop)/casper/initrd.lz
}

Only the first menu entry works, the rest restart the computer. The 2nd menu entry is where I tried using Ubuntu server, when that didn't work I tried using a 32 bit version. Next I looked at some forums, and some one with a similar problem said he tried using something similar to the 4th menu entry so I tried it as well.

When I boot an Ubuntu desktop image it boots to the "try ubuntu" mode where its not installed to your computer, but has the install button on the desktop, and otherwise acts like its on your computer.

As a summary I would like to know what I have to do to change the grub configuration so that I can boot Ubuntu server iso images.

2

To boot Ubuntu server I'm using a menuentry like so:

menuentry "Ubuntu server installer" {
    set isofile=/isos/ubuntu-15.04-server-amd64.iso
    loopback isoloop $isofile
    set gfxpayload=keep
    linux   (isoloop)/install/vmlinuz file=/cdrom/preseed/ubuntu-server.seed iso-scan/filename=$isofile quiet noeject --
    initrd  (isoloop)/install/initrd.gz
}

Looks like you're missing the file=/cdrom ... line. The path passed here is where you mount the ISO.

Fair warning though: In my experience the Ubuntu installer does not work gracefully from a loopback mounted ISO. The desktop installer gets confused when it encounters a mounted file system that's not an ISO (your USB drive in this case) and it will want to umount it. When I tried a full install from my USB + ISO setup the Desktop installer disk partitioning step messed up my USB drive rendering it unbootable (had to reinstall grub). Also, support for iso-scan/filename doesn't work with the server installer so I had to manually losetup & mount it.

It seems like support for this sort of configuration has regressed in the last few releases unfortunately.

  • Where is that "preseet/ubuntu.server.seed" file coming from? – skerit Dec 16 '15 at 23:17
  • The installer has some magic in it that will mount the ISO from the USB on /cdrom. The installer ISO itself has a directory /preseed with the ubuntu-server.seed file in it. It's kinda weird but at the time that grub evaluates this menuentry /cdrom isn't mounted but by the time the ubuntu installer used this data it will have already been mounted. This feature is documented in the Ubuntu community docs but doesn't look like it's been updated since 12.04: help.ubuntu.com/community/Grub2/ISOBoot – flihp Dec 18 '15 at 1:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.