21744
![]() |
|
|
|
|
|||||||
| Installing & Upgrading Installing and upgrading FreeBSD. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Is it possible to boot a computer with PXE and go directly to sysinstall? The documentation I find is only on diskless clients, and demands a lot of work (building own root on a NFS-mount etc).
|
|
#2
|
||||
|
||||
|
A boot loader will have to load a memstick or CD image into memory on the target machine. You'll still have to have a PXE server, with at least TFTP and preferably HTTP for speed. And of course the target machine has to have enough RAM to hold the image and leave enough free to run the installer.
Syslinux seems to have filename length problems, so I renamed FreeBSD-8.2-RELEASE-i386-bootonly.iso to bootonly.iso. Otherwise, this just worked for me: Code:
label freebsd-install menu label FreeBSD Install linux memdisk initrd http://192.168.1.1/images/freebsd-install/bootonly.iso append iso raw This was just thrown into the default menu file as shown in PXE Booting Utilities With FreeBSD. |
|
#3
|
|||
|
|||
|
Can this be done without involving Syslinux? I'm able to boot using PXE and fetching the file /boot/pxeboot (as configured in dhcpd) from the server using TFTP. But from there NFS is need, or am I mistaking?
|
|
#4
|
||||
|
||||
|
pxeboot(8) says it needs NFS.
|
|
#5
|
||||
|
||||
|
Quote:
__________________
Senior UNIX Engineer at Unix Support Nederland Experience is something you don't get until just after you need it. |
|
#6
|
|||
|
|||
|
Quote:
Code:
Lookup of /dev for devfs, error: 2 init: not found in path /sbin/init:/sbin/oinit:/sbin/init.bak:/rescue/init:/stand/sysinstall Code:
load /boot/kernel/kernel load -t mfs_root /boot/mfsroot set vfs.root.mountfrom="ufs:/dev/md0" boot Last edited by DutchDaemon; February 28th, 2011 at 19:31. |
|
#7
|
||||
|
||||
|
It may be possible if you use the old floppy boot but I'm not sure if that's supplied anymore. The installer itself is able to install from FTP, HTTP etc.
In theory you may be able to PXE boot those install floppies and do the rest of the installation via FTP or HTTP.
__________________
Senior UNIX Engineer at Unix Support Nederland Experience is something you don't get until just after you need it. |
|
#8
|
||||
|
||||
|
Quote:
Quote:
|
|
#9
|
|||
|
|||
|
I've been playing around with setting up FreeBSD PXE booting today as I'm also trying to create a boot environment that runs from RAM and simply presents me with a shell with all the tools available to manually set up a FreeBSD system. I've had a few stumbles along the way, and have worked out the following:
pxeboot is by default only an NFS client, but you can recompile it to add tftp support instead of NFS. This might be useful if you want to use an mfsroot, because you obviously can't mount a filesystem using tftp. See /usr/src/sys/boot/i386/loader/Makefile. I've managed to get a host netbooting into sysinstall using the same mfsroot filesystem that the official installation media uses, but the Fixit option that I use for manual installs doesn't work as it expects the fixit environment to be on CD/DVD, USB or floppy. My next step is to look into creating a custom mfsroot that boots to a shell, not to sysinstall.
__________________
http://www.b0rken.org/ |
|
#10
|
|||
|
|||
|
Just a thought, wouldn't it be in the interest of security to be able to boot this way without NFS?
|
|
#11
|
|||
|
|||
|
While continuing to work on this today, I discovered the following document:
http://www.locolomo.org/howto/pxeboot/article.html This comment stood out: Quote:
On another issue, I was able to find and use an alternative mfsroot image to the standard 'sysinstall' one from the FreeBSD install media. I used mfsBSD to generate an image suitable for 'dd'ing to a disk, then opened it up with mdconfig+mount and took the mfsroot.gz file out of it. This one boots into a root shell environment and has all the tools available to set up a system manually.
__________________
http://www.b0rken.org/ |
|
#12
|
||||
|
||||
|
Quote:
|
|
#13
|
|||
|
|||
|
Well, dhcp can always give out a different NFS root-path for each host so no problem there.
By default, when using tftp, the pxeboot loader will only look for /boot/loader.rc, but perhaps the Fourth language in the loader is flexible enough to use logic to determine which kernel file to load after that, basing it on the MAC address of the machine for example? That information is certainly exposed within the loader environment: Code:
OK show LINES=24 acpi_load=YES autoboot_delay=NO boot.netif.gateway=192.168.0.1 boot.netif.hwaddr=08:00:c0:a8:00:52 boot.netif.ip=192.168.0.82 ... kernelname=/boot/kernel/kernel
__________________
http://www.b0rken.org/ Last edited by DutchDaemon; March 3rd, 2011 at 23:16. |
|
#14
|
||||
|
||||
|
Using MAC works fine for diskless workstations, but it doesn't give you any runtime choice as to which kernel/filesystem is used. If pxeboot took an optional parameter, a path to a TFTP directory to boot from, it would be useful. No idea how hard that would be to implement.
|
|
#15
|
|||
|
|||
|
Quote:
Still needs NFS though. |
|
#16
|
|||
|
|||
|
Can someone explain to me why NFS is preferred for this operation and not http, ftp or tftp? Would be far more secure and easier to administer.
Last edited by DutchDaemon; December 28th, 2011 at 06:05. |
|
#17
|
||||
|
||||
|
Possibly because there's built-in support for using NFS, while there isn't anything for using a TFTP, FTP, or HTTP address as a filesystem. Adding support for that to pxeboot(8) would be really useful.
|
|
#18
|
|||
|
|||
|
Got some response I can't figure out while trying to install 9.0-RELEASE over PXE.
Code:
Trying to mount root from nfs: []... fxp0: link state changed to DOWN NFS ROOT: 192.168.1.2:/usr/local/pxeboot fxp0: link state changed to UP Interface fxp0 IP-Address 192.168.1.3 Broadcast 192.168.1.255 Entropy harvesting: interrupts ethernet point_to_point kickstart. Starting file system checks: mount_nfs: no <host>:<dirpath> nfs-name Mounting root filesystem rw failed, startup aborted ERROR: ABORTING BOOT (sending SIGTERM to parent!) Jan 15 21:44:45 init: /bin/sh on /etc/rc terminated abnormally, going to singel user mode Enter full pathname of shell or RETURN for /bin/sh: |
|
#19
|
||||
|
||||
|
Code:
mount_nfs: no <host>:<dirpath> nfs-name |
|
#20
|
|||
|
|||
|
Seems to me to be NFS. Network up, got pxeboot from tftp on same address as NFS. Tried 8.2-RELEASE to eliminate 9.0 issues, but same output.
|
|
#21
|
|||
|
|||
|
Good afternoon. Faced with a multiversions
Last edited by DutchDaemon; January 19th, 2012 at 22:53. |
|
#22
|
|||
|
|||
|
Perhaps consider using iPXE which has builtin support for http, SAN, and so on.
http://ipxe.org/ There are still some caveats regarding the "kernel memdisk" method for booting ISO files. I have only successfully been able to boot an mfsbsd and bootonly ISOs using this method. I presume this has something to do with the setup of the ISO or the lack of correct kernel/initrd/kernel flag arguments within the pxelinux.cfg menu item for the other ISOs. Does anyone know what kernel file and flags the FreeBSD boot ISO requires (i)pxelinux to us in order to mount the ISO as root? |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| pxe boot and exec install.cfg | Tom-i | Installing & Upgrading | 1 | July 1st, 2010 20:30 |
| PXE boot install server | electric | Installing & Upgrading | 4 | June 2nd, 2010 19:37 |
| [Solved] PXE troubles | andrnils | Installing & Upgrading | 4 | May 21st, 2010 14:51 |
| Can't load kernel using pxe | vbm | Installing & Upgrading | 5 | May 11th, 2010 01:08 |
| FreeBSD 8.0 headless pxe install | loppefaaret | Installing & Upgrading | 4 | February 28th, 2010 20:01 |