Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to add an ISO (alternate distro of ubuntu ) to my GRUB .

This is the output of fdisk -l:


FDISK OUTPUT

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00061b6d

 

  Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        9539    76614656   83  Linux
/dev/sda2            9539        9730     1533953    5  Extended
/dev/sda5            9539        9730     1533952   82  Linux swap / Solaris

 

Disk /dev/sdb: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x41ffc810
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1       30401   244196001    c  W95 FAT32 (LBA)

grub.cfg

menuentry "Ubuntu Alternate Install 10.10 32bit" {
 loopback loop (hd0,0)/boot/ubuntu-10.10-alternate-i386.iso
 linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/boot/ubuntu-10.10-alternate-i386.iso noprompt nomodeset 
 initrd (loop)/casper/initrd.lz
}

I added an entry to 40_custom file like this and did a sudo grub-update.

menuentry "Ubuntu Alternate Install 10.10 32bit" {
 loopback loop (hd0,1)/boot/ubuntu-10.10-alternate-i386.iso
 linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/boot/ubuntu-10.10-alternate-i386.iso noprompt nomodeset 
 initrd (loop)/casper/initrd.lz

But I am getting this File Not Found , You need to load kernel etc when I chose this option from the GRUB Menu . Where am I going wrong

share|improve this question
    
Did you try giving your new menuentry a different name than the one in grub.cfg? –  rakslice May 18 '11 at 7:40
add comment

2 Answers

up vote 0 down vote accepted

According to http://pendrivelinux.com/downloads/multibootlinux/grub.cfg you have to leave out the (hd0,1):

menuentry "Ubuntu 10.10 Desktop ISO" {
 loopback loop /ubuntu.iso
 linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/ubuntu.iso noeject noprompt splash --
 initrd (loop)/casper/initrd.lz
}

This can be found at Boot Multiple ISO from USB via Grub2 unsing Linux. Probably you should check out this page and compare these steps with your setup.

Good luck!

share|improve this answer
add comment

I tried to get a community wiki going on these topics, I'll just copy my answer from here below. I hope this helps!


So I have created a simple file 39_iso inside /etc/grub.d/ for loading my ISO's. I have a copy of Ubuntu 10.10, Clonezilla, and SystemRescueCD. My entries make sure the ISO file is available inside /iso/ before adding the menu entry. For example Clonezilla will load into memory, so I can clone my hard drive whenever I want!

Ubuntu 10.10:

if test -e /iso/ubuntu-10.10-desktop-amd64.iso ; then
  isofile="/iso/ubuntu-10.10-desktop-amd64.iso"
  echo "Found Ubuntu 10.10 (x64) ISO: ${isofile}" >&2
  cat << EOF

  menuentry "Ubuntu 10.10 (x64) ISO"
  {
    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile
    initrd (loop)/casper/initrd.lz
  }
EOF
fi

Clonezilla:

if test -e /iso/clonezilla-live-1.2.6-24-amd64.iso ; then
  isofile="/iso/clonezilla-live-1.2.6-24-amd64.iso"
  echo "Found Clonezilla Live ISO: ${isofile}" >&2
  cat << EOF

  menuentry "Clonezilla Live 1.2.6-24-amd64 ISO"
  {
    loopback loop $isofile
    linux (loop)/live/vmlinuz boot=live live-config union=aufs nolocales noprompt ocs_lang="en_US.UTF-8" ocs_live_keymap="NONE" vga=791 ip=frommedia toram=filesystem.squashfs findiso=$isofile
    initrd (loop)/live/initrd.img
  }
EOF
fi

SystemRescueCD

if test -e /iso/systemrescuecd-x86-1.6.2.iso ; then
  isofile="/iso/systemrescuecd-x86-1.6.2.iso"
  echo "Found SystemRescueCD ISO: ${isofile}" >&2
  cat << EOF

  menuentry "SystemRescueCD 1.6.2 (x64) ISO"
  {
    loopback loop $isofile
    linux (loop)/isolinux/rescue64 setkmap=us docache isoloop=$isofile
    initrd (loop)/isolinux/initram.igz
  }
EOF
fi

I've also fixed how GRUB names Windows 7 as Windows 7 (loader) to something nicer like Windows 7 Professional (x64):

if [ "${LONGNAME}" = "Windows 7 (loader)" ] ; then
  LONGNAME="Windows 7 Professional (x64)"
elif [ -z "${LONGNAME}" ] ; then
  LONGNAME="${LABEL}"
fi

It replaced a section such as the following:

if [ -z "${LONGNAME}" ] ; then
  LONGNAME="${LABEL}"
fi

Inside 30_os-proper of GRUB

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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