# 7.1 Jumpstart server



## eldiablo (Jan 6, 2009)

I followed the instructions to configure a Jumpstart server:

Installed DHCP server
Enabled ftp
Enabled nfs
restart to activate services

so far so good

I copied the kern1.flp and mfsroot.flp from the iso image to a temp directory and did the following:

# mdconfig -a -t vnode -f kern.flp -u 0
# mount /dev/md0 /mnt
# cp -R /mnt /usr/tftpboot
# umount /mnt
# mdconfig -d -u 0

The file copied is kernel.gz.aa instead of kernel.gz. The same happens with the mfsroot file: mfsroot.gz.aa.

What am I doing wrong here?

Thx for you help.


----------



## tingo (Jan 7, 2009)

Which instructions? Do you have a pointer?


----------



## eldiablo (Jan 7, 2009)

The instructions located here:

http://www.freebsd.org/doc/en/articles/pxe/index.html

It is outdated as the "vnconfig" command is replaced by "mdconfig"

Thx for your time


----------



## tingo (Jan 7, 2009)

Ah, I see. That guide is a couple of years old. Meanwhile, FreeBSD hae gained some mass. What used to bee "kern.flp" is now "kern1.flp", "kern2.flp" and "kern3.flp", according to the floppies[1] directory on the ftp servers.

IIRC, you can do cat file.aa file.ab file.ac ..." > file. So for the kernel: cat kernel.gz.aa kernel.gz.ab ... > kernel.gz

Check the installh.sh script in the kernels[2] directory for more.

HTH

References:
1) pub/FreeBSD/releases/i386/7.1-RELEASE/floppies/
2) pub/FreeBSD/releases/i386/7.1-RELEASE/kernels/


----------



## eldiablo (Jan 7, 2009)

Excellent! Many thanks for your time. Appreciated. :e


----------



## brd@ (Jan 9, 2009)

eldiablo said:
			
		

> The instructions located here:
> 
> http://www.freebsd.org/doc/en/articles/pxe/index.html
> 
> ...


It has been on my TODO list to update this article, unfortunately I have not had the time yet.


----------



## electric (Jan 17, 2009)

tingo said:
			
		

> Ah, I see. That guide is a couple of years old. Meanwhile, FreeBSD hae gained some mass. What used to bee "kern.flp" is now "kern1.flp", "kern2.flp" and "kern3.flp", according to the floppies[1] directory on the ftp servers.
> 
> IIRC, you can do cat file.aa file.ab file.ac ..." > file. So for the kernel: cat kernel.gz.aa kernel.gz.ab ... > kernel.gz
> 
> ...



I've just tried it with the files and it doesn't work.
I get the error: gunzip: kernel.gz: not in gzip format

anyone an idea?


----------



## tingo (Jan 17, 2009)

idea: run file(1) on it and find out which format it is in...


----------



## tlevitt (Jan 31, 2009)

tingo said:
			
		

> idea: run file(1) on it and find out which format it is in...



I am also experiencing similar issues when using the outdated jumpstart guide. 


```
test# fetch ftp://ftp2.freebsd.org/pub/FreeBSD/releases/i386/7.1-RELEASE/floppies/mfsroot1.flp
fetch: ftp://ftp2.freebsd.org/pub/FreeBSD/releases/i386/7.1-RELEASE/floppies/mfsroot1.flp: size of remote file is not known
mfsroot1.flp                                          1440 kB 1791 kBp

test# ls -l
-rw-r--r--  1 root  tlevitt  1474560 Jan 30 20:23 mfsroot1.flp

test# mdconfig -a -t vnode -f /home/tlevitt/pxe/mfsroot1.flp -u 0
test# mount /dev/md0 /mnt/md0
test# cd /mnt/md0
test# ls -l
total 1097
drwxrwxr-x  2 root  operator      512 Jan  1 10:17 .snap
-rw-r--r--  1 root  wheel     1117425 Jan  1 10:17 mfsroot.gz.aa

test# gunzip mfsroot.gz.aa
gunzip: mfsroot.gz.aa: unknown suffix -- ignored

test# gunzip -S.aa mfsroot.gz.aa
gunzip: mfsroot.gz.aa: not in gzip format

test# file mfsroot.gz.aa
mfsroot.gz.aa: data

test# strings mfsroot.gz.aa
dh&&
E6p/
H&V-
z0y#f?f
,0a_
-B^%
7Z[R`
G,2C
[...]

