Following noogie''s howto (http://opensolaris.org/jive/thread.jspa?threadID=62436), I thought I''d share my approach to this problem. Most of this procedure is intended to be a paste-bomb. I''m working on amd64, some details will need to change for other architectures. Install and start Apache so that we can pretend to be an Ubuntu mirror (optional, but it''s faster this way): pkg install SUNWapch22 svccfg -v import /var/svc/manifest/network/http-apache22.xml svcadm enable svc:/network/http:apache22 Grab the Ubuntu server alternate (.1) CD for this architecture, mount it up and link it into the Apache Docroot: mkdir -p /export/isoimages cd /export/isoimages wget http://mirrors.gigenet.com/ubuntu/hardy/ubuntu-8.04.1-server-amd64.iso iso="/export/isoimages/ubuntu-8.04.1-server-amd64.iso" dev=`lofiadm -a $iso` dir=`echo $iso | sed ''s/\.iso$//''` mkdir -p $dir mount -Fhsfs $dev $dir ln -s $dir/ubuntu /var/apache2/2.2/htdocs/ Grab a xen-ified kernel from xensource: mkdir -p /xen/ubuntu /xen/temp cd /xen/temp wget http://bits.xensource.com/oss-xen/release/3.1.0/bin.tgz/xen-3.1.0-install-x86_64.tgz gzcat xen-3.1.0-install-x86_64.tgz | gtar xvf - dist/install/boot/vmlinuz-2.6.18-xen cp dist/install/boot/vmlinuz-2.6.18-xen /xen/ubuntu/ Now we need the Hardy (Ubuntu 8.04) initrd.img for network installation: cd /xen/ubuntu wget http://archive.ubuntu.com/ubuntu/dists/hardy/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/initrd.gz Create the disk image to be used by Ubuntu: /opt/csw/bin/qemu-img create /xen/ubuntu/ubuntu.img 5G Finally, create the VM config file: cat > ubuntu-install.cfg << EOF kernel = "/xen/ubuntu/vmlinuz-2.6.18-xen" ramdisk = "/xen/ubuntu/initrd.gz" name = "ubuntu-install" memory = "512" disk = [ ''file:/xen/ubuntu/ubuntu.img,hda,w'', ] vif = [ ''mac=00:16:3e:11:11:11'' ] EOF -- This message posted from opensolaris.org
Before booting the VM, install netcat (if you don''t already have it), and start a listener. We''ll need it later. pkg install SUNWnetcat cd /xen/ubuntu nc -l -p 10000 | tar xvf - & Start the VM! xm create -c ubuntu-install.cfg Here are the hilights of the install process: Mirror Country: Manual (scroll to the top to find it) Mirror Host: Your Dom0 IP goes here Mirror Directory: /ubuntu (the symlink to the install cd) Continue withouth loading modules? Yes (xensource kernel can''t load the installer''s modules -- doesn''t seem to be a big deal) /dev/hda "invalid argument": Ignore (several times) Now, DON''T reboot at the end of the installation. Instead: Installation complete: go back Execute A Shell Continue chroot /target apt-get install linux-image-2.6.24-19-xen chroot /target apt-get install linux-ubuntu-modules-2.6.24-19-xen And now use the netcat listener to ship your new kernel stuff to Dom0: cd /target/boot /target/bin/tar cvf - vmlinuz*xen initrd*xen | nc 192.168.1.8 10000 The only thing missing now is a login service running on the system console. Init thinks the console is a PC monitor and keyboard. The console is really the xvc0 device created by the Xen kernel. Kill off the gettys on the bogus ttys, and start one in the right place: cd /target/etc/event.d rm tty? cat > xvc0 << EOF start on stopped rc2 start on stopped rc3 start on stopped rc4 start on stopped rc5 stop on runlevel 0 stop on runlevel 1 stop on runlevel 6 respawn exec /sbin/getty 38400 xvc0 EOF Finally, quit the installation and find yourself back at the Dom0 prompt. We''re done with the xensource kernel, the net-install initrd.gz and the install VM config: mkdir .install mv ubuntu-install.cfg vmlinuz-2.6.18-xen initrd.gz .install Now, a new VM config for the installed ubuntu image: cat > ubuntu.cfg << EOF kernel = "/xen/ubuntu/vmlinuz-2.6.24-19-xen" ramdisk = "/xen/ubuntu/initrd.img-2.6.24-19-xen" extra = "root=/dev/hda1 linux 2" name = "ubuntu" memory = "512" disk = [ ''file:/xen/ubuntu/ubuntu.img,hda,w'' ] vif = [ ''mac=00:16:3e:11:11:11'' ] EOF Done! -- This message posted from opensolaris.org
Whoops! The end of my first post got mangled by my use of this character: < It should read: Finally, create the VM config file: cat > ubuntu-install.cfg << EOF kernel = "/xen/ubuntu/vmlinuz-2.6.18-xen" ramdisk = "/xen/ubuntu/initrd.gz" name = "ubuntu-install" memory = "512" disk = [ ''file:/xen/ubuntu/ubuntu.img,hda,w'', ] vif = [ ''mac=00:16:3e:11:11:11'' ] EOF -- This message posted from opensolaris.org
Boris Derzhavets
2008-Oct-14 15:27 UTC
Re: Ubuntu DomU into Indiana Dom0 -- another approach
I've tried to setup VNC on debootstraped image :- # apt-get install ubuntu_desktop ( every time with certain issues) # apt-get remove NetworkManager # apt-get install vnc4server xinetd # vi /etc/gdm/gdm.conf Uncomment this line RemoteGreeter=/usr/lib/gdm/gdmlogin Enable xdmcp, look for [xdmcp] and change Enable to true. [xdmcp] Enable=true ***************** Restart gdm ***************** # /etc/init.d/gdm restart Setup xinetd ***************************************** Create a new service file for xinetd ***************************************** # vi /etc/xinetd.d/Xvnc service Xvnc { type = UNLISTED disable = no socket_type = stream protocol = tcp wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd -query localhost -geometry 1024×768 -depth 16 -cc 3 -once -SecurityTypes=none -extension XFIXES port = 5901 } ****************** Restart xinetd ****************** # /etc/init.d/xinetd restart Gnome Settings Daemon fails to start. Details may be viewed here:- http://bderzhavets.wordpress.com/2008/10/10/attempt-of-vnc-setup-on-ubuntu-hardy-pv-domu-at-xen-33-centos-52-dom0-all-64-bit/ Maybe your approach would work better ? -- This message posted from opensolaris.org _______________________________________________ xen-discuss mailing list xen-discuss@opensolaris.org
Boris Derzhavets
2008-Oct-14 15:34 UTC
Re: Ubuntu DomU into Indiana Dom0 -- another approach
One more question. Looks like you managed on OpenSolaris 2008/11 (05). I am not sure would packages names be the same on SNV_98. -- This message posted from opensolaris.org
@dbaxps: I can''t comment on whether a different Ubuntu install technique would change your DomU desktop experience any. I''ve never had a requirement for a GUI in a DomU. I was just trying to illustrate how to install a PV Ubuntu DomU without the Solaris -> HVM -> Ubuntu Dom0 -> Ubuntu DomU stack. Regarding the specific Solaris release - I''m using this one: http://genunix.org/distributions/indiana/osol-0811-98.iso /chris -- This message posted from opensolaris.org
Boris Derzhavets
2008-Oct-14 17:36 UTC
Re: Ubuntu DomU into Indiana Dom0 -- another approach
Chris, To reproduce your schema on Nevada b98 , i would have to install Apache (1) and nl (2). Right ? One more question. In general, on CentOS 5.X (RHEL 5.x) if i could properly emulate http mirror on local Apache Server, i guess it should be possible to manage via virt-install. My experience with local http mirrors is 0. Just , NFS shares on linux and Nevada. -- This message posted from opensolaris.org
Apache -- It''s optional. You can skip the bit with grabbing, mounting and serving (via apache) the ubuntu iso image. You''d just point to a real ubuntu mirror site during the ubuntu installation. Which is the default behavior anyway. Netcat -- The purpose here is to get the xen-ified ubuntu kernel and initrd.gz off the ubuntu VM, and onto the Dom0. There are probably other ways to do this: - download the debian packages to the Dom0; rip the files right out of the ARchives - use some other transfer mechanism -- this is complicated by the state of the ubuntu system during install. Probably worked around with LD_LIBRARY_PATH - re-use the xensource kernel for the first boot - mount the ubuntu fs on your Dom0 machine (probably easy if your Dom0 is CentOS) -- This message posted from opensolaris.org
Boris Derzhavets
2008-Oct-18 16:40 UTC
Re: Ubuntu DomU into Indiana Dom0 -- another approach
> Following noogie''s howto > (http://opensolaris.org/jive/thread.jspa?threadID=6243 > 6), I thought I''d share my approach to this problem. > > Most of this procedure is intended to be a > paste-bomb. I''m working on amd64, some details will> Grab the Ubuntu server alternate (.1) CD for this > architecture, mount it up and link it into the Apache > Docroot: > > mkdir -p /export/isoimages > cd /export/isoimages > wget > http://mirrors.gigenet.com/ubuntu/hardy/ubuntu-8.04.1- > server-amd64.iso > iso="/export/isoimages/ubuntu-8.04.1-server-amd64.iso" > > dev=`lofiadm -a $iso` > dir=`echo $iso | sed ''s/\.iso$//''` > mkdir -p $dir > mount -Fhsfs $dev $dir > ln -s $dir/ubuntu /var/apache2/2.2/htdocs/Thanks a lot for this code. I''ve got the point. http://bderzhavets.wordpress.com/2008/10/17/install-opensuse-11-domu-at-xen-33-centos-52-dom0-via-local-http-server-all-64-bit/ http://bderzhavets.wordpress.com/2008/10/15/install-centos-52-f9-pv-domus-at-opensuse-11-dom0-via-local-http-server-all-64-bit/ -- This message posted from opensolaris.org
Boris Derzhavets
2008-Oct-19 12:06 UTC
Re: Ubuntu DomU into Indiana Dom0 -- another approach
> Here are the hilights of the install process: > > Mirror Country: Manual (scroll to the top to find > it) > Mirror Host: Your Dom0 IP goes hereI''ve attempted to reproduce your schema at Xen 3.3 CentOS 5.2 Dom0:- 1. I was not given an opportunity to enter IP of local HTTP Server different from selected by system official mirror FQDN. 2. Utility qemu-img seems to be important to use, because after portioning gets done installer fails to mount / on /dev/hda1 or /dev/xvda1 (both options have been tested). Installation procedure seems to be OpenSolaris specific versus debootstrap working everywhere. Could you be so kind to provide some other link with with Ubuntu PV DomU installation via HTTP procedure described , which doesn''t utilize debootstrap, of course if one exists ?> Mirror Directory: /ubuntu (the symlink to the > install cd) > Continue withouth loading modules? Yes (xensource > kernel can''t load the installer''s modules -- doesn''t > seem to be a big deal) > /dev/hda "invalid argument": Ignore (several times)-- This message posted from opensolaris.org
> 1. I was not given an opportunity to enter IP of local HTTP Server > different from selected by system official mirror FQDN.Doesn''t make sense. The feature is built into the initrd-based installer I cited. Did you scroll to the top of the country list?> 2. Utility qemu-img seems to be important to use, because after partitioning > gets done installer fails to mount / on /dev/hda1 or /dev/xvda1 (both options > have been tested).qemu-img is the only way I have tried creating the disk image. I don''t know what special things it might do that are not accomplished with a sparse file created by dd or mkfile. Sorry, I don''t know why it isn''t working on your CentOS Dom0.> Installation procedure seems to be OpenSolaris specific versus debootstrap > working everywhere.Maybe. It''s reproducible in the environment I described. More than that I cannot promise. -- This message posted from opensolaris.org
Boris Derzhavets
2008-Oct-20 14:19 UTC
Re: Ubuntu DomU into Indiana Dom0 -- another approach
--- On Mon, 10/20/08, chris <opensolaris.org@marget.com> wrote: From: chris <opensolaris.org@marget.com> Subject: Re: [xen-discuss] Ubuntu DomU into Indiana Dom0 -- another approach To: xen-discuss@opensolaris.org Date: Monday, October 20, 2008, 8:59 AM> 1. I was not given an opportunity to enter IP of local HTTP Server > different from selected by system official mirror FQDN.Doesn''t make sense. The feature is built into the initrd-based installer I cited. Did you scroll to the top of the country list? ******************************* Sorry, i''ll try one more time *******************************> 2. Utility qemu-img seems to be important to use, because afterpartitioning> gets done installer fails to mount / on /dev/hda1 or /dev/xvda1 (bothoptions> have been tested).qemu-img is the only way I have tried creating the disk image. I don''t know what special things it might do that are not accomplished with a sparse file created by dd or mkfile. Sorry, I don''t know why it isn''t working on your CentOS Dom0.> Installation procedure seems to be OpenSolaris specific versus debootstrap > working everywhere.Maybe. It''s reproducible in the environment I described. More than that I cannot promise. -- This message posted from opensolaris.org _______________________________________________ xen-discuss mailing list xen-discuss@opensolaris.org __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com