How to create a bootable HARDDISK Image with GRUB2?
Posted: Sat Jul 16, 2016 10:50 pm
Here I am, the most idiotic person ever to be on osdev forums :p
So this time my Question is JUST THIS-> I WANT TO CREATE AN HDD IMAGE via GRUB2 Which also contains my KERNEL and CONFIG FILE. HOW TO DO IT??? In another way, i wanna ask that I just want to create something SIMILAR to the CDROM ISO File we create using grub-mkrescue except that it should be for HDD not CD-ROM. Help please :/
I Tried made an hdd using 'dd' and then formated via 'fdisk'. then creating the loopback devices to it and formatting it with ext2 and fat32 (once with ext2, didnt worked, then with fat32 so i can check it directly on my windows and dont have to boot linux again. still didnt work :/ ). So here is what I did after that-> I mounted the new partition (starting from 1MB) and then used grub-install .... (I experimented with several configs, none worked). Then I put my Kernel and grub.cfg in /boot and /boot/grub dirs respectively of my hdd image. Currently I get <b>'error: no such device:<some no>'</b>.
I just wanna ask the EXACT steps for doing this (And with using my kernel and config file being included in the core image itself while on build). PLEASE HELP >_<
So this time my Question is JUST THIS-> I WANT TO CREATE AN HDD IMAGE via GRUB2 Which also contains my KERNEL and CONFIG FILE. HOW TO DO IT??? In another way, i wanna ask that I just want to create something SIMILAR to the CDROM ISO File we create using grub-mkrescue except that it should be for HDD not CD-ROM. Help please :/
I Tried made an hdd using 'dd' and then formated via 'fdisk'. then creating the loopback devices to it and formatting it with ext2 and fat32 (once with ext2, didnt worked, then with fat32 so i can check it directly on my windows and dont have to boot linux again. still didnt work :/ ). So here is what I did after that-> I mounted the new partition (starting from 1MB) and then used grub-install .... (I experimented with several configs, none worked). Then I put my Kernel and grub.cfg in /boot and /boot/grub dirs respectively of my hdd image. Currently I get <b>'error: no such device:<some no>'</b>.
I just wanna ask the EXACT steps for doing this (And with using my kernel and config file being included in the core image itself while on build). PLEASE HELP >_<