Re: Current USB Wifi status

2015-08-07 Thread Quartz

So, Stuart's comment is still valid. I will stop looking for a USB
solution, and instead see if I can find a low power chassis with a PCI
slot. While more expensive, it is probably money well invested.


It might be worth buying/reusing a standalone access point (perhaps 
reflashing a linksys router or something) and connecting via ethernet 
cable. That way you have more flexibility in choosing locations: ie, the 
OpenBSD router can be somewhere that's convenient for interfacing with 
your ISP's equipment, and the wap can be somewhere with good reception. 
'course, then you have two boxes to deal with, so it's a trade off.




Re: Repartitioning

2015-08-07 Thread Quartz

How about taking some directory that is currently under /var (depending
on what you're doing with the machine, maybe log or www or mysql or
something?) and moving the contents to /usr/obj or /usr/src (or if
they're together on disk, remove /usr/obj and /usr/src and create a
new partition covering the space that was used by both)? (Then change
the mountpoint in /etc/fstab). If that gives you enough capacity,
that might be easier than some big shuffle-around.


That's kinda half-assing it for us, as that would still leave like three 
partitions around that are 95% empty consuming over a third of the disk. 
If I'm going to be redoing things, I might as well do it all at once.




Re: Current USB Wifi status

2015-08-07 Thread lists
> > To summarize: For best hostap experience use a supported athn(4)
> > device on PCI. That's what I use at home and it just works.
> > Avoid USB for hostap if at all possible.
> 
> Thank you very much for the answer.
> 
> There is the usual problem that many of the devices listed are not 
> available anymore, or there are numerous versions with the same device 
> name where the manufacturer altered the chipset. I sometimes wish that 
> store pages would be as clear as OpenBSD man pages.

That's a serious problem for hardware buyers especially first time or
off bidding sites, beware sometimes they sell crap that does not pass
factory quality control.

Posting success stories with correct technical details on personal pages
related to OpenBSD for the search engine to find is a step forward, but
best is a follow up on the mail lists so archives have these details
for others (the usual place to search for tech insight).

> So, Stuart's comment is still valid. I will stop looking for a USB 
> solution, and instead see if I can find a low power chassis with a PCI 
> slot. While more expensive, it is probably money well invested.

Yes, indeed. Just a small suggestion, there are PCI(e) to mini-PCI
converters which can hold a laptop form factor wireless card in a
regular PCI(e) slot, not sure if these are electrical only or have a
chip on them that might not be supported, but an option worth checking.

Another idea may be to temporarily reuse an old access point and
connect that to an existing OpenBSD system over Ethernet, to give you
wireless coverage, but in my opinion the wireless card as hostap is
always the better solution.

One can even use a spare (old) portable (netbook) laptop with an
included athn(4) in hostap mode as a device to provide wireless access
to others.

Please post back info when you sort it out, experience, comments, and
possibly links to helpful past threads in the mail archives.



Re: Repartitioning

2015-08-07 Thread Stuart Henderson
On 2015-08-06, Quartz  wrote:
> We have an older system running 4.9 that acts as a sort of 
> dev/test/scratch machine for messing around. When it was set up it we 
> threw a 10gb drive in there and did a generic install with all the 
> defaults. Over time, as we've used this for various stuff, we've 
> realized that that partitioning scheme turned out to be decidedly non 
> optimal. /usr/obj and /usr/src are eating up a gig each but only have 
> 2kb of data on them (this machine has never compiled anything). /home 
> and /usr/local are using less than 45mb combined. Meanwhile /var was 
> only set up at a few hundred megs and is bursting at the seams. Over 
> half the drive's capacity is being wasted.
>
> I'm not super familiar with how OpenBSD does disks and all of the 
> caveats. How easy would it be to nuke some of these partitions and 
> recombine the space? Is it something that could be done with a couple 
> fdisk commands or would it involve a lot of screwing around? I've looked 
> though the manual regarding fdisk and disklabel but I'm still not sure I 
> really understand how everything works together.

How about taking some directory that is currently under /var (depending
on what you're doing with the machine, maybe log or www or mysql or
something?) and moving the contents to /usr/obj or /usr/src (or if
they're together on disk, remove /usr/obj and /usr/src and create a
new partition covering the space that was used by both)? (Then change
the mountpoint in /etc/fstab). If that gives you enough capacity,
that might be easier than some big shuffle-around.



