Re: pxeboot, machine dependent kernel

2012-09-08 Thread Ville Valkonen
On 7 September 2012 14:08, russell russ...@dotplan.dyndns.org wrote:
 I have doing quite a lot of netbooting lately. However I can not figure out
 how to configure a specific machine to use a specific kernel.

 Is there a way for pxeboot to load a kernel based on something machine
 dependent, for example, mac address?

 If not, I have been digging around in sys/stand/boot/boot.c
 while I have not found where to get the mac address yet
 would it be preferable to
 a. look for a boot.conf.macaddress before an unadorned boot.conf
 b. if not otherwise specified fall back to /bsd.macadress
 c. macro expansion in boot.conf(somthing in the manner of
machine $macaddress)

 I like option a as that seems like it would be easy to put in and provide
 configuration power where needed while not complicating the
 setup in the common case of only ever needing one kernel.

Have you checked man 8 diskless ?

--
Ville



Re: pxeboot, machine dependent kernel

2012-09-08 Thread russell

On 09/08/12 03:34, Ville Valkonen wrote:

On 7 September 2012 14:08, russell russ...@dotplan.dyndns.org wrote:

I have doing quite a lot of netbooting lately. However I can not figure out
how to configure a specific machine to use a specific kernel.

Is there a way for pxeboot to load a kernel based on something machine
dependent, for example, mac address?

If not, I have been digging around in sys/stand/boot/boot.c
while I have not found where to get the mac address yet
would it be preferable to
a. look for a boot.conf.macaddress before an unadorned boot.conf
b. if not otherwise specified fall back to /bsd.macadress
c. macro expansion in boot.conf(somthing in the manner of
machine $macaddress)

I like option a as that seems like it would be easy to put in and provide
configuration power where needed while not complicating the
setup in the common case of only ever needing one kernel.


Have you checked man 8 diskless ?

--
Ville


heh, diskless(8), thats my bible.

but my problem is.
dhcp: filename directive
  can be per machine but it does not point to  a kernel.
  it points to a pxeboot.
pxeboot:
  can be configured via boot.conf but there is no way to specify
  a kernel based on the machine actually booting,
  can only hard code the kernel image in.
  and even if I kept different pxeboot binarys they would still use the
  same boot.conf

when different machines (say one is amd64 and the other is i386) need 
different kernels one boot.conf will not work.


I was hoping there was something obvious I missed when setting it up.
cause right now I am typing in the kernel name by hand when booting, 
which sucks and kind of defeats the purpose of netbooting.


my intention is to hack boot.c(my guess, at this point I am still just 
looking at source) to check for and use some sort of global kernel 
macaddress var pxeboot claims to set.


It may seem I have no idea what I am doing, this is true.
However I figure this is a good chance to learn.



Re: ext2 max filesystem size

2012-09-08 Thread Claus Lensbøl
Ok, so I'm trying it out. I got the disk ready with:
mkfs.ext2 -L cmol-storage -m 0 -I 128 /dev/sdb1
, to get the inodes right according to this:
http://efreedom.com/Question/H-33983/Flash-Drive-OpenBSD-Specified-Device-Mat
ch-Mounted-Device

The disk shows up in dmesg as:
umass0 at uhub0 port 1 configuration 1 interface 0 Seagate Backup+ Desk
rev 2.10/1.00 addr 2
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
sd0 at scsibus1 targ 1 lun 0: Seagate, Backup+ Desk, 0503 SCSI4 0/direct
fixed
sd0: 2861588MB, 4096 bytes/sec, 732566645 sec total

And disklabel shows:
# disklabel
sd0

# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: Backup+ Desk
duid: 
flags:
bytes/sector: 4096
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 45600
total sectors: 732566645
boundstart: 0
boundend: 732566645
drivedata: 0

16 partitions:
#size   offset  fstype [fsize bsize  cpg]
  c:7325666450  unused
  i:732566272  256  ext2fs

However, when I'm trying to mount I get:
# mount -t ext2fs /dev/sd0i /mnt
mount_ext2fs: /dev/sd0i on /mnt: specified device does not match mounted
device

Any ideas?

