Skip to content. | Skip to navigation

Personal tools

Navigation

You are here: Home / Wiki / Updatemfs

Updatemfs

Making small changes to the FreeBSD-based admin and disk-loader MFSes

Making small changes to the FreeBSD-based admin and disk-loader MFSes

On occasion, you may need to update the Emulab software in the FreeBSD-based disk loader ("frisbee") and admin ("freebsd") MFSes. For small changes, this can be done directly from boss as described below.

If you want to install a whole new Emulab client-side, that is a trickier process because the MFS binaries and shared libraries are from older versions of FreeBSD and thus client-side binaries (e.g., tmcc) need to be built in a matching environment. It would be best to talk to Utah before trying this.

  • Go to the tftpboot directory of the MFS you wish to change.
       cd /tftpboot/freebsd/boot	# admin MFS, or...
       cd /tftpboot/frisbee/boot	# ...disk loader MFS
    
  • Make a backup of the MFS before you go clobbering things:
       sudo cp -p mfsroot mfsroot.bak
    
  • Associate a "virtual (memory) disk" with the MFS file and then mount that disk:
       sudo mdconfig -a -t vnode -u 1 -f mfsroot
       sudo mount /dev/md1 /mnt
    
  • If you just need to make minor tweaks, you can now do it via /mnt directly. Of course, be careful not to get confused and start editing things in /etc instead of /mnt/etc!
  • When you are done, just unmount the filesystem and rerun the prepare script:
       sudo umount /dev/md1
       sudo mdconfig -d -u 1
       sudo ./prepare
    
  • Make sure the new version works. If you have modified the admin MFS in /tftpboot/freebsd/boot you can just allocate any node and then force it into "admin" mode. You can watch the console during boot, and then ssh into the node.
       node_admin on pc1
    
    If you modified the Frisbee MFS, you can reload the disk to see if Frisbee works okay:
       os_load pc1
    
    This will of course clobber the disk on pc1, so don't do it if you were using the node for something else! Make sure the disk load runs correctly by watching the console.

Note about FreeBSD 4.10 and the MFSes:

  • Early versions of the MFS tarball we distributed included a FreeBSD 4.10 version of the MFSes. However, we encountered occasional data corruption on machines with older IDE chipsets (specifically, the venerable Intel BX chipset). The problem would manifest itself as machines that wouldn't boot or that had filesystem problems, shortly after loading their disks with a FreeBSD 4.10 frisbee MFS. Machines with newer chipsets had no such problems. We advise that you use the lastest MFS (7.3 kernel, 5.x binaries) http://www.emulab.net/downloads/tftpboot-latest.tar.gz