README 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. These are sources and binaries for a Linux/Alpha boot file installer
  2. and disk partitioner. They're horrible, and should be destroyed.
  3. We're going to assume you don't have OSF/1, but want to use your hard
  4. drive. If you have OSF/1, what are you doing in here??!?!?!!?
  5. The program also assumes you have a SCSI disk with 512-byte sectors,
  6. tho it should work fine on an IDE drive as well. All sizes are
  7. specified on the command line in sectors.
  8. There are 8 partitions in total, and are numbered from 0 to 7.
  9. Partitions have to be added sequentially, as this program won't let
  10. you leave empty partitions unlike many BSD disklabel programs.
  11. First off, if you have an invalid disk label (you've never run this
  12. program before) you get to do
  13. sdisklabel /dev/sda zero
  14. (/dev/sda is the device you're partitioning, substitute as
  15. appropriate).
  16. This zeros out your disk label. Only do this if you really want to
  17. zero your disk label. It just does it; it doesn't ask, or warn, or
  18. anything.
  19. The program also probably printed out the size of your disk in K. If
  20. it was wrong, you now get to use the "size xxx" option along with the
  21. rest of these commands. The size isn't critical, it's just used to try
  22. and make sure you don't go past the end of the disk.
  23. Next, add your first partition. This *doesn't* start from 0, as you
  24. have to leave room for the boot loader and other stuff. 256K (or 512
  25. sectors) will be enough.
  26. Let's pretend that you want to make a 250000K partition starting
  27. from sector offset 512:
  28. sdisklabel /dev/sda 0 512 500000 8 print
  29. The last number is the filesystem type, and is currently 8 for ext2fs
  30. filesystems. (A different number would be used to specify an OSF/1
  31. partition, for example).
  32. If all was successful, the program should print out the partition (the
  33. last keyword, "print", specifies that it should print the partition
  34. after modifying it with the previous command), and you should see
  35. something like
  36. ----------------------------------------------------------------
  37. I think your disk is 528870K total size.
  38. If I'm wrong, override the size with the 'size num' option
  39. partition 0: type 8, starts sector 512, size 500000
  40. ----------------------------------------------------------------
  41. We can then add the next partition, which would be partition 1.
  42. To add a second partition that is 200000K long, we'd run
  43. sdisklabel /dev/sda 1 512256 400000 8 print
  44. And both partitions would then be printed out.
  45. If for some reason the size got determined incorrectly, we'd do
  46. instead
  47. sdisklabel /dev/sda size 528870 0 512 400000 8 print
  48. The size option should come immediately after the device name, and the
  49. size is the total # of sectors on the drive.
  50. That wasn't too bad, was it? The program doesn't do enough error
  51. checking, but it should work OK if you don't try to abuse it.
  52. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  53. Adding a bootstrap to the HD
  54. This isn't exactly trivial, and should be done immediately after
  55. setting up the partitions (but not before...). I can't be held
  56. responsible if the bootstrap writer wipes your drive-it does hardly
  57. any error checking, tho it tries to make sure that you're not going to
  58. wipe out any partitions before it starts writing.
  59. The program basically writes a raw binary image (*not* an a.out format file)
  60. to the disk starting from sector 2. This can be generated from an executable
  61. by using the arch/alpha/linux/tools/build program found in the kernel
  62. distribution, or the similar program in the aboot distributiion. So to
  63. install the bootloader in bootlx, assuming you've partitioned your disk (and
  64. left enough blank space between the start of the disk and the first
  65. partition to hold the bootloader):
  66. swriteboot /dev/sda bootlx
  67. When using aboot, you can also append a kernel image by using
  68. swriteboot /dev/sda bootlx vmlinux.gz
  69. If you invoke swriteboot with the '-v' option, it will be a bit more
  70. verbose.
  71. If you have to partition your disk with a program that does not allow to
  72. leave a blank (unpartitiones) space at the beginning for the bootloader,
  73. create a partition of the desired size instead. swriteboot will complain
  74. that the desired boot area overlaps with that partition, so you must use
  75. swriteboot -f# ...
  76. where # is the partition number to force overwriting this area.