On Fri, Sep 7, 2012 at 6:07 PM, Ted Unangst t...@tedunangst.com wrote:

 On Fri, Sep 07, 2012 at 15:11, Claus Lensbøl wrote:
  Hi
 
  I'm trying to figure out the maximum file system size for ext2 on
 openbsd,
  but I can't seem to find it documented anywhere.
  Does anybody know if the limitation is the old 2TB (as in linux pre
  2.6.17 ish), or 32TB as newer implementations?

 As far as I know, thats was a limit of the linux kernel, not the
 filesystem, so it doesn't apply, but I'm not that familiar with ext2fs.



Re: pxeboot, machine dependent kernel

2012-09-08 Thread Ville Valkonen
On 7 September 2012 23:14, russell russ...@dotplan.dyndns.org wrote:
 On 09/08/12 03:34, Ville Valkonen wrote:

 On 7 September 2012 14:08, russell russ...@dotplan.dyndns.org wrote:

 I have doing quite a lot of netbooting lately. However I can not figure
 out
 how to configure a specific machine to use a specific kernel.

 Is there a way for pxeboot to load a kernel based on something machine
 dependent, for example, mac address?

 If not, I have been digging around in sys/stand/boot/boot.c
 while I have not found where to get the mac address yet
 would it be preferable to
 a. look for a boot.conf.macaddress before an unadorned boot.conf
 b. if not otherwise specified fall back to /bsd.macadress
 c. macro expansion in boot.conf(somthing in the manner of
 machine $macaddress)

 I like option a as that seems like it would be easy to put in and provide
 configuration power where needed while not complicating the
 setup in the common case of only ever needing one kernel.


 Have you checked man 8 diskless ?

 --
 Ville

 heh, diskless(8), thats my bible.

 but my problem is.
 dhcp: filename directive
   can be per machine but it does not point to  a kernel.
   it points to a pxeboot.
 pxeboot:
   can be configured via boot.conf but there is no way to specify
   a kernel based on the machine actually booting,
   can only hard code the kernel image in.
   and even if I kept different pxeboot binarys they would still use the
   same boot.conf

 when different machines (say one is amd64 and the other is i386) need
 different kernels one boot.conf will not work.

 I was hoping there was something obvious I missed when setting it up.
 cause right now I am typing in the kernel name by hand when booting, which
 sucks and kind of defeats the purpose of netbooting.

 my intention is to hack boot.c(my guess, at this point I am still just
 looking at source) to check for and use some sort of global kernel
 macaddress var pxeboot claims to set.

 It may seem I have no idea what I am doing, this is true.
 However I figure this is a good chance to learn.

Apparently I remembered the contents of the man and its pointers
wrong, so for sorry for the noise. Should have checked.

--
Ville



Re: pxeboot, machine dependent kernel

2012-09-08 Thread Renzo Fabriek
On Saturday 08 September 2012 15:11:07 Ville Valkonen wrote:
 On 7 September 2012 23:14, russell russ...@dotplan.dyndns.org wrote:
  On 09/08/12 03:34, Ville Valkonen wrote:
 
  On 7 September 2012 14:08, russell russ...@dotplan.dyndns.org wrote:
 
  I have doing quite a lot of netbooting lately. However I can not figure
  out
  how to configure a specific machine to use a specific kernel.
 
  Is there a way for pxeboot to load a kernel based on something machine
  dependent, for example, mac address?
 
  If not, I have been digging around in sys/stand/boot/boot.c
  while I have not found where to get the mac address yet
  would it be preferable to
  a. look for a boot.conf.macaddress before an unadorned boot.conf
  b. if not otherwise specified fall back to /bsd.macadress
  c. macro expansion in boot.conf(somthing in the manner of
  machine $macaddress)
 
  I like option a as that seems like it would be easy to put in and provide
  configuration power where needed while not complicating the
  setup in the common case of only ever needing one kernel.
 
 
  Have you checked man 8 diskless ?
 
  --
  Ville
 
  heh, diskless(8), thats my bible.
 
  but my problem is.
  dhcp: filename directive
can be per machine but it does not point to  a kernel.
it points to a pxeboot.
  pxeboot:
