Re: ath0: cannot map register space

2016-02-13 Thread Martin Husemann
On Sun, Feb 14, 2016 at 11:14:42AM +0530, Mayuresh wrote:
> ath0 at pci2 dev 0 function 0: Atheros 5424/2424
> ath0: cannot map register space

Can you show output of "pcictl dump" for that device?

Martin


Re: How to install NetBSD on a USB stick

2016-02-13 Thread Alistair Crooks
http://pkgsrc.se/sysutils/mkmemstick

Best,
Alistair

On 13 February 2016 at 21:48, Gary Duzan  wrote:
> In Message <20160214054548.070dd115...@xen1.duzan.org>,
>"Gary Duzan" wrote:
>
> =>In Message <20160214052012.ga...@internode.on.net>,
> =>   Brett Lymn wrote:
> =>
> =>=>On Sun, Feb 14, 2016 at 08:34:37AM +0530, Mayuresh wrote:
> =>=>
> =>=>> - Will the end result be different with your method vs creating a live
> =>=>>   image (as Gary's reply suggested)?
> =>=>>
> =>=>
> =>=>IIRC Gary pointed you at an install image which has a cut down set of
> =>=>tools on it, just sufficient to install the operating system.  If you
> =>=>are looking for a fully functioning NetBSD system then you don't want an
> =>=>install image.
> =>
> =>   Not that it matters much at this point, since Mayuresh appears
> =>to have managed a normal install to USB, but I had suggested building
> =>a live-image, which appears to be pretty complete. From a -current
> =>build in January:
> =>
> =># df -k /mnt
> =>Filesystem1K-blocks   Used  Avail %Cap Mounted on
> =>/dev/dk01416942 894948 451148  66% /mnt
> =># ls -l /mnt/etc/mtree/
> =>total 13400
> =>-r--r--r--  1 root  wheel59623 Jan  3 01:40 NetBSD.dist
> =>-r--r--r--  1 root  wheel   812361 Jan  3 01:56 set.base
> =>-r--r--r--  1 root  wheel  2605531 Jan  3 01:56 set.comp
> =>-r--r--r--  1 root  wheel44485 Jan  3 01:56 set.etc
> =>-r--r--r--  1 root  wheel44126 Jan  3 01:56 set.games
> =>-r--r--r--  1 root  wheel   840260 Jan  3 01:56 set.man
> =>-r--r--r--  1 root  wheel98679 Jan  3 01:56 set.misc
> =>-r--r--r--  1 root  wheel   104099 Jan  3 01:56 set.modules
> =>-r--r--r--  1 root  wheel   416694 Jan  3 01:56 set.tests
> =>-r--r--r--  1 root  wheel93113 Jan  3 01:57 set.text
> =>-r--r--r--  1 root  wheel   213721 Jan  3 01:57 set.xbase
> =>-r--r--r--  1 root  wheel   489084 Jan  3 01:57 set.xcomp
> =>-r--r--r--  1 root  wheel11608 Jan  3 01:57 set.xetc
> =>-r--r--r--  1 root  wheel   780017 Jan  3 01:57 set.xfont
> =>-r--r--r--  1 root  wheel36002 Jan  3 01:57 set.xserver
> =>-r--r--r--  1 root  wheel19264 Jan  3 01:40 special
> =>
> =>  Gary Duzan
> =>
> =>
> =>p.s., Interestingly, it was a bit more difficult to mount the wd0
> =>image than I expected. It has an MBR partition table, but the
> =>disklabel on the vnd device I attached to it was garbage, with
> =>partitions a-p all covering the whole disk. I had to use dkctl
> =>addwedge with the offset and size from the fdisk to get a device
> =>I could mount. This was on 7.0_STABLE from mid-December.
>
>Sorry, FWIW, this was actually an sd0 live-image.
>
> Gary Duzan
>
>


Re: How to install NetBSD on a USB stick

2016-02-13 Thread Brett Lymn
On Sun, Feb 14, 2016 at 08:34:37AM +0530, Mayuresh wrote:
> On Sun, Feb 14, 2016 at 08:55:05AM +1030, Brett Lymn wrote:
> > that is an install image, the orignal poster sounded like they wanted to
> > run a full NetBSD from the stick which is different.  There is a wiki
> > entry for installing on a usb stick:
> > 
> > https://wiki.netbsd.org/tutorials/how_to_install_netbsd_from_an_usb_memory_stick/
> > 
> > which is pretty much the same as my one (the implementality blog post).
> > Are you having problems or just after "official" documentation?
> 
> I was looking for either
> - official documentation or

Well, the above wiki qualifies does it not?

> - official image (I cited a 3rd party one in OP, A. Do not know whether it
>   would be secure B. I anyway tried it and it didn't work) or

jibbed is actually done by a NetBSD developer if my recollection is
correct so it may be somewhat trustworthy

> - instructions to install using installer, using which I am able to
>   install to a hard disk, (why not to a USB stick)

I think because of broken bioses that see usb as removable media and
want to boot from them but not 100% sure.  Really, if the media is
available at boot I would have expected that you could install to it but
it is not something I have tried.

> - your blog (I cited in OP) is nice. I just wonder why the standard
>   installation procedure should not work for a stick.


Well, mainly because I had a NetBSD system running already and I didn't
want to risk doing an install again - it is always hairy when you have
multiple disks on a machine and you are not sure which is which.  It was
easier for me just to create the usb disk in the manner I documented
rather than any systemic blocker.

> - Will the end result be different with your method vs creating a live
>   image (as Gary's reply suggested)?
> 

IIRC Gary pointed you at an install image which has a cut down set of
tools on it, just sufficient to install the operating system.  If you
are looking for a fully functioning NetBSD system then you don't want an
install image.

-- 
Brett Lymn
Let go, or be dragged - Zen proverb.


Re: ath0: cannot map register space

2016-02-13 Thread Mayuresh
On Sun, Feb 14, 2016 at 11:14:42AM +0530, Mayuresh wrote:
> #dmesg | grep ath0
> ath0 at pci2 dev 0 function 0: Atheros 5424/2424
> ath0: cannot map register space

Just in case if it is relevant, the device works fine on Linux and
reported as follows:

# dmesg  | grep ath
[   17.228139] ath5k :03:00.0: can't disable ASPM; OS doesn't have
ASPM control
[   17.228154] ath5k :03:00.0: enabling device ( -> 0002)
[   17.228322] ath5k :03:00.0: registered as 'phy0'
[   17.863904] ath: EEPROM regdomain: 0x65
[   17.863913] ath: EEPROM indicates we should expect a direct regpair map
[   17.863918] ath: Country alpha2 being used: 00
[   17.863921] ath: Regpair used: 0x65
[   18.181025] ath5k: phy0: Atheros AR2425 chip found (MAC: 0xe2, PHY:
0x70)


Particularly NetBSD says it is 5424/2424 and Linux says it is AR2425 - in
case it matters.

Mayuresh


ath0: cannot map register space

2016-02-13 Thread Mayuresh
I have an old laptop where I am trying out NetBSD 7.0 i386.

Get the following information about the wifi device:

#dmesg | grep ath0
ath0 at pci2 dev 0 function 0: Atheros 5424/2424
ath0: cannot map register space

Interface ath0 is not created due to above error.

Following PRs sound relevant:

http://gnats.netbsd.org/34045
http://gnats.netbsd.org/38734

But these look old and the patches mentioned do not seem to match 7.0's
code.

Would appreciate help in this matter.

Mayuresh.



Re: How to install NetBSD on a USB stick

2016-02-13 Thread Gary Duzan
In Message <20160214054548.070dd115...@xen1.duzan.org>,
   "Gary Duzan" wrote:

=>In Message <20160214052012.ga...@internode.on.net>,
=>   Brett Lymn wrote:
=>
=>=>On Sun, Feb 14, 2016 at 08:34:37AM +0530, Mayuresh wrote:
=>=>
=>=>> - Will the end result be different with your method vs creating a live
=>=>>   image (as Gary's reply suggested)?
=>=>> 
=>=>
=>=>IIRC Gary pointed you at an install image which has a cut down set of
=>=>tools on it, just sufficient to install the operating system.  If you
=>=>are looking for a fully functioning NetBSD system then you don't want an
=>=>install image.
=>
=>   Not that it matters much at this point, since Mayuresh appears
=>to have managed a normal install to USB, but I had suggested building
=>a live-image, which appears to be pretty complete. From a -current
=>build in January:
=>
=># df -k /mnt
=>Filesystem1K-blocks   Used  Avail %Cap Mounted on
=>/dev/dk01416942 894948 451148  66% /mnt
=># ls -l /mnt/etc/mtree/
=>total 13400
=>-r--r--r--  1 root  wheel59623 Jan  3 01:40 NetBSD.dist
=>-r--r--r--  1 root  wheel   812361 Jan  3 01:56 set.base
=>-r--r--r--  1 root  wheel  2605531 Jan  3 01:56 set.comp
=>-r--r--r--  1 root  wheel44485 Jan  3 01:56 set.etc
=>-r--r--r--  1 root  wheel44126 Jan  3 01:56 set.games
=>-r--r--r--  1 root  wheel   840260 Jan  3 01:56 set.man
=>-r--r--r--  1 root  wheel98679 Jan  3 01:56 set.misc
=>-r--r--r--  1 root  wheel   104099 Jan  3 01:56 set.modules
=>-r--r--r--  1 root  wheel   416694 Jan  3 01:56 set.tests
=>-r--r--r--  1 root  wheel93113 Jan  3 01:57 set.text
=>-r--r--r--  1 root  wheel   213721 Jan  3 01:57 set.xbase
=>-r--r--r--  1 root  wheel   489084 Jan  3 01:57 set.xcomp
=>-r--r--r--  1 root  wheel11608 Jan  3 01:57 set.xetc
=>-r--r--r--  1 root  wheel   780017 Jan  3 01:57 set.xfont
=>-r--r--r--  1 root  wheel36002 Jan  3 01:57 set.xserver
=>-r--r--r--  1 root  wheel19264 Jan  3 01:40 special
=>
=>  Gary Duzan
=>
=>
=>p.s., Interestingly, it was a bit more difficult to mount the wd0
=>image than I expected. It has an MBR partition table, but the
=>disklabel on the vnd device I attached to it was garbage, with
=>partitions a-p all covering the whole disk. I had to use dkctl
=>addwedge with the offset and size from the fdisk to get a device
=>I could mount. This was on 7.0_STABLE from mid-December.

   Sorry, FWIW, this was actually an sd0 live-image.

Gary Duzan




Re: How to install NetBSD on a USB stick

2016-02-13 Thread Gary Duzan
In Message <20160214052012.ga...@internode.on.net>,
   Brett Lymn wrote:

=>On Sun, Feb 14, 2016 at 08:34:37AM +0530, Mayuresh wrote:
=>
=>> - Will the end result be different with your method vs creating a live
=>>   image (as Gary's reply suggested)?
=>> 
=>
=>IIRC Gary pointed you at an install image which has a cut down set of
=>tools on it, just sufficient to install the operating system.  If you
=>are looking for a fully functioning NetBSD system then you don't want an
=>install image.

   Not that it matters much at this point, since Mayuresh appears
to have managed a normal install to USB, but I had suggested building
a live-image, which appears to be pretty complete. From a -current
build in January:

# df -k /mnt
Filesystem1K-blocks   Used  Avail %Cap Mounted on
/dev/dk01416942 894948 451148  66% /mnt
# ls -l /mnt/etc/mtree/
total 13400
-r--r--r--  1 root  wheel59623 Jan  3 01:40 NetBSD.dist
-r--r--r--  1 root  wheel   812361 Jan  3 01:56 set.base
-r--r--r--  1 root  wheel  2605531 Jan  3 01:56 set.comp
-r--r--r--  1 root  wheel44485 Jan  3 01:56 set.etc
-r--r--r--  1 root  wheel44126 Jan  3 01:56 set.games
-r--r--r--  1 root  wheel   840260 Jan  3 01:56 set.man
-r--r--r--  1 root  wheel98679 Jan  3 01:56 set.misc
-r--r--r--  1 root  wheel   104099 Jan  3 01:56 set.modules
-r--r--r--  1 root  wheel   416694 Jan  3 01:56 set.tests
-r--r--r--  1 root  wheel93113 Jan  3 01:57 set.text
-r--r--r--  1 root  wheel   213721 Jan  3 01:57 set.xbase
-r--r--r--  1 root  wheel   489084 Jan  3 01:57 set.xcomp
-r--r--r--  1 root  wheel11608 Jan  3 01:57 set.xetc
-r--r--r--  1 root  wheel   780017 Jan  3 01:57 set.xfont
-r--r--r--  1 root  wheel36002 Jan  3 01:57 set.xserver
-r--r--r--  1 root  wheel19264 Jan  3 01:40 special

Gary Duzan


p.s., Interestingly, it was a bit more difficult to mount the wd0
image than I expected. It has an MBR partition table, but the
disklabel on the vnd device I attached to it was garbage, with
partitions a-p all covering the whole disk. I had to use dkctl
addwedge with the offset and size from the fdisk to get a device
I could mount. This was on 7.0_STABLE from mid-December.


Re: How to install NetBSD on a USB stick

2016-02-13 Thread Mayuresh
On Sun, Feb 14, 2016 at 08:34:37AM +0530, Mayuresh wrote:
> - instructions to install using installer, using which I am able to
>   install to a hard disk, (why not to a USB stick)

I just retried the installation and the "Old BPB too big" that I got
earlier went away on its own and the installation succeeded.

I was about to follow Brett's instructions to overcome above error, but it
went away on its own.

Perhaps something on the disk (stick) changed in my last installation
attempt, making it smooth in second attempt. Just a guess.

Mayuresh.


Re: How to install NetBSD on a USB stick

2016-02-13 Thread Mayuresh
On Sun, Feb 14, 2016 at 08:55:05AM +1030, Brett Lymn wrote:
> that is an install image, the orignal poster sounded like they wanted to
> run a full NetBSD from the stick which is different.  There is a wiki
> entry for installing on a usb stick:
> 
> https://wiki.netbsd.org/tutorials/how_to_install_netbsd_from_an_usb_memory_stick/
> 
> which is pretty much the same as my one (the implementality blog post).
> Are you having problems or just after "official" documentation?

I was looking for either
- official documentation or
- official image (I cited a 3rd party one in OP, A. Do not know whether it
  would be secure B. I anyway tried it and it didn't work) or
- instructions to install using installer, using which I am able to
  install to a hard disk, (why not to a USB stick)
- your blog (I cited in OP) is nice. I just wonder why the standard
  installation procedure should not work for a stick.
- Will the end result be different with your method vs creating a live
  image (as Gary's reply suggested)?

Mayuresh.


Re: How to install NetBSD on a USB stick

2016-02-13 Thread Brett Lymn
On Sat, Feb 13, 2016 at 06:57:15PM +, Christian Koch wrote:
> 
> amd64 and i386, at least, already have images you can "dd" to a USB stick
> 
> ftp://ftp.netbsd.org/pub/NetBSD/images/7.0/NetBSD-7.0-i386-install.img.gz
> 

that is an install image, the orignal poster sounded like they wanted to
run a full NetBSD from the stick which is different.  There is a wiki
entry for installing on a usb stick:

https://wiki.netbsd.org/tutorials/how_to_install_netbsd_from_an_usb_memory_stick/

which is pretty much the same as my one (the implementality blog post).
Are you having problems or just after "official" documentation?

-- 
Brett Lymn
Let go, or be dragged - Zen proverb.


Re: How to install NetBSD on a USB stick

2016-02-13 Thread Christian Koch
On Sat, Feb 13, 2016 at 10:08:07AM -0500, Gary Duzan wrote:
> In Message <20160213142158.GA20835@odin>,
>Mayuresh wrote:
> 
> =>I wish to install NetBSD 7.0 i386 on a laptop on a USB stick. This is for
> =>testing purpose, not for day to day use.
> =>
> =>I know I can boot from an installation image from a USB stick. However I
> =>want to carry out the installation on a USB stick.
> =>
> =>The installation procedure that works with a hard disk did not work. I am
> =>not sure whether setting up geometry etc. needs to be done differently if
> =>the target drive is a USB stick.
> =>
> =>I notice a memstick image for 5.1, but not for 7.0.
> =>http://ftp.netbsd.org/pub/NetBSD/NetBSD-5.1/memstick/
> 
>Unfortunately, you'll probably need to build one yourself.
> Fortunately, as long as you have a build host, it should be pretty
> easy. With the source checked out, just:
> 
> % ./build.sh -m i386 -U tools release live-image
> 
> You'll end up with NetBSD-${version}-${arch}-live-{sd0,wd0}root.img.gz
> files in the releasedir/images directory. Uncompressed, the sd0
> image will work on USB drives, and the wd0 image will work on SATA
> drives. Note that I haven't done this as a cross-build, but I
> believe it should work.
> 
>Good luck...
> 
>   Gary Duzan
> 
> 

amd64 and i386, at least, already have images you can "dd" to a USB stick

ftp://ftp.netbsd.org/pub/NetBSD/images/7.0/NetBSD-7.0-i386-install.img.gz

-Christian


Re: How to install NetBSD on a USB stick

2016-02-13 Thread Gary Duzan
In Message <20160213142158.GA20835@odin>,
   Mayuresh wrote:

=>I wish to install NetBSD 7.0 i386 on a laptop on a USB stick. This is for
=>testing purpose, not for day to day use.
=>
=>I know I can boot from an installation image from a USB stick. However I
=>want to carry out the installation on a USB stick.
=>
=>The installation procedure that works with a hard disk did not work. I am
=>not sure whether setting up geometry etc. needs to be done differently if
=>the target drive is a USB stick.
=>
=>I notice a memstick image for 5.1, but not for 7.0.
=>http://ftp.netbsd.org/pub/NetBSD/NetBSD-5.1/memstick/

   Unfortunately, you'll probably need to build one yourself.
Fortunately, as long as you have a build host, it should be pretty
easy. With the source checked out, just:

% ./build.sh -m i386 -U tools release live-image

You'll end up with NetBSD-${version}-${arch}-live-{sd0,wd0}root.img.gz
files in the releasedir/images directory. Uncompressed, the sd0
image will work on USB drives, and the wd0 image will work on SATA
drives. Note that I haven't done this as a cross-build, but I
believe it should work.

   Good luck...

Gary Duzan




How to install NetBSD on a USB stick

2016-02-13 Thread Mayuresh
I wish to install NetBSD 7.0 i386 on a laptop on a USB stick. This is for
testing purpose, not for day to day use.

I know I can boot from an installation image from a USB stick. However I
want to carry out the installation on a USB stick.

The installation procedure that works with a hard disk did not work. I am
not sure whether setting up geometry etc. needs to be done differently if
the target drive is a USB stick.

I notice a memstick image for 5.1, but not for 7.0.
http://ftp.netbsd.org/pub/NetBSD/NetBSD-5.1/memstick/

Also notice a couple of more URLs talking about this, but nothing found in
NetBSD documentation or mailing list:

http://implementality.blogspot.in/2012/09/netbsd-on-stick.html
http://www.jibbed.org/

Would appreciate inputs in this regard.

Mayuresh.