9 api = plc.PLC(auth.auth, auth.plc)
10 n = api.GetNodes(hostname)
11 filename = "bootcd-alpha/" + hostname + ".txt"
12 if not os.path.exists(filename):
13 f = open("bootcd-alpha/" + hostname + ".txt", 'w')
14 f.write( api.AdmGenerateNodeConfFile(n[0]['node_id']) )
16 print os.system("cd bootcd-alpha; ./build.sh -f %s.txt -t iso -o /plc/data/var/www/html/bootcds/%s.iso &> /dev/null" % ( hostname, hostname))
17 print os.system("cd bootcd-alpha; ./build.sh -f %s.txt -t usb_partition -o /plc/data/var/www/html/bootcds/%s-partition.usb &> /dev/null" % ( hostname, hostname))
19 # assume that the images have already been generated..
23 args['url_list'] = " http://pl-virtual-03.cs.princeton.edu/bootcds/%s-partition.usb\n" % hostname
24 args['url_list'] += " http://pl-virtual-03.cs.princeton.edu/bootcds/%s.iso" % hostname
25 #print "http://pl-virtual-03.cs.princeton.edu/bootcds/%s.usb\n" % hostname
29 if __name__ == '__main__':
30 from config import config as cfg
31 from optparse import OptionParser
32 parser = OptionParser()
33 parser.set_defaults(media='both')
34 parser.add_option("", "--media", dest="media", metavar="usb, iso, both",
35 help="""Which media to generate the message for.""")
40 ret = {'url_list' : ''}
43 ret['url_list'] += conf['url_list']
46 if config.media == "both":
50 Here are links to both the ISO CD image, and partitioned, USB image for the
51 DC7800 and others. These are based on the new 4.2 BootImage, and are the most
52 up-to-date software for PlanetLab nodes.
56 All that is necessary is to raw-write these images to a usb stick or CD-ROM, and
57 then boot from them. If using USB, please use a command like:
59 dd if=%(hostname)s.usb of=/dev/sdX
61 Where sdX is your USB device. It is not necessary to run any other formatting
62 commands for these images, because they already include a MBR, partition
65 Please let me know if you have any trouble.
71 elif config.media == "cd":
75 Here are links to the ISO CD image(s) for your machines. These are based on
76 the new 4.2 BootImage, and are the most up-to-date software for PlanetLab
81 All that is necessary is to burn these images to a CD-ROM, and
84 Please let me know if you have any trouble.
90 elif config.media == "usb":
94 Here are links to the partitioned, USB images for the DC7800 and others.
95 These are based on the new 4.2 BootImage, and are the most
96 up-to-date software for PlanetLab nodes.
100 All that is necessary is to raw-write these images to a usb stick, and
101 then boot from them. Please use a command like:
103 dd if=%(hostname)s.usb of=/dev/sdX
105 Where sdX is your direct, USB device. Do not use a partition on the usb
106 image, or the boot will fail. It is not necessary to run any other formatting
107 commands for these images, because they already include a MBR, partition
110 Please let me know if you have any trouble.