can be configured via boot.conf but there is no way to specify
a kernel based on the machine actually booting,
can only hard code the kernel image in.
and even if I kept different pxeboot binarys they would still use the
same boot.conf
 
  when different machines (say one is amd64 and the other is i386) need
  different kernels one boot.conf will not work.
 
  I was hoping there was something obvious I missed when setting it up.
  cause right now I am typing in the kernel name by hand when booting, which
  sucks and kind of defeats the purpose of netbooting.
 
  my intention is to hack boot.c(my guess, at this point I am still just
  looking at source) to check for and use some sort of global kernel
  macaddress var pxeboot claims to set.
 
  It may seem I have no idea what I am doing, this is true.
  However I figure this is a good chance to learn.
 
 Apparently I remembered the contents of the man and its pointers
 wrong, so for sorry for the noise. Should have checked.
 
 --
 Ville
 

How about man dhcpd.conf?



Re: ext2 max filesystem size

2012-09-08 Thread Kenneth R Westerback
On Sat, Sep 08, 2012 at 01:50:26PM +0200, Claus Lensb?l wrote:
 Ok, so I'm trying it out. I got the disk ready with:
 mkfs.ext2 -L cmol-storage -m 0 -I 128 /dev/sdb1
 , to get the inodes right according to this:
 http://efreedom.com/Question/H-33983/Flash-Drive-OpenBSD-Specified-Device-Mat
 ch-Mounted-Device
 
 The disk shows up in dmesg as:
 umass0 at uhub0 port 1 configuration 1 interface 0 Seagate Backup+ Desk
 rev 2.10/1.00 addr 2
 umass0: using SCSI over Bulk-Only
 scsibus1 at umass0: 2 targets, initiator 0
 sd0 at scsibus1 targ 1 lun 0: Seagate, Backup+ Desk, 0503 SCSI4 0/direct
 fixed
 sd0: 2861588MB, 4096 bytes/sec, 732566645 sec total
 
 And disklabel shows:
 # disklabel
 sd0
 
 # /dev/rsd0c:
 type: SCSI
 disk: SCSI disk
 label: Backup+ Desk
 duid: 
 flags:
 bytes/sector: 4096
 sectors/track: 63
 tracks/cylinder: 255
 sectors/cylinder: 16065
 cylinders: 45600
 total sectors: 732566645
 boundstart: 0
 boundend: 732566645
 drivedata: 0
 
 16 partitions:
 #size   offset  fstype [fsize bsize  cpg]
   c:7325666450  unused
   i:732566272  256  ext2fs
 
 However, when I'm trying to mount I get:
 # mount -t ext2fs /dev/sd0i /mnt
 mount_ext2fs: /dev/sd0i on /mnt: specified device does not match mounted
 device
 
 Any ideas?
 
 On Fri, Sep 7, 2012 at 6:07 PM, Ted Unangst t...@tedunangst.com wrote:
 
  On Fri, Sep 07, 2012 at 15:11, Claus Lensb?l wrote:
   Hi
  
   I'm trying to figure out the maximum file system size for ext2 on
  openbsd,
   but I can't seem to find it documented anywhere.
   Does anybody know if the limitation is the old 2TB (as in linux pre
   2.6.17 ish), or 32TB as newer implementations?
 
  As far as I know, thats was a limit of the linux kernel, not the
  filesystem, so it doesn't apply, but I'm not that familiar with ext2fs.
 

I'm suspicious that the problem lies with:

bytes/sector: 4096

since there should be no problem handling inodes larger than 128 bytes since
a commit in 2008.

 Ken



Re: pxeboot, machine dependent kernel

2012-09-08 Thread Andrew Dalgleish

On 8/09/2012 6:14 AM, russell wrote:
...

my intention is to hack boot.c(my guess, at this point I am still just
looking at source) to check for and use some sort of global kernel
macaddress var pxeboot claims to set.

...

I played with a similar patch from here many years ago:
http://nbender.com/install.netboot/install.html

These days I use iPXE instead, it is fairly painless to set up.



problems on ldpd with multiple links between 2 hosts

2012-09-08 Thread Manuel Guesdon
Hi,

I've made some tests on ldpd and found some problems/strange things with the
following configuration:

2 hosts (v 5.0)
 - core3 (loopback 10.0.0.7)
 - core1 (loopback 10.0.0.9)

2 links between these 2 hosts:
 - vlan211 (on em9)
 core3 IP: 10.0.0.125
 core1 IP: 10.0.0.126
 - vlan212 (on em5)
 core3 IP: 10.0.0.121
 core1 IP: 10.0.0.122

