Re: FAI Support for FreeBSD

2010-01-31 Thread Jason Helfman

On Sun, Jan 31, 2010 at 08:09:51PM +0100, Michael Tautschnig thus spake:

On Tue, Jan 12, 2010 at 09:55:42PM +0100, Thomas Lange thus spake:
>>On Mon, 11 Jan 2010 11:42:53 -0800, Jason Helfman  said:
>
>   >> - Is the tool parted available?
>   > No.
>Oh, that's bad. Our partinioning tool depends on parted, and rewriting
>it is not possible.
>
>   > bsdlabel
>   > fdisk
>   > newfs
>If BSD fdisk is the same as for Linux, we can use our old tool, which
>works with fdisk.

Here is the source for fdisk:
http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/sbin/fdisk/fdisk.c?rev=1.95.2.1.2.1;content-type=text%2Fplain



Although a bit late to chime in, I'd like to note that the previous partitioning
tool (setup_harddisks) actually used (and pretty much relied on) sfdisk. Would
that also be available on FreeBSD?


Never too late to chime in :)

Yes, sfdisk is a port. Not sure how up-to-date this port, is though, or if
that would matter.

Port:   sfdisk-0.2
Path:   /usr/ports/sysutils/sfdisk
Info:   Standalone sysinstall's fdisk
Maint:  s...@rm-rf.kiev.ua
B-deps: 
R-deps: 
WWW:



On the other hand, according, to http://www.gnu.org/software/parted/index.shtml,
parted should actually be available as a port. However, a quick web search
didn't turn up any such binaries.


Unfortunately, parted is not in the ports tree.

Here is a area where the ports can be searched:
http://www.freebsd.org/ports/

-j



Best,
Michael



Re: FAI Support for FreeBSD

2010-01-31 Thread Michael Tautschnig
> On Tue, Jan 12, 2010 at 09:55:42PM +0100, Thomas Lange thus spake:
> >>On Mon, 11 Jan 2010 11:42:53 -0800, Jason Helfman  
> >>said:
> >
> >   >> - Is the tool parted available?
> >   > No.
> >Oh, that's bad. Our partinioning tool depends on parted, and rewriting
> >it is not possible.
> >
> >   > bsdlabel
> >   > fdisk
> >   > newfs
> >If BSD fdisk is the same as for Linux, we can use our old tool, which
> >works with fdisk.
> 
> Here is the source for fdisk:
> http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/sbin/fdisk/fdisk.c?rev=1.95.2.1.2.1;content-type=text%2Fplain
> 

Although a bit late to chime in, I'd like to note that the previous partitioning
tool (setup_harddisks) actually used (and pretty much relied on) sfdisk. Would
that also be available on FreeBSD?

On the other hand, according, to http://www.gnu.org/software/parted/index.shtml,
parted should actually be available as a port. However, a quick web search
didn't turn up any such binaries.

Best,
Michael



pgpj2czPkAArT.pgp
Description: PGP signature


Re: FAI Support for FreeBSD

2010-01-12 Thread Jason Helfman

On Tue, Jan 12, 2010 at 09:55:42PM +0100, Thomas Lange thus spake:

On Mon, 11 Jan 2010 11:42:53 -0800, Jason Helfman  said:


   >> - Is the tool parted available?
   > No.
Oh, that's bad. Our partinioning tool depends on parted, and rewriting
it is not possible.

   > bsdlabel
   > fdisk
   > newfs
If BSD fdisk is the same as for Linux, we can use our old tool, which
works with fdisk.


Here is the source for fdisk:
http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/sbin/fdisk/fdisk.c?rev=1.95.2.1.2.1;content-type=text%2Fplain


Re: FAI Support for FreeBSD

2010-01-12 Thread Jason Helfman

Perfect! Thank you.

I build our own custom ISO, and the ISO set contains the bootonly ISO, so
this is perfect.

Shouldn't be too difficult. Crossing fingers :)

I can't get to this right away, but down the line I can.

On Wed, Jan 13, 2010 at 12:15:38AM +0100, Thomas Lange thus spake:

