PDA

View Full Version : 7.1 Jumpstart server


eldiablo
January 6th, 2009, 21:36
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
January 7th, 2009, 19:41
Which instructions? Do you have a pointer?

eldiablo
January 7th, 2009, 20:41
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
January 7th, 2009, 21:13
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
January 7th, 2009, 21:45
Excellent! Many thanks for your time. Appreciated. :e

brd@
January 9th, 2009, 16:45
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
It has been on my TODO list to update this article, unfortunately I have not had the time yet.

electric
January 17th, 2009, 01:18
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/

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
January 17th, 2009, 01:52
idea: run file on it and find out which format it is in...

tlevitt
January 31st, 2009, 17:35
idea: run file 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@
January 31st, 2009, 18:39
Looks like you should be doing:
mount /dev/md1 /mnt
I'm guessing that /mnt/md1 does not exist?

tlevitt
January 31st, 2009, 19:06
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
February 1st, 2009, 12:06
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
February 1st, 2009, 15:09
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
March 20th, 2009, 08:25
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
April 4th, 2009, 02:13
Have I misunderstood all of it ?

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

Cheers,

normunds
April 20th, 2009, 19:30
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 8th, 2009, 19:37
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 8th, 2009, 19:57
can't edit my own posts yet, so am uploading new bugfix version of previous script.

babel17
May 13th, 2009, 01:34
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.)