Sie sind auf Seite 1von 2

1.

FollowtheinstructionsbyRichardMillerto9fanstocreateanewinstance:
http://9fans.net/archive/2012/05/453
From:RichardMiller<9fans@ham...>
Subject:plan9inthecloudamazonec2
Date:Thu,24May201208:47:42+0100

I'vemadeafewtweakstotheparavirtualisedplan9kernelin
/n/sources/xen/xen3tomakeitcompatiblewiththexenenvironment
usedinamazon's"elasticcomputecloud".There'sanexamplepublic
AMI(inzoneeuwest1)namedami03c9f377whichcanbeusedto
instantiateacpuserverwithfossilona1GB"elasticblockstorage"
volume.Thisfitswithinthefreeusagetierwhichyougetforthe
first12monthsaftercreatinganamazonwebservicesaccount.

Whenfirstlaunched,yourserverwillstartwithauthid=ec2,authdom
andsysnameequaltotheec2instanceid,andarandomlygenerated
passwordwhichwillbeechoedtothesystemconsole,whereitcanbe
retrievedonlybytheinstance'sownerusingtheGetSystemLog
functionoftheawswebinterface.(Bepatientthereisoftena
delayofsomeminutesafterlaunchinganinstancebeforetheconsole
logbecomesavailable.)

Alternatively,ifthe"userdata"field,whichyoucancreateaspart
oflaunchinganec2instance,containsashellscript(anything
followingalinebeginningwith#!/bin/rc),thiswillberunfrom
/bin/cpurc.localatboottime.Youcanusethistoinjectyourown
initialauthenticationdetailsintofactotum,byputtingsomething
likethisintheuserdatafield:
#!/bin/rc
auth/factotumg'proto=p9sk1user=ec2dom=my.auth.dom!password=XXXX'

Therandompasswordorfactotumscriptwillallowyoutoconnectto
yourserverforthefirsttimeusingcpu,drawtermorssh1.(Forthe
firsttwo,don'tforgettoopenport17010or17013inthe"security
group"firewall.)You'llthenwanttouseauth/wrkeytoputnew
credentialssecurelyintonvram,andrebootorrun'auth/readnvram
>/mnt/factotum/ctl'sotheycantakeeffect.Afterwardsyoucandelete
theoldtemporarypasswordfromuserdata,butonlywhentheinstance
isstopped.

Forthecurious,I'vesetupaplan9instanceatec2.hamnavoe.com,
usingauthenticationdomainoutside.plan9.belllabs.comsoanyone
withasourcesaccountcancpuintoit.I'llleaveitrunningfor
afewdays(untilmymonthlyfreeusagetierquotarunsout).

2. Tocreateanewkernel,followtheinstructionsin/n/sources/xen/xen3/README.
3. Createanewkernel(e.g9xenpccpufrb.gz).
4. Thekerneldoesntgoin/386butinaseparateext3partitionwhereitcanbebootedby
pvgrub.Theext3isnotmountedbydefault,andmighthavetorun/bin/diskparts
before,inordertoseeit(check/dev/sd00firsttoseeifthelinuxpartitionexists,thats
thepartitionwewant).

5. Mounttheext3partitionon/n/linuxandcopythekernelto/n/linux/boot.usuallyext2srvis
runningsoitmightbeaseasyas:
mount /srv/ext2 /n/linux /dev/sd00/linux
6. Changethedefaultoptionin/n/linux/boot/grub/defaultto2,andchange
/n/linux/boot/grub/menu.lsttosomethinglike:
# edit grub/default file to select configuration for next boot
default saved
timeout 0
hiddenmenu
title Plan 9 fossil
root (hd0,0)
kernel /boot/9xenpccpuf.gz nobootprompt=local!#S/sd00/fossil
venti=127.0.0.1
title Plan 9 tcp
root (hd0,0)
kernel /boot/9xenpccpuf.gz nobootprompt=tcp fs=N.N.N.N auth=N.N.N.N
# test configuration
# 'savedefault' reverts to fallback configuration on subsequent
reboot title Plan 9 test
root (hd0,0)
kernel /boot/9xenpccpufrb.gz nobootprompt=local!#S/sd00/fossil
venti=127.0.0.1
savedefault 0
7. Onceyouveverifiedthatthenewonebootsok,makeitthedefault(i.e.0)kernel.

Das könnte Ihnen auch gefallen