Re: no more sudo on openbsd 5.8

2015-08-07 Thread Stuart Henderson
On 2015-08-07, John Naggets  wrote:
> Hello,
>
> I just installed OpenBSD snapshot (5.8) through an automated install
> and was surprise to login with my normal user and to find out that
> there is no sudo command available. Is this normal?
>
> I have setup the autoinstall for no root password and only one user
> account so I was wondering how do I run something as root now? Do I
> really need to setup a root account from autoinstall?

You'll need to change procedure. Here are a few alternatives:

- setup a root password,

- setup a root ssh key and permit root logins (e.g. "Allow root ssh =
prohibit-password"),

- provide a site58.tgz with a doas.conf(5) file that permits access
for members of wheel.



Re: Current USB Wifi status

2015-08-07 Thread Bernd Schoeller

On 07/08/15 10:38, Stefan Sperling wrote:

AFAIK the man pages are all up to date and explain the current state on
a per driver basis. I don't have anything to add to what the pages say.

To summarize: For best hostap experience use a supported athn(4)
device on PCI. That's what I use at home and it just works.
Avoid USB for hostap if at all possible.


Thank you very much for the answer.

There is the usual problem that many of the devices listed are not 
available anymore, or there are numerous versions with the same device 
name where the manufacturer altered the chipset. I sometimes wish that 
store pages would be as clear as OpenBSD man pages.


So, Stuart's comment is still valid. I will stop looking for a USB 
solution, and instead see if I can find a low power chassis with a PCI 
slot. While more expensive, it is probably money well invested.


Thanks,
Bernd



Re: Repartitioning

2015-08-07 Thread Kevin Chadwick
> Yes. Use VBoxManage convertfromraw on the dd'ed image.

Either use dump or mount each drive you need to keep and tar it to an
external disk

Re-install the same version with the layout you want

Untar and reboot; done

or you could also just swap the contents of a couple of partitions and
fix fstab.

p.s. I always leave some space free for unthought of needs for
partitions but having too little is more problematic especially if you
need lots of inodes but easily fixed.

-- 

KISSIS - Keep It Simple So It's Securable



Re: Repartitioning

2015-08-07 Thread Brian Conway
Yes. Use VBoxManage convertfromraw on the dd'ed image.

Brian

On Aug 7, 2015 11:37 AM, "Quartz"  wrote:

> You could also make a raw image of the disk and run a copy of that image
>> in qemu on another computer, something which would give you a chance to
>> do some experimenting with growfs(8)&  friends without having to risk
>> anything.
>>
>
> Oh, now that's a really good idea actually, I never thought of that. Would
> that also work for VirtualBox or some other VM? VB can be weird about disk
> images.



Re: Repartitioning

2015-08-07 Thread Quartz

You could also make a raw image of the disk and run a copy of that image
in qemu on another computer, something which would give you a chance to
do some experimenting with growfs(8)&  friends without having to risk
anything.


Oh, now that's a really good idea actually, I never thought of that. 
Would that also work for VirtualBox or some other VM? VB can be weird 
about disk images.




Re: Repartitioning

2015-08-07 Thread Erling Westenvik
On Fri, Aug 07, 2015 at 11:44:36AM -0400, Ted Unangst wrote:
> Quartz wrote:
> > > The general answer to your question, however, is the "growfs" command.
> > > growfs will let you expand an off-line file system with additional space
> > > immediately adjoining the end of the partition.
> > 
> > OK that's the general answer providing we replace the disk with a 
> > bigger one though, right? Is there a good way to use the same disk? 
> > Again, the issue is not that the disk is full, but that's it half empty 
> > and split up in a way that we can't really use the space.
> 
> you need to use disklabel to delete some of the existing paritions.
> 
> this is the kind of procedure you really don't want to do without backups, and
> if you have backups, restoring them may be easier.
> 
> there is no easy way to shrink or move filesystems, only copying their
> contents. depending on where /var is, your ability to grow it may be limited.
 
You could also make a raw image of the disk and run a copy of that image
in qemu on another computer, something which would give you a chance to
do some experimenting with growfs(8) & friends without having to risk
anything. Grantet success, you could even transfer the changed image
back to the original disk, or another disk if you dont't trust the
original image, and test it live on the machine in question.

I find the issue interresting and hope you report back if you decide to
give your repartitioning-project a shot.

Good luck,

Erling



Re: Repartitioning

2015-08-07 Thread Quartz

- nuke usr/X11R6,



That will end up with five partitions: /, /tmp, /home, /usr, and /var


Also, this machine doesn't have X, FWIW.



Re: Repartitioning

2015-08-07 Thread Quartz

there is no easy way to shrink or move filesystems, only copying their
contents. depending on where /var is, your ability to grow it may be limited.


Disklabel puts /var as the third partition. I wasn't really expecting to 
be able to grow it directly. I think what I'd like to do is


- copy the contents of the /usr/local and /usr/X11R6 partitions over to 
dirs in /usr


- backup contents of /var somewhere else temporarily

- wipe /var partition and turn it into /home, and copy the old /home 
contents over


- nuke usr/X11R6, /usr/local, /usr/src, /usr/obj, and the old /home 
(they're all adjacent partitions)


- use that space to make a new /var

That will end up with five partitions: /, /tmp, /home, /usr, and /var



Re: Repartitioning

2015-08-07 Thread lists
> > First of all, you have a machine that is running a very old version of
> > OpenBSD.  You have a lot of upgrades to do, and since you have other
> > issues (partitioning), you probably just want to reinstall and start
> > over using your current knowledge of your disk layout needs.
> 
> Well that's kind of the thing.
> The machine is mainly used for messing around and testing stuff, so it 
> has a bunch of random things installed that will be a pain to move over. 
> Additionally, we occasionally use it to verify things against older 
> OpenBSD specifically (like, 4.9 was still using Apache for example). 
> Upgrading is certainly possible, it's just a question of which will 
> cause more pain in the end- that or repartitioning.

So, partitioning originally was not up to your current usage, and you're
stuck with it over years. Probably you have other constraints to keep
it this way, so redoing partitioning may not solve it for you at all.

Simplest approach is usually better than inventing complications for
not doing anything to solve current issues.

You could also just sit another test box next to the old one, install
a fresh snapshot (or your historic preferred one) and gradually move
things over, if you find a way around your other constraints and decide
to do so.

You can also copy your data out, re-partition the old system and move
back the copy. Note, while dealing with historic software (unless
you're on a dead platform), you will keep replicating and rippling out
the problem in various other places over time.

And another idea, you could just add another (and then another) drive
from your old spares to the same system and just add the partitions
there.

So, there are no more than two simple choices, do anything, or nothing
at all, and most probably partitioning is the least of your issues. If
you're so inclined to redo partitioning, just follow Nick's advice.



Re: Repartitioning

2015-08-07 Thread Ted Unangst
Quartz wrote:
> > The general answer to your question, however, is the "growfs" command.
> > growfs will let you expand an off-line file system with additional space
> > immediately adjoining the end of the partition.
> 
> OK that's the general answer providing we replace the disk with a 
> bigger one though, right? Is there a good way to use the same disk? 
> Again, the issue is not that the disk is full, but that's it half empty 
> and split up in a way that we can't really use the space.

you need to use disklabel to delete some of the existing paritions.

this is the kind of procedure you really don't want to do without backups, and
if you have backups, restoring them may be easier.

there is no easy way to shrink or move filesystems, only copying their
contents. depending on where /var is, your ability to grow it may be limited.



Re: no more sudo on openbsd 5.8

2015-08-07 Thread Todd C. Miller
On Fri, 07 Aug 2015 17:06:03 +0200, John Naggets wrote:

> I just installed OpenBSD snapshot (5.8) through an automated install
> and was surprise to login with my normal user and to find out that
> there is no sudo command available. Is this normal?

Yes, sudo has moved to ports.  The new doas(1) acts like a simplified
sudo.

> I have setup the autoinstall for no root password and only one user
> account so I was wondering how do I run something as root now? Do I
> really need to setup a root account from autoinstall?

You can either use doas(1) or install the sudo port.

 - todd



Re: no more sudo on openbsd 5.8

2015-08-07 Thread Maurice McCarthy
On Fri, Aug 07, 2015 at 05:06:03PM +0200 or thereabouts, John Naggets wrote:
> Hello,
> 
> I just installed OpenBSD snapshot (5.8) through an automated install
> and was surprise to login with my normal user and to find out that
> there is no sudo command available. Is this normal?
> 
> I have setup the autoinstall for no root password and only one user
> account so I was wondering how do I run something as root now? Do I
> really need to setup a root account from autoinstall?
> 
> Regards
> John
> 

man doas



Re: no more sudo on openbsd 5.8

2015-08-07 Thread David Coppa
On Fri, Aug 7, 2015 at 5:06 PM, John Naggets  wrote:
> Hello,
>
> I just installed OpenBSD snapshot (5.8) through an automated install
> and was surprise to login with my normal user and to find out that
> there is no sudo command available. Is this normal?
>
> I have setup the autoinstall for no root password and only one user
> account so I was wondering how do I run something as root now? Do I
> really need to setup a root account from autoinstall?
>
> Regards
> John
>

man doas

http://www.tedunangst.com/flak/post/doas


Ciao!
David
-- 
"If you try a few times and give up, you'll never get there. But if
you keep at it... There's a lot of problems in the world which can
really be solved by applying two or three times the persistence that
other people will."
-- Stewart Nelson



no more sudo on openbsd 5.8

2015-08-07 Thread John Naggets
Hello,

I just installed OpenBSD snapshot (5.8) through an automated install
and was surprise to login with my normal user and to find out that
there is no sudo command available. Is this normal?

I have setup the autoinstall for no root password and only one user
account so I was wondering how do I run something as root now? Do I
really need to setup a root account from autoinstall?

Regards
John



Re: Repartitioning

2015-08-07 Thread Quartz

(though when you start looking
at how much it costs to power the thing, it's still not free, and at
some point it might have been cheaper to replace it with something
else.


I don't think it really works that way for mechanical hard drives. At 
least, taking a quick look at the drive pile and comparing a few, 
there's an old 15gb ide that consumes .3 amps each for both rails, vs a 
couple 1tb sata drives that use .5 - .75 for both. Unless you're talking 
about replacing a mechanical with an SSD I don't think power consumption 
is really an issue. And depending on how expensive that SSD is compared 
to a bargain bin old mech, it may be a while before you catch up, 
especially if the machine isn't on 24/7.




Re: Repartitioning

2015-08-07 Thread Quartz

First of all, you have a machine that is running a very old version of
OpenBSD.  You have a lot of upgrades to do, and since you have other
issues (partitioning), you probably just want to reinstall and start
over using your current knowledge of your disk layout needs.


Well that's kind of the thing.
The machine is mainly used for messing around and testing stuff, so it 
has a bunch of random things installed that will be a pain to move over. 
Additionally, we occasionally use it to verify things against older 
OpenBSD specifically (like, 4.9 was still using Apache for example). 
Upgrading is certainly possible, it's just a question of which will 
cause more pain in the end- that or repartitioning.



Since you are working on a 10G hard disk, you might want to consider
replacing that just because of its age (I say, as glance over at my
crate of 20G and smaller HDs), and 10G disks are just plain slow
compared to modern disks.


That will be a problem eventually yes. This machine doesn't have a lot 
of disk activity though so so far the drive's been holding up. Speed 
isn't that big of a deal.



The general answer to your question, however, is the "growfs" command.
growfs will let you expand an off-line file system with additional space
immediately adjoining the end of the partition.


OK that's the general answer providing we replace the disk with a 
bigger one though, right? Is there a good way to use the same disk? 
Again, the issue is not that the disk is full, but that's it half empty 
and split up in a way that we can't really use the space.




Re: Repartitioning

2015-08-07 Thread Raul Miller
On Fri, Aug 7, 2015 at 8:04 AM, Nick Holland
 wrote:
> When you are buying disks for your (say) firewall, you need maybe 5G of
> disk space, but you will have great difficulty buying new disks smaller
> than 300G.

Currently, you can get a western digital WD1600AVJS from amazon for
about 20 dollars. That is a 160GB drive.

And the problem is not so much that you cannot buy smaller drives, but
that they are not cheaper.

Also, something like a seagate ST3000DM001 is currently something like
$80-$90. That's a 3 TB drive.

But if you have criteria which the smaller drives satisfy and the
larger drives do not, you might get one of them anyways, even if they
cost more?

On the other hand an existing drive that you don't have to pay
anything for is probably even cheaper (though when you start looking
at how much it costs to power the thing, it's still not free, and at
some point it might have been cheaper to replace it with something
else. But getting long term power costs on a drive takes a bit of
work, and it's often even more difficult to obtain those numbers for a
drive you haven't bought yet.

Thanks,

-- 
Raul



Re: Repartitioning

2015-08-07 Thread Nick Holland
On 08/06/15 17:13, Quartz wrote:
> We have an older system running 4.9 that acts as a sort of 
> dev/test/scratch machine for messing around. When it was set up it we 
> threw a 10gb drive in there and did a generic install with all the 
> defaults. Over time, as we've used this for various stuff, we've 
> realized that that partitioning scheme turned out to be decidedly non 
> optimal. /usr/obj and /usr/src are eating up a gig each but only have 
> 2kb of data on them (this machine has never compiled anything). /home 
> and /usr/local are using less than 45mb combined. Meanwhile /var was 
> only set up at a few hundred megs and is bursting at the seams. Over 
> half the drive's capacity is being wasted.
> 
> I'm not super familiar with how OpenBSD does disks and all of the 
> caveats. How easy would it be to nuke some of these partitions and 
> recombine the space? Is it something that could be done with a couple 
> fdisk commands or would it involve a lot of screwing around? I've looked 
> though the manual regarding fdisk and disklabel but I'm still not sure I 
> really understand how everything works together.

First of all, you have a machine that is running a very old version of
OpenBSD.  You have a lot of upgrades to do, and since you have other
issues (partitioning), you probably just want to reinstall and start
over using your current knowledge of your disk layout needs.

Since you are working on a 10G hard disk, you might want to consider
replacing that just because of its age (I say, as glance over at my
crate of 20G and smaller HDs), and 10G disks are just plain slow
compared to modern disks.

The general answer to your question, however, is the "growfs" command.

growfs will let you expand an off-line file system with additional space
immediately adjoining the end of the partition.  That's a lot of
restrictions, but if you combine it with a lot of unused space on a
modern big disk, you have a high degree of flexibility.

When you are buying disks for your (say) firewall, you need maybe 5G of
disk space, but you will have great difficulty buying new disks smaller
than 300G.  Don't allocate all of the 300G, just what you actually need.
 Leave the rest unallocated.  Decide you need more /usr space?  Make a
new partition, copy the existing /usr to the new one, change your
/etc/fstab, reboot, delete your old /usr.

Nick.



Re: Current USB Wifi status

2015-08-07 Thread Stefan Sperling
On Fri, Aug 07, 2015 at 08:02:13AM +0100, Bernd Schoeller wrote:
> Hi,
> 
> I would love to start using my OpenBSD router as access point. In 2013, it
> was noted that using USB with Hostap is not a very well supported:
> 
> http://marc.info/?l=openbsd-misc&m=136650077623629&w=2
> 
> Has the situation changed? Are there current USB Wifi adapters available
> that run well in hostap mode? Any specific one that is easy to obtain?
> 
> Thanks,
> Bernd

AFAIK the man pages are all up to date and explain the current state on
a per driver basis. I don't have anything to add to what the pages say.

To summarize: For best hostap experience use a supported athn(4)
device on PCI. That's what I use at home and it just works.
Avoid USB for hostap if at all possible.



support update

2015-08-07 Thread info
0
C Germany
P Bayern
T Nürnberg
Z 90478
O swapspace
I Stefan Wieseckel
A Vordere Cramergasse 11-13
M i...@swapspace.de
U http://www.swapspace.de/
B +49-(0)-911-51827-57
X +49-(0)-911-51827-56
N System and network consulting and administration; setup, configuration and 
maintenance of OpenBSD- and Linux-based systems (firewalls, mailservers, 
webservers, DNS servers, ...).



Current USB Wifi status

2015-08-07 Thread Bernd Schoeller

Hi,

I would love to start using my OpenBSD router as access point. In 2013, 
it was noted that using USB with Hostap is not a very well supported:


http://marc.info/?l=openbsd-misc&m=136650077623629&w=2

Has the situation changed? Are there current USB Wifi adapters available 
that run well in hostap mode? Any specific one that is easy to obtain?


Thanks,
Bernd