GRUB on VMware workstation

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
wonde
Posts: 6
Joined: Wed Mar 12, 2008 11:39 am

GRUB on VMware workstation

Post by wonde »

Hi all
I have a kernel <<kernel.bin>> I have been booting my kernel using GRUB, which is loaded on Ubuntu OS by putting it on /kernel/boot directory and by editing GRUB's menu.lst file but at this time i want to install GRUB with my OS(kernel.bin) on Vmware workstation but i don't have any idea how to do that, could you tell me what I should do on VMware thanks
User avatar
KrnlHckr
Member
Member
Posts: 36
Joined: Tue Jul 17, 2007 9:16 am
Location: Washington, DC Metro Area
Contact:

Re: GRUB on VMware workstation

Post by KrnlHckr »

wonde wrote:Hi all
I have a kernel <<kernel.bin>> I have been booting my kernel using GRUB, which is loaded on Ubuntu OS by putting it on /kernel/boot directory and by editing GRUB's menu.lst file but at this time i want to install GRUB with my OS(kernel.bin) on Vmware workstation but i don't have any idea how to do that, could you tell me what I should do on VMware thanks
I'm using VMware Server with a floppy image. This works fine for what I'm doing. I simply have a blank floppy image and 'dd' the kernel bin over to it. It works with either my generic bootloader code or grub.

The following bourne script will use the loopback block device to install the kernel to the floppy and then copy that .flp image over to my local datastore for VMware to find it.

Code: Select all

#!/bin/sh

sudo /sbin/losetup /dev/loop0 $HOME/kernel/floppy.flp
sudo mount /dev/loop0 /mnt
sudo cp $HOME/kernel/kernel.bin /mnt/vmkern
sudo umount /dev/loop0
sudo /sbin/losetup -d /dev/loop0

sudo cp $HOME/kernel/floppy.flp /var/lib/vmware/Virtual\ Machines/common/kernel.flp
Check out http://www.osdev.org/wiki/Loopback_Device for more details on using the loopback device. Information on creating disk images can be found here: http://www.osdev.org/wiki/Disk_Images
"If your code won't run, verify that you are, indeed, using the STABLE branches of your toolchain!" -- KrnlHckr, 2007 :oops:
User avatar
jinksys
Posts: 20
Joined: Tue May 20, 2008 4:52 pm
Location: St Louis, Missouri, USA

Re: GRUB on VMware workstation

Post by jinksys »

wonde wrote:Hi all
I have a kernel <<kernel.bin>> I have been booting my kernel using GRUB, which is loaded on Ubuntu OS by putting it on /kernel/boot directory and by editing GRUB's menu.lst file but at this time i want to install GRUB with my OS(kernel.bin) on Vmware workstation but i don't have any idea how to do that, could you tell me what I should do on VMware thanks
Read this -> http://www.osdev.org/wiki/GRUB
Post Reply