SRM-HOWTO.sgml 67 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293
  1. <!DOCTYPE Article PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
  2. <!-- <!DOCTYPE Article PUBLIC "-//Davenport//DTD DocBook V3.0//EN"> -->
  3. <Article id="index">
  4. <articleinfo>
  5. <Title>SRM Firmware Howto</Title>
  6. <authorgroup>
  7. <AUTHOR>
  8. <firstname>Rich</firstname> <surname>Payne</surname>
  9. <affiliation><address><email>rdp@alphalinux.org</email></address></affiliation>
  10. </AUTHOR>
  11. <!-- and -->
  12. <AUTHOR>
  13. <firstname>David</firstname> <surname>Huggins-Daines</surname>
  14. <affiliation><address><email>dhuggins@linuxcare.com</email></address></affiliation>
  15. </AUTHOR>
  16. </authorgroup>
  17. <PubDate>v0.8.1, 14 February 2004</PubDate>
  18. <Abstract>
  19. <Para>
  20. This document describes how to boot Linux/Alpha using the SRM console,
  21. which is the console firmware also used to boot
  22. <productname>HP Tru64 Unix</productname>
  23. (also known as <productname>Digital Unix</productname> and <productname>OSF/1</productname>) and <productname>OpenVMS</productname>.
  24. </Para>
  25. </Abstract>
  26. </articleinfo>
  27. <Sect1 id="SRM-about">
  28. <Title>About this manual</Title>
  29. <Sect2>
  30. <Title>Who should read this manual</Title>
  31. <Para>
  32. You should read this manual if you are installing Linux on a new
  33. Alpha system that can only boot from the SRM console, or if you are
  34. installing Linux on an older Alpha system that can use the SRM console
  35. and wish to use SRM to boot your Linux installation.
  36. </Para>
  37. <Para>
  38. Because SRM is the only way to boot Linux on modern Alpha systems,
  39. and because it provides the proper operating environment for Unix and
  40. Unix-like operating systems (such as Linux), it is the recommended way
  41. of booting Linux on Alpha when available.
  42. </Para>
  43. <Para>
  44. Sometimes, it is preferable to use the ARC, ARCSBIOS, or AlphaBIOS
  45. console, such as if you have a machine for which SRM is not available,
  46. if you wish to dual-boot with <productname>Windows NT</productname>
  47. without switching consoles,
  48. or if you have hardware that is not supported by SRM. On these
  49. machines, you will typically use MILO to boot Linux. For more
  50. information, refer to the MILO Howto, available from
  51. <ULink URL="http://www.alphalinux.org/faq/milo.html">http://www.alphalinux.org/faq/milo.html</ULink>.
  52. </Para>
  53. </Sect2>
  54. <Sect2>
  55. <Title>Conventions</Title>
  56. <Para>
  57. Throughout this manual, we will use the following conventions for
  58. commands to be entered by the user:
  59. </Para>
  60. <Para>
  61. SRM console commands will be shown with the characteristic SRM
  62. '&#62;&#62;&#62;' prompt, like this:
  63. <FOOTNOTE>
  64. <Para>
  65. On multiprocessor machines, you
  66. will see 'P00&#62&#62;' instead, or possibly some other number depending on
  67. which processor SRM is running.
  68. </Para>
  69. </FOOTNOTE>
  70. <Screen>
  71. &#62;&#62;&#62; boot dva0 -fi linux.gz -fl "root=/dev/fd0 load_ramdisk=1"
  72. </Screen>
  73. </Para>
  74. <Para>
  75. Unix commands will be shown with the '&num;' command prompt if they are
  76. to be run as <Literal remap="tt">root</Literal>, or '$' if they are to be run by a normal user,
  77. like this:
  78. <Screen>
  79. # swriteboot -f3 /dev/sda /boot/bootlx
  80. </Screen>
  81. </Para>
  82. <Para>
  83. Aboot commands will be shown with the 'aboot&#62;' command prompt, like
  84. this:
  85. <Screen>
  86. aboot&#62; b 6/boot/vmlinuz root=/dev/hda6
  87. </Screen>
  88. </Para>
  89. </Sect2>
  90. </Sect1>
  91. <Sect1 id="SRM-whatis">
  92. <Title>What is SRM?</Title>
  93. <Para>
  94. SRM console is used by Alpha systems as
  95. Unix-style boot firmware. <productname>Tru64 Unix</productname> and
  96. <productname>OpenVMS</productname> depend on it and
  97. Linux can boot from it. You can recognize SRM console as a blue screen
  98. with a prompt that is presented to you on power-up.
  99. </Para>
  100. <Sect2>
  101. <Title>Getting to SRM</Title>
  102. <Para>
  103. Most Alpha systems have both the SRM and ARC/AlphaBIOS console in
  104. their firmware. On one of these machines, if your machine starts up
  105. with ARC/AlphaBIOS by default, you can switch to SRM through the
  106. "<guimenuitem>Console Selection</guimenuitem>" option in the Advanced CMOS Setup menu. To make <!-- FIXME Markup should do the marking -->
  107. the change permanent, you should set the <Literal remap="tt">os&lowbar;type</Literal> environment
  108. variable in SRM to "OpenVMS" or "Unix", like this:
  109. <Screen>
  110. &#62;&#62;&#62; set os_type Unix
  111. </Screen>
  112. </Para>
  113. <Para>
  114. Either one will work to boot Linux. However, if you intend to
  115. dual-boot OpenVMS on this machine, you must set <Literal remap="tt">os&lowbar;type</Literal> to
  116. "OpenVMS". Conversely, to return to ARC/AlphaBIOS, you can set
  117. <Literal remap="tt">os&lowbar;type</Literal> to "NT".
  118. </Para>
  119. <Para>
  120. Some older systems may not have both SRM and ARC in firmware as
  121. shipped. On these systems, you will have to upgrade your firmware.
  122. See <ULink
  123. URL="http://ftp.digital.com/pub/DEC/Alpha/firmware/"
  124. >http://ftp.digital.com/pub/DEC/Alpha/firmware</ULink
  125. > for the
  126. latest firmware updates and instructions.
  127. </Para>
  128. <Para>
  129. A few older systems (primarily evaluation boards such as the 164SX
  130. and 164LX) are "half-flash" systems, whose firmware can hold SRM or
  131. AlphaBIOS, but not both. If you have one of these machines, you will
  132. have to reflash your firmware with the SRM console using the AlphaBIOS
  133. firmware update utility. Again, see
  134. <ULink
  135. URL="http://ftp.digital.com/pub/DEC/Alpha/firmware/"
  136. >http://ftp.digital.com/pub/DEC/Alpha/firmware</ULink
  137. > for firmware
  138. images and instructions. If you wish to return to AlphaBIOS on these
  139. machines, you may rerun the firmware update utility from a floppy in
  140. SRM using the <Literal remap="tt">fwupdate</Literal> command. You can also start AlphaBIOS
  141. from a floppy using the <Literal remap="tt">arc</Literal> command.
  142. </Para>
  143. </Sect2>
  144. <Sect2>
  145. <Title>Using the SRM console</Title>
  146. <Para>
  147. The SRM console works very much like a Unix or OpenVMS shell. It
  148. views your NVRAM and devices as a pseudo-filesystem. You can see this
  149. if you use the <command>ls</command> command. Also, it contains a fairly large set
  150. of diagnostic, setup, and debugging utilities, the details of which
  151. are beyond the scope of this document. As in the Unix shell, you can
  152. pipe the output of one command to the input of another, and there is a
  153. <command>more</command> command that works not unlike the Unix one. To get a full
  154. listing of available commands, run:
  155. <Screen>
  156. &#62;&#62;&#62; help | more
  157. </Screen>
  158. </Para>
  159. <Para>
  160. As well, SRM has environment variables, a number of which are
  161. pre-defined and correspond to locations in NVRAM. You can view the
  162. entire list of environment variables and their values with the
  163. <command>show</command> command (there are quite a few of them, so you will probably
  164. want to pipe its output to <command>more</command>). You can also show variables
  165. matching a "glob" pattern - for example, <command>show boot*</command> will show all
  166. the variables starting in "boot".
  167. </Para>
  168. <Para>
  169. Environment variables are categorized as either <Emphasis>read-only</Emphasis>,
  170. <Emphasis>warm non-volatile</Emphasis>, or <Emphasis>cold non-volatile</Emphasis>. The full listing
  171. of pre-defined variables is detailed in the Alpha Architecture
  172. Reference Manual. The most useful pre-defined environment variables
  173. for the purposes of booting Linux are <varname>bootdef&lowbar;dev</varname>,
  174. <varname>boot&lowbar;file</varname>, <varname>boot&lowbar;flags</varname>, and
  175. <varname>auto&lowbar;action</varname>, all of which are cold non-volatile.
  176. </Para>
  177. <Para>
  178. To set environment variables, use the <command>set</command> command, like this:
  179. <Screen>
  180. &#62;&#62;&#62; set bootdef_def dka0
  181. </Screen>
  182. </Para>
  183. <Para>
  184. If you set an undefined variable, it will be created for you, however
  185. it will not persist across reboots.
  186. </Para>
  187. <Para>
  188. The <varname>bootdef&lowbar;dev</varname> variable specifies the device (using
  189. VMS naming conventions - see <XRef LinkEnd="device-naming"> for an
  190. explanation of these) which will be booted from if no device is
  191. specified on the <Literal remap="tt">boot</Literal> command line, or in an automatic boot.
  192. The <varname>boot&lowbar;file</varname> variable contains the filename to be
  193. loaded by the secondary bootloader, while <varname>boot&lowbar;flags</varname>
  194. contains any extra flags. <varname>auto&lowbar;action</varname> specifies the
  195. action which the console should take on power-up. By default, it is
  196. set to <Literal remap="tt">HALT</Literal>, meaning that the machine will start up in the
  197. SRM console. Once you have configured your bootloader and the
  198. boot-related variables, you can set it to <Literal remap="tt">BOOT</Literal> in order to
  199. boot automatically on power-up.
  200. </Para>
  201. <Para>
  202. Finally, two helpful console keystrokes you should know are
  203. <keycombo action='simul'><keycap>Control</keycap><keycap>C</keycap></keycombo>,
  204. which, as in the shell, halts a command in progress (such
  205. as an automatic boot), and
  206. <keycombo action='simul'><keycap>Control</keycap><keycap>P</keycap></keycombo>,
  207. which if issued from the aboot
  208. prompt (or other secondary bootloader) will halt the bootloader and
  209. return you to the SRM console.
  210. </Para>
  211. </Sect2>
  212. <Sect2 id="how-srm-boots">
  213. <Title>How Does SRM Boot an OS?</Title>
  214. <Para>
  215. All versions of SRM can boot from SCSI disks and the versions for
  216. recent platforms, such as the Noname or AlphaStations can boot from
  217. floppy disks as well. Network booting via <Literal remap="tt">bootp</Literal> is supported.
  218. Note that older SRM versions (notably the one for the Jensen)
  219. cannot boot from floppy disks. Booting from IDE devices
  220. is supported on newer platforms (164SX, 164LX, 164UX, DS20, DS10, DP264, UP2000(+), UP1000, UP1100 etc.).
  221. </Para>
  222. <Para>
  223. Booting Linux with SRM is a two step process: first, SRM loads and
  224. transfers control to the secondary bootstrap loader. Then the
  225. secondary bootstrap loader sets up the environment for Linux, reads
  226. the kernel image from a disk filesystem and finally transfers control to Linux.
  227. </Para>
  228. <Para>
  229. Currently, there are two secondary bootstrap loaders for Linux:
  230. the <Emphasis>raw</Emphasis> loader that comes with the Linux kernel and <Literal remap="tt">aboot</Literal>
  231. which is distributed separately. These two loaders are described in
  232. more detail below.
  233. </Para>
  234. </Sect2>
  235. <Sect2>
  236. <Title>Loading The Secondary Bootstrap Loader</Title>
  237. <Para>
  238. SRM knows nothing about filesystems or disk-partitions. It simply
  239. expects that the secondary bootstrap loader occupies a consecutive
  240. range of physical disk sector, starting from a given offset. The
  241. information on the size of the secondary bootstrap loader and the
  242. offset of its first disk sector is stored in the first 512 byte
  243. sector. Specifically, the long integer at offset 480 stores the
  244. <Emphasis>size</Emphasis> of the secondary bootstrap loader (in 512-byte blocks) and
  245. the long at offset 488 gives the <Emphasis>sector number</Emphasis> at which the
  246. secondary bootstrap loader starts. The first sector also stores a
  247. flag-word at offset 496 which is always 0 and a checksum at offset
  248. 504. The checksum is simply the sum of the first 63 long integers in
  249. the first sector.
  250. </Para>
  251. <Para>
  252. If the checksum in the first sector is correct, SRM goes ahead and
  253. reads the <Emphasis>size</Emphasis> sectors starting from the sector given in the
  254. <Emphasis>sector number</Emphasis> field and places them in <Emphasis>virtual</Emphasis> memory at
  255. address <Literal remap="tt">0x20000000</Literal>. If the reading completes successfully,
  256. SRM performs a jump to address <Literal remap="tt">0x20000000</Literal>.
  257. </Para>
  258. </Sect2>
  259. </Sect1>
  260. <Sect1 id="SRM-DeviceNaming">
  261. <Title>SRM Device Naming</Title>
  262. <Sect2>
  263. <Title>The First Two Letter</Title>
  264. <Para>The following is based on the example device dkb1.2.3.4.5 taken from a Digital Server 3300 (Whitebox version of
  265. an AS800).
  266. </Para>
  267. <Para>
  268. Two letter port or class driver designator:
  269. <!-- <variablelist>
  270. <varlistentry><term>DR:</term><listitem><para>RAID set device</Para></ListItem></varlistentry>
  271. <varlistentry><term>DV:</term><ListItem><Para>Floppy Drive</Para></ListItem></varlistentry>
  272. <ListItem><Para> EW: Ethernet port (TULIP, DEC 21040) </Para></ListItem>
  273. <ListItem><Para> EI: Ethernet port (Intel 82557 or 82559) </Para></ListItem>
  274. <ListItem><Para> PK: SCSI port (controller) </Para></ListItem>
  275. <ListItem><Para> DK: SCSI disk </Para></ListItem>
  276. <ListItem><Para> MK: SCSI tape </Para></ListItem>
  277. <ListItem><Para> PU: DSSI port </Para></ListItem>
  278. <ListItem><Para> DU: DSSI disk </Para></ListItem>
  279. <ListItem><Para> MU: DSSI tape </Para></ListItem>
  280. <ListItem><Para> JK: SCSI monitor (or robot) </Para></ListItem>
  281. <ListItem><Para> DQ: (E)IDE Device (disk or CD-ROM)</Para></ListItem>
  282. </ItemizedList>
  283. </variablelist> -->
  284. <ItemizedList>
  285. <ListItem><Para> DR: RAID set device </Para></ListItem>
  286. <ListItem><Para> DV: Floppy Drive </Para></ListItem>
  287. <ListItem><Para> EW: Ethernet port (TULIP, DEC 21040) </Para></ListItem>
  288. <ListItem><Para> EI: Ethernet port (Intel 82557 or 82559) </Para></ListItem>
  289. <ListItem><Para> PK: SCSI port (controller) </Para></ListItem>
  290. <ListItem><Para> DK: SCSI disk </Para></ListItem>
  291. <ListItem><Para> MK: SCSI tape </Para></ListItem>
  292. <ListItem><Para> PU: DSSI port </Para></ListItem>
  293. <ListItem><Para> DU: DSSI disk </Para></ListItem>
  294. <ListItem><Para> MU: DSSI tape </Para></ListItem>
  295. <ListItem><Para> JK: SCSI monitor (or robot) </Para></ListItem>
  296. <ListItem><Para> DQ: (E)IDE Device (disk or CD-ROM)</Para></ListItem>
  297. </ItemizedList>
  298. </Para>
  299. </Sect2>
  300. <Sect2>
  301. <Title>The Rest Of The Device Name</Title>
  302. <Para>
  303. <ItemizedList>
  304. <ListItem><Para>
  305. b->adapter ID (one letter adapter designator)</Para></ListItem>
  306. <ListItem><Para>
  307. 1->Device number (SCSI unit numbers are forced to 100x Node ID)</Para></ListItem>
  308. <ListItem><Para>
  309. 2->Bus Node ID</Para></ListItem>
  310. <ListItem><Para>
  311. 3->Channel Number</Para></ListItem>
  312. <ListItem><Para>
  313. 4->Channel Number (used for multi-channel devices)</Para></ListItem>
  314. <ListItem><Para>
  315. 5->Logical Slot number
  316. <ItemizedList>
  317. <ListItem><Para>EISA: they correspond to the physical slot numbers (1-3)</Para></ListItem>
  318. <ListItem><Para>PCI:</Para>
  319. <ItemizedList>
  320. <ListItem><Para>slot 5= SCSI controller on system backplane (DS3300)</Para></ListItem>
  321. <ListItem><Para>slot 6= On board VGA (DS3300)</Para></ListItem>
  322. <ListItem><Para>slot 7= PCI to EISA bridge chip (DS3300)</Para></ListItem>
  323. <ListItem><Para>slots 11 - 14 = Correspond to Physical PCI option slots:
  324. PCI11, PCI12, PCI13 and PCI14 (64bit) (DS3300)</Para></ListItem>
  325. </ItemizedList>
  326. </ListItem>
  327. </ItemizedList>
  328. </Para>
  329. </ListItem>
  330. <ListItem><Para>
  331. 6->Hose number: 0 PCI_0 (32bit PCI); 1 EISA (DS3300)</Para></ListItem>
  332. </ItemizedList>
  333. </Para>
  334. </Sect2>
  335. </Sect1>
  336. <Sect1 id="SRM-rawloader">
  337. <Title>The Raw Loader</Title>
  338. <Para>
  339. The sources for this loader can be found in directory
  340. <filename>arch/alpha/boot</filename> of the Linux kernel source
  341. distribution. It loads the Linux kernel by reading
  342. <varname>START&lowbar;SIZE</varname> bytes starting at disk offset
  343. <varname>BOOT&lowbar;SIZE</varname><Literal remap="tt">+512</Literal>
  344. (also in bytes). The constants
  345. <varname>START&lowbar;SIZE</varname> and <varname>BOOT&lowbar;SIZE</varname>
  346. are defined in
  347. <filename>linux/include/asm-alpha/system.h</filename>.
  348. <varname>START&lowbar;SIZE</varname>
  349. must be at least as big as the kernel image (i.e., the size of the
  350. <Literal remap="tt">.text</Literal>, <Literal remap="tt">.data</Literal>, and <Literal remap="tt">.bss</Literal> segments). Similarly,
  351. <varname>BOOT&lowbar;SIZE</varname> must be at least as big as the image of the
  352. raw bootstrap loader. Both constants should be an integer multiple of the
  353. sector size, which is 512 bytes. The default values are currently 2MB
  354. for <varname>START&lowbar;SIZE</varname> and 16KB for
  355. <varname>BOOT&lowbar;SIZE</varname>. Note
  356. that if you want to boot from a 1.44MB floppy disk, you have to reduce
  357. <varname>START&lowbar;SIZE</varname> to 1400KB and make sure that the kernel you
  358. want to boot is no bigger than that.
  359. </Para>
  360. <Para>
  361. To build a raw loader, simply type <command>make rawboot</command> in the top
  362. directory of your linux source tree (typically
  363. <filename>/usr/src/linux</filename>). This should produce the following files
  364. in <filename>arch/alpha/boot</filename>:
  365. </Para>
  366. <Para>
  367. <VariableList>
  368. <VarListEntry>
  369. <Term><filename>tools/lxboot</filename>:</Term>
  370. <ListItem>
  371. <Para>
  372. The first
  373. sector on the disk. It contains the offset and size of
  374. the next file in the format described above.
  375. </Para>
  376. </Listitem>
  377. </VarListEntry>
  378. <VarListEntry>
  379. <Term><filename>tools/bootlx</filename>:</Term>
  380. <ListItem>
  381. <Para>
  382. The raw boot loader that
  383. will load the file below.
  384. </Para>
  385. </Listitem>
  386. </VarListEntry>
  387. <VarListEntry>
  388. <Term><filename>vmlinux.nh</filename>:</Term>
  389. <ListItem>
  390. <Para>
  391. The raw kernel image consisting of
  392. the <Literal remap="tt">.text</Literal>, <Literal remap="tt">.data</Literal>, and <Literal remap="tt">.bss</Literal> segments of the
  393. object file in <Literal remap="tt">/usr/src/linux/vmlinux</Literal>. The
  394. extension <Literal remap="tt">.nh</Literal> indicates that this file has no object-file
  395. header.
  396. </Para>
  397. </Listitem>
  398. </VarListEntry>
  399. </VariableList>
  400. </Para>
  401. <Para>
  402. The concatenation of these three files should be written to the
  403. disk from which you want to boot. For example, to boot from a floppy,
  404. insert an empty floppy disk in, say, <filename>/dev/fd0</filename> and then type:
  405. <Screen>
  406. # cat tools/lxboot tools/bootlx vmlinux &#62;/dev/fd0
  407. </Screen>
  408. </Para>
  409. <Para>
  410. You can then shutdown the system and boot from the floppy by
  411. issuing the command <command>boot dva0</command>.
  412. </Para>
  413. </Sect1>
  414. <Sect1 id="SRM-aboot">
  415. <Title>The aboot Loader</Title>
  416. <Para>
  417. When using the SRM firmware, <Literal remap="tt">aboot</Literal> is the preferred way of
  418. booting Linux. It supports:
  419. </Para>
  420. <Para>
  421. <ItemizedList>
  422. <ListItem>
  423. <Para>
  424. direct booting from various filesystems (<Literal remap="tt">ext2</Literal>, <Literal remap="tt">ISO9660</Literal>, and
  425. <Literal remap="tt">UFS</Literal>, the <productname>HP Tru64</productname> filesystem)
  426. </Para>
  427. </ListItem>
  428. <ListItem>
  429. <Para>
  430. listing directories and following symbolic links on ext2 (version 0.6 and later)
  431. </Para>
  432. </ListItem>
  433. <ListItem>
  434. <Para>
  435. booting of executable object files (both ELF and ECOFF)
  436. </Para>
  437. </ListItem>
  438. <ListItem>
  439. <Para>
  440. booting compressed kernels
  441. </Para>
  442. </ListItem>
  443. <ListItem>
  444. <Para>
  445. network booting (using bootp)
  446. </Para>
  447. </ListItem>
  448. <ListItem>
  449. <Para>
  450. partition tables in <productname>HP Tru64</productname> format (which is
  451. compatible with BSD Unix partition tables)
  452. </Para>
  453. </ListItem>
  454. <ListItem>
  455. <Para>
  456. interactive booting and default configurations for
  457. SRM consoles that cannot pass long option strings
  458. </Para>
  459. </ListItem>
  460. <ListItem>
  461. <Para>
  462. load initrd images to load modules at boot time (0.7 and later)
  463. </Para>
  464. </ListItem>
  465. </ItemizedList>
  466. </Para>
  467. <Sect2>
  468. <Title>Getting and Building aboot</Title>
  469. <Para>
  470. The latest sources for <Literal remap="tt">aboot</Literal> are available from <ULink
  471. URL="http://www.sf.net/projects/aboot"
  472. >Sourceforge</ULink>. They can
  473. also be obtained via anonymous CVS from www.sf.net, to get the latest version from CVS use these commands:
  474. <Screen>
  475. bash# cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aboot login
  476. bash# cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aboot co aboot
  477. </Screen>
  478. (Note there is no password for the CVS login, just press enter)
  479. </Para>
  480. <Para>
  481. The description in this manual applies to <Literal remap="tt">aboot</Literal> version 0.6
  482. or newer. Please note that many distributions ship aboot with them so
  483. downloading aboot from this directory is probably not neccesary.
  484. </Para>
  485. <Para>
  486. Once you downloaded and extracted the latest tar file, take a
  487. look at the <filename>README</filename> and <filename>INSTALL</filename> files
  488. for installation hints. In particular, be sure to adjust the variables in
  489. <filename>Makefile</filename> and in <filename>include/config.h</filename>
  490. to match your
  491. environment. Normally, you won't need to change anything when
  492. building under Linux, but it is always a good idea to double check.
  493. If you're satisfied with the configuration, simply type <command>make</command>
  494. to build it (if you're not building under Linux, be advised that
  495. <Literal remap="tt">aboot</Literal> requires GNU <Literal remap="tt">make</Literal>).
  496. </Para>
  497. <Para>
  498. After running <Literal remap="tt">make</Literal>, the <filename>aboot</filename>
  499. directory should contain the following files:
  500. </Para>
  501. <Para>
  502. <VariableList>
  503. <VarListEntry>
  504. <Term><filename>aboot</filename></Term>
  505. <ListItem>
  506. <Para>
  507. This is the actual <Literal remap="tt">aboot</Literal> executable (either an
  508. ECOFF or ELF object file).
  509. </Para>
  510. </Listitem>
  511. </VarListEntry>
  512. <VarListEntry>
  513. <Term><filename>bootlx</filename></Term>
  514. <ListItem>
  515. <Para>
  516. Same as above, but it contains only the text, data
  517. and bss segments &dash; that is, this file is not an object file.
  518. </Para>
  519. </Listitem>
  520. </VarListEntry>
  521. <VarListEntry>
  522. <Term><filename>sdisklabel/swriteboot</filename></Term>
  523. <ListItem>
  524. <Para>
  525. Utility to install <Literal remap="tt">aboot</Literal> on a
  526. hard disk.
  527. </Para>
  528. </Listitem>
  529. </VarListEntry>
  530. <VarListEntry>
  531. <Term><filename>tools/e2writeboot</filename></Term>
  532. <ListItem>
  533. <Para>
  534. Utility to install <Literal remap="tt">aboot</Literal> on an ext2
  535. filesystem (usually used for floppies only).
  536. </Para>
  537. </Listitem>
  538. </VarListEntry>
  539. <VarListEntry>
  540. <Term><filename>tools/isomarkboot</filename></Term>
  541. <ListItem>
  542. <Para>
  543. Utility to install <Literal remap="tt">aboot</Literal> on a iso9660
  544. filesystem (used by CD-ROM distributors).
  545. </Para>
  546. </Listitem>
  547. </VarListEntry>
  548. <VarListEntry>
  549. <Term><filename>tools/abootconf</filename></Term>
  550. <ListItem>
  551. <Para>
  552. Utility to configure an installed <Literal remap="tt">aboot</Literal>.
  553. </Para>
  554. </Listitem>
  555. </VarListEntry>
  556. </VariableList>
  557. </Para>
  558. </Sect2>
  559. <Sect2>
  560. <Title>Floppy Installation</Title>
  561. <Para>
  562. The bootloader can be installed on a floppy using the
  563. <command>e2writeboot</command> command (note: this can't be done on a Jensen
  564. since
  565. its firmware does <Emphasis>not</Emphasis> support booting from floppy). This command
  566. requires that the disk is not overly fragmented as it needs to find
  567. enough contiguous file blocks to store the entire <Literal remap="tt">aboot</Literal> image
  568. (currently about 90KB). If <command>e2writeboot</command> fails because of this,
  569. reformat the floppy and try again (e.g., with <command>fdformat</command>(1)).
  570. For
  571. example, the following steps install <Literal remap="tt">aboot</Literal> on floppy disk
  572. assuming the floppy is in drive <filename>/dev/fd0</filename>:
  573. <Screen>
  574. # fdformat /dev/fd0
  575. # mke2fs /dev/fd0
  576. # e2writeboot /dev/fd0 bootlx
  577. </Screen>
  578. </Para>
  579. </Sect2>
  580. <Sect2>
  581. <Title>Harddisk Installation</Title>
  582. <Para>
  583. Since the <command>e2writeboot</command> command may fail on highly fragmented
  584. disks and since reformatting a harddisk is not without pain, it is
  585. generally safer to install <Literal remap="tt">aboot</Literal> on a harddisk using the
  586. <command>swriteboot</command> command.
  587. <Literal remap="tt">swriteboot</Literal> requires that the first few
  588. sectors are reserved for booting purposes. We suggest that the disk
  589. be partitioned such that the first partition starts at an offset of
  590. 2048 sectors. This leaves 1MB of space for storing <Literal remap="tt">aboot</Literal>. On
  591. a properly partitioned disk, it is then possible to install <Literal remap="tt">aboot</Literal>
  592. as follows (assuming the disk is <filename>/dev/sda</filename>):
  593. <Screen>
  594. # swriteboot /dev/sda bootlx
  595. </Screen>
  596. </Para>
  597. <Para>
  598. On systems where partition <Literal remap="tt">c</Literal> in the entire disk it will be
  599. necessary to 'force' the write of aboot. In this case use the <Literal remap="tt">-f</Literal>
  600. flag followed by the partition number (in the case of partition <Literal remap="tt">c</Literal>
  601. this is 3):
  602. <Screen>
  603. # swriteboot /dev/sda bootlx -f3
  604. </Screen>
  605. </Para>
  606. <Para>
  607. On a Jensen, you will want to leave some more space, since you need to
  608. write a kernel to this place, too---2MB should be sufficient when
  609. using compressed kernels. Use <Literal remap="tt">swriteboot</Literal> as described in Section
  610. <XRef LinkEnd="booting"> to write <filename>bootlx</filename> together with
  611. the Linux kernel.
  612. </Para>
  613. </Sect2>
  614. <Sect2>
  615. <Title>CD-ROM Installation</Title>
  616. <Para>
  617. To make a CD-ROM bootable by SRM, simply build <Literal remap="tt">aboot</Literal> as
  618. described above. Then, make sure that the <filename>bootlx</filename> file is
  619. present on the iso9660 filesystem (e.g., copy <filename>bootlx</filename> to
  620. the directory that is the filesystem master, then run <command>mkisofs</command>
  621. on that directory). After that, all that remains to be done is to mark the
  622. filesystem as SRM bootable. This is achieved with a command of the
  623. form:
  624. <Screen>
  625. # isomarkboot filesystem bootlx
  626. </Screen>
  627. </Para>
  628. <Para>
  629. The command above assumes that <filename>filesystem</filename> is a file
  630. containing the iso9660 filesystem and that <filename>bootlx</filename> has been
  631. copied into the
  632. root directory of that filesystem. That's it!
  633. </Para>
  634. </Sect2>
  635. <Sect2 id="Building-Linux">
  636. <Title>Building the Linux Kernel</Title>
  637. <Para>
  638. A bootable Linux kernel can be built with the following steps.
  639. During the <command>make config</command>, be sure to answer "yes" to the
  640. question
  641. whether you want to boot the kernel via SRM (for certain platforms
  642. this is automatically selected). Note that if you build a generic
  643. kernel (by selecting "Generic" as the alpha system type), the kernel
  644. is able to guess whether it is running under SRM or not.
  645. <Screen>
  646. # cd /usr/src/linux
  647. # make config
  648. # make dep
  649. # make boot
  650. # make modules (if applicable)
  651. # make modules_install (if applicable)
  652. </Screen>
  653. </Para>
  654. <Para>
  655. The last command will build the file
  656. <filename>arch/alpha/boot/vmlinux.gz</filename> which can then be copied to the
  657. disk from which you want to boot from. In our floppy disk example
  658. above, this would entail:
  659. <Screen>
  660. # mount /dev/fd0 /mnt
  661. # cp arch/alpha/boot/vmlinux.gz /mnt
  662. # umount /mnt
  663. </Screen>
  664. </Para>
  665. </Sect2>
  666. <Sect2 id="booting">
  667. <Title>Booting Linux</Title>
  668. <Para>
  669. With the SRM firmware and <Literal remap="tt">aboot</Literal> installed, Linux is generally
  670. booted with a command of the form:
  671. <Screen>
  672. <Literal remap="tt">boot</Literal> <Emphasis remap="it">devicename</Emphasis> <Literal remap="tt">-fi</Literal> <Emphasis remap="it">filename</Emphasis>
  673. <Literal remap="tt">-fl</Literal> <Emphasis remap="it">flags</Emphasis>
  674. </Screen>
  675. </Para>
  676. <Para>
  677. The <Emphasis remap="it">filename</Emphasis> and <Emphasis remap="it">flags</Emphasis> arguments are optional. If
  678. they are not specified, SRM uses the default values stored in
  679. environment variables <varname>BOOTDEF&lowbar;DEV</varname>,
  680. <varname>BOOT&lowbar;OSFILE</varname> and
  681. <varname>BOOT&lowbar;OSFLAGS</varname>. The
  682. syntax and meaning of these two arguments is described in more detail
  683. below. To list the current values of these variables type
  684. <command>show boot*</command> at the SRM command prompt. This will also show a
  685. <varname>boot&lowbar;dev</varname> variable (among others), this variable is
  686. read only
  687. and needs to be changed via the <varname>bootdef&lowbar;dev</varname> variable.
  688. </Para>
  689. <Sect3 id="device-naming">
  690. <Title>Device Naming</Title>
  691. <Para>
  692. This corresponds to the device from which SRM will attempt to boot. Examples include:
  693. </Para>
  694. <Para>
  695. <VariableList>
  696. <VarListEntry>
  697. <Term>dva0</Term>
  698. <ListItem>
  699. <Para>
  700. - First floppy drive, <filename>/dev/fd0</filename> under Linux
  701. </Para>
  702. </Listitem>
  703. </VarListEntry>
  704. <VarListEntry>
  705. <Term>dqa0</Term>
  706. <ListItem>
  707. <Para>
  708. - Primary IDE CD-ROM or hard disk as Master, <filename>/dev/hda</filename>
  709. under Linux
  710. </Para>
  711. </Listitem>
  712. </VarListEntry>
  713. <VarListEntry>
  714. <Term>dqa1</Term>
  715. <ListItem>
  716. <Para>
  717. - Primary IDE CD-ROM or hard disk as Slave, <filename>/dev/hdb</filename>
  718. under Linux
  719. </Para>
  720. </Listitem>
  721. </VarListEntry>
  722. <VarListEntry>
  723. <Term>dka0</Term>
  724. <ListItem>
  725. <Para>
  726. - SCSI disk on first bus, Device 0, <filename>/dev/sda</filename> under Linux
  727. </Para>
  728. </Listitem>
  729. </VarListEntry>
  730. <VarListEntry>
  731. <Term>ewa0</Term>
  732. <ListItem>
  733. <Para>
  734. - First Ethernet Device, <filename>/dev/eth0</filename> under Linux
  735. </Para>
  736. </Listitem>
  737. </VarListEntry>
  738. </VariableList>
  739. </Para>
  740. <Para>
  741. For example to boot from the disk at SCSI id 6, you would enter:
  742. <Screen>
  743. &#62;&#62;&#62; boot dka600
  744. </Screen>
  745. </Para>
  746. <Para>
  747. To list the devices currently installed in the system type
  748. <command>show dev</command> at the SRM command line. In contrast to Linux
  749. device naming, the
  750. partition number on a disk device is <Emphasis>not</Emphasis> given as part of the
  751. device name (you may see extra numbers after the device names when
  752. running <command>show dev</command> - these correspond to things like PCI bus and
  753. device numbers and are not useful to the user). Remember, as
  754. mentioned in <XRef LinkEnd="how-srm-boots">, that SRM knows <Emphasis>nothing</Emphasis>
  755. about partitions or disklabels - it merely reads a boot block and
  756. secondary bootstrap from sectors on a disk. Therefore, the partition
  757. number is given as part of the boot filename.
  758. </Para>
  759. </Sect3>
  760. <Sect3>
  761. <Title>Boot Filename</Title>
  762. <Para>
  763. The filename argument takes the form:
  764. <QUOTE
  765. >&lsqb;<Emphasis>n</Emphasis>/&rsqb;<Emphasis>filename</Emphasis></QUOTE
  766. >
  767. </Para>
  768. <Para>
  769. <Emphasis>n</Emphasis> is a single digit in the range 1..8 that gives the partition
  770. number from which to boot from. <filename>filename</filename> is the path of the file
  771. you want boot. For example to boot a kernel named
  772. <filename>vmlinux.gz</filename> from the second partition of SCSI
  773. device 6, you would enter:
  774. <Screen>
  775. &#62;&#62;&#62; boot dka600 -file 2/vmlinux.gz
  776. </Screen>
  777. </Para>
  778. <Para>
  779. Or to boot from floppy drive 0, you'd enter:
  780. <Screen>
  781. &#62;&#62;&#62; boot dva0 -file vmlinux.gz
  782. </Screen>
  783. </Para>
  784. <Para>
  785. If a disk has no partition table, <Literal remap="tt">aboot</Literal> pretends the disk
  786. contains one <Literal remap="tt">ext2</Literal> partition starting at the first diskblock.
  787. This allows booting from floppy disks.
  788. </Para>
  789. <Para>
  790. As a special case, partition number 0 is used to request booting
  791. from a disk that does not (yet) contain a file system. When
  792. specifying "partition" number 0, <Literal remap="tt">aboot</Literal> assumes that the Linux
  793. kernel is stored right behind the <Literal remap="tt">aboot</Literal> image. Such a layout
  794. can be achieved with the <command>swriteboot</command> command. For example, to
  795. setup a filesystem-less boot from <filename>/dev/sda</filename>, one could use
  796. the command:
  797. <Screen>
  798. # swriteboot /dev/sda bootlx vmlinux.gz
  799. </Screen>
  800. </Para>
  801. <Para>
  802. Booting a system in this way is not normally necessary. The
  803. reason this feature exists is to make it possible to get Linux
  804. installed on a systems that can't boot from a floppy disk (e.g., the
  805. Jensen).
  806. </Para>
  807. </Sect3>
  808. <Sect3>
  809. <Title>Boot Flags</Title>
  810. <Para>
  811. A number of bootflags can be specified. The syntax is:
  812. <Screen>
  813. -flags "options..."
  814. </Screen>
  815. </Para>
  816. <Para>
  817. Where "options..." is any combination the following options (separated
  818. by blanks). There are many more bootoptions, depending on what
  819. drivers your kernel has installed. The options listed below are
  820. therefore just examples to illustrate the general idea:
  821. </Para>
  822. <Para>
  823. <VariableList>
  824. <VarListEntry>
  825. <Term>load&lowbar;ramdisk=1</Term>
  826. <ListItem>
  827. <Para>
  828. Copy root file system from a (floppy) disk to the RAM disk
  829. before starting the system. The RAM disk will be used in
  830. lieu of the root device. This is useful to bootstrap Linux
  831. on a system with only one floppy drive.
  832. </Para>
  833. </Listitem>
  834. </VarListEntry>
  835. <VarListEntry>
  836. <Term>floppy=<Emphasis>str</Emphasis></Term>
  837. <ListItem>
  838. <Para>
  839. Sets floppy configuration to <Emphasis>str</Emphasis>.
  840. </Para>
  841. </Listitem>
  842. </VarListEntry>
  843. <VarListEntry>
  844. <Term>root=<Emphasis>dev</Emphasis></Term>
  845. <ListItem>
  846. <Para>
  847. Select device <Emphasis>dev</Emphasis> as the root-file
  848. system. The device can be specified as a major/minor hex number (e.g.,
  849. 0x802 for <filename>/dev/sda2</filename>) or one of a few canonical names (e.g.,
  850. <filename>/dev/fd0</filename>, <filename>/dev/sda2</filename>).
  851. </Para>
  852. </Listitem>
  853. </VarListEntry>
  854. <VarListEntry>
  855. <Term>single</Term>
  856. <ListItem>
  857. <Para>
  858. Boot system in single user mode.
  859. </Para>
  860. </Listitem>
  861. </VarListEntry>
  862. <VarListEntry>
  863. <Term>kgdb</Term>
  864. <ListItem>
  865. <Para>
  866. Enable kernel-gdb (works only if <varname>CONFIG&lowbar;KGDB</varname> is
  867. enabled; a second Alpha system needs to be connected over the serial
  868. port in order to make this work)
  869. </Para>
  870. </Listitem>
  871. </VarListEntry>
  872. </VariableList>
  873. </Para>
  874. <Para>
  875. Some SRM implementations (e.g., the one for the Jensen) are
  876. handicapped and allow only short option strings (e.g., at most 8
  877. characters). In such a case, <Literal remap="tt">aboot</Literal> can be booted with the
  878. single-character boot flag "i". With this flag, <Literal remap="tt">aboot</Literal> will
  879. enter interactive mode
  880. </Para>
  881. </Sect3>
  882. <Sect3>
  883. <Title>Using aboot interactively</Title>
  884. <Para>
  885. As of version 0.6, <Literal remap="tt">aboot</Literal> supports a simple command-oriented
  886. interactive mode. Note that this is <Emphasis>different</Emphasis> from the prompt
  887. which previous versions issued when booted with the "i" flag, or after
  888. failing to load a kernel. You can get a summary of the available
  889. commands by typing "h" or "?" at the prompt:
  890. <Screen>
  891. &#62;&#62;&#62; boot dka0 -fl i
  892. aboot&#62; ?
  893. h, ? Display this message
  894. q Halt the system and return to SRM
  895. p 1-8 Look in partition &#60;num&#62; for configuration/kernel
  896. l List pre-configured kernels
  897. d &#60;dir&#62; List directory &#60;dir&#62; in current filesystem
  898. b &#60;file&#62; &#60;args&#62; Boot kernel in &#60;file&#62; (- for raw boot)
  899. with arguments &#60;args&#62;
  900. 0-9 Boot pre-configuration 0-9 (list with 'l')
  901. aboot&#62; b 3/vmlinux.gz root=/dev/sda3 single
  902. </Screen>
  903. </Para>
  904. </Sect3>
  905. <Sect3>
  906. <Title>The <filename>aboot.conf</filename> configuration file</Title>
  907. <Para>
  908. Since booting in that manner quickly becomes tedious, <Literal remap="tt">aboot</Literal>
  909. allows to define short-hands for frequently used command lines. In
  910. particular, a single digit option (0-9) requests that <Literal remap="tt">aboot</Literal> uses
  911. the corresponding option string stored in file
  912. <filename>etc/aboot.conf</filename>. A sample <filename>aboot.conf</filename> is shown below:
  913. <Screen>
  914. #
  915. # aboot default configurations
  916. #
  917. 0:3/vmlinux.gz root=/dev/sda3
  918. 1:3/vmlinux.gz root=/dev/sda3 single
  919. 2:3/vmlinux.new.gz root=/dev/sda3
  920. 3:3/vmlinux root=/dev/sda3
  921. 8:- root=/dev/sda3 # fs-less boot of raw kernel
  922. 9:0/vmlinux.gz root=/dev/sda3 # fs-less boot of (compressed) ECOFF kernel
  923. -
  924. </Screen>
  925. </Para>
  926. <Para>
  927. With this configuration file, the command
  928. <Screen>
  929. &#62;&#62;&#62; boot dka0 -fl 1
  930. </Screen>
  931. corresponds exactly to the boot command shown above.
  932. </Para>
  933. <Para>
  934. Finally, at the <Literal remap="tt">aboot</Literal> prompt, it is possible to enter one of the
  935. single character flags ("0"-"9") to get the same effect as if that
  936. flag had been specified in the boot command line. As noted in the
  937. help text cited above, you can also list the available default
  938. configurations with the "l" command.
  939. </Para>
  940. <Sect4>
  941. <Title>Selecting the Partition of <filename>etc/aboot.conf</filename></Title>
  942. <Para>
  943. When installed on a harddisk, <Literal remap="tt">aboot</Literal> needs to know what
  944. partition to search for the <filename>/etc/aboot.conf</filename> file. A newly
  945. compiled <Literal remap="tt">aboot</Literal> will search the <Emphasis>second</Emphasis> partition (e.g.,
  946. <filename>/dev/sda2</filename>). Since it would be inconvenient to have to
  947. recompile <Literal remap="tt">aboot</Literal> just to change the partition number,
  948. <Literal remap="tt">abootconf</Literal> allows to directly modify an installed <Literal remap="tt">aboot</Literal>.
  949. Specifically, if you want to change <Literal remap="tt">aboot</Literal> to use the <Emphasis>third</Emphasis>
  950. partition on disk <filename>/dev/sda</filename>, you'd use the command:
  951. <Screen>
  952. # abootconf /dev/sda 3
  953. </Screen>
  954. </Para>
  955. <Para>
  956. You can verify the current setting by simply omitting the partition
  957. number. That is: <command>abootconf /dev/sda</command> will print the currently
  958. selected partition number. Note that <Literal remap="tt">aboot</Literal> does have to be
  959. installed already for this command to succeed. As of version 0.6,
  960. <Literal remap="tt">swriteboot</Literal> it will preserve the existing configuration when
  961. installing a new <Literal remap="tt">aboot</Literal> on a hard disk.
  962. </Para>
  963. <Para>
  964. Since <Literal remap="tt">aboot</Literal> version 0.5, it is also possible to select the
  965. <filename>aboot.conf</filename> partition via the boot command line. This can
  966. be
  967. done with a command line of the form <Emphasis remap="it">a</Emphasis><Literal remap="tt">:</Literal><Emphasis remap="it">b</Emphasis>
  968. where <Emphasis remap="it">a</Emphasis>
  969. is the partition that holds <filename>etc/aboot.conf</filename> and <Emphasis remap="it">b</Emphasis> is a
  970. single-letter option as described above (<Literal remap="tt">0</Literal>-<Literal remap="tt">9</Literal>, <Literal remap="tt">i</Literal>, or
  971. <Literal remap="tt">h</Literal>). For example, if you type
  972. <command>boot -fl "3:h" dka100</command> the
  973. system boots from SCSI ID 1, loads <filename>etc/aboot.conf</filename> from the
  974. third partition, prints its contents on the screen and waits for you
  975. to enter the boot options.
  976. </Para>
  977. </Sect4>
  978. </Sect3>
  979. </Sect2>
  980. <Sect2 id="DHCP-and-BOOTPD-server-setup">
  981. <Title>Setting up a BOOTP capable server using DHCP</Title>
  982. <Para>
  983. The following configuration assumes that the server is running RH-6.2.
  984. Prerequisites packages are,
  985. <ItemizedList>
  986. <Listitem>
  987. <Para>
  988. dhcp-2.0.5
  989. </Para>
  990. </Listitem>
  991. <Listitem>
  992. <Para>
  993. tftp-server-0.16.5
  994. </Para>
  995. </Listitem>
  996. </Itemizedlist>
  997. </Para>
  998. <Sect3>
  999. <Title>DHCP & BOOTP configuation</Title>
  1000. <Para>
  1001. Once those packages are installed there are a few setup issues to take care of.
  1002. </Para>
  1003. <Para>
  1004. Create the default directory to which files will be pulled from using tftp.
  1005. </Para>
  1006. <Screen>
  1007. # mkdir /tftpboot
  1008. </Screen>
  1009. <Para>
  1010. Create the <filename>dhcp.leases</filename> file which is not create per default
  1011. (though it should be) when
  1012. you install the dhcp package so the dhcp server may start.
  1013. </Para>
  1014. <Screen>
  1015. # mkdir -p /var/state/dhcp
  1016. # touch /var/state/dhcp/dhcpd.leases
  1017. </Screen>
  1018. <Para>
  1019. Configure the inetd to accept the tftp service. Edit your
  1020. <filename>/etc/inetd.conf</filename> file and locate
  1021. the following line. Then uncomment it and save the file.
  1022. </Para>
  1023. <Screen>
  1024. #tftp dgram udp wait root /usr/sbin/tcpd in.tftpd
  1025. </Screen>
  1026. <Para>
  1027. Create the <filename>/etc/dhcp.conf</filename> configuation file. An example
  1028. config is provided below with the directives which allow BOOTP.
  1029. </Para>
  1030. <Screen>
  1031. subnet 192.168.1.0 netmask 255.255.255.0 {
  1032. option routers 192.168.1.1;
  1033. option subnet-mask 255.255.255.0;
  1034. option nis-domain "alphalinux.org";
  1035. option domain-name "alphalinux.org";
  1036. option domain-name-servers 192.168.1.2;
  1037. range 192.168.1.3 192.168.1.254;
  1038. range dynamic-bootp 192.168.1.3 192.168.1.254;
  1039. default-lease-time 21600;
  1040. max-lease-time 43200;
  1041. allow bootp;
  1042. allow booting;
  1043. filename "/tftpboot/vmlinux.bootp";
  1044. }
  1045. </Screen>
  1046. <Sect4>
  1047. <Title>Examination of <filename>/etc/dhcp.conf</filename></Title>
  1048. <Para>
  1049. There are four directives that you should be concerned with.
  1050. </Para>
  1051. <ItemizedList>
  1052. <Listitem>
  1053. <Para><Literal remap="tt">range dynamic-bootp 192.168.1.3 192.168.1.254;</Literal>
  1054. which defines the range of ip's available for bootp.
  1055. </Para></Listitem>
  1056. <Listitem><Para>
  1057. <Literal remap="tt">allow bootp;</Literal>
  1058. which tells the dhcp server to allow the bootp protocol..
  1059. </Para></Listitem>
  1060. <Listitem><Para>
  1061. <Literal remap="tt">allow booting;</Literal>
  1062. which tells the dhcp server to allow the transfer of the file specified
  1063. either in the the "filename" directive or passed in the "-file" flag in SRM.
  1064. </Para></Listitem>
  1065. <Listitem><Para>
  1066. <Literal remap="tt">filename "<filename>/tftpboot/vmlinux.bootp</filename>";</Literal>
  1067. which is the default file which is transferred and executed when no filename
  1068. specified in SRM as an argument.
  1069. </Para></Listitem>
  1070. </ItemizedList>
  1071. <Para>Lastly, Restart the inetd daemon so that the changes we made can take effect</Para>
  1072. <Screen># service inet restart</Screen>
  1073. <Para>You should now have a DHCP server that is capable of BOOTP.</Para>
  1074. </Sect4>
  1075. </Sect3>
  1076. <Sect3>
  1077. <Title id="bootpd-setup">bootpd configuration</Title>
  1078. <Para>
  1079. The bootpd is the older way of making a bootp server and for the most part is not used anymore
  1080. in lieu of more modern DHCP servers that are capable of handling the protocol with minimal configuration
  1081. and more flexibility. This style of setup does not allow just any client to be granted a BOOTP request.
  1082. Instead you must specify the ip address and MAC address of the allowed clients. Naturally this could get
  1083. quite tedious if you where say administrating more than a few machines.
  1084. </Para>
  1085. <Para>
  1086. bootpd rpms can be found on older versions of RedHat's distributions like version 5.2 and below. Note:
  1087. the rpm itself is named bootp though the package does contain the bootpd filename. It is available
  1088. for download at your favorite RedHat <ulink url="ftp://ftp.freesoftware.com/.1/linux/redhat/old-releases/redhat-5.2/alpha/RedHat/RPMS/">mirror</ulink>.
  1089. The bootp package requires the tftp-server just as before and the location to where the files are grabbed from is the same.
  1090. </Para>
  1091. <Para>
  1092. Once installed you must configure your inetd service to talk to the bootpd daemon. Uncomment the following line in your <filename>/etc/inetd.conf</filename>.
  1093. </Para>
  1094. <Screen>
  1095. #bootps dgram udp wait root /usr/sbin/tcpd bootpd
  1096. </Screen>
  1097. <Para>
  1098. Then restart the inetd.
  1099. </Para>
  1100. <Screen>
  1101. # service inet restart
  1102. </Screen>
  1103. <Para>
  1104. Configuring the <filename>/etc/bootptab</filename> file. The
  1105. <filename>bootptab</filename> file
  1106. has one entry describing each client that is allowed to boot from
  1107. the server. For example, if you want to boot the machine
  1108. <Literal remap="tt">voodoo.alphalinux.org</Literal>, then an entry of the following form would
  1109. be needed:
  1110. <Screen>
  1111. voodoo.alphalinux.org:\
  1112. :hd=/tftpboot/:bf=vmlinux.bootp:\
  1113. :ht=ethernet:ha=08012B1C51F8:hn:vm=rfc1048:\
  1114. :ip=192.12.69.254:bs=auto:
  1115. </Screen>
  1116. </Para>
  1117. <Para>
  1118. This entry assumes that the machine's Ethernet address is
  1119. <Literal remap="tt">08012B1C51F8</Literal> and that its IP address is 192.12.69.254. The
  1120. Ethernet address can be found with the <command>show device</command> command
  1121. of the SRM console or, if Linux is running, with the <command>ifconfig</command>
  1122. command.
  1123. The entry also defines that if the client does not specify otherwise,
  1124. the file that will be booted is <filename>vmlinux.bootp</filename> in directory
  1125. <filename>/tftpboot</filename>. For more information on configuring <Literal remap="tt">bootpd</Literal>,
  1126. please refer to its man page.
  1127. </Para>
  1128. </Sect3>
  1129. </Sect2>
  1130. <Sect2 id="Network-Booting">
  1131. <Title>Booting Over the Network</Title>
  1132. <Para>
  1133. Three steps are necessary before Linux can be booted via
  1134. a network. First you need an Ethernet adapter that is supported by SRM.
  1135. Most version of SRM support the DE500 series of cards, with newer
  1136. versions (5.6 and later) also supporting the Intel EtherExpress/Pro series
  1137. of cards.
  1138. Second, you need to set the SRM environment variables to
  1139. enable booting via the bootp protocol and third you need to setup
  1140. another machine as the your boot server. Enabling bootp in SRM is
  1141. usually done by setting the ewa0&lowbar;protocol (DE500 cards) or eia0&lowbar;protocol (Intel cards) variable to bootp.
  1142. <Screen>
  1143. &#62;&#62;&#62; set ewa0_protocol bootp
  1144. </Screen>
  1145. </Para>
  1146. <Para>
  1147. Also check to see that your ethernet device has a link light to whatever hub or switch it is connected to. If you
  1148. do not see a link light try forcing the negotiation of the ethernet device. For example:
  1149. </Para>
  1150. <Screen>
  1151. >>> set ewa0_mode FastFD
  1152. </Screen>
  1153. <Para> Would set the DE500 ethernet card to fast full duplex operation. To see a list of the available modes</Para>
  1154. <Screen>
  1155. >>> set ewa0_mode
  1156. </Screen>
  1157. <Para>
  1158. Netboot using the aboot sources is currently broken though for the curious the steps needed are further below. Instead use the directions for netbooting using the kernel sources.
  1159. </Para>
  1160. <Sect3>
  1161. <Title>Netboot using the kernel sources</Title>
  1162. <Para>
  1163. <OrderedList>
  1164. <Listitem>
  1165. <Para>
  1166. Make sure the kernel you want to boot has already been built
  1167. </Para>
  1168. </Listitem>
  1169. <Listitem>
  1170. <Para>
  1171. Execute the following while in the linux source dir:
  1172. <ItemizedList>
  1173. <Listitem>
  1174. <Para>
  1175. <Literal><command>make bootimage</command></Literal>
  1176. </Para>
  1177. </Listitem>
  1178. <Listitem>
  1179. <Para>
  1180. <Literal><command>make bootpfile</command></Literal>
  1181. </Para>
  1182. </Listitem>
  1183. </Itemizedlist>
  1184. </Para>
  1185. <Para>
  1186. This creates a uncompressed kernel named <filename>bootpfile</filename> located
  1187. in <filename>arch/alpha/boot/</filename>. Note that this kernel is
  1188. significantly larger than that produced by the aboot sources.
  1189. </Para>
  1190. </Listitem>
  1191. <Listitem>
  1192. <Para>
  1193. Copy bootpfile to the bootp server's directory. With a default setup the tftp server would look in
  1194. <filename>/tftpboot</filename> so copy <filename>bootpfile</filename> into
  1195. <filename>/tftpboot</filename>.
  1196. </Para>
  1197. </Listitem>
  1198. </Orderedlist>
  1199. </Para>
  1200. </Sect3>
  1201. <Sect3>
  1202. <Title>Netboot using the aboot sources</Title>
  1203. <Para>
  1204. <OrderedList>
  1205. <Listitem>
  1206. <Para>
  1207. Build aboot with with the command <command>make netboot</command>.
  1208. </Para>
  1209. </Listitem>
  1210. <Listitem>
  1211. <Para>
  1212. Make sure the kernel that you want to boot has been built already.
  1213. By default, the aboot Makefile uses the kernel in
  1214. <filename>/usr/src/linux/arch/alpha/boot/vmlinux.gz</filename> (edit the
  1215. Makefile if you want to use a different path). The result of
  1216. <command>make netboot</command> is a file called
  1217. <filename>vmlinux.bootp</filename>
  1218. which contains aboot and the Linux kernel, ready for network booting.
  1219. </Para>
  1220. </Listitem>
  1221. <Listitem>
  1222. <Para>
  1223. Copy <filename>vmlinux.bootp</filename> to the bootp server's directory. In the
  1224. example above, you'd copy it into <filename>/tftpboot/vmlinux.bootp</filename>.
  1225. </Para>
  1226. </Listitem>
  1227. </Orderedlist>
  1228. </Para>
  1229. <Para>
  1230. Next, power up the client machine and boot it, specifying the Ethernet adapter as the boot device. Typically, SRM calls the DEC based Ethernet adapter ewa0 and the Intel based adapter
  1231. eia0, so to boot from that device, you'd use the command:
  1232. <screen>
  1233. >>> boot ewa0
  1234. </screen>
  1235. </Para>
  1236. <Para>
  1237. The -fi and -fl options can be used as usual. For example,
  1238. </Para>
  1239. <Para>
  1240. <screen>
  1241. >>> boot ewa0 -fi bootpfile -fl "root=/dev/hda2"
  1242. </screen>
  1243. </Para>
  1244. <Para>
  1245. In particular, you can ask aboot to prompt for Linux kernel arguments by specifying the option
  1246. -fl i .
  1247. </Para>
  1248. </Sect3>
  1249. <Sect3>
  1250. <Title>Updating the SRM console through BOOTP</Title>
  1251. <Para>
  1252. Updating your SRM console over the network through BOOTP is just as easy as booting the Linux kernel
  1253. in the same manner. The hardware prerequisites are the same as netbooting Linux.
  1254. </Para>
  1255. <Para>
  1256. First you have to obtain an SRM image that is able to BOOTP over the network. These images normally
  1257. have a .exe extension. For DEC/Compaq/HP Alpha products these images can be found at
  1258. <ulink url="ftp://ftp.digital.com/pub/Digital/Alpha/firmware/">ftp://ftp.digital.com/pub/Digital/Alpha/firmware/</ulink>; you will need version 5.8 or later. For access you might need to use an proper ftp client. You can also find these files on the Alpha Systems Firmware Update CD-ROM. <ulink url="http://www.api-networks.com">API NetWorks</ulink> did not offer any net bootable SRM image.
  1259. </Para>
  1260. <!--
  1261. ftp://ftp.digital.com/pub/Digital/Alpha/firmware/index.html [openvms ask the wizard link]
  1262. or
  1263. ftp://ftp.digital.com/pub/DEC/Alpha/firmware/index.html [alpha site left nav firmware link]
  1264. but I think they are the same location.
  1265. ftp://ftp.digital.com/pub/Digital/Alpha/firmware/archive/ for old images
  1266. -->
  1267. <Para>
  1268. For example say you had a DS20 and wanted to update it's firmware over the network using BOOTP. You would have to,
  1269. <OrderedList>
  1270. <Listitem><Para>Get the correct firmware image for the DS20 that supported BOOTP execution which in this case the filename is
  1271. <filename>ds20_v5_8.exe</filename> from <ulink url="ftp://gatekeeper.dec.com/pub/DEC/Alpha/firmware/v5.8/">ftp://gatekeeper.dec.com/pub/DEC/Alpha/firmware/v5.8/</ulink>.</Para>
  1272. </Listitem>
  1273. <Listitem>
  1274. <Para>Copy the file to the <filename>/tftpboot</filename> folder located on the
  1275. BOOTP server.</Para> <!-- FIXME Folder vs. Directory -->
  1276. </Listitem>
  1277. </OrderedList>
  1278. </Para>
  1279. <Para>
  1280. To execute the update from SRM you would do the following:
  1281. </Para>
  1282. <Screen>>>> b ewa0 -fi ds20_v5_8.exe</Screen>
  1283. <Para>
  1284. SRM would then proceed to upgrade the firmware in the same fashion as if you had done the firmware update from a CD.
  1285. </Para>
  1286. </Sect3>
  1287. </Sect2>
  1288. <Sect2>
  1289. <Title>Partitioning Disks</Title>
  1290. <Sect3>
  1291. <Title>What is a disklabel?</Title>
  1292. <Para>
  1293. A disk label is a partition table. Unfortunately, there are several
  1294. formats the partition table can take, depending on the operating
  1295. system.
  1296. </Para>
  1297. <Para>
  1298. DOS partition tables are the standard used by Linux and
  1299. Windows. AlphaBIOS systems and every Linux kernel can read DOS
  1300. partition tables. Unfortunately, the SRM console's boot sector format
  1301. overlaps with parts of the DOS partition table on disk, and therefore
  1302. DOS partition tables cannot be used with SRM.
  1303. </Para>
  1304. <Para>
  1305. BSD disklabels are used by several variants of Unix, including
  1306. <productname>Tru64</productname>. SRM's boot block does not conflict with
  1307. the BSD disklabel (in
  1308. fact, the BSD disklabel resides entirely within "reserved" areas of
  1309. the first sector), and Linux can use a BSD disklabel, provided that
  1310. support for BSD disklabels has been compiled into the kernel.
  1311. </Para>
  1312. <Para>
  1313. To boot from a disk using SRM, a BSD disklabel is required. If the
  1314. disk is not a boot disk, the BSD disklabel is not required. A BSD
  1315. disklabel can be created using fdisk, the standard Linux disk
  1316. partitioning tool.
  1317. </Para>
  1318. </Sect3>
  1319. <Sect3>
  1320. <Title>Partitioning the Easy Way: a DOS Disklabel</Title>
  1321. <Para>
  1322. The simplest way to partition your disk is to let your Linux installer
  1323. do it for you, for example by using Red Hat's disk druid or fdisk. On
  1324. Red Hat 6.1, this will produce a valid BSD disklabel, but
  1325. <Emphasis>only</Emphasis> if the disk in question previously contained one. In
  1326. most cases, this will produce a DOS disklabel. It will be readable by
  1327. Linux, but you will not be able to boot from it via SRM. For this
  1328. reason, you will probably want to create a BSD disklabel manually in
  1329. order to boot Linux
  1330. </Para>
  1331. </Sect3>
  1332. <Sect3>
  1333. <Title>Partitioning with a BSD Disklabel</Title>
  1334. <Para>
  1335. <OrderedList>
  1336. <ListItem>
  1337. <Para>
  1338. Start fdisk on the disk you're configuring
  1339. </Para>
  1340. </ListItem>
  1341. <ListItem>
  1342. <Para>
  1343. Choose to make a BSD disklabel - option 'b' (newer versions of
  1344. fdisk will detect existing BSD disklabels and automatically enter
  1345. disklabel mode)
  1346. </Para>
  1347. </ListItem>
  1348. <ListItem>
  1349. <Para>
  1350. You'll notice some things: Partitions are letters instead of
  1351. numbers, from a-h Partition 'c' covers the whole of the disk. This is
  1352. the convention, don't touch it. While you can see it, note down the
  1353. disk parameters as you'll use them more often than with the
  1354. DOS-disklabel approach
  1355. </Para>
  1356. </ListItem>
  1357. <ListItem>
  1358. <Para>
  1359. Creating a new partition uses the same procedure as the
  1360. DOS-disklabel approach, except that the partitions are referred to by
  1361. letter instead of number. That is, 'n' to make a new partition
  1362. followed by the partition letter followed by the starting block
  1363. followed by the end block
  1364. </Para>
  1365. </ListItem>
  1366. <ListItem>
  1367. <Para>
  1368. Setting partition type is slightly different, because the
  1369. numbering scheme is different (1 is swap, 8 is ext2).
  1370. </Para>
  1371. </ListItem>
  1372. <ListItem>
  1373. <Para>
  1374. When you are finished, write ('w') and quit ('q') as normal.
  1375. </Para>
  1376. </ListItem>
  1377. </OrderedList>
  1378. </Para>
  1379. <Para>
  1380. There are some important catches that you must be aware of when
  1381. partitioning using a BSD disklabel:
  1382. <ItemizedList>
  1383. <ListItem>
  1384. <Para>
  1385. Partition 'a' should start about 1M into the disk: don't start
  1386. it at sector 1, try starting at sector 10 (for example). This leaves
  1387. plenty of space for writing the boot block (see below)
  1388. </Para>
  1389. </ListItem>
  1390. <ListItem>
  1391. <Para>
  1392. There is a bug in some versions of fdisk which makes the disk
  1393. look one sector bigger than it actually is. The listing when you
  1394. create the BSD disklabel is correct. The last sector of partition 'c'
  1395. is correct. The default last sector when creating a new partition is
  1396. 1 sector too big
  1397. </Para>
  1398. </ListItem>
  1399. <ListItem>
  1400. <Para>
  1401. Always adjust for this extra sector. This bug exists in the
  1402. version of fdisk shipped with Red Hat 6.0. Not making an adjustment
  1403. for this problem almost always leads to "Access beyond end of device"
  1404. errors from the Linux kernel.
  1405. </Para>
  1406. </ListItem>
  1407. </ItemizedList>
  1408. </Para>
  1409. <Para>
  1410. Once you have made a BSD disklabel, continue the installation. After
  1411. installation, you can write a boot block to your disk to make it
  1412. bootable from SRM.
  1413. </Para>
  1414. </Sect3>
  1415. </Sect2>
  1416. </Sect1>
  1417. <Sect1 id="SRM-sharingWithDEC">
  1418. <Title>Sharing a Disk With <productname>HP Tru64</productname></Title>
  1419. <Para>
  1420. Unfortunately, <productname>HP Tru64</productname> doesn't know anything about Linux, so sharing
  1421. a single disk between the two OSes is not entirely trivial. However,
  1422. it is not a difficult task if you heed the tips in this section. The
  1423. section assumes you are using <Literal remap="tt">aboot</Literal> version 0.5 or newer.
  1424. </Para>
  1425. <Sect2>
  1426. <Title>Partitioning the disk</Title>
  1427. <Para>
  1428. First and foremost: <Emphasis>never</Emphasis> use any of the Linux partitioning
  1429. programs (<Literal remap="tt">minlabel</Literal> or <Literal remap="tt">fdisk</Literal>) on a disk that is also
  1430. used by <productname>HP Tru64</productname>. The Linux <Literal remap="tt">minlabel</Literal> program uses the same
  1431. partition table format as <productname>HP Tru64</productname> <Literal remap="tt">disklabel</Literal>, but there are
  1432. some incompatibilities in the data that <Literal remap="tt">minlabel</Literal> fills in, so
  1433. <productname>HP Tru64</productname> will simply refuse to accept a partition table generated by
  1434. <Literal remap="tt">minlabel</Literal>. To setup a Linux <Literal remap="tt">ext2</Literal> partition under <productname>HP Tru64</productname>,
  1435. you'll have to change the disktab entry for your disk. For the
  1436. purpose of this discussion, let's assume that you have an rz26 disk (a
  1437. common 1GB drive) on which you want to install Linux. The disktab
  1438. entry under <productname>HP Tru64</productname> v3.2 looks like this (see file
  1439. <filename>/etc/disktab</filename>):
  1440. <Screen>
  1441. rz26|RZ26|DEC RZ26 Winchester:\
  1442. :ty=winchester:dt=SCSI:ns#57:nt#14:nc#2570:\
  1443. :oa#0:pa#131072:ba#8192:fa#1024:\
  1444. :ob#131072:pb#262144:bb#8192:fb#1024:\
  1445. :oc#0:pc#2050860:bc#8192:fc#1024:\
  1446. :od#393216:pd#552548:bd#8192:fd#1024:\
  1447. :oe#945764:pe#552548:be#8192:fe#1024:\
  1448. :of#1498312:pf#552548:bf#8192:ff#1024:\
  1449. :og#393216:pg#819200:bg#8192:fg#1024:\
  1450. :oh#1212416:ph#838444:bh#8192:fh#1024:
  1451. </Screen>
  1452. </Para>
  1453. <Para>
  1454. The interesting fields here are <Literal remap="tt">o</Literal><Emphasis remap="it">?</Emphasis>, and
  1455. <Literal remap="tt">p</Literal><Emphasis remap="it">?</Emphasis>, where <Emphasis remap="it">?</Emphasis> is a letter in the range
  1456. <Literal remap="tt">a</Literal>-<Literal remap="tt">h</Literal> (first through 8-th partition). The <Literal remap="tt">o</Literal>
  1457. value gives the starting offset of the partition (in sectors) and the
  1458. <Literal remap="tt">p</Literal> value gives the size of the partition (also in sectors).
  1459. See <Literal remap="tt">disktab</Literal>(4) for more info. Note that <productname>HP Tru64</productname> likes to
  1460. define overlapping partitions. For the entry above, the partition
  1461. layout looks like this (you can verify this by adding up the various
  1462. <Literal remap="tt">o</Literal> and <Literal remap="tt">p</Literal> values):
  1463. <Screen>
  1464. a b d e f
  1465. |---|-------|-----------|-----------|-----------|
  1466. c
  1467. |-----------------------------------------------|
  1468. g h
  1469. |-----------------|-----------------|
  1470. </Screen> <!-- FIXME This is screen? -->
  1471. </Para>
  1472. <Para>
  1473. <productname>HP Tru64</productname> insists that partition <Literal remap="tt">a</Literal> starts at offset 0 and that
  1474. partition <Literal remap="tt">c</Literal> spans the entire disk. Other than that, you can
  1475. setup the partition table any way you like.
  1476. </Para>
  1477. <Para>
  1478. Let's suppose you have <productname>HP Tru64</productname> using partition <Literal remap="tt">g</Literal> and want to
  1479. install Linux on partition <Literal remap="tt">h</Literal> with partition <Literal remap="tt">b</Literal> being a
  1480. (largish) swap partition. To get this layout without destroying the
  1481. existing <productname>HP Tru64</productname> partition, you need to set the partition types
  1482. explicitly. You can do this by adding a <Literal remap="tt">t</Literal> field for each
  1483. partition. In our case, we add the following line to the above
  1484. disktab entry.
  1485. <Screen>
  1486. :ta=unused:tb=swap:tg=4.2BSD:th=resrvd8:
  1487. </Screen>
  1488. </Para>
  1489. <Para>
  1490. Now why do we mark partition <Literal remap="tt">h</Literal> as "reservd8" instead of "ext2"?
  1491. Well, <productname>HP Tru64</productname> doesn't know about Linux. It so happens that partition
  1492. type "ext2" corresponds to a numeric value of 8, and <productname>HP Tru64</productname> uses the
  1493. string "reservd8" for that value. Thus, in <productname>HP Tru64</productname> speak, "reservd8"
  1494. means "ext2". OK, this was the hard part. Now we just need to
  1495. install the updated disktab entry on the disk. Let's assume the disk
  1496. has SCSI id 5. In this case, we'd do:
  1497. <Screen>
  1498. # disklabel -rw /dev/rrz5c rz26
  1499. </Screen>
  1500. </Para>
  1501. <Para>
  1502. You can verify that everything is all right by reading back the
  1503. disklabel with <command>disklabel -r /dev/rrz5c</command>. At this point, you
  1504. may want to reboot <productname>HP Tru64</productname> and make sure the existing <productname>HP Tru64</productname>
  1505. partition is still alive and well. If that is the case, you can shut
  1506. down the machine and start with the Linux installation. Be sure to
  1507. skip the disk partitioning step during the install. Since we already
  1508. installed a good partition table, you should be able to proceed and
  1509. select the 8th partition as the Linux root partition and the 2nd
  1510. partition as the swap partition. If the disk is, say, the second SCSI
  1511. disk in the machine, then the device name for these partitions would
  1512. be <filename>/dev/sdb8</filename> and <filename>/dev/sdb2</filename>,
  1513. respectively (note that
  1514. Linux uses letters to name the drives and numbers to name the
  1515. partitions, which is exactly reversed from what <productname>HP Tru64</productname> does; the
  1516. Linux scheme makes more sense, of course ;-).
  1517. </Para>
  1518. </Sect2>
  1519. <Sect2>
  1520. <Title>Installing <Literal remap="tt">aboot</Literal></Title>
  1521. <Para>
  1522. <Emphasis>First big caveat</Emphasis>: with the SRM firmware, you can boot one and
  1523. only one operating system per disk. For this reason, it is generally
  1524. best to have at least two SCSI disks in a machine that you want to
  1525. dual-boot between Linux and <productname>HP Tru64</productname>. Of course, you could also boot
  1526. Linux from a floppy if speed doesn't matter or over the network, if
  1527. you have a <Literal remap="tt">bootp</Literal>-capable server. But in this section we assume
  1528. you want to boot Linux from a disk that contains one or more <productname>HP Tru64</productname>
  1529. partitions.
  1530. </Para>
  1531. <Para>
  1532. <Emphasis>Second big caveat</Emphasis>: installing <Literal remap="tt">aboot</Literal> on a disk shared with
  1533. <productname>HP Tru64</productname> renders the first and third partition unusable (since those
  1534. <Emphasis>must</Emphasis> have a starting offset of 0). For this reason, we recommend
  1535. that you change the size of partition <Literal remap="tt">a</Literal> to something that is just
  1536. big enough to hold <Literal remap="tt">aboot</Literal> (1MB should be plenty).
  1537. </Para>
  1538. <Para>
  1539. Once these two caveats are taken care of, installing <Literal remap="tt">aboot</Literal> is
  1540. almost as easy as usual: since partition <Literal remap="tt">a</Literal> and <Literal remap="tt">c</Literal> will
  1541. overlap with <Literal remap="tt">aboot</Literal>, we need to tell <Literal remap="tt">swriteboot</Literal> that this is
  1542. indeed OK. We can do this under Linux with a command line of the
  1543. following form (again, assuming we're trying to install <Literal remap="tt">aboot</Literal> on
  1544. the second SCSI disk):
  1545. <Screen>
  1546. # swriteboot -f1 -f3 /dev/sdb bootlx
  1547. </Screen>
  1548. </Para>
  1549. <Para>
  1550. The <Literal remap="tt">-f1</Literal> means that we want to force writing
  1551. <filename>bootlx</filename> even
  1552. though it overlaps with partition 1. The corresponding applies for
  1553. partition 3.
  1554. </Para>
  1555. <Para>
  1556. This is it. You should now be able to shutdown the system and boot
  1557. Linux from the harddisk. In our example, the SRM command line to do
  1558. this would be:
  1559. <Screen>
  1560. &#62;&#62;&#62; boot dka5 -fi 8/vmlinux.gz -fl root=/dev/sdb8
  1561. </Screen>
  1562. </Para>
  1563. </Sect2>
  1564. </Sect1>
  1565. <Sect1 id="SRM-Distributions">
  1566. <Title>Installation of Distributions</Title>
  1567. <Sect2>
  1568. <Title>RedHat 6.0, 6.1 and 6.2</Title>
  1569. <Sect3>
  1570. <Title>Installation from the Red Hat 6.0, 6.1 or 6.2 CD</Title>
  1571. <Para>
  1572. Red Hat have made their distribution CD bootable from SRM console
  1573. <FOOTNOTE>
  1574. <Para>
  1575. Please note that through the official RedHat CD-ROM is SRM
  1576. bootable, copies made by various other companies may not be
  1577. bootable.
  1578. </Para>
  1579. </FOOTNOTE>
  1580. To start an installation, put the CD in and type
  1581. the following:
  1582. <Screen>
  1583. &#62;&#62;&#62; boot srm-device -file kernels/generic.gz -flags root=linux-device
  1584. </Screen>
  1585. </Para>
  1586. <Para>
  1587. In the above, the SRM device name and Linux device name for your
  1588. CD-ROM drive are needed. For Example if the machine had an IDE CD-ROM
  1589. installed as primary master the command would look like this:
  1590. <Screen>
  1591. &#62;&#62;&#62; boot dqa0 -file kernels/generic.gz -flags "root=/dev/hda"
  1592. </Screen>
  1593. </Para>
  1594. <Para>
  1595. See the section on <XRef LinkEnd="device-naming"> conventions if you don't know what these are.
  1596. </Para>
  1597. </Sect3>
  1598. </Sect2>
  1599. <!-- FIXME Newer RedHat ?? -->
  1600. <Sect2>
  1601. <Title>SuSE 6.1</Title>
  1602. <Sect3>
  1603. <Title>Installation from the SuSE 6.1 CD</Title>
  1604. <Para>
  1605. The SuSE 6.1 CD is not bootable from SRM console. SuSE have an
  1606. alternative approach which involves creating two boot floppies, the
  1607. images of which are included on the CD. The boot disks can be created
  1608. in various ways, depending on the systems you have available
  1609. </Para>
  1610. <Para>
  1611. Writing the boot disks from a linux system
  1612. The command to use is dd. From the mount-point of SuSE CD 1, the commands are:
  1613. <Screen>
  1614. # dd if=disks/aboot of=/dev/fd0
  1615. # dd if=disks/install of=/dev/fd0
  1616. </Screen>
  1617. </Para>
  1618. <Para>
  1619. For writing the boot disks from a windows system, the command to use
  1620. is rawrite. It is available on the CD.
  1621. <Screen>
  1622. D:\tools\&#62; rawrite
  1623. </Screen>
  1624. </Para>
  1625. <Para>
  1626. The program then prompts for input disk image and output disk
  1627. drive. Run this command once for each of the disk images as shown
  1628. above.
  1629. </Para>
  1630. <Para>
  1631. Starting the SuSE installer from the boot disks
  1632. With the floppy disk made from the aboot image in place, type:
  1633. <Screen>
  1634. &#62;&#62;&#62; boot dva0 -file vmlinux.gz -flags "root=/dev/fd0 load_ramdisk=1"
  1635. </Screen>
  1636. </Para>
  1637. <Para>
  1638. This will start the kernel, prompt you for the second boot disk, and start the installer
  1639. </Para>
  1640. </Sect3>
  1641. </Sect2>
  1642. <Sect2>
  1643. <Title>SuSE 6.3</Title>
  1644. <Sect3>
  1645. <Title>Installation from the SuSE 6.3 CD</Title>
  1646. <Para>
  1647. The SuSE 6.3 CD-ROM is SRM bootable much like the RedHat 6.0 and 6.1 CD-ROMs. The best way
  1648. to start the install from SRM is to use the following command:
  1649. <Screen>
  1650. &#62;&#62;&#62; boot srm-device -flags 0
  1651. </Screen>
  1652. </Para>
  1653. <Para>
  1654. In the above, the SRM device names for your
  1655. CD-ROM drive is needed. For example if the machine had an IDE CD-ROM
  1656. installed as primary master the command would look like this:
  1657. <Screen>
  1658. &#62;&#62;&#62; boot dqa0 -flags 0
  1659. </Screen>
  1660. SuSE has added support to aboot to allow it to load initrd files. The above command will from the
  1661. CD-ROM drive and use config number 0 from the <filename>/etc/aboot.conf</filename> file. For other variations
  1662. on this refer to the SuSE installation guide.
  1663. </Para>
  1664. </Sect3>
  1665. </Sect2>
  1666. <!-- FIXME Newer RedHat ?? -->
  1667. <!-- FIXME Debian ?? -->
  1668. </Sect1>
  1669. <Sect1 id="SRM-history">
  1670. <Title>Document History</Title>
  1671. <para>
  1672. v0.8.1 14th February 2004 Updated by Helge Kreutzmann <email>kreutzm@physik.uni-hannover.de</email>
  1673. </para>
  1674. <ItemizedList>
  1675. <listitem>
  1676. <para>
  1677. Introduced more SGML-Tags, updated DocBook-Version
  1678. </para>
  1679. </listitem>
  1680. <listitem>
  1681. <para>
  1682. Minor typographic corrections (e.g., whitespaces)
  1683. </para>
  1684. </listitem>
  1685. <listitem>
  1686. <para>
  1687. Fixed some (outdated) URLS
  1688. </para>
  1689. </listitem>
  1690. </ItemizedList>
  1691. <Para>
  1692. v0.8 9th November 2000 Changed from Rich Payne <email>rdp@alphalinux.org</email>
  1693. <ItemizedList>
  1694. <ListItem>
  1695. <Para>
  1696. Added section on SRM Device names
  1697. </Para>
  1698. </ListItem>
  1699. <ListItem>
  1700. <Para>
  1701. Many spelling/grammer fixes.
  1702. </Para>
  1703. </ListItem>
  1704. </ItemizedList>
  1705. </Para>
  1706. <Para>
  1707. v0.7.1 6th November 2000 Changes from Peter Petrakis <email>ppetrakis@alphalinux.org</email>
  1708. <ItemizedList>
  1709. <ListItem>
  1710. <Para>
  1711. Cleaned up netbooting section. Avoid duplicate information.
  1712. </Para>
  1713. </ListItem>
  1714. <ListItem>
  1715. <Para>
  1716. Added DHCP/BOOTP server configuration section.
  1717. </Para>
  1718. </ListItem>
  1719. <ListItem>
  1720. <Para>
  1721. Added SRM netbooting section.
  1722. </Para>
  1723. </ListItem>
  1724. <ListItem>
  1725. <Para>
  1726. Put the older bootpd configuration in it's own section and elaborated on it.
  1727. </Para>
  1728. </ListItem>
  1729. </ItemizedList>
  1730. </Para>
  1731. <Para>
  1732. v0.7 10th July 2000 Changes from Rich Payne <email>rdp@alphalinux.org</email>
  1733. <ItemizedList>
  1734. <ListItem>
  1735. <Para>
  1736. Updated for RedHat 6.2
  1737. </Para>
  1738. </ListItem>
  1739. <ListItem>
  1740. <Para>
  1741. Fixed aboot link for alphalinux.org and added CVS information.
  1742. </Para>
  1743. </ListItem>
  1744. <ListItem>
  1745. <Para>
  1746. Added additional netboot information from Peter Petrakis <email>ppetrakis@alphalinux.org</email>
  1747. </Para>
  1748. </ListItem>
  1749. </ItemizedList>
  1750. </Para>
  1751. <Para>
  1752. v0.6.1 21 March 2000 Changes from Rich Payne <email>rdp@alphalinux.org</email>
  1753. <ItemizedList>
  1754. <ListItem>
  1755. <Para>
  1756. Made the installation hints a new chapter
  1757. </Para>
  1758. </ListItem>
  1759. <ListItem>
  1760. <Para>
  1761. Added information on Netbooting
  1762. </Para>
  1763. </ListItem>
  1764. <ListItem>
  1765. <Para>
  1766. Added to the new section on RedHat 6.1 and BSD disklabels
  1767. </Para>
  1768. </ListItem>
  1769. <ListItem>
  1770. <Para>
  1771. Removed David Mosberger-Tang's name from the authors list
  1772. </Para>
  1773. </ListItem>
  1774. <ListItem>
  1775. <Para>
  1776. Marked a few of the feature as being in 0.6 only
  1777. </Para>
  1778. </ListItem>
  1779. <ListItem>
  1780. <Para>
  1781. Added info for SuSE 6.3 and RedHat 6.1
  1782. </Para>
  1783. </ListItem>
  1784. </ItemizedList>
  1785. </Para>
  1786. <Para>
  1787. v0.6 3 March 2000 Changes and information from David Huggins-Daines
  1788. <email>dhd@linuxcare.com</email>
  1789. <ItemizedList>
  1790. <ListItem>
  1791. <Para>
  1792. Moved the notes on MILO vs. SRM to an "About this document" section
  1793. </Para>
  1794. </ListItem>
  1795. <ListItem>
  1796. <Para>
  1797. Added sections on switching to SRM, and basic SRM usage
  1798. </Para>
  1799. </ListItem>
  1800. <ListItem>
  1801. <Para>
  1802. Added section on the new interactive use of aboot
  1803. </Para>
  1804. </ListItem>
  1805. <ListItem>
  1806. <Para>
  1807. Updated the note on DOS partition tables to mention the Red Hat 6.1
  1808. installer's behavior.
  1809. </Para>
  1810. </ListItem>
  1811. <ListItem>
  1812. <Para>
  1813. Normalized the markup, and codified the conventions used for
  1814. user-entered commands.
  1815. </Para>
  1816. </ListItem>
  1817. <ListItem>
  1818. <Para>
  1819. Corrected the notes on BSD disklabels (SRM does <Emphasis>not</Emphasis>
  1820. read BSD disklabels, it's just that they don't conflict with the boot
  1821. block).
  1822. </Para>
  1823. </ListItem>
  1824. </ItemizedList>
  1825. </Para>
  1826. <Para>
  1827. v0.5.2 5 December 1999 Added comments and information from Stig Telfer
  1828. (<email>stig@alpha-processor.com</email>).
  1829. <ItemizedList>
  1830. <ListItem>
  1831. <Para>
  1832. Added chart on SRM to Linux name mappings
  1833. </Para>
  1834. </ListItem>
  1835. <ListItem>
  1836. <Para>
  1837. Added RedHat 6.0 and SuSE 6.1 installation information
  1838. </Para>
  1839. </ListItem>
  1840. <ListItem>
  1841. <Para>
  1842. Added Disk Partitioning Information
  1843. </Para>
  1844. </ListItem>
  1845. </ItemizedList>
  1846. </Para>
  1847. <Para>
  1848. v0.5.1 (Not Released) 13 November 1999 Took the original 0.5 document and updated several parts:
  1849. </Para>
  1850. <Para>
  1851. <ItemizedList>
  1852. <ListItem>
  1853. <Para>
  1854. Update information on SRM booting from IDE devices
  1855. </Para>
  1856. </ListItem>
  1857. <ListItem>
  1858. <Para>
  1859. Fixed URL to aboot source
  1860. </Para>
  1861. </ListItem>
  1862. <ListItem>
  1863. <Para>
  1864. Update toc page to reflect MILO's future
  1865. </Para>
  1866. </ListItem>
  1867. <ListItem>
  1868. <Para>
  1869. Included information on bootdef&lowbar;dev and boot&lowbar;dev to chapter 3
  1870. </Para>
  1871. </ListItem>
  1872. <ListItem>
  1873. <Para>
  1874. Added this section
  1875. </Para>
  1876. </ListItem>
  1877. </ItemizedList>
  1878. </Para>
  1879. <Para>
  1880. v0.5 17 August 1996 - Original Document by David Mosberger-Tang
  1881. </Para>
  1882. </Sect1>
  1883. </Article>