On Sun, Dec 04, 2011 at 02:36:46PM -0500, David Howland wrote: > Hi, I recently installed Fedora 16 in a Xen PV DomU and since I didn't > find a lot of information online, I wanted to share my procedure in case > it helps anyone else. My Dom0 is Debian Squeeze, which uses a kernel at > version 2.6.32. The pygrub issues you described were fixed and I believe are now in Xen 4.1.2. But that won't work for you since Debian is 4.0 I think. I think they can be back-ported. Would you be up for trying to back-port those patches and submit them to Debian Squeeze? (Just search for M A Young and pygrub on this mailing list - he posted the patches two months ago or so). > > Because I deal with varying operating systems and because I prefer > fine-grained control over configuration, I don't use virt-* tools or GUI > front ends. I wanted to install the OS the regular way. > > The basic install path was to use the live DVD to install in an HVM, > then switch to a PV with pygrub. I want to use pygrub so that I don't > have to copy kernels and init images around everytime the OS updates itself. > > pygrub caused me some trouble because the version in my system can't > handle GPT partitions, grub2, or ext4 - all of which are used by default > in Fedora 16. > > What follows isn't perfect, but should be useful for people who want to > install Fedora 16 in an environment similar to mine. Note that I'm > using x86_64 with VT-x, and that matters. Use your brain, and be > careful to recognize newlines that email may introduce. > > > > > *** Create hard drive image *** > dom0# mkdir -p /img/fedora > - you can put it anywhere you want! This is just what I used. > dom0# cd /img/fedora > dom0# dd if=/dev/zero of=xen-fedora-16.img bs=1M count=20000 > > *** Download DVD image *** > dom0# cd /img/fedora > dom0# wget > http://download.fedoraproject.org/pub/fedora/linux/releases/16/Fedora/x86_64/iso/Fedora-16-x86_64-DVD.iso > > *** Create HVM config file *** > dom0# cd /etc/xen > dom0# (edit fedora-16.hvm) > -----/etc/xen/fedora-16.hvm------------------------------ > name = 'fedora-16' > vif = [ 'mac=aa:00:00:50:02:f0, bridge=xenbr0' ] > disk = [ > 'file:/img/fedora/xen-fedora-16.img,hda,w', > 'file:/img/fedora/Fedora-16-x86_64-DVD.iso,hdc:cdrom,r', > ] > boot = 'dca' > > kernel = '/usr/lib64/xen-4.0/boot/hvmloader' > device_model = '/usr/lib64/xen-4.0/bin/qemu-dm' > builder = 'hvm' > > memory = 2048 > shadow_memory = 8 > vcpus = 2 > #pae = 1 > acpi = 1 > apic = 1 > vnc = 1 > vncconsole = 1 > sdl = 0 > stdvga = 0 > usbdevice = 'tablet' > serial = 'pty' > > on_poweroff = 'destroy' > on_reboot = 'destroy' > on_crash = 'destroy' > --------------------------------------------------------- > > *** Install Fedora 16 *** > dom0# xm create fedora-16.hvm > domU# (connect to new VM with a VNC viewer - Quickly!) > domU# (press TAB at boot menu to edit the kernel command line) > domU# (add "nogpt" to command line, without quotes) > domU# (install fedora) > - disable lvm > - in partition list, change /boot to ext2 instead of ext4 > - after install finishes, let it shut down > dom0# (edit fedora-16.hvm) > - comment out > "'file:/img/fedora/Fedora-16-x86_64-DVD.iso,hdc:cdrom,r'," > dom0# xm create fedora-16.hvm > domU# (complete install) > - should be at desktop now > > *** Enable SSH *** > domU# (open root shell) > domU# systemctl enable sshd.service > domU# systemctl start sshd.service > > *** Make a grub menu *** > domU# cd /boot/grub > domU# (edit menu.lst, using /boot/grub2/grub.cfg as a guide) > - be sure to use your own kernal, init, and UUIDs from your own > grub2 config > -----/boot/grub/menu.lst--------------------------------- > -----/etc/xen/fedora-16.hvm------------------------------ > timeout 3 > default 0 > > title Fedora Linux > root (hd0,0) > kernel /vmlinuz-3.1.2-1.fc16.x86_64 > root=UUID=fc5702b1-65d9-426d-81d7-e52f31cb6a4a ro rd.md=0 rd.lvm=0 > rd.dm=0 KEYTABLE=us quiet SYSFONT=latarcyrheb-sun16 rhgb rd.luks=0 > LANG=en_US.UTF-8 > initrd /initramfs-3.1.2-1.fc16.x86_64.img > > title Fedora Linux (recovery mode) > root (hd0,0) > kernel /vmlinuz-3.1.2-1.fc16.x86_64 > root=UUID=fc5702b1-65d9-426d-81d7-e52f31cb6a4a ro single rd.md=0 > rd.lvm=0 rd.dm=0 KEYTABLE=us quiet SYSFONT=latarcyrheb-sun16 rhgb > rd.luks=0 LANG=en_US.UTF-8 > initrd /initramfs-3.1.2-1.fc16.x86_64.img > --------------------------------------------------------- > > *** Make PV domU *** > domU# (shutdown VM) > dom0# cd /etc/xen > dom0# (edit fedora-16.pv) > -----/etc/xen/fedora-16.pv------------------------------- > name = 'fedora-16' > vif = [ 'mac=aa:00:00:50:02:f0, bridge=xenbr0' ] > disk = [ > 'file:/img/fedora/xen-fedora-16.img,xvda,w', > ] > > bootloader = '/usr/lib/xen-4.0/bin/pygrub' > > memory = 2048 > shadow_memory = 8 > vcpus = 2 > #pae = 1 > > on_poweroff = 'destroy' > on_reboot = 'restart' > on_crash = 'restart' > --------------------------------------------------------- > dom0# xm create -c fedora-16.pv > > *** Enable VNC *** > domU# yum install vnc-server > domU# cp /lib/systemd/system/vncserver\@.service > /etc/systemd/system/vncserver\@\:0.service > domU# (edit /etc/systemd/system/vncserver\@\:0.service) > domU# (add user name instead of <USER>) > domU# (edit /etc/sysconfig/iptables) > - insert new line: "-A INPUT -m state --state NEW -m tcp -p tcp > --dport 5900 -j ACCEPT" > domU# service iptables restart > domU# systemctl enable vncserver@:0.service > domU# systemctl start vncserver@:0.service > > > thanks, > -d > -- > xen mailing list > xen@xxxxxxxxxxxxxxxxxxxxxxx > https://admin.fedoraproject.org/mailman/listinfo/xen -- xen mailing list xen@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/xen