Re: How to compile x86_64 NetBSD Xen domU PV kernel and userland

2019-08-21 Thread Greg Troxel
"J. Lewis Muir"  writes:

> but based on your reply, I found XEN3_DOMU in
>
>   /usr/src/sys/arch/amd64/conf
>
> So, for using build.sh, I just specify XEN3_DOMU for the kernel name
> instead of GENERIC?  In other words, instead of

"build.sh distribution" will build all the kernels that are part of the
release, including the XEN kernels (DOM0, DOMU, install variants).  Yes,
it takes a bit longer, but it will make your life easier to just do
that.


Re: Write an install image to a flash drive?

2019-08-21 Thread Bob Bernstein
On Wed, Aug 21, 2019 at 06:09:28PM +0200, Martin Husemann wrote:

> Indeed, that image runs with the root file system on the USB device.

To my delight I learned that I can edit the image "in place," as 
it were, on the flash drive. Thus I put my boot.cfg on it, which 
nicely ushers me past the odious nouveau problem on this old 
emachine.

I'm going to have some fun with these little "sticks."



Thank you

-- 
What can be asserted without evidence can be 
dismissed without evidence.
 Hitchens' Razor


Re: How to compile x86_64 NetBSD Xen domU PV kernel and userland

2019-08-21 Thread J. Lewis Muir
On 08/21, Martin Husemann wrote:
> On Wed, Aug 21, 2019 at 01:34:12PM -0500, J. Lewis Muir wrote:
> > On an amd64 NetBSD 8 stable kernel and userland system (i.e., tracking
> > the netbsd-8 branch), how do I compile a NetBSD 8 stable kernel and
> > userland to run on an x86_64 Xen domU in PV mode?
> 
> Nothing special about userland. The kernel you need is XEN3_DOMU -
> ... or I might be misunderstanding your question.

I think you understood perfectly; I just couldn't find it!  I was
looking in

  /usr/src/sys/arch/xen/conf

but based on your reply, I found XEN3_DOMU in

  /usr/src/sys/arch/amd64/conf

So, for using build.sh, I just specify XEN3_DOMU for the kernel name
instead of GENERIC?  In other words, instead of

  ./build.sh -O ../obj -T ../tools -U kernel=GENERIC

I would do the following?

  ./build.sh -O ../obj -T ../tools -U kernel=XEN3_DOMU

Thanks!

Lewis


Re: How to compile x86_64 NetBSD Xen domU PV kernel and userland

2019-08-21 Thread Martin Husemann
On Wed, Aug 21, 2019 at 01:34:12PM -0500, J. Lewis Muir wrote:
> Hello!
> 
> On an amd64 NetBSD 8 stable kernel and userland system (i.e., tracking
> the netbsd-8 branch), how do I compile a NetBSD 8 stable kernel and
> userland to run on an x86_64 Xen domU in PV mode?

Nothing special about userland. The kernel you need is XEN3_DOMU -
... or I might be misunderstanding your question.

Martin


How to compile x86_64 NetBSD Xen domU PV kernel and userland

2019-08-21 Thread J. Lewis Muir
Hello!

On an amd64 NetBSD 8 stable kernel and userland system (i.e., tracking
the netbsd-8 branch), how do I compile a NetBSD 8 stable kernel and
userland to run on an x86_64 Xen domU in PV mode?

I couldn't find documentation anywhere, but if I missed it, I'd be
grateful to be pointed to it.

I'm aware of the following which, as far as I can tell, do not document
how to do it:

* https://wiki.netbsd.org/ports/xen/howto/
* https://www.netbsd.org/docs/guide/en/chap-kernel.html
* https://www.netbsd.org/docs/guide/en/chap-updating.html

Thanks!

Lewis


Re: Write an install image to a flash drive?

