newimage.txt 3.92 KB
Newer Older
Robert Ricci's avatar
Robert Ricci committed
1 2
Instructions for updating the node disk image.

3 4
A. Linux:

Robert Ricci's avatar
Robert Ricci committed
5
0. Update /etc/testbed/supfile from the source (tmcd/linux)
6 7 8 9
   directory.  With each new image, the sup release needs to be bumped
   and the checkouts file removed. See below for a more detailed
   explaination of this.

10 11 12 13 14 15 16 17 18 19 20
1. Update whatever files necessary.

2. Reboot to single-user.  To do this, reboot and when you get the 
   LILO prompt, type "linux -s".  Note: I prefer to reboot rather than
   just shutdown to single user, to ensure that all processes are gone and
   all filesystems unmounted.

3. Mount the root filesystem RW:
	mount -n -o remount,rw /
   so you can update files.

21
4. Mount the rest of the filesystems so you can add/change things:
22

23
	mount -a -t ufs
24

25
5. Run the testbed prepare script:
26

Robert Ricci's avatar
Robert Ricci committed
27
	cd /usr/local/etc/testbed
28
	./prepare	
29

30
6. Reboot to BSD to finish.  I have tried dd'ing off the linux partition
31 32 33 34 35
   while running Linux, but it has always produced a corrupt image.  So
   I dd everything from FreeBSD.

B. FreeBSD:

36 37 38 39 40
0. Update /etc/testbed/supfile from the source (tmcd/freebsd) directory.
   With each new image, the sup release needs to be bumped and the
   checkouts file removed. See below for a more detailed explaination of
   this.

41 42 43 44 45
1. Update whatever files necessary.

2. Reboot to single-user.  To do this, reboot and when you get the 
   FreeBSD boot prompt:

46 47 48
	>> FreeBSD/i386 BOOT
	Default: 0:ad(0,a)kernel
	boot:
49

50
   Type "kernel -s" at the boot prompt and type return.
51 52 53 54 55

3. Mount the root filesystem RW:
	mount -u /
   so you can update files.

56
4. Mount the rest of the filesystems so you can add/change things:
57

58
	mount -a -t ufs
59

60
5. Run the testbed prepare script:
61

Robert Ricci's avatar
Robert Ricci committed
62
	cd /usr/local/etc/testbed
63
	./prepare	
64

65
---------------------------------------------------------------------------
66 67 68

C. Cutting the image:

Robert Ricci's avatar
Robert Ricci committed
69 70
1. Boot into the FreeBSD MFS (you can use the 'node_admin on' command to set
   this up)
71

Robert Ricci's avatar
Robert Ricci committed
72
2. Log in and run imagezip - to make a full-disk image, run:
73

Robert Ricci's avatar
Robert Ricci committed
74
   /usr/local/bin/imagezip -d /dev/rad0 <outfile>
75

Robert Ricci's avatar
Robert Ricci committed
76 77
   The MFS will mount all the usual /users and /proj directories, so write it
   into NFS somewhere, then move it into its final location on boss from there.
78 79


80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
CVSUP:

Each time we cut a new image, we need to bump the sup release since its
entirely possible that different versions of the image will be running on
different nodes. Older images will still need the sup release that they
were built with so that they continue to get updates, while new images
need a different (newer) sup release. Fortunately, this is pretty easy to
do.

* Before you cut a new image, make sure that both freebsd and linux are
  booted to multiuser mode so that they pick up all the updates in their
  sup release.

* Bump the sup release in the supfile. This file is CVS'ed in the tmcd
  directory as linux/supfile and freebsd/supfile. The section of this
  file that matters is:

		release=20000221

  Change this to the current date and install the new supfile. On freebsd
  this is /etc/testbed/supfile. On linux its /etc/rc.d/testbed/supfile.

* Unfortunately, cvsup on the client side has a minor bug in how it
  handles a new release. The work around is to remove the "checkouts"
  file that tells sup which files it has picked up:

  Linux:   rm /etc/rc.d/testbed/sup/sup/RHL62-STD/checkouts
  Freebsd: rm /etc/testbed/sup/sup/FBSD40-STD/checkouts

* Now for the server side (before you boot the new image!). You need to
  create the new "release" that is referenced in the supfile you modified
  above. To do this, go to
  paper:/usr/testbed/sup/sup/{FBSD40-STD,RHL62-STD} and edit the
  "releases" file in each. You need to *add* a line like this:

  20000221 list=list prefix=/usr/testbed/sup/sup/FBSD40-STD/root-20000221 norcs

  where 20000221 is the name of the new release you put in the supfile
  above. You also need to create the new root directory (the prefix
  argument):

	mkdir /usr/testbed/sup/sup/FBSD40-STD/root-20000221

  Do this for both the freebsd and linux sup subdirs.

* Thats it! Easy as cake.