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