Grub - boot debian iso file from ntfs partition and install it

11,098

Solution 1

You need download initrd.gz from hd-media directory and put it in the same directory with the image file and give it a suitable name. For example my grub.cfg

menuentry 'Debian Jessie (stable) graphical expert' {
    set isofile='/iso/debian-8.3.0-amd64-lxde-CD-1.iso'
    set initrdfile='/iso/gtk/debian-8.3.0-amd64-lxde-CD-1.initrd.gz'
    loopback loop $isofile
    linux (loop)/install.amd/vmlinuz findiso=$isofile dekstop=lxde priority=low     gfxpayload=1024x768x32
    initrd $initrdfile
}

I find solution in Reddit and here

Solution 2

You must download the hd-media/vmlinuz and hd-media/initrd.gz and use them as the Linux kernel and initial ramdisk respectively. You can't use the vmlinuz and initrd.gz inside the Debian ISO image. The Debian ISO image is the CD the installer ask for.

Here's a detailed guide on my blog : https://www.linuxbabe.com/debian/boot-debian-9-iso-from-hard-drive-grub2

Share:
11,098

Related videos on Youtube

Mas Bagol
Author by

Mas Bagol

I am undefined variable

Updated on September 18, 2022

Comments

  • Mas Bagol
    Mas Bagol over 1 year

    I have problem installing debian directly from hard drive. Say, i have a logical partition /dev/sda5 and there is debian DVD iso file located in (hd0,5)/iso/debian-8.0.0-amd64-DVD-1.iso with initrd file there too. Then I created grub menu entry with this:

    menuentry "Debian Jessie (stable)" {
        set isofile='/iso/debian-8.0.0-amd64-DVD-1.iso'
        set initrdfile='/iso/debian-8.0.0-hdd.initrd.gz'
        loopback loop (hd0,5)$isofile
        linux (loop)/install.amd/vmlinuz iso-scan/ask_second_pass=true iso-scan/filename=$isofile
        initrd (hd0,5)$initrdfile
    }
    

    Booting is successful. But, when come to searching debian CD it fails. The iso file cannot be found by installer. If I use USB drive, every thing goes fine. In USB, I put debian DVD iso in `/boot/iso/debian-8.0.0-amd64-DVD-1.iso'. And the menuentry look like this:

    menuentry 'Debian Jessie (stable)' {
        set isofile='/boot/iso/debian-8.0.0-amd64-DVD-1.iso'
        set initrdfile='/boot/iso/debian-8.0.0-amd64-DVD-1.hdd.initrd.gz'
        loopback loop $isofile
        linux (loop)/install.amd/vmlinuz iso-scan/ask_second_pass=true iso-scan/filename=$isofile
        initrd $initrdfile
    }
    

    My /dev/sda5 is formatted in NTFS and my USB drive is formatted in FAT32. So, I guess the problem is because of filesystem format. And if it is, how can I boot debian iso file properly from NTFS partition?

    Update

    The NTFS partiton is logical partition. Is it causeing problem too?

    • Vincent Nivoliers
      Vincent Nivoliers about 9 years
      From this related thread in ubuntu forums, you may have to insert additional modules in the menuentry, such as insmod ntfs.
    • Mas Bagol
      Mas Bagol about 9 years
      Not working. The install still can't detect iso image file.
  • tripleee
    tripleee about 6 years
    Hello, and welcome to Unix & Linux. Linking to a blog or similar for background and more information is fine, but if you are linking to your own site, you definitely need to be explicit about it. See How not to be a spammer.
  • M G
    M G about 6 years
    @tripleee Just edited my answer.