test# mdconfig -a -t vnode -f /mnt/md0/mfsroot.gz.aa -u 1
test# mount /dev/md1 /mnt/md1
mount: /dev/md1 : Invalid argument
```

Any ideas?


----------



## brd@ (Jan 31, 2009)

Looks like you should be doing:

```
mount /dev/md1 /mnt
```
I'm guessing that /mnt/md1 does not exist?


----------



## tlevitt (Jan 31, 2009)

brd@ said:
			
		

> I'm guessing that /mnt/md1 does not exist?



/mnt/md1 does exist. My apologies for not making that clear. 


```
test# ls -l /mnt
total 7
drwxr-xr-x  2 root  wheel  512 Jan 31 11:23 md0
drwxr-xr-x  2 root  wheel  512 Jan 31 11:23 md1

test# mdconfig -a -t vnode -f /mnt/md0/mfsroot.gz.aa -u 1

test# mount /dev/md1 /mnt/md1
mount: /dev/md1 : Invalid argument
```


----------



## trev (Feb 1, 2009)

tlevitt said:
			
		

> test# mdconfig -a -t vnode -f /mnt/md0/mfsroot.gz.aa -u 1
> test# mount /dev/md1 /mnt/md1
> mount: /dev/md1 : Invalid argument[/CODE]



You did concatenate all the parts of mfsroot right? By the look of "mfsroot.gz.aa" you only have part "aa"?


----------



## tlevitt (Feb 1, 2009)

trev said:
			
		

> You did concatenate all the parts of mfsroot right? By the look of "mfsroot.gz.aa" you only have part "aa"?



mfsroot.gz.aa was the only file present within mfsroot1.flp. Additionally, there does not appear to be any additional mfsroot floppy images. ( mfsroot2.flp, mfsroot3.flp, etc )

ftp://ftp2.freebsd.org/pub/FreeBSD/releases/i386/7.1-RELEASE/floppies/

Any other suggestions?


----------



## FireJet (Mar 20, 2009)

Hey, I've been trying to get this to work myself, with a bit more luck. I've included a quick script I wrote to fetch and extract all the floppy images into a workable PXE boot directory. Should look something like this:


```
[root@pxeserv /usr/tftpboot]# ./mkflpbootstrap.sh /usr/tftpboot
Downloading...
boot.flp                                      100% of 1440 kB  287 kBps
kern1.flp                                     100% of 1440 kB  254 kBps
kern2.flp                                     100% of 1440 kB  286 kBps
kern3.flp                                     100% of 1440 kB  289 kBps
mfsroot1.flp                                  100% of 1440 kB  292 kBps
Mounting...
Extracting...
Cleaning...
Done!
[root@pxeserv /usr/tftpboot]# ls
acpi.ko	boot	kernel	mfsroot
```


----------



## tom-pele (Apr 4, 2009)

Have I misunderstood all of it ?

Can You alternatively use ports :
ie. 'cd /usr/ports/net/pxe/ && make install clean' ?

Cheers,


----------



## normunds (Apr 20, 2009)

To get mfsroot for 7.1 you need both
 mfsroot.gz.boot from boot.flp
 mfsroot.gz.aa from mfsroot1.flp


```
# cat mfsroot.gz.boot mfsroot.gz.aa > mfsroot.gz
# file mfsroot
mfsroot: Unix Fast File system...
```


----------



## babel17 (May 8, 2009)

Ran across this thread in archives, and since I couldn't see firejets script from there, wrote my own.  They both have their pluses and minuses.  Mine assumes you already have the floppies dir locally, but is independant of release version, so if the number of parts changes, script does not need to be modified.  I am also missing the acpi stuff. not sure why.


----------



## babel17 (May 8, 2009)

can't edit my own posts yet, so am uploading new bugfix version of previous script.


----------



## babel17 (May 13, 2009)

Is any of the floppy stuff really necessary for PXE anyway?  The kernel and mfsroot you get from the floppy images appear to be identical to the kernel and mfsroot that are included elsewhere in the distribution (/boot/kernel/kernel and /boot/mfsroot.gz respectively.)


----------

