Re: [HOW-TO] CentOS on bhyve

2014-09-05 Thread Dan Mack

On Sat, 8 Mar 2014, Peter Grehan wrote:


Hi Rudy,


Peter, anyway to get grub-bhyve to automatically load /grub/grub.conf
from a CentOS install?


snip

CentOS is grub v1 which isn't quite compatible with grub2 (e.g. linux - 
kernel).


grub-bhyve can pick up a config file from the host system: use -r host to 
force that, and the -d option to change the default path for grub.conf. No 
need to redirect input.


Then, in grub.conf on the host, put in the absolute path with the grub 
commands e.g.


snip


(the console=ttyS0 isn't needed: grub-bhyve auto-inserts that).




Let me resucitate this thread ...

I just tried this on Centos7 and expeience the same lack of grub menu.
I was able to work around it by manually entering the manual paths for
linux and initrd but wouldn't it be nice ...

However, on the Centos7 install, there appears to be both a grub/ and
grub2/ configuration directory:

 |
 | grub ls (hd0,msdos1)/
 | Possible files are:
 |  grub/ grub2/ ...
 |

and in the grub2 folder there exists a seemling grub2 compatible grub.cfg file:

 | grub cat (hd0,msdos1)/grub2/grub.cfg
 | #
 | # DO NOT EDIT THIS FILE
 | #
 | # It is automatically generated by grub2-mkconfig using templates
 | # from /etc/grub.d and settings from /etc/default/grub
 | #
 | 
snip


Is there a way to direct grub-bhyve to use the
centos:/boot/grub2/grub.cfg file ala some argument -- I scanned the
source and couldn't find a simple over-ride.

I'll test/rebuild the suite if you can point me in the general
direction.

Thanks,

dan
--
Dan Mack

___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
freebsd-virtualization-unsubscr...@freebsd.org


Re: [HOW-TO] CentOS on bhyve

2014-09-05 Thread Peter Grehan

Hi Dan,


Is there a way to direct grub-bhyve to use the
centos:/boot/grub2/grub.cfg file ala some argument -- I scanned the
source and couldn't find a simple over-ride.


 The Centos7 install I did put the grub2 config into /grub2/grub.cfg

 grub-bhyve can be told to search in this directory with the -d 
option i.e.


 -d /grub2

later,

Peter.
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
freebsd-virtualization-unsubscr...@freebsd.org


[HOW-TO] CentOS on bhyve

2014-03-07 Thread Rudy (bulk)


A customer wanted CentOS, so I tried doing it like I did my Ubuntu 
install --- no luck with the grub loading up automatically.


Here is basically what I did ... it works, but I get all these odd 
characters in my terminal (if I hit tab, I can guess at the menu items 
and successfully make it through the installation process).  I need to 
clean up this how-to, but here it is...


START INSTALL -

# cd /data/images/
# truncate -s 200G vm2.img
# cat vm2-device.map
(hd0) /data/images/vm2.img
(cd0) /data/distributions/CentOS-6.5-x86_64-minimal.iso

# bhyvectl --vm=vm2 --destroy
# grub-bhyve -r cd0 -m /data/images/vm2-device.map -M 2048 vm2

grub linux /isolinux/vmlinuz
grub initrd /isolinux/initrd.img
grub boot

# bhyve -c 2 -m 2048M -H -P -A \
-l com1,stdio \
-s 0:0,hostbridge \
-s 1:0,lpc -s 2:0,virtio-net,tap1 \
-s 3,ahci-cd,/data/distributions/CentOS-6.5-x86_64-minimal.iso \
-s 4,virtio-blk,/data/images/vm2.img vm2


END  INSTALL -

Is there something like this that will clean up the output from the 
CentOS install program?


grub GRUB_TERMINAL=console


The boot part is messy (how to I load up the grub.conf from inside the 
install image?




START BOOT -
# grub-bhyve -r hd0,msdos1 -m vm2.map -M 2048 vm2
grub cat /grub/
Possible files are:

 grub.conf splash.xpm.gz menu.lst device.map stage1 stage2 
e2fs_stage1_5 fat_stage1_5 ffs_stage1_5
iso9660_stage1_5 jfs_stage1_5 minix_stage1_5 reiserfs_stage1_5 
ufs2_stage1_5 vstafs_stage1_5 xfs_stage1_5

grub cat /grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#  all kernel and initrd paths are relative to /boot/, eg.
#  root (hd0,0)
#  kernel /vmlinuz-version ro root=/dev/mapper/VolGroup-lv_root
#  initrd /initrd-[generic-]version.img
#boot=/dev/vda
default=0
timeout=5
serial --unit=0 --speed=9600
terminal --timeout=5 serial console
title CentOS (2.6.32-431.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-431.el6.x86_64 ro 
root=/dev/mapper/VolGroup-lv_root rd_NO_LUKS LANG=en_US.UTF-8
rd_NO_MD  KEYTABLE=us rd_LVM_LV=VolGroup/lv_swap 
SYSFONT=latarcyrheb-sun16 console=ttyS0 crashkernel=auto rd_LV

M_LV=VolGroup/lv_root rd_NO_DM
initrd /initramfs-2.6.32-431.el6.x86_64.img


grub linux /vmlinuz-2.6.32-431.el6.x86_64 ro 
root=/dev/mapper/VolGroup-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_
NO_MD  KEYTABLE=us rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-sun16 
console=ttyS0 crashkernel=auto rd_LVM_L

V=VolGroup/lv_root rd_NO_DM
grub OM
error: can't find command `OM'.
grub linux /vmlinuz-2.6.32-431.el6.x86_64 ro 
root=/dev/mapper/VolGroup-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_
NO_MD  KEYTABLE=us rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-sun16 
console=ttyS0 crashkernel=auto rd_LVM_L

V=VolGroup/lv_root rd_NO_DM
grub initrd /initramfs-2.6.32-431.el6.x86_64.img
grub boot

# bhyve -c 2 -m 2048M -H -P -A -s 0:0,hostbridge -s 1:0,lpc -s 
2:0,virtio-net,tap1 -s 
3,ahci-cd,/data/distributions/CentOS-6.5-x86_64-minimal.iso -s 
4,virtio-blk,/data/images/vm2.img -l com1,stdio vm2


[snip]
CentOS release 6.5 (Final)
Kernel 2.6.32-431.el6.x86_64 on an x86_64

localhost.localdomain login: root
Password:
[root@localhost ~]#

 END  BOOT -

Also, this is making me wonder... am I doing this wrong?  I am using 
install CD images, are other people using pre-made CentOS images?
I have noticed grub-bhyve requires a space at the end of the line or I 
get 'OM' on STDOUT and the line fails.  Above, I hit the up-arrow then a 
space (

Rudy


___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
freebsd-virtualization-unsubscr...@freebsd.org


Re: [HOW-TO] CentOS on bhyve

2014-03-07 Thread Rudy (bulk)

On 3/7/14, 11:31 PM, Rudy (bulk) wrote:


Peter, anyway to get grub-bhyve to automatically load /grub/grub.conf 
from a CentOS install?


This didn't do it... I just read the --help and found --directory, but 
that doesn't seem to work:


   grub-bhyve --directory=/grub -r hd0,msdos1 -m vm2.map -M 2048 vm2


Rudy

___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
freebsd-virtualization-unsubscr...@freebsd.org