4

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?

5

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

0

For Debian 8 (jessie), you need different options to find the iso image (the option you specified are valid for Ubuntu).

Change your grub entry as follows:

linux (loop)/install.amd/vmlinuz findiso=$isofile
-1

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

  • 2
    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. – tripleee Apr 11 '18 at 6:53
  • @tripleee Just edited my answer. – LinuxBabe Apr 11 '18 at 7:05

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.