2019-08-21 Thread Martin Husemann
On Wed, Aug 21, 2019 at 11:44:32AM -0400, Bob Bernstein wrote:
> One interesting turn running sysinst: I tried "unmounted 
> fs" to access the flash drive with the install img only to learn 
> that it was already mounted and therefore "busy." I got what I 
> needed selecting "Local fs" at /mnt.

Indeed, that image runs with the root file system on the USB device.

It is also a full populated NetBSD base system, you can exit from
sysinst (or use Utils/Run /bin/sh) to get a shell and do whatever
you like manually.

Martin


Re: Write an install image to a flash drive?

2019-08-21 Thread Bob Bernstein
YO YO YO Jeremy! (aka The Hardest-Working Man in NetBSD-land! 
) Long time, long time...

My upgrade is successful:

NetBSD nebby 9.0_BETA NetBSD 9.0_BETA (GENERIC) #0: Sun Aug 18 
14:36:49 UTC 2019 
mkre...@mkrepro.netbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC 
amd64

On Wed, Aug 21, 2019 at 09:04:59AM -0500, r...@reedmedia.net wrote:

> Did you get any error message or information before it 
> reverted booting from your hard disk?

I had the wrong img on the stick. I had just slapped a boot.iso 
on it, like a big dummy. With the (always) very astute aid of 
the assembled faithful here, I was put right. This is the img I 
needed, and used to good effect:

http://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-9/latest/images/NetBSD-9.0_BETA-amd64-install.img.gz

One interesting turn running sysinst: I tried "unmounted 
fs" to access the flash drive with the install img only to learn 
that it was already mounted and therefore "busy." I got what I 
needed selecting "Local fs" at /mnt.

Thank You

-- 
What can be asserted without evidence can be dismissed without 
evidence.
Hitchens' Razor


Re: Write an install image to a flash drive?

2019-08-21 Thread reed
On Tue, 20 Aug 2019, Bob Bernstein wrote:

> I want to use a flash drive instead of a CD to upgrade from an 
> old 'current' to our latest. This is being done on an ancient 
> emachine amd64:

"ancient"

In my experience some old systems just won't boot from USB flash disks 
well. In some cases, I have had to try over five different flash disks 
until I found one that worked.

Did you get any error message or information before it reverted booting 
from your hard disk?


Re: Write an install image to a flash drive?

2019-08-21 Thread Greg Troxel
Bob Bernstein  writes:

> I want to use a flash drive instead of a CD to upgrade from an 
> old 'current' to our latest. This is being done on an ancient 
> emachine amd64:
>
> NetBSD nebby 8.99.35 NetBSD 8.99.35 (GENERIC) #0: Wed Mar 13 06:27:34 UTC 
> 2019  mkre...@mkrepro.netbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64

Also, it's good to have things like flash drives and CD around to rescue
your box, but you don't need external media for an upgrade.

In pkgsrc there is etcmanage (my way to do it) and sysupgrade (someone
else's way, a bit more mainstream).  I upgrade machines in place all the
time using INSTALL-NetBSD from etcmanage.

That said, I don't want to discourage you from working through the flash
drive issues as that's useful for you and fixing doc bugs, if any, is
useful for everyone.


Re: Write an install image to a flash drive?

2019-08-21 Thread Michael van Elst
jmitc...@bigjar.com (Jason Mitchell) writes:

>Also, is there an easy way to remove the first 2048 sectors from the image so 
>the FFS part could be mounted using a vnd device? Or would this work without 
>making changes?

The image includes an MBR and NetBSD will create a default disklabel for it.
E.g.:

8 partitions:
#sizeoffset fstype [fsize bsize cpg/sgs]
 a:   2865152  2048 4.2BSD   1024  819216  # (Cyl.  1 -   1399)
 c:   2865152  2048 unused  0 0# (Cyl.  1 -   1399)
 d:   2867200 0 unused  0 0# (Cyl.  0 -   1399)

You can then use /dev/vnd0a to mount the filesystem.

-- 
-- 
Michael van Elst
Internet: mlel...@serpens.de
"A potential Snark may lurk in every tree."