On Tue, 12 Jan 2010 13:05:53 -0800, Jason Helfman  said:


   > Can you expand on "create the nfsroot," and what this is and what it should
   > contain?
It should contain a minimal set of commands that are needed to run a
system ( the jail). Also a kernel and an initrd (does BSD have such things?) 
that
can be loaded via PXE and tftp is needed. FAI needs a netboot
environment so that the kernel and initrd mounts its root file system
via NFS. Maybe this helps:

https://www.tnpi.net/computing/freebsd/pxe-netboot.shtml
http://www.freebsdwiki.net/index.php/Installing_FreeBSD_with_netboot

That's all for the beginning.
--
regards Thomas



Re: FAI Support for FreeBSD

2010-01-12 Thread Thomas Lange
> On Tue, 12 Jan 2010 13:05:53 -0800, Jason Helfman  said:

> Can you expand on "create the nfsroot," and what this is and what it 
should
> contain?
It should contain a minimal set of commands that are needed to run a
system ( the jail). Also a kernel and an initrd (does BSD have such things?) 
that
can be loaded via PXE and tftp is needed. FAI needs a netboot
environment so that the kernel and initrd mounts its root file system
via NFS. Maybe this helps:

https://www.tnpi.net/computing/freebsd/pxe-netboot.shtml
http://www.freebsdwiki.net/index.php/Installing_FreeBSD_with_netboot

That's all for the beginning.
-- 
regards Thomas


Re: FAI Support for FreeBSD

2010-01-12 Thread Jason Helfman

On Tue, Jan 12, 2010 at 09:55:42PM +0100, Thomas Lange thus spake:

On Mon, 11 Jan 2010 11:42:53 -0800, Jason Helfman  said:


   >> - Is the tool parted available?
   > No.
Oh, that's bad. Our partinioning tool depends on parted, and rewriting
it is not possible.

   > bsdlabel
   > fdisk
   > newfs
If BSD fdisk is the same as for Linux, we can use our old tool, which
works with fdisk.

   > You can use "jails" for this. It is native to the FreeBSD OS.
   > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html
OK.

   >> - Is there something similar to aufs-modules?
   > I'm told this is a "unionfs," but I am not sure.
   > Here is some information I found on this assumption.
   > http://people.freebsd.org/~daichi/unionfs/
Unionfs is also fine.

   > pkg_add can add packages, and resolves dependencies.
That will be the easiest part.


   >> First, the major difficult part will be creating the nfsroot and
   >> booting and mounting a file system via NFS. I guess this is much 
different to Linux.
   > I'll help as much as I can :)
Since I do not have access to a BSD system, someone else has to do the
main work. I can only help if there are any questions convering FAI.
I also guess, it's possible but not that easy to get FAI running for
BSD. First, try to create the nfsroot and try to boot a system via PXE
using the nfsroot.


Can you expand on "create the nfsroot," and what this is and what it should
contain?



--
regards Thomas



--
Jason Helfman


Re: FAI Support for FreeBSD

2010-01-12 Thread Thomas Lange
> On Mon, 11 Jan 2010 11:42:53 -0800, Jason Helfman  said:

>> - Is the tool parted available?
> No.
Oh, that's bad. Our partinioning tool depends on parted, and rewriting
it is not possible. 

> bsdlabel
> fdisk
> newfs
If BSD fdisk is the same as for Linux, we can use our old tool, which
works with fdisk.

> You can use "jails" for this. It is native to the FreeBSD OS.
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html
OK.

>> - Is there something similar to aufs-modules? 
> I'm told this is a "unionfs," but I am not sure.
> Here is some information I found on this assumption.
> http://people.freebsd.org/~daichi/unionfs/
Unionfs is also fine.

> pkg_add can add packages, and resolves dependencies.
That will be the easiest part.


>> First, the major difficult part will be creating the nfsroot and
>> booting and mounting a file system via NFS. I guess this is much 
different to Linux.
> I'll help as much as I can :)
Since I do not have access to a BSD system, someone else has to do the
main work. I can only help if there are any questions convering FAI.
I also guess, it's possible but not that easy to get FAI running for
BSD. First, try to create the nfsroot and try to boot a system via PXE
using the nfsroot.