I've keeped only interesting part in command results (there some other ospf
neighbors and interfaces). Sorry for this long post, I wanted to reproduce a
problem I've got one time but failed to get it again (see a the end of this
email). 

ospf is running on both hosts:
core3:
ID  Pri StateDeadTime Address Iface Uptime
10.0.0.91   FULL/DR  00:00:34 10.0.0.122  vlan212   00:24:38
10.0.0.91   FULL/DR  00:00:34 10.0.0.126  vlan211   00:23:27

core1:
ID  Pri StateDeadTime Address Iface Uptime
10.0.0.71   FULL/BCKUP   00:00:31 10.0.0.121  vlan212   00:24:50
10.0.0.71   FULL/BCKUP   00:00:31 10.0.0.125  vlan211   00:23:40

ldpd.conf on core3:

router-id 10.0.0.7

distribution independent
retention liberal
advertisement unsolicited

interface vlan212
interface vlan211

same on core1 except that router-id is 10.0.0.9


I start ldpd on 2 hosts:

core3 logs:
Sep  8 14:04:59 core3 ldpd[5529]: startup
Sep  8 14:05:00 core3 ldpd[5529]: mpath route not found
Sep  8 14:05:05 core3 ldpd[30289]: Connection attempt from unknown neighbor
10.0.0.126: NO HELLO

core1 logs:
Sep  8 14:04:54 core1 ldpd[8601]: startup
Sep  8 14:04:55 core1 ldpd[17310]: received notification from neighbor
10.0.0.7: Session Rejected, No Hello

ldpd seems confused by notification received from same host on different
links.


root@core3:etc$ ldpctl sh nei
ID  State  Address Iface Uptime
10.0.0.9OPERATIONAL/ACTIVE 10.0.0.126  vlan211   00:00:09

root@core1:etc$ ldpctl sh nei
ID  State  Address Iface Uptime
10.0.0.7OPERATIONAL/ACTIVE 10.0.0.125  vlan211   00:00:13


=== First problem: only routes from one interface are tagged:

root@core1:etc$ ldpctl sh l
Destination  Nexthop   Local LabelRemote Label   In Use

10.200.0.176/29 10.0.0.12156 33 yes
10.200.0.176/29 10.0.0.12556 Untagged   yes
10.100.0.0/24   10.0.0.12162 39 yes
10.100.0.0/24   10.0.0.12562 Untagged   yes

Tagged interface correspond to interface in fib:

root@core1:etc$ route -n get 10.100.0.1
   route to: 10.100.0.1
destination: 10.100.0.0
   mask: 255.255.255.0
gateway: 10.0.0.121
  interface: vlan212
 if address: 10.0.0.122
 mpls label: PUSH 39
   priority: 32 (ospf)
  flags: UP,GATEWAY,DONE,MPATH,MPLS
 use   mtuexpire
  72 0 0


Now I shutdown vlan211 on core1 with ifconfig vlan211 down

No logs on core3

on core1:
Sep  8 14:15:03 core1 ldpd[17310]: interface vlan211 down
Sep  8 14:15:03 core1 ospfd[23127]: send_packet: error sending packet on
interface vlan211: Network is down
Sep  8 14:15:03 core1 ospfd[23127]: interface vlan211 down
Sep  8 14:15:07 core1 ldpd[17310]: send_packet: error sending packet on
interface vlan211: Network is down


root@core3:etc$ ospfctl sh nei
ID  Pri StateDeadTime Address Iface Uptime
10.0.0.91   FULL/DR  00:00:36 10.0.0.122  vlan212   00:37:17
10.0.0.91   DOWN/OTHER   00:00:54 10.0.0.126  vlan211   -


root@core1:etc$ ospfctl sh nei
ID  Pri StateDeadTime Address Iface Uptime
10.0.0.71   FULL/BCKUP   00:00:33 10.0.0.121  vlan212   00:37:08
10.0.0.71   DOWN/DOWN00:01:18 10.0.0.125  vlan211   -

root@core3:etc$ ldpctl sh nei
ID  State  Address Iface Uptime
10.0.0.9OPERATIONAL/ACTIVE 10.0.0.126  vlan211   00:11:40

