Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to understand the Debian "booting from Hard Disk" installation manual.

The process is as follows: I copy a kernel image, a ramdisk initrd and an ISO with installer to the hard drive and then configure GRUB to start the kernel and ramdisk, but also I have to tell GRUB, where is the root filesystem (it should be located at the ISO), so that the kernel could pivot root to it. But the debian-supplied grub configurations seem to specify the whole hard drive as the root filesystem, not the ISO file within it:


title  New Install
root   (hd0,0)
kernel /boot/newinstall/vmlinuz
initrd /boot/newinstall/initrd.gz


menuentry 'New Install' {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
linux /boot/newinstall/vmlinuz
initrd /boot/newinstall/initrd.gz

Why would that work? Is GRUB so smart to mount the ISO file on the hard disk as root filesystem, not the whole hard disk? Or do I have to dd the contents of ISO right onto the hard disk? Debian is vague on this.

share|improve this question
It's the kernel/initrd that loop mounts the ISO once booted, so GRUB is not involved. In case of the net installer it doesn't even need any ISO at all. –  frostschutz Oct 1 '13 at 14:40
@frostschutz Why would kernel loop mount the ISO? How does it know, what to mount? –  Bob Oct 1 '13 at 14:42
the initrd.gz (initramfs) contains the busybox userland and Debian scripts written to that purpose. GRUB2 also supports loop mounting ISO directly, but usually just to grab the kernel/initrd from the ISO itself, and once that's loaded again the ISO has to be found and loopmounted by the kernel/initrd. –  frostschutz Oct 1 '13 at 14:55
@frostschutz Thanks so much, frostschutz, your post and this stuff mostly explains it: wiki.gentoo.org/wiki/Early_Userspace_Mounting. So, GRUB's root option only points to a folder, where GRUB stores its belongings, right? And what about the contents of /proc/cmdline, does it point to the Linux root filesystem, obtained from initramfs or GRUB root filesystem, obtained from GRUB config? Could you post your answer as an answer, not as a comment, so that I could accept it and close the question. –  Bob Oct 1 '13 at 15:27
add comment

Your Answer


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

Browse other questions tagged or ask your own question.