-- 
regards Thomas


Re: FAI Support for FreeBSD

2010-01-11 Thread Jason Helfman

On Mon, Jan 11, 2010 at 11:42:53AM -0800, Jason Helfman thus spake:

- FAI reads some information from /proc. We have to check, if BSD will
 give FAI all needed information


What information is needed. There is no /proc filesystem in BSD.


My apologies but there *IS*  a procfs in FreeBSD, but for security reasons, it
is not mounted.

mount -t procfs procfs /proc

Thanks,
Jason


Re: FAI Support for FreeBSD

2010-01-11 Thread Jason Helfman

On Mon, Jan 11, 2010 at 06:53:31PM +0100, Thomas Lange thus spake:

On Mon, 11 Jan 2010 09:34:16 -0800, Jason Helfman  said:


   > I am interested if FAI can be modified to support FreeBSD and the ports
   > infrastructure? I would be particularly interested in native support, if
   > that can be done.

Since I do not have any experiences with BSD, I need some information
about differences between Linux and BSD. Here are several questions I have:

- What type of disklabel does FreeBSD use?

It uses bsdlabel:
http://www.freebsd.org/cgi/man.cgi?query=bsdlabel&apropos=0&sektion=0&manpath=FreeBSD+8.0-RELEASE&format=html


- Is the tool parted available?

No.

I believe other tools can be used for this, though.
bsdlabel
fdisk
newfs


- Which bootloader can be used? grub?

Loader is used for this. Here is a link to the booting process:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/boot.html


- FAI reads some information from /proc. We have to check, if BSD will
 give FAI all needed information


What information is needed. There is no /proc filesystem in BSD.


- Is there a tool for creating a minimal chroot environment? Debian
 has debootstrap for that.


You can use "jails" for this. It is native to the FreeBSD OS.
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html

- Is there something similar to aufs-modules? 

I'm told this is a "unionfs," but I am not sure.
Here is some information I found on this assumption.
http://people.freebsd.org/~daichi/unionfs/



If there's somthing like a live CD for FreeBSD, we will find similar techniques 
there.


Yes, there are livecd iso's for all released version of FreeBSD. There is
also a facility to make releases that is native to FreeBSD.
http://www.freebsd.org/releases/


- Which command line tool installs packages? Does is resolve package 
dependencies?


pkg_add can add packages, and resolves dependencies.



First, the major difficult part will be creating the nfsroot and
booting and mounting a file system via NFS. I guess this is much different to 
Linux.


I'll help as much as I can :)


--
regards Thomas



Thanks!
Jason


Re: FAI Support for FreeBSD

2010-01-11 Thread Thomas Lange
> On Mon, 11 Jan 2010 09:34:16 -0800, Jason Helfman  said:

> I am interested if FAI can be modified to support FreeBSD and the ports
> infrastructure? I would be particularly interested in native support, if
> that can be done.

Since I do not have any experiences with BSD, I need some information
about differences between Linux and BSD. Here are several questions I have:

- What type of disklabel does FreeBSD use?
- Is the tool parted available?
- Which bootloader can be used? grub?
- FAI reads some information from /proc. We have to check, if BSD will
  give FAI all needed information
- Is there a tool for creating a minimal chroot environment? Debian
  has debootstrap for that.
- Is there something similar to aufs-modules? If there's somthing like
  a live CD for FreeBSD, we will find similar techniques there.
- Which command line tool installs packages? Does is resolve package 
dependencies?

First, the major difficult part will be creating the nfsroot and
booting and mounting a file system via NFS. I guess this is much different to 
Linux.
-- 
regards Thomas


FAI Support for FreeBSD

2010-01-11 Thread Jason Helfman

Hello All,

I am interested if FAI can be modified to support FreeBSD and the ports
infrastructure? I would be particularly interested in native support, if
that can be done.

I would be willing to be a tester of this software, as well. Right now, I
have access to 7.2 and 8.x testing.

Thanks,
Jason