root@core1:etc$ ldpctl sh nei
ID  State  Address Iface Uptime
10.0.0.7OPERATIONAL/DOWN   10.0.0.125  vlan211   00:11:35



Next I restore vlan211 with ifconfig vlan211 up

no logs on core3

on core1:
Sep  8 14:17:45 core1 ldpd[17310]: interface vlan211 up
Sep  8 14:17:45 core1 ospfd[23127]: interface vlan211 up

root@core3:etc$ ospfctl sh nei
ID  Pri StateDeadTime Address Iface Uptime
10.0.0.91   FULL/DR  00:00:37 10.0.0.122  vlan212   00:39:06
10.0.0.91   FULL/DR  00:00:37 10.0.0.126  vlan211   00:00:23

root@core1:etc$ ospfctl sh nei
ID  Pri StateDeadTime Address Iface Uptime
10.0.0.71   FULL/BCKUP   00:00:34 10.0.0.121  vlan212   00:39:28
10.0.0.71   FULL/BCKUP   00:00:34 10.0.0.125  vlan211   00:00:45


and shut down vlan212 on core1 with ifconfig vlan212 down


Sep  8 

Re: pxeboot, machine dependent kernel

2012-09-08 Thread Ted Unangst
On Fri, Sep 07, 2012 at 13:14, russell wrote:

 can be configured via boot.conf but there is no way to specify
 a kernel based on the machine actually booting,
 can only hard code the kernel image in.
 and even if I kept different pxeboot binarys they would still use the
 same boot.conf
 
 when different machines (say one is amd64 and the other is i386) need
 different kernels one boot.conf will not work.

You can also run two tftp servers on two different IPs.



Re: pxeboot, machine dependent kernel

2012-09-08 Thread Christian Weisgerber
Ted Unangst t...@tedunangst.com wrote:

 You can also run two tftp servers on two different IPs.

The new tftpd also has this:

  -r socket
   Issue filename rewrite requests to the specified UNIX domain
   socket.  tftpd will write lines in the format IP OP filename,
   terminated by a newline, where IP is the client's IP address, and
   OP is one of read or write.  tftpd expects replies in the
   format filename terminated by a newline.  All rewrite requests
   from the daemon must be answered (even if it is with the original
   filename) before the TFTP request will continue.  By default
   tftpd does not use filename rewriting.

-- 
Christian naddy Weisgerber  na...@mips.inka.de



Re: xenocara not building on amd64-current

2012-09-08 Thread Emilio Perea
On Tue, Sep 04, 2012 at 03:44:35AM -0400, Ted Unangst wrote:
 A lot of effort is expended trying to get snapshots out quickly after
 toolchain changes, precisely to make things easy for people.  Even if
 you think you can figure out building from the source, the polite
 thing to do is to use the snapshots anyway. :)

I am very grateful for the effort the developers put into the snapshots,
so I don't mean this as criticism.  But it is possible for somebody
reading the thread to believe that the latest snapshot would allow
xenocara to build.  As far as I can tell, it does not (yet) on amd64.

Since I'm sure it will be fixed by another snapshot soon, this is no big
deal.



Re: Hi - Packages Requests For Current

2012-09-08 Thread Eric Furman
No one is stopping you from porting them yourself.
http://www.openbsd.org/faq/faq1.html#HowAbout

On Sun, Sep 9, 2012, at 12:43 AM, Das wrote:
 Hi,
 
 I was looking over Current and I noticed these programs were not in
 OpenBSD;
 
 *WinFF*; (This is a really great FFmpeg frontend for converting video
 formats, I find this works much better at converting then Avidemux)
 
 http://code.google.com/p/winff/
 
 *Bleacbit* (Really great for cleaning up and the privacy conscious)
 
 http://bleachbit.sourceforge.net/
 
 *LXAppearance *(This works really great in OpenBox for changing GTK
 Themes,
 I'd imagine it would work just fine in Fluxbox and Blackbox too... The
 latest version is actually 0.5.2, just released a few months ago.
 
 http://wiki.lxde.org/en/LXAppearance
 
 I personally use all these applications and they all work great for me in
 Slackware 13.37 x86...
 
 
 Thank you very much for your time and consideration, I look forward to
 seeing these hopefully soon in Current...
 
 
 Cheers
 Das