last 0.3 fixes
[hdw-linux/hdw-linux.git] / doc / INSTALL
1 # hdw - linux INSTALL file
2
3 this is a short introduction on how to install hdw-linux. you should have build
4 your hdw distro already or at least have the hdw-linux sources installed to use
5 the hdw-get script to install from precompiled binaries.
6 it is supposed to work, at least for me. though this may hurt your baby, be
7 warned. i mean it!
8
9 there are two diffrent ways of how to setup your hdw-linux system. the first
10 one assumes you have finished a build as explained in doc/BUILD. for the other
11 way you need to have the binary tarballs accessible which you may have created
12 after/during build procedure or on cd from someone else. please note that
13 hdw-get is able to fetch them from a http/ftp server too. i keep trying to
14 offer the binaries of the latest stable release on hackdaworld.dyndns.org,
15 mirrors appreciated! finally some configuration issues are discussed and the
16 system is prepared for reboot.
17
18 here we go ...
19
20 1. way - hdw-distro ready @ $hdw_build_dir
21 ------------------------------------------
22
23 in case your hdw-build directory alreday has been mounted on a seperated 
24 partition you may skip the following and read on at chapter 'final steps'.
25 otherwise copy over the hdw system to your target partition. please make sure
26 unmount the hdw related mounts which the scripts may not have umounted.
27         
28         example:
29
30         mke2fs <target partition>
31         mkdir -p /mnt/hdw-target
32         mount <target partition> /mnt/hdw-target
33         (feel free to create more partitions like /usr, /var, /boot and so on)
34         mke2fs <another partition>
35         mkdir -p /mnt/hdw-target/boot
36         mount <another partition> /mnt/hdw-target/boot
37
38         umount $hdw_build_dir/dev/{shm,pts}
39         umount $hdw_build_dir/{dev,sys,proc}
40         umount $hdw_build_dir/usr/src/hdw-linux/{download,binaries}
41         cp -a $hdw_build_dir/* /mnt/hdw-target
42
43 2. way - hdw-get
44 ----------------
45
46 hdw-get is a minimal packet manager used to install/remove packages from your
47 hdw distribution. please have a look at the hdw-get script, it is simple and
48 thus more easy to get its functionality. two diffrent ways using hde-get are
49 introduced now. the hdw-get script can be found in the hdw-linux source tree
50 in the ./misc/hdw-tools directory.
51
52         installing binaries explicitly pointing to them
53         -----------------------------------------------
54         in that case you may just install one package after another.
55         
56         example:
57
58         mke2fs <target partition>
59         mount <target partition> /mnt/hdw-target
60         (again feel free to create more partitions)
61
62         for i in /point/to/binaries/*.tar.bz2; do
63                 hdw-get install /mnt/hdw-target $i
64         done
65
66         this is not a nice way since what you want is more control of the
67         packages going to be installed. please try to use the next method.
68
69         install binaries according to a distribution package list
70         ---------------------------------------------------------
71         in that case binaries should be located in bin_dir or net_addr of your
72         hdw-get.conf file within the same directory structure as created by
73         scripts/Create-Binary. wget is needed if you want to fetch the binaries
74         via internet. please note that due to harddisk limitations binaries for
75         only one arch/optimization and hdw version can be offered via internet.
76         if you thnk this is bad and you could help out, please contact me!
77         
78         example:
79         
80         cat > /etc/hdw-get.conf << EOF
81         net_addr="http://hackdaworld.dyndns.org/download"
82         bin_addr="/usr/src/hdw-linux/binaries"
83         # note that there dont exist binaries of all versions/archs
84         hdw_version="0.3"
85         hdw_arch="ia32" ; hdw_arch_opt="i686"
86         EOF
87
88         ./scripts/Helper -create_dist_file
89         ./misc/hdw-tools/hdw-get dist-install /mnt/hdw-target \
90                                                 ./distro/<target name>
91
92         you may edit the distribution file, hdw-get should actually warn you
93         about runtime dependencies. please note that dependency checking is
94         still in development, even for the stable releases, so be sure you know
95         what you are doing.
96
97         hint: (how i am using hdw ...)
98                 o build target all-dev, skip packages that wont build by
99                   touching a logfile
100                 o upload all the created binaries to a networked computer with
101                   apache installed
102                 o boot your other debian/suse/old-hdw systems, get the hdw-linux
103                   sources, create appropriate distro files and run hdw-get
104                   (or even use an automated method using pxe boot,
105                    see ./doc/FAI)
106
107 final steps
108 -----------
109
110 |--------------------------------------------------------------------------|
111 | you may want/need to mount proc/sysfs somewhere in tis steps, simply do: |
112 | mount /proc ; mount /sys  (when you think its needed)                    | 
113 |--------------------------------------------------------------------------|
114
115 - chroot to your new build system and compile a new kernel
116   (you have to do this if you are not booting via nfsroot!)
117         
118         example:
119         
120         chroot /mnt/hdw-target /bin/bash \
121                 PATH="/sbin:/bin:/usr/sbin:/usr/bin" --login
122         cd /usr/src/linux
123         make menuconfig
124         (disable CONFIG_ROOT_NFS, if you are not booting via nfsroot!)
125         make dep bzImage modules modules_install
126
127 - yo may want to set a root password (default is 'hdw' iirc)
128         
129         example:
130         
131         passwd
132         (type your password, yes, type it twice :)
133
134 - leave the chroot (beside you are not installing from rescue disks or via FAI)
135   and make the kernel bootable
136
137         example:
138         
139         exit
140         cp /mnt/hdw-target/usr/src/linux/arch/i386/boot/bzImage \
141                 /boot/vmlinuz_hdw
142         vi /etc/lilo.conf
143         (add vmlinuz_hdw)
144         lilo
145
146 - create essential console and null nodes (!important!)
147
148         example:
149         
150         mknod -m 0666 /mnt/hdw-target/dev/null
151         mknod -m 0600 /mnt/hdw-target/dev/null
152
153         [ WARNING : your system will not start up without these nodes ]
154
155 - have a look at the config files in /mnt/hdw-target/etc/* and adjust to your 
156   needs. reboot then - good luck! ;)
157         
158         example:
159         
160         init 6
161
162
163 troubleshooting:
164 ----------------
165
166 - visit: irc.hackdaworld.dyndns.org, #hackdaworld
167 - visit: http://www.hackdaworld.dyndns.org/contents/mailing-list/
168 - visit: www.linuxfromscratch.org, www.linuxdoc.org, www.rocklinux.org ;)
169
170
171 regards hackbard