LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Need to install grub2 on "empty" drive, needs to only boot from a iso. (https://www.linuxquestions.org/questions/linux-software-2/need-to-install-grub2-on-empty-drive-needs-to-only-boot-from-a-iso-816109/)

brubizu 06-24-2010 06:57 AM

Need to install grub2 on "empty" drive, needs to only boot from a iso.
 
Hey people... don't know if this is the correct area for bootloaders but i guess it is...

I'm making a custom ubuntu, that it will work only as a liveCD... I mean, everytime I boot the pc, it will load the squashfs image.

So that's what I'm doing:

There will be only a folder system with a livecd iso file inside... called "thin.iso"

and the grub will only have a menuentry that boots this iso.

I have already managed to do it in a pc with a full instalation of Ubuntu, that is, with an already working GRUB2.

But I can't manage to install the GRUB2 from the live environment with no system installed on the drive.

I tried coping the /boot folder to the drive, alongside with the "thin.iso", but still doesn't work.

Can somebody help me to install a grub on an empty harddrive?
I'm using a xfs partition to store the iso.

amani 06-24-2010 10:04 AM

Welcome to LQ!


See 11th post in http://michael-prokop.at/blog/2009/0...iso-via-grub2/

brubizu 07-01-2010 08:17 AM

Got it...

I mounted the formatted drive to a temp folder and installed it with:

Code:

grub-install --root-directory=tempfolder /dev/sda
and then "manually" created a grub.cfg

don't forget to flag the partition as bootable....


All times are GMT -5. The time now is 05:50 PM.