Hello Wondering if someone has any pointers dom0 is SXCE : SunOS noc01 5.11 snv_121 i86pc i386 i86xpv domU is : osol-1002-122 I use the methode describe here : http://alexeremin.blogspot.com/search?updated-max=2008-12-22T22%3A03%3A00-08%3A00&max-results=7 Im using the http://pkg.opensolaris.org/dev repository instead of http://pkg.opensolaris.org/release everything installs just fine but it seems grub never get installed? switch to http://pkg.opensolaris.org/release give me the same result.. If I do a window installation then it works.. so could it be something is missing in the pkg server and I would need to do a manually update? or some special way to get grub installed? Thanks -ls Here some output during installation: bootadm: not using biosdev command for disk: /dev/dsk/c7t0d0s0. bootadm: cannot get (hd?,?,?) for menu. menu not on bootdisk: /dev/rdsk/c7t0d0s0 Installing grub on /dev/rdsk/c7t0d0s0 stage1 written to partition 0 sector 0 (abs 16065) stage2 written to partition 0, 273 sectors starting at 50 (abs 16115) then reboot and I get this: root@opensolaris:~# reboot Sep 16 03:57:33 opensolaris reboot: initiated by jack on /dev/console syncing file systems... done rebooting... libvir: error : Unknown failure Connection to domain 74 closed. Guest installation complete... restarting guest. POST operation failed: xend_post: error from xen daemon: (xend.err "Boot loader didn''t return any data!") Domain installation may not have been successful. If it was, you can restart your domain by running ''virsh start cyan02''; otherwise, please restart your installation. ERROR POST operation failed: xend_post: error from xen daemon: (xend.err "Boot loader didn''t return any data!")
Luc I. Suryo wrote:> Hello > > Wondering if someone has any pointers > dom0 is SXCE : SunOS noc01 5.11 snv_121 i86pc i386 i86xpv > domU is : osol-1002-122 > > I use the methode describe here : > http://alexeremin.blogspot.com/search?updated-max=2008-12-22T22%3A03%3A00-08%3A00&max-results=7Can you try the script http://blogs.sun.com/mrj/resource/slim-guest-installer some info about it @ http://blogs.sun.com/mrj/entry/installing_a_small_xvm_or For dev bits, you can do a $ pfexec ./slim-guest-installer --repo=http://pkg.opensolaris.org/dev Thanks, MRJ> Im using the http://pkg.opensolaris.org/dev repository instead of http://pkg.opensolaris.org/release > everything installs just fine but it seems grub never get installed? > > switch to http://pkg.opensolaris.org/release give me the same result.. > If I do a window installation then it works.. so could it be something is missing > in the pkg server and I would need to do a manually update? or some special > way to get grub installed? > > Thanks > > -ls > > Here some output > > during installation: > > bootadm: not using biosdev command for disk: /dev/dsk/c7t0d0s0. > bootadm: cannot get (hd?,?,?) for menu. menu not on bootdisk: /dev/rdsk/c7t0d0s0 > Installing grub on /dev/rdsk/c7t0d0s0 > stage1 written to partition 0 sector 0 (abs 16065) > stage2 written to partition 0, 273 sectors starting at 50 (abs 16115) > > > then reboot and I get this: > > root@opensolaris:~# reboot > Sep 16 03:57:33 opensolaris reboot: initiated by jack on /dev/console > syncing file systems... done > rebooting... > libvir: error : Unknown failure > > Connection to domain 74 closed. > > Guest installation complete... restarting guest. > POST operation failed: xend_post: error from xen daemon: (xend.err "Boot loader didn''t return any data!") > Domain installation may not have been > successful. If it was, you can restart your domain > by running ''virsh start cyan02''; otherwise, please > restart your installation. > ERROR POST operation failed: xend_post: error from xen daemon: (xend.err "Boot loader didn''t return any data!") > > _______________________________________________ > xen-discuss mailing list > xen-discuss@opensolaris.org
Hi Mark yes it works! Compare to the scripts between yours and mine (ksh) is the follwing I do not use fmthard I use the $PKG_IMAGE/boot/solaris/bin/update_grub that installes stage1 and stage2 from $PKG_IMAGE instead from the booted CD image (your) ther order when bootadm is execed, mine righer before update-grub vs uour atthe end Since itr works, I;ll use yours and add the packages I need to the list thanks! Mark Johnson <Mark.Johnson@Sun.COM> wrote at Wed, Sep 16, 2009 at 05:25:16PM -0400:> > > Luc I. Suryo wrote: >> Hello >> >> Wondering if someone has any pointers >> dom0 is SXCE : SunOS noc01 5.11 snv_121 i86pc i386 i86xpv >> domU is : osol-1002-122 >> >> I use the methode describe here : >> http://alexeremin.blogspot.com/search?updated-max=2008-12-22T22%3A03%3A00-08%3A00&max-results=7 > > > Can you try the script > http://blogs.sun.com/mrj/resource/slim-guest-installer > > some info about it @ > http://blogs.sun.com/mrj/entry/installing_a_small_xvm_or > > For dev bits, you can do a > $ pfexec ./slim-guest-installer --repo=http://pkg.opensolaris.org/dev > > > > > Thanks, > > > MRJ > > >> Im using the http://pkg.opensolaris.org/dev repository instead of http://pkg.opensolaris.org/release >> everything installs just fine but it seems grub never get installed? >> >> switch to http://pkg.opensolaris.org/release give me the same result.. >> If I do a window installation then it works.. so could it be something is missing >> in the pkg server and I would need to do a manually update? or some special >> way to get grub installed? >> >> Thanks >> >> -ls >> >> Here some output >> >> during installation: >> >> bootadm: not using biosdev command for disk: /dev/dsk/c7t0d0s0. >> bootadm: cannot get (hd?,?,?) for menu. menu not on bootdisk: /dev/rdsk/c7t0d0s0 >> Installing grub on /dev/rdsk/c7t0d0s0 >> stage1 written to partition 0 sector 0 (abs 16065) >> stage2 written to partition 0, 273 sectors starting at 50 (abs 16115) >> >> >> then reboot and I get this: >> >> root@opensolaris:~# reboot >> Sep 16 03:57:33 opensolaris reboot: initiated by jack on /dev/console >> syncing file systems... done >> rebooting... >> libvir: error : Unknown failure >> >> Connection to domain 74 closed. >> >> Guest installation complete... restarting guest. >> POST operation failed: xend_post: error from xen daemon: (xend.err "Boot loader didn''t return any data!") >> Domain installation may not have been >> successful. If it was, you can restart your domain >> by running ''virsh start cyan02''; otherwise, please >> restart your installation. >> ERROR POST operation failed: xend_post: error from xen daemon: (xend.err "Boot loader didn''t return any data!") >>
Luc I. Suryo wrote:> Hi Mark > > yes it works! Compare to the scripts between yours and mine (ksh) > is the follwing > I do not use fmthard > > I use the $PKG_IMAGE/boot/solaris/bin/update_grub that installes > stage1 and stage2 from $PKG_IMAGE instead from the booted CD image > (your) > > ther order when bootadm is execed, mine righer before update-grub > vs uour atthe end > > > Since itr works, I;ll use yours and add the packages I need to the listyou need to make sure the disk is formated correctly. It needs to be partitioned, then labeled with all the space in s0. And you *MUST* label s0 as root (took me a bit to figure out that one). MRJ> thanks! > > > Mark Johnson <Mark.Johnson@Sun.COM> > wrote at Wed, Sep 16, 2009 at 05:25:16PM -0400: > >> >> Luc I. Suryo wrote: >>> Hello >>> >>> Wondering if someone has any pointers >>> dom0 is SXCE : SunOS noc01 5.11 snv_121 i86pc i386 i86xpv >>> domU is : osol-1002-122 >>> >>> I use the methode describe here : >>> http://alexeremin.blogspot.com/search?updated-max=2008-12-22T22%3A03%3A00-08%3A00&max-results=7 >> >> Can you try the script >> http://blogs.sun.com/mrj/resource/slim-guest-installer >> >> some info about it @ >> http://blogs.sun.com/mrj/entry/installing_a_small_xvm_or >> >> For dev bits, you can do a >> $ pfexec ./slim-guest-installer --repo=http://pkg.opensolaris.org/dev >> >> >> >> >> Thanks, >> >> >> MRJ >> >> >>> Im using the http://pkg.opensolaris.org/dev repository instead of http://pkg.opensolaris.org/release >>> everything installs just fine but it seems grub never get installed? >>> >>> switch to http://pkg.opensolaris.org/release give me the same result.. >>> If I do a window installation then it works.. so could it be something is missing >>> in the pkg server and I would need to do a manually update? or some special >>> way to get grub installed? >>> >>> Thanks >>> >>> -ls >>> >>> Here some output >>> >>> during installation: >>> >>> bootadm: not using biosdev command for disk: /dev/dsk/c7t0d0s0. >>> bootadm: cannot get (hd?,?,?) for menu. menu not on bootdisk: /dev/rdsk/c7t0d0s0 >>> Installing grub on /dev/rdsk/c7t0d0s0 >>> stage1 written to partition 0 sector 0 (abs 16065) >>> stage2 written to partition 0, 273 sectors starting at 50 (abs 16115) >>> >>> >>> then reboot and I get this: >>> >>> root@opensolaris:~# reboot >>> Sep 16 03:57:33 opensolaris reboot: initiated by jack on /dev/console >>> syncing file systems... done >>> rebooting... >>> libvir: error : Unknown failure >>> >>> Connection to domain 74 closed. >>> >>> Guest installation complete... restarting guest. >>> POST operation failed: xend_post: error from xen daemon: (xend.err "Boot loader didn''t return any data!") >>> Domain installation may not have been >>> successful. If it was, you can restart your domain >>> by running ''virsh start cyan02''; otherwise, please >>> restart your installation. >>> ERROR POST operation failed: xend_post: error from xen daemon: (xend.err "Boot loader didn''t return any data!") >>>
Hi, Actually when newboot i.e. GRUB boot was introduced we did away with the requirement that root slice needs to have the "root" tag and I booted Solaris all the time without the root tag. AFAIK this is still true with SXCE. I dont know if beadm (or Opensolaris) has reintroduced this requirement. Vikram Mark Johnson wrote:> > > Luc I. Suryo wrote: >> Hi Mark >> >> yes it works! Compare to the scripts between yours and mine (ksh) >> is the follwing >> I do not use fmthard >> >> I use the $PKG_IMAGE/boot/solaris/bin/update_grub that installes >> stage1 and stage2 from $PKG_IMAGE instead from the booted CD image >> (your) >> >> ther order when bootadm is execed, mine righer before update-grub >> vs uour atthe end >> >> >> Since itr works, I;ll use yours and add the packages I need to the list > > you need to make sure the disk is formated correctly. It needs to > be partitioned, then labeled with all the space in s0. And you *MUST* > label s0 as root (took me a bit to figure out that one). > > > > MRJ > > > > >> thanks! >> >> >> Mark Johnson <Mark.Johnson@Sun.COM> >> wrote at Wed, Sep 16, 2009 at 05:25:16PM -0400: >> >>> >>> Luc I. Suryo wrote: >>>> Hello >>>> >>>> Wondering if someone has any pointers >>>> dom0 is SXCE : SunOS noc01 5.11 snv_121 i86pc i386 i86xpv >>>> domU is : osol-1002-122 >>>> >>>> I use the methode describe here : >>>> http://alexeremin.blogspot.com/search?updated-max=2008-12-22T22%3A03%3A00-08%3A00&max-results=7 >>>> >>> >>> Can you try the script >>> http://blogs.sun.com/mrj/resource/slim-guest-installer >>> >>> some info about it @ >>> http://blogs.sun.com/mrj/entry/installing_a_small_xvm_or >>> >>> For dev bits, you can do a >>> $ pfexec ./slim-guest-installer --repo=http://pkg.opensolaris.org/dev >>> >>> >>> >>> >>> Thanks, >>> >>> >>> MRJ >>> >>> >>>> Im using the http://pkg.opensolaris.org/dev repository instead of >>>> http://pkg.opensolaris.org/release >>>> everything installs just fine but it seems grub never get installed? >>>> >>>> switch to http://pkg.opensolaris.org/release give me the same result.. >>>> If I do a window installation then it works.. so could it be >>>> something is missing >>>> in the pkg server and I would need to do a manually update? or some >>>> special >>>> way to get grub installed? >>>> >>>> Thanks >>>> >>>> -ls >>>> >>>> Here some output >>>> >>>> during installation: >>>> >>>> bootadm: not using biosdev command for disk: /dev/dsk/c7t0d0s0. >>>> bootadm: cannot get (hd?,?,?) for menu. menu not on bootdisk: >>>> /dev/rdsk/c7t0d0s0 >>>> Installing grub on /dev/rdsk/c7t0d0s0 >>>> stage1 written to partition 0 sector 0 (abs 16065) >>>> stage2 written to partition 0, 273 sectors starting at 50 (abs 16115) >>>> >>>> >>>> then reboot and I get this: >>>> >>>> root@opensolaris:~# reboot >>>> Sep 16 03:57:33 opensolaris reboot: initiated by jack on /dev/console >>>> syncing file systems... done >>>> rebooting... >>>> libvir: error : Unknown failure >>>> >>>> Connection to domain 74 closed. >>>> >>>> Guest installation complete... restarting guest. >>>> POST operation failed: xend_post: error from xen daemon: (xend.err >>>> "Boot loader didn''t return any data!") >>>> Domain installation may not have been >>>> successful. If it was, you can restart your domain >>>> by running ''virsh start cyan02''; otherwise, please >>>> restart your installation. >>>> ERROR POST operation failed: xend_post: error from xen daemon: >>>> (xend.err "Boot loader didn''t return any data!") >>>> > _______________________________________________ > xen-discuss mailing list > xen-discuss@opensolaris.org
On Wed, Sep 16, 2009 at 04:09:19PM -0700, Vikram Hegde wrote:> Actually when newboot i.e. GRUB boot was introduced we did away with the > requirement that root slice needs to have the "root" tag and I booted > Solaris all the time without the root tag. AFAIK this is still true with > SXCE. I dont know if beadm (or Opensolaris) has reintroduced this > requirement.pygrub requires it (see below). If I don''t have the tag, how do I know which slice contains the root? regards john def get_solaris_slice(file, offset): """Find the root slice in a Solaris VTOC.""" buf = fsimage.get_disk_data(file, (offset + (DK_LABEL_LOC * SECTOR_SIZE)), 512) if struct.unpack("<H", buf[508:510])[0] != DKL_MAGIC: raise RuntimeError, "Invalid disklabel magic" nslices = struct.unpack("<H", buf[30:32])[0] for i in range(nslices): sliceoff = 72 + 12 * i slicetag = struct.unpack("<H", buf[sliceoff:sliceoff+2])[0] slicesect = struct.unpack("<L", buf[sliceoff+4:sliceoff+8])[0] if slicetag == V_ROOT: return slicesect * SECTOR_SIZE raise RuntimeError, "No root slice found"
John Levon wrote:> On Wed, Sep 16, 2009 at 04:09:19PM -0700, Vikram Hegde wrote: > >> Actually when newboot i.e. GRUB boot was introduced we did away with the >> requirement that root slice needs to have the "root" tag and I booted >> Solaris all the time without the root tag. AFAIK this is still true with >> SXCE. I dont know if beadm (or Opensolaris) has reintroduced this >> requirement. > > pygrub requires it (see below). If I don''t have the tag, how do I know > which slice contains the root?I assume it''s findroot (pool_rpool,0,a) /rpool/boot/grub/bootsign/pool_rpool MRJ> regards > john > > > def get_solaris_slice(file, offset): > """Find the root slice in a Solaris VTOC.""" > buf = fsimage.get_disk_data(file, (offset + (DK_LABEL_LOC * SECTOR_SIZE)), 512) > > if struct.unpack("<H", buf[508:510])[0] != DKL_MAGIC: > raise RuntimeError, "Invalid disklabel magic" > > nslices = struct.unpack("<H", buf[30:32])[0] > > for i in range(nslices): > sliceoff = 72 + 12 * i > slicetag = struct.unpack("<H", buf[sliceoff:sliceoff+2])[0] > slicesect = struct.unpack("<L", buf[sliceoff+4:sliceoff+8])[0] > if slicetag == V_ROOT: > return slicesect * SECTOR_SIZE > > raise RuntimeError, "No root slice found"
Hi, There are two cases where you need to know the location of the Solaris slice (root or otherwise) 1. To locate the GRUB menu: The slice and fdisk parttion are encoded into stage2 of GRUB so it know which slice contains the GRUB menu. This is true for both UFS and ZFS 2. To locate the "unix" module and the boot_archive. Note that the root slice is *always* the slice that contains unix and boot_archive This is in the GRUB menu entry. Specified by findroot() alone in the UFS case and by findroot and bootfs in the ZFS case. ZFS needs to extra step because findroot only specifies the pool and you need either an explicit bootfs or the bootfs property set in the pool. pygrub appears to be a OSOL only utility. If you try SXCE (use prtvtoc/fmthard to remove the root tag) it will boot just fine. Vikram John Levon wrote:> On Wed, Sep 16, 2009 at 04:09:19PM -0700, Vikram Hegde wrote: > > >> Actually when newboot i.e. GRUB boot was introduced we did away with the >> requirement that root slice needs to have the "root" tag and I booted >> Solaris all the time without the root tag. AFAIK this is still true with >> SXCE. I dont know if beadm (or Opensolaris) has reintroduced this >> requirement. >> > > pygrub requires it (see below). If I don''t have the tag, how do I know > which slice contains the root? > > regards > john > > > def get_solaris_slice(file, offset): > """Find the root slice in a Solaris VTOC.""" > buf = fsimage.get_disk_data(file, (offset + (DK_LABEL_LOC * SECTOR_SIZE)), 512) > > if struct.unpack("<H", buf[508:510])[0] != DKL_MAGIC: > raise RuntimeError, "Invalid disklabel magic" > > nslices = struct.unpack("<H", buf[30:32])[0] > > for i in range(nslices): > sliceoff = 72 + 12 * i > slicetag = struct.unpack("<H", buf[sliceoff:sliceoff+2])[0] > slicesect = struct.unpack("<L", buf[sliceoff+4:sliceoff+8])[0] > if slicetag == V_ROOT: > return slicesect * SECTOR_SIZE > > raise RuntimeError, "No root slice found" >
On Wed, Sep 16, 2009 at 04:37:52PM -0700, Vikram Hegde wrote:> pygrub appears to be a OSOL only utility. If you try SXCE (use > prtvtoc/fmthard to remove the root tag) it will boot just fine.No, pygrub is how Solaris Xen PV boots. We don''t have any grub at all (it''s somewhat of a misnomer for us) so we can''t do any of the tricks you mention... regards john
Hi, The only problem I see this will cause is if you have multiple root pools or (possibly even multiple BEs) or multiple UFS root filesystems in a domU. Switching between them will be problematic. It is probably very simple to simulate findroot() functionality in Xen and get rid of the root tag requirement. Vikram John Levon wrote:> On Wed, Sep 16, 2009 at 04:37:52PM -0700, Vikram Hegde wrote: > > >> pygrub appears to be a OSOL only utility. If you try SXCE (use >> prtvtoc/fmthard to remove the root tag) it will boot just fine. >> > > No, pygrub is how Solaris Xen PV boots. We don''t have any grub at all > (it''s somewhat of a misnomer for us) so we can''t do any of the tricks > you mention... > > regards > john >
Hello Mark! Yes, after I saw your message I just realized that! I had todo that everytime I wanted a bootable external usb disk manually partition and made sure ''root'' partition was defined. thanks! works now -ls Mark Johnson <Mark.Johnson@Sun.COM> wrote at Wed, Sep 16, 2009 at 07:02:18PM -0400:> > > Luc I. Suryo wrote: >> Hi Mark >> >> yes it works! Compare to the scripts between yours and mine (ksh) >> is the follwing >> I do not use fmthard >> >> I use the $PKG_IMAGE/boot/solaris/bin/update_grub that installes >> stage1 and stage2 from $PKG_IMAGE instead from the booted CD image >> (your) >> >> ther order when bootadm is execed, mine righer before update-grub >> vs uour atthe end >> >> >> Since itr works, I;ll use yours and add the packages I need to the list > > you need to make sure the disk is formated correctly. It needs to > be partitioned, then labeled with all the space in s0. And you *MUST* > label s0 as root (took me a bit to figure out that one). > > > > MRJ > > > > >> thanks! >> >> >> Mark Johnson <Mark.Johnson@Sun.COM> >> wrote at Wed, Sep 16, 2009 at 05:25:16PM -0400: >> >>> >>> Luc I. Suryo wrote: >>>> Hello >>>> >>>> Wondering if someone has any pointers >>>> dom0 is SXCE : SunOS noc01 5.11 snv_121 i86pc i386 i86xpv >>>> domU is : osol-1002-122 >>>> >>>> I use the methode describe here : >>>> http://alexeremin.blogspot.com/search?updated-max=2008-12-22T22%3A03%3A00-08%3A00&max-results=7 >>> >>> Can you try the script >>> http://blogs.sun.com/mrj/resource/slim-guest-installer >>> >>> some info about it @ >>> http://blogs.sun.com/mrj/entry/installing_a_small_xvm_or >>> >>> For dev bits, you can do a >>> $ pfexec ./slim-guest-installer --repo=http://pkg.opensolaris.org/dev >>> >>> >>> >>> >>> Thanks, >>> >>> >>> MRJ >>> >>> >>>> Im using the http://pkg.opensolaris.org/dev repository instead of http://pkg.opensolaris.org/release >>>> everything installs just fine but it seems grub never get installed? >>>> >>>> switch to http://pkg.opensolaris.org/release give me the same result.. >>>> If I do a window installation then it works.. so could it be something is missing >>>> in the pkg server and I would need to do a manually update? or some special >>>> way to get grub installed? >>>> >>>> Thanks >>>> >>>> -ls >>>> >>>> Here some output >>>> >>>> during installation: >>>> >>>> bootadm: not using biosdev command for disk: /dev/dsk/c7t0d0s0. >>>> bootadm: cannot get (hd?,?,?) for menu. menu not on bootdisk: /dev/rdsk/c7t0d0s0 >>>> Installing grub on /dev/rdsk/c7t0d0s0 >>>> stage1 written to partition 0 sector 0 (abs 16065) >>>> stage2 written to partition 0, 273 sectors starting at 50 (abs 16115) >>>> >>>> >>>> then reboot and I get this: >>>> >>>> root@opensolaris:~# reboot >>>> Sep 16 03:57:33 opensolaris reboot: initiated by jack on /dev/console >>>> syncing file systems... done >>>> rebooting... >>>> libvir: error : Unknown failure >>>> >>>> Connection to domain 74 closed. >>>> >>>> Guest installation complete... restarting guest. >>>> POST operation failed: xend_post: error from xen daemon: (xend.err "Boot loader didn''t return any data!") >>>> Domain installation may not have been >>>> successful. If it was, you can restart your domain >>>> by running ''virsh start cyan02''; otherwise, please >>>> restart your installation. >>>> ERROR POST operation failed: xend_post: error from xen daemon: (xend.err "Boot loader didn''t return any data!")
On Wed, Sep 16, 2009 at 04:55:18PM -0700, Vikram Hegde wrote:> Switching between them will be problematic. It is probably very simple > to simulate findroot() functionality in Xen and get rid of the root tag > requirement.What does findroot() need to do? regards john
Hi, Nothing much - just searching for a tag. Say the GRUB menu says findroot (pool_rpool1, 1, d) Cycle through all the disks in the VM, do a ZFS mount of slice 3 (a= 0, d= 3). fdisk partition 2 ( 0 = 1, 1 = 2) and check for the a zero length file called pool_rpool1 in /rpool/etc/bootsign directory in the slice. When that file is found boot from that slice. So the pool_rpool1 part of findroot is used to pick the disk to boot from, 1 specifies the fdisk partition and d specifies the slice) So it is pretty much the same as searching for the root tag except that the signature is in the filesystem (instead of the VTOC) and supports multiple disks and multiple BEs Vikram John Levon wrote:> On Wed, Sep 16, 2009 at 04:55:18PM -0700, Vikram Hegde wrote: > > >> Switching between them will be problematic. It is probably very simple >> to simulate findroot() functionality in Xen and get rid of the root tag >> requirement. >> > > What does findroot() need to do? > > regards > john >