14a08b684SThomas Nikolajsen DRAGONFLY 'Live CD' README FILE 2b816f770SMatthew Dillon 34a08b684SThomas Nikolajsen This CD/DVD/USB stick boots DragonFly BSD. Basically what you get is a 44a08b684SThomas Nikolajsen full base system on the media with certain critical directories, such as 54a08b684SThomas Nikolajsen /tmp, remounted read-write using TMPFS. Your existing hard drive is not 64a08b684SThomas Nikolajsen affected by booting this media. 74a08b684SThomas Nikolajsen 84a08b684SThomas Nikolajsen DragonFly 'Live CD' can be used from either CD, DVD or USB stick, in the 94a08b684SThomas Nikolajsen following the media is called 'CD' for brevity (nothing is specific to the 104a08b684SThomas Nikolajsen CD media). The DragonFly 'Live CD' is used for both trying out DragonFly, 114a08b684SThomas Nikolajsen installing DragonFly and for emergency repair of DragonFly systems. 12b816f770SMatthew Dillon 13b6a0a5cfSMatthew Dillon NOTE!!! DRAGONFLY IS UNDERGOING DEVELOPMENT AND IS CONSIDERED 14b6a0a5cfSMatthew Dillon EXPERIMENTAL! BSD RELATED EXPERIENCE IS RECOMMENDED WHEN USING 154a08b684SThomas Nikolajsen THIS CD. 16b816f770SMatthew Dillon 17b816f770SMatthew Dillon If you just want to play with DragonFly and not mess with your hard disk, 184a08b684SThomas Nikolajsen this CD boots into a fully operational console-based system, though 19b816f770SMatthew Dillon without swap it should be noted that you are limited by available memory. 2087c240feSMatthew Dillon It is a good idea to test your hardware for compatibility from a CD boot 2187c240feSMatthew Dillon before spending time installing the dist on your hard disk. 2287c240feSMatthew Dillon 23b816f770SMatthew Dillon 24b816f770SMatthew Dillon AUTOMATIC INSTALLATION 25b816f770SMatthew Dillon 26312e6f1dSChris Pressey There are currently two installation tools available - the installer, and 27312e6f1dSChris Pressey rconfig. 2889e4f808SMatthew Dillon 29312e6f1dSChris Pressey The installer can be run with a text-based (curses) user interface 30312e6f1dSChris Pressey from the serial console or a VTY, and provides a straightforward method 31312e6f1dSChris Pressey for installing DragonFly on your HD. To start it, just login with the 32312e6f1dSChris Pressey username 'installer'. 33312e6f1dSChris Pressey 34312e6f1dSChris Pressey The installer can also be run with a web-based (CGI) user interface. 35312e6f1dSChris Pressey To set this up manually is a bit of work, but much of it can be automated 36312e6f1dSChris Pressey by writing a couple of lines into a configuration file on a floppy disk 37312e6f1dSChris Pressey or USB pendrive, and inserting or attaching that to the computer before 384a08b684SThomas Nikolajsen booting the CD. See the file /etc/defaults/pfi.conf for more info. 3989e4f808SMatthew Dillon 4089e4f808SMatthew Dillon rconfig is a client/server protocol which requires a server (typically on 4189e4f808SMatthew Dillon the same network). An example server setup can be found in 4287c240feSMatthew Dillon /usr/share/examples/rconfig. If you have multiple machines you can setup 4387c240feSMatthew Dillon an installation script and run rconfig on a server and then install the 444a08b684SThomas Nikolajsen clients from CD boot with network connectivity (e.g. 'dhclient <if>') 4589e4f808SMatthew Dillon and then, typically, 'rconfig -a'. 4687c240feSMatthew Dillon 4789e4f808SMatthew Dillon You can also just boot from the CD, login as 'root' to get a shell 4889e4f808SMatthew Dillon prompt, copy the sample script to /tmp, edit, and run it directly 4989e4f808SMatthew Dillon (assuming that blowing away your existing disk is ok). 5087c240feSMatthew Dillon 5187c240feSMatthew Dillon 5287c240feSMatthew Dillon CONSOLE OPERATION 5387c240feSMatthew Dillon 5487c240feSMatthew Dillon The second stage boot (boot2) and third stage boot (loader) default 554a08b684SThomas Nikolajsen to dual serial & video console I/O. You can direct the boot output 5687c240feSMatthew Dillon to just the serial port by creating the file /boot.config with the 5787c240feSMatthew Dillon line '-h', or to just the screen using '-V'. If you wish to leave 5887c240feSMatthew Dillon boot2 in dual I/O mode but want the third stage to use just one or the 5987c240feSMatthew Dillon other, you can set the 'console' environment variable in /boot/loader.conf 604a08b684SThomas Nikolajsen to either 'vidconsole' or 'comconsole'. 6187c240feSMatthew Dillon 6287c240feSMatthew Dillon The dual serial port operation might have to be disabled if you use 6387c240feSMatthew Dillon the serial port for things like UPSs. Also note that by default 644a08b684SThomas Nikolajsen the CD will not run a login prompt on the serial port after booting is 654a08b684SThomas Nikolajsen complete. This can be enabled by editing the 'ttyd0' line in /etc/ttys 6687c240feSMatthew Dillon after installation is complete. 6787c240feSMatthew Dillon 6887c240feSMatthew Dillon Note that the kernel itself currently only supports one console or the 6987c240feSMatthew Dillon other. If both are enabled, the kernel will use the video console or 7087c240feSMatthew Dillon the last one for which input was received. 71b816f770SMatthew Dillon 72ba5e7b2fSChris Pressey 73b816f770SMatthew Dillon MANUAL INSTALLATION 74b816f770SMatthew Dillon 7587c240feSMatthew Dillon Manual installation of DragonFly onto an HD involves the following sequence 76b816f770SMatthew Dillon of commands. You must be familiar with BSD style UNIX systems to do 774a08b684SThomas Nikolajsen installations manually. The primary IDE hard drive is typically 'ad0', 784a08b684SThomas Nikolajsen if using AHCI, SILI or SCSI HD controller it is typically 'da0', and if 794a08b684SThomas Nikolajsen using USB HD controller it is typically 'da8'. 804a08b684SThomas Nikolajsen DragonFly is typically installed onto the first free slice (ad0s1 if disk 814a08b684SThomas Nikolajsen is empty, ad0s2 if your first slice contains another OS, etc). Be careful 824a08b684SThomas Nikolajsen to substitute the correct disk and partition name in the steps below. 834a08b684SThomas Nikolajsen 844a08b684SThomas Nikolajsen You need to decide which file system to use for DragonFly install: UFS or 854a08b684SThomas Nikolajsen HAMMER. UFS is the classical BSD file system and HAMMER is a newer and 864a08b684SThomas Nikolajsen more feature rich file system, HAMMER needs 50GB space at minimum, see 874a08b684SThomas Nikolajsen 'man HAMMER'. The installation is somewhat different depending on the 884a08b684SThomas Nikolajsen file system used. 89b816f770SMatthew Dillon 90dae36ee2SMatthew Dillon # OPTIONAL STEP: If your disk is already partitioned and you 91dae36ee2SMatthew Dillon # have a spare primary partition on which you want to install 924a08b684SThomas Nikolajsen # DragonFly, skip this step. However, sometimes old boot 93dae36ee2SMatthew Dillon # blocks or cruft in the boot area can interfere with the 94dae36ee2SMatthew Dillon # initialization process. A cure is to zero out the start of 95*bbb35c81SSascha Wildner # the disk before running fdisk. Replace 'ad0' with the chosen disk. 96dae36ee2SMatthew Dillon # 97dae36ee2SMatthew Dillon # WARNING: This COMPLETELY WIPES and repartitions your hard drive. 98572e6852SMatthew Dillon # 99572e6852SMatthew Dillon dd if=/dev/zero of=/dev/ad0 bs=32k count=16 100fb017d4eSChris Pressey fdisk -I ad0 101fb017d4eSChris Pressey fdisk -B ad0 102b816f770SMatthew Dillon 103dae36ee2SMatthew Dillon # If you didn't zero the disk as above, but have a spare slice 1044a08b684SThomas Nikolajsen # whose partition type you want to change to DragonFly, use fdisk(8). 105dae36ee2SMatthew Dillon 106b816f770SMatthew Dillon # This installs boot blocks onto the HD and verifies their 107b6a0a5cfSMatthew Dillon # installation. See note just above the 'reboot' below for 108dae36ee2SMatthew Dillon # things to try if it does not boot from your HD. If you 109dae36ee2SMatthew Dillon # already have a multi-OS bootloader installed you can skip 110dae36ee2SMatthew Dillon # this step. 111b6a0a5cfSMatthew Dillon # 112b816f770SMatthew Dillon boot0cfg -B ad0 113b816f770SMatthew Dillon boot0cfg -v ad0 114b816f770SMatthew Dillon 115dae36ee2SMatthew Dillon # This creates an initial label on the chosen slice of the HD. If 116b816f770SMatthew Dillon # you have problems booting you could try wiping the first 32 blocks 117dae36ee2SMatthew Dillon # of the slice with dd and then reinstalling the label. Replace 118dae36ee2SMatthew Dillon # 'ad0s1' with the chosen slice. 119b816f770SMatthew Dillon # 120b816f770SMatthew Dillon # dd if=/dev/zero of=/dev/ad0s1 bs=32k count=16 121b816f770SMatthew Dillon disklabel -B -r -w ad0s1 auto 122b816f770SMatthew Dillon 123b816f770SMatthew Dillon # Edit the label. Create various standard partitions. The typical 124ba5e7b2fSChris Pressey # configuration is: 125b816f770SMatthew Dillon # 1264a08b684SThomas Nikolajsen # UFS (fstype 4.2BSD): 1274a08b684SThomas Nikolajsen # ad0s1a 768m This will be your / 1284a08b684SThomas Nikolajsen # ad0s1b 4096m This will be your swap 129b816f770SMatthew Dillon # ad0s1c (leave alone) 1304a08b684SThomas Nikolajsen # ad0s1d 512m This will be your /var 1314a08b684SThomas Nikolajsen # ad0s1e 512m This will be your /tmp 132b816f770SMatthew Dillon # ad0s1f 8192m This will be your /usr (min 4096m) 1330dab2a93SMatthew Dillon # ad0s1g * All remaining space to your /home 134b816f770SMatthew Dillon # 1354a08b684SThomas Nikolajsen # HAMMER (fstype HAMMER): 1364a08b684SThomas Nikolajsen # ad0s1a 768m This will be your /boot; UFS 1374a08b684SThomas Nikolajsen # ad0s1b 4096m This will be your swap 1384a08b684SThomas Nikolajsen # ad0s1d * All remaining space to your /; HAMMER 1394a08b684SThomas Nikolajsen # 140ba5e7b2fSChris Pressey # An example disklabel can be found in /etc/disklabel.ad0s1. 1414e04bc29SMatthew Dillon # 142b816f770SMatthew Dillon disklabel -e ad0s1 143b816f770SMatthew Dillon 1444a08b684SThomas Nikolajsen # Newfs (format) the various file systems. 1454a08b684SThomas Nikolajsen # 1464a08b684SThomas Nikolajsen # UFS: 1474a08b684SThomas Nikolajsen # Softupdates is not normally enabled on the root file system because 1484a08b684SThomas Nikolajsen # large kernel or world installs/upgrades can run it out of space due 1494a08b684SThomas Nikolajsen # to softupdate's delayed bitmap freeing code. 150b816f770SMatthew Dillon # 151b816f770SMatthew Dillon newfs /dev/ad0s1a 152b816f770SMatthew Dillon newfs -U /dev/ad0s1d 153b816f770SMatthew Dillon newfs -U /dev/ad0s1e 154b816f770SMatthew Dillon newfs -U /dev/ad0s1f 155b816f770SMatthew Dillon newfs -U /dev/ad0s1g 1564a08b684SThomas Nikolajsen # 1574a08b684SThomas Nikolajsen # HAMMER: 1584a08b684SThomas Nikolajsen newfs /dev/ad0s1a 1594a08b684SThomas Nikolajsen newfs_hammer -L ROOT /dev/ad0s1d 160b816f770SMatthew Dillon 161ba5e7b2fSChris Pressey # Mount the file systems. 162b816f770SMatthew Dillon # 1634a08b684SThomas Nikolajsen # UFS: 164b816f770SMatthew Dillon mount /dev/ad0s1a /mnt 165b816f770SMatthew Dillon mkdir /mnt/var 166b816f770SMatthew Dillon mkdir /mnt/tmp 167b816f770SMatthew Dillon mkdir /mnt/usr 168b816f770SMatthew Dillon mkdir /mnt/home 169b816f770SMatthew Dillon mount /dev/ad0s1d /mnt/var 170b816f770SMatthew Dillon mount /dev/ad0s1e /mnt/tmp 171b816f770SMatthew Dillon mount /dev/ad0s1f /mnt/usr 172b816f770SMatthew Dillon mount /dev/ad0s1g /mnt/home 1734a08b684SThomas Nikolajsen # 1744a08b684SThomas Nikolajsen # HAMMER: 1754a08b684SThomas Nikolajsen mount -t hammer /dev/ad0s1d /mnt 1764a08b684SThomas Nikolajsen mkdir /mnt/boot 1774a08b684SThomas Nikolajsen mount /dev/ad0s1a /mnt/boot 1784a08b684SThomas Nikolajsen # Make HAMMER pseudo file systems (PFSs), and NULL mount them. 1794a08b684SThomas Nikolajsen # All PFSs share all space in a HAMMER file system, but policy on how 1804a08b684SThomas Nikolajsen # often to make snapshots, how long to keep them and general ability to 1814a08b684SThomas Nikolajsen # delete them is per PFS. Also mirroring (e.g. for backup) is done 1824a08b684SThomas Nikolajsen # per PFS. Typical setup is: 1834a08b684SThomas Nikolajsen # 1844a08b684SThomas Nikolajsen mkdir /mnt/pfs 1854a08b684SThomas Nikolajsen hammer pfs-master /mnt/pfs/var 1864a08b684SThomas Nikolajsen hammer pfs-master /mnt/pfs/var.crash 1874a08b684SThomas Nikolajsen hammer pfs-master /mnt/pfs/tmp 1884a08b684SThomas Nikolajsen hammer pfs-master /mnt/pfs/usr 1894a08b684SThomas Nikolajsen hammer pfs-master /mnt/pfs/usr.obj 1904a08b684SThomas Nikolajsen hammer pfs-master /mnt/pfs/home 1914a08b684SThomas Nikolajsen mkdir /mnt/var 1924a08b684SThomas Nikolajsen mkdir /mnt/tmp 1934a08b684SThomas Nikolajsen mkdir /mnt/usr 1944a08b684SThomas Nikolajsen mkdir /mnt/home 1954a08b684SThomas Nikolajsen mount -t null /mnt/pfs/var /mnt/var 1964a08b684SThomas Nikolajsen mount -t null /mnt/pfs/tmp /mnt/tmp 1974a08b684SThomas Nikolajsen mount -t null /mnt/pfs/usr /mnt/usr 1984a08b684SThomas Nikolajsen mount -t null /mnt/pfs/home /mnt/home 1994a08b684SThomas Nikolajsen mkdir /mnt/var/crash 2004a08b684SThomas Nikolajsen mkdir /mnt/usr/obj 2014a08b684SThomas Nikolajsen mount -t null /mnt/pfs/var.crash /mnt/var/crash 2024a08b684SThomas Nikolajsen mount -t null /mnt/pfs/usr.obj /mnt/usr/obj 2034a08b684SThomas Nikolajsen # add root file system to /boot/loader.conf 2044a08b684SThomas Nikolajsen echo 'vfs.root.mountfrom="hammer:ad0s1d"' >> /mnt/boot/loader.conf 205b816f770SMatthew Dillon 2064a08b684SThomas Nikolajsen 2074a08b684SThomas Nikolajsen # UFS & HAMMER: 2084a08b684SThomas Nikolajsen # Copy the CD onto the target. cpdup won't cross mount boundaries 2094a08b684SThomas Nikolajsen # on the source (e.g. the TMPFS remounts) or destination, so it takes 2104a08b684SThomas Nikolajsen # a few commands. 21121aa02d0SChris Pressey # 21221aa02d0SChris Pressey # Note that /etc contains the config files used for booting from the 2134a08b684SThomas Nikolajsen # CD itself, and /etc.hdd contains those for booting off a 21421aa02d0SChris Pressey # hard disk. So it's the latter that you want to copy to /mnt/etc. 21521aa02d0SChris Pressey # 216b816f770SMatthew Dillon cpdup / /mnt 2174a08b684SThomas Nikolajsen cpdup /boot /mnt/boot 218b816f770SMatthew Dillon cpdup /var /mnt/var 21921aa02d0SChris Pressey cpdup /etc.hdd /mnt/etc 220a3e78356SMatthew Dillon cpdup /usr /mnt/usr 221b816f770SMatthew Dillon 2227bd4a647SMatthew Dillon # Cleanup. Also, with /tmp a partition it is usually reasonable 223ba5e7b2fSChris Pressey # to make /var/tmp a softlink to /tmp. 2247bd4a647SMatthew Dillon # 2257bd4a647SMatthew Dillon chmod 1777 /mnt/tmp 2267bd4a647SMatthew Dillon rm -rf /mnt/var/tmp 2277bd4a647SMatthew Dillon ln -s /tmp /mnt/var/tmp 2287bd4a647SMatthew Dillon 229b816f770SMatthew Dillon # Edit /mnt/etc/fstab to reflect the new mounts. An example fstab 230b816f770SMatthew Dillon # file based on the above parameters exists as /mnt/etc/fstab.example 231b816f770SMatthew Dillon # which you can rename to /mnt/etc/fstab. 232b816f770SMatthew Dillon # 233b816f770SMatthew Dillon mv /mnt/etc/fstab.example /mnt/etc/fstab 234b816f770SMatthew Dillon vi /mnt/etc/fstab 235b816f770SMatthew Dillon 236ba5e7b2fSChris Pressey # Save out your disklabel just in case. It's a good idea to save 2374e04bc29SMatthew Dillon # it to /etc so you can get at it from your backups. You do intend 238ba5e7b2fSChris Pressey # to backup your system, yah? :-) (This isn't critical but it's a 2394e04bc29SMatthew Dillon # good idea). 2404e04bc29SMatthew Dillon # 2414e04bc29SMatthew Dillon disklabel ad0s1 > /mnt/etc/disklabel.ad0s1 2424e04bc29SMatthew Dillon 24387c240feSMatthew Dillon 24487c240feSMatthew Dillon MISC CLEANUPS BEFORE REBOOTING 24587c240feSMatthew Dillon 246b816f770SMatthew Dillon Once you've duplicated the CD onto your HD you have to make some edits 247b816f770SMatthew Dillon so the system boots properly from your HD. Primarily you must remove 248dae36ee2SMatthew Dillon or edit /mnt/boot/loader.conf, which exists on the CD to tell the kernel 249dae36ee2SMatthew Dillon to mount the CD's root partition. 250b816f770SMatthew Dillon 25187c240feSMatthew Dillon # Remove or edit /mnt/boot/loader.conf so the kernel does not try 25287c240feSMatthew Dillon # to obtain the root file system from the CD, and remove the other 2534e04bc29SMatthew Dillon # cruft that was sitting on the CD that you don't need on the HD. 254b816f770SMatthew Dillon # 255b816f770SMatthew Dillon rm /mnt/boot/loader.conf 256e3a14b1fSJoerg Sonnenberger rm /mnt/README* /mnt/autorun* /mnt/index.html /mnt/dflybsd.ico 2570dab2a93SMatthew Dillon rm /mnt/boot.catalog 2580dab2a93SMatthew Dillon rm -r /mnt/rr_moved 259b816f770SMatthew Dillon 260b816f770SMatthew Dillon At this point it should be possible to reboot. The CD may be locked 26187c240feSMatthew Dillon since it is currently mounted. To remove the CD, type 'halt' instead 26287c240feSMatthew Dillon of 'reboot', wait for the machine to halt, then the CD door should be 26387c240feSMatthew Dillon unlocked. Remove the CD and hit any key to reboot. 26487c240feSMatthew Dillon 26587c240feSMatthew Dillon Be careful of the CD drawer closing on you if you try to remove the CD 26687c240feSMatthew Dillon while the machine is undergoing a reboot or reset. 267b816f770SMatthew Dillon 268ba5e7b2fSChris Pressey WARNING: Do not just hit reset; the kernel may not have written out 269a3e78356SMatthew Dillon all the pending data to your HD. Either unmount the HD partitions 27087c240feSMatthew Dillon or type halt or reboot. 271a3e78356SMatthew Dillon 27287c240feSMatthew Dillon # halt 27387c240feSMatthew Dillon (let the machine halt) 274b816f770SMatthew Dillon (remove CD when convenient, be careful of the CD drawer closing on you) 27587c240feSMatthew Dillon (hit any key to reboot) 276b816f770SMatthew Dillon 27787c240feSMatthew Dillon 27887c240feSMatthew Dillon THE ACPI ISSUE 27987c240feSMatthew Dillon 28087c240feSMatthew Dillon You will notice in the boot menu that you can choose to boot with or 28187c240feSMatthew Dillon without ACPI. ACPI is an infrastructure designed to allow an operating 282ba5e7b2fSChris Pressey system to configure hardware devices associated with the system. 283ba5e7b2fSChris Pressey Unfortunately, as usual, PC BIOS makers have royally screwed up the 284ba5e7b2fSChris Pressey standard and ACPI is as likely to hurt as it is to help. Worse, some 285ba5e7b2fSChris Pressey PCs cannot be booted without it, so there is no good 'default' choice. 28687c240feSMatthew Dillon 28787c240feSMatthew Dillon The system will use ACPI by default. You can disable it in the default 28887c240feSMatthew Dillon boot by adding the line 'hint.acpi.0.disabled=1' in /boot/loader.conf. 28987c240feSMatthew Dillon If you boot without hitting any menu options the system will boot without 29087c240feSMatthew Dillon ACPI. To boot without ACPI no matter what, place 'unset acpi_load' in 29187c240feSMatthew Dillon our /boot/loader.conf instead. This is not recommended. 29287c240feSMatthew Dillon 29387c240feSMatthew Dillon 29487c240feSMatthew Dillon IF YOU HAVE PROBLEMS BOOTING FROM HD 29587c240feSMatthew Dillon 29673bc901dSSascha Wildner There are a couple of things to try. Try booting from the CD again and 29773bc901dSSascha Wildner use boot0cfg to turn off packet mode (boot0cfg -o nopacket ad0). If you 29873bc901dSSascha Wildner can select CHS or LBA mode in your BIOS, try changing the mode to LBA. 29973bc901dSSascha Wildner Also try booting with and without ACPI (option 1 or 2 in the boot menu). 300dae36ee2SMatthew Dillon 301b816f770SMatthew Dillon Once you have a working HD based system you can clean up /etc/rc.conf 302b816f770SMatthew Dillon to enable things like cron, sendmail, setup your networking, and so 303b816f770SMatthew Dillon forth. If 'ifconfig' does not show your networking device you could 3044a08b684SThomas Nikolajsen try to kldload it from /boot/kernel. With a recognized network device 305b816f770SMatthew Dillon you can ifconfig its IP address or, if you have a DHCP server on your 306b816f770SMatthew Dillon network, use 'dhclient <interfacename>' to obtain an IP address from 307513aa0c6SDavid Rhodus the network. 308b816f770SMatthew Dillon 309ba5e7b2fSChris Pressey 310a700883cSSascha Wildner USING GIT TO OBTAIN A SOURCE TREE AND DOING BUILDWORLDS 311b816f770SMatthew Dillon 312a700883cSSascha Wildner Instructions on how to obtain and maintain DragonFly source code using 313a700883cSSascha Wildner git are in the development(7) manual page. 3149c13f47cSMatthew Dillon 315a700883cSSascha Wildner To upgrade a DragonFly system from sources you run the following 316a700883cSSascha Wildner sequence: 3179c13f47cSMatthew Dillon 3189c13f47cSMatthew Dillon cd /usr/src 3199c13f47cSMatthew Dillon make buildworld 3204a08b684SThomas Nikolajsen make KERNCONF=<KERNELNAME> buildkernel 3214a08b684SThomas Nikolajsen make KERNCONF=<KERNELNAME> installkernel 3229c13f47cSMatthew Dillon make installworld 3239c13f47cSMatthew Dillon 324a700883cSSascha Wildner You will also want to run the 'upgrade' target to upgrade your /etc 325a700883cSSascha Wildner and the rest of your system. The upgrade target is aware of stale 326a700883cSSascha Wildner files created by older DragonFly installations and should delete them 327a700883cSSascha Wildner automatically. 328a700883cSSascha Wildner 329a700883cSSascha Wildner make upgrade 330a700883cSSascha Wildner 331a700883cSSascha Wildner See the build(7) manual page for further information. 332a700883cSSascha Wildner 333a700883cSSascha Wildner Once you've done a full build of the world and kernel you can do 334a700883cSSascha Wildner incremental upgrades of either by using the 'quickworld' and 335a700883cSSascha Wildner 'quickkernel' targets instead of 'buildworld' and 'buildkernel'. If 336a700883cSSascha Wildner you have any problems with the quick targets, try updating your repo 337a700883cSSascha Wildner first, and then a full buildworld and buildkernel as shown above, before 338a700883cSSascha Wildner asking for help. 3399c13f47cSMatthew Dillon 340ba5e7b2fSChris Pressey 34145fa0bf8SSascha Wildner OBTAINING A DPORTS TREE TO BUILD/INSTALL PACKAGES 342cacc9236SSascha Wildner 34345fa0bf8SSascha Wildner In order to obtain a reasonably current snapshot of the dports tree, use 3444a08b684SThomas Nikolajsen our repo: 345cacc9236SSascha Wildner 3464a08b684SThomas Nikolajsen cd /usr 3474a08b684SThomas Nikolajsen make help 34845fa0bf8SSascha Wildner make dports-create 349cacc9236SSascha Wildner 3504a08b684SThomas Nikolajsen This tree can then be kept up to date with: 351cacc9236SSascha Wildner 3524a08b684SThomas Nikolajsen cd /usr 35345fa0bf8SSascha Wildner make dports-update 354cacc9236SSascha Wildner 355cacc9236SSascha Wildner 3564a08b684SThomas Nikolajsen EMERGENCY RECOVERY FROM THE 'Live CD' 3579c13f47cSMatthew Dillon 3589c13f47cSMatthew Dillon Lets say you blew up your kernel or something else in / and you need to 3594a08b684SThomas Nikolajsen boot the 'Live CD' to fix it. Remember that you have a fully operational 3604a08b684SThomas Nikolajsen system when booting the 'Live CD', but that you have to fsck and mount your 3619c13f47cSMatthew Dillon hard drive (typically onto /mnt) to get at the contents of your HD. 3629c13f47cSMatthew Dillon 3634a08b684SThomas Nikolajsen Your HD is typically an IDE hard drive, so the device is typically 'ad0', 3644a08b684SThomas Nikolajsen if using AHCI, SILI or SCSI HD controller it is typically 'da0', and if 3654a08b684SThomas Nikolajsen using USB HD controller it is typically 'da8'. Steps below will use 'ad0', 3664a08b684SThomas Nikolajsen be careful to substitute the correct disk name below. 3679c13f47cSMatthew Dillon 3684a08b684SThomas Nikolajsen DragonFly is typically on the first slice, which is /dev/ad0s1. For UFS 3694a08b684SThomas Nikolajsen setup the root partition is always in partition 'a', which is /dev/ad0s1a. 3704a08b684SThomas Nikolajsen For HAMMER setup the typical setup is that boot partition is partition 'a', 3714a08b684SThomas Nikolajsen and root partition is partition 'd'. 3724a08b684SThomas Nikolajsen 3734a08b684SThomas Nikolajsen # UFS: 3749c13f47cSMatthew Dillon # fsck root before trying to mount it. 3759c13f47cSMatthew Dillon fsck /dev/ad0s1a 3769c13f47cSMatthew Dillon # mount root read-write onto /mnt 3779c13f47cSMatthew Dillon mount /dev/ad0s1a /mnt 3784a08b684SThomas Nikolajsen # 3794a08b684SThomas Nikolajsen # HAMMER: 3804a08b684SThomas Nikolajsen # fsck boot before trying to mount it. 3814a08b684SThomas Nikolajsen fsck /dev/ad0s1a 3824a08b684SThomas Nikolajsen # mount root read-write onto /mnt 3834a08b684SThomas Nikolajsen mount -t hammer /dev/ad0s1d /mnt 3844a08b684SThomas Nikolajsen # mount boot read-write onto /mnt/boot 3854a08b684SThomas Nikolajsen mount /dev/ad0s1a /mnt/boot 3864a08b684SThomas Nikolajsen # 3879c13f47cSMatthew Dillon # copy files from the CD as appropriate to make it possible to boot 3884a08b684SThomas Nikolajsen # from your HD again. Note that /mnt/boot/kernel/kernel may be 3894a08b684SThomas Nikolajsen # flags-protected. 3904a08b684SThomas Nikolajsen chflags noschg /mnt/boot/kernel/kernel 3914a08b684SThomas Nikolajsen cp /boot/kernel/* /mnt/boot/kernel 3929c13f47cSMatthew Dillon 3939c13f47cSMatthew Dillon If you want to mount other partitions from your HD but have forgotten 3944a08b684SThomas Nikolajsen what they are, simply cat /mnt/etc/fstab after mounting the root partition. 395