Initial CAPS IPC structural encoding and decoding support. Note that the
[dragonfly.git] / nrelease / root / README
1                             DRAGONFLY CDROM README FILE
2
3     This CDROM boots DragonFly BSD.  Basically what you get is a full base
4     system on CD with certain critical directories, such as /tmp, remounted
5     read-write using MFS.  Your existing hard drive is not effected by
6     booting this CDROM.
7
8     NOTE!!! DRAGONFLY IS UNDERGOING DEVELOPMENT AND IS CONSIDERED
9     EXPERIMENTAL!  BSD RELATED EXPERIENCE IS RECOMMENDED WHEN USING
10     THIS CDROM.
11
12     If you just want to play with DragonFly and not mess with your hard disk,
13     this CDROM boots into a fully operational console-based system, though
14     without swap it should be noted that you are limited by available memory.
15
16                             AUTOMATIC INSTALLATION
17
18     We are currently developing automatic installation tools.  There are none
19     on this CD.
20
21                             MANUAL INSTALLATION
22
23     Manual installation of DragonFly onto an HD involve the following sequence
24     of commands.  You must be familiar with BSD style UNIX systems to do
25     installations manually.  The primary IDE hard drive is typically 'ad0'
26     and DragonFly is typically installed onto the first slice (ad0s1).
27     SCSI disks are named 'da[0-9]'.
28
29
30         # This COMPLETELY WIPES and repartitions your hard drive.  Sometimes
31         # old boot blocks can interfere with the initialization process, which
32         # is why we zero-out the start of the disk before running fdisk.
33         #
34         dd if=/dev/zero of=/dev/ad0 bs=32k count=16
35         fdisk -IB ad0
36
37         # This installs boot blocks onto the HD and verifies their 
38         # installation.  See note just above the 'reboot' below for
39         # things to try if it does not boot from your HD.
40         #
41         boot0cfg -B ad0
42         boot0cfg -v ad0
43
44         # This creates an initial label on the first slice of the HD.  If
45         # you have problems booting you could try wiping the first 32 blocks
46         # of the slice with dd and then reinstalling the label
47         #
48         # dd if=/dev/zero of=/dev/ad0s1 bs=32k count=16
49         disklabel -B -r -w ad0s1 auto
50
51         # Edit the label.  Create various standard partitions.  The typical
52         # configurations is:
53         #
54         #       ad0s1a  256m            This will be your /
55         #       ad0s1b  1024m           This will be your swap
56         #       ad0s1c                  (leave alone)
57         #       ad0s1d  256m            This will be your /var
58         #       ad0s1e  256m            This will be your /tmp
59         #       ad0s1f  8192m           This will be your /usr (min 4096m)
60         #       ad0s1g  *               All remaining space to your /home
61         #
62         #  An example disklabel can be found in /etc/disklabel.ad0s1
63         #
64         disklabel -e ad0s1
65
66         # Newfs (format) the various filesystems.  Softupdates is not 
67         # normally enabled on the root filesystem.
68         #
69         newfs /dev/ad0s1a
70         newfs -U /dev/ad0s1d
71         newfs -U /dev/ad0s1e
72         newfs -U /dev/ad0s1f
73         newfs -U /dev/ad0s1g
74
75         # Mount the filesystems
76         #
77         mount /dev/ad0s1a /mnt
78         mkdir /mnt/var
79         mkdir /mnt/tmp
80         mkdir /mnt/usr
81         mkdir /mnt/home
82         mount /dev/ad0s1d /mnt/var
83         mount /dev/ad0s1e /mnt/tmp
84         mount /dev/ad0s1f /mnt/usr
85         mount /dev/ad0s1g /mnt/home
86
87         # Copy the CDRom onto the target.  cpdup won't cross mount boundaries
88         # on the source (e.g. the MFS remounts) so it takes a few commands.
89         cpdup / /mnt
90         cpdup /var /mnt/var
91         cpdup /etc /mnt/etc
92         cpdup /dev /mnt/dev
93         cpdup /usr /mnt/usr
94
95         # Cleanup.  Also, with /tmp a partition it is usually reasonable
96         # to make /var/tmp a softlink to /tmp
97         #
98         chmod 1777 /mnt/tmp
99         rm -rf /mnt/var/tmp
100         ln -s /tmp /mnt/var/tmp
101
102         # Edit /mnt/etc/fstab to reflect the new mounts.  An example fstab
103         # file based on the above parameters exists as /mnt/etc/fstab.example
104         # which you can rename to /mnt/etc/fstab.
105         #
106         mv /mnt/etc/fstab.example /mnt/etc/fstab
107         vi /mnt/etc/fstab
108
109         # save out your disklabel just in case.  It's a good idea to save
110         # it to /etc so you can get at it from your backups.  You do intend
111         # to backup your system, yah? :-)  (this isn't critical but it's a
112         # good idea).
113         # 
114         disklabel ad0s1 > /mnt/etc/disklabel.ad0s1
115
116     Once you've duplicated the CD onto your HD you have to make some edits
117     so the system boots properly from your HD.  Primarily you must remove
118     or edit /mnt/boot/loader.conf
119
120         # Remove /mnt/boot/loader.conf so the kernel does not try to
121         # obtain the root filesystem from the CD, and remove the other
122         # cruft that was sitting on the CD that you don't need on the HD.
123         #
124         rm /mnt/boot/loader.conf
125         rm /mnt/README
126         rm /mnt/boot.catalog
127         rm -r /mnt/rr_moved
128
129     At this point it should be possible to reboot.  The CD may be locked
130     since it is currently mounted.  Be careful of the CD drawer closing
131     on you when you open it during the reboot.  Remove the CD and allow
132     the system to boot from the HD.
133
134     WARNING do not just hit reset, the kernel may not have written out
135     all the pending data to your HD.  Either unmount the HD partitions
136     or type reboot.
137
138     WHAT TO TRY IF IT WONT BOOT FROM YOUR HD.  There are a couple of things
139     to try.  If you can select CHS or LBA mode in your BIOS, try changing the
140     mode to LBA.  If that doesn't work boot from the CD again and use 
141     boot0cfg to turn on packet mode (boot0cfg -o packet ad0).
142
143         # reboot
144         reboot
145         (remove CD when convenient, be careful of the CD drawer closing on you)
146
147     Once you have a working HD based system you can clean up /etc/rc.conf
148     to enable things like cron, sendmail, setup your networking, and so
149     forth.  If 'ifconfig' does not show your networking device you could
150     try to kldload it from /modules.  With a recognized network device
151     you can ifconfig its IP address or, if you have a DHCP server on your
152     network, use 'dhclient <interfacename>' to obtain an IP address from
153     the netweork.
154
155             USING CVSUP TO OBTAIN A CVS TREE, PORTS, AND DOING BUILDWORLDS
156
157     cvsup can be used to obtain the DragonFly cvs repository, the FreeBSD 
158     ports tree, and so on and so forth.  'man cvsup' for more information on
159     its capabilities.  cvsup is a port (not part of the base system), but
160     it IS included on the CD.  The cvsup example files are in
161     /usr/share/examples/cvsup.  You will primarily be interested in the
162     DragonFly CVS repository, DragonFly-supfile, and the FreeBSD ports,
163     FreeBSD-ports-supfile.  Once you have done the initial cvsup of the
164     blocks of data that you want you may wish to create a cron job to
165     keep it all up to date.  However, please do not run an unattended cvsup
166     more then once a day.
167
168     # get the CVS pository (it is placed in /home/dcvs)
169     cvsup /usr/share/examples/cvsup/DragonFly-supfile
170     # install the source from the CVS hierarchy
171     cd /usr
172     cvs -R -d /home/dcvs checkout src
173     cvs -R -d /home/dcvs checkout dfports
174
175     # get the FreeBSD ports tree (it is directly broken out into /usr/ports)
176     cvsup -h cvsup.freebsd.org /usr/share/examples/cvsup/FreeBSD-ports-supfile
177
178     # buildworld and installworld examples
179     #
180     cd /usr/src
181     make buildworld
182     make installworld
183
184     # buildkernel and installkernel examples.  Create your own custom kernel
185     # config in /usr/src/sys/i386/conf/<YOURKERNEL> and you can build and
186     # install custom kernels.
187     #
188     # WARNING!  Always keep a fully working backup kernel in / in case
189     # you blow it.  Remember that /kernel.old is overwritten when you 
190     # make installkernel.  It is usually a good idea to maintain an emergency
191     # kernel as /kernel.GENERIC or /kernel.bak.  If all else fails you can
192     # still fall back to booting the CD.
193     #
194     cd /usr/src
195     make buildkernel KERNCONF=GENERIC
196     make installkernel KERNCONF=GENERIC
197
198                         EMERGENCY RECOVERY FROM THE CD
199
200     Lets say you blew up your kernel or something else in / and you need to
201     boot the CD to fix it.  Remember that you have a fully operational 
202     system when booting the CD, but that you have to fsck and mount your
203     hard drive (typically onto /mnt) to get at the contents of your HD.
204
205     Your HD is typically an IDE hard drive, so the device is typically
206     /dev/ad0.  DragonFly is typically on the first slice, which is
207     /dev/ad0s1, and the root partition is always in partition 'a',
208     which is /dev/ad0s1a.
209
210     # fsck root before trying to mount it.  
211     fsck /dev/ad0s1a
212     # mount root read-write onto /mnt
213     mount /dev/ad0s1a /mnt
214     # copy files from the CD as appropriate to make it possible to boot
215     # from your HD again.  Note that /mnt/kernel may be flags-protected.
216     chflags noschg /mnt/kernel
217     cp /kernel /mnt/kernel
218     cp /modules/* /mnt/modules/
219
220     If you want to mount other partitions from your HD but have forgotten
221     what they are, simply cat /mnt/etc/fstab after mounting the root
222     partition.
223
224 $DragonFly: src/nrelease/root/README,v 1.9 2004/01/27 18:28:22 dillon Exp $
225