2 This is the Bacula Rescue CD source directory. The some of the
3 scripts in this directory were dervied from Martin L. Purschke's
4 "Roll your own Linux Rescue or Setup CD". See:
5 http://www.phenix.bnl.gov/~purschke/RescueCD/ for more details.
6 This information was invaluable in creating this rescue disk.
7 However, not much of the original code (if any) remains.
9 The idea is to build a boot CD that contains a copy of your
10 current system that can be booted in an emergency to either
11 repair your filesystem, or to load Bacula to restore your
12 filesystem. Even though this boot CD is built from your system,
13 it can be booted on almost any system.
16 - A Linux system (known to work with RedHat Enterprise 3.0)
17 - It will boot and run on any hardware that isolinux can boot
20 To build an ISO image for burning a CD, you do the following:
23 ./configure (your-options)
38 When running these scripts, you should have few or no warnings.
40 You will probably also have a number of "Could not finds" under
43 As long as the script runs to completion, you can probably ignore
46 The Makefile will copy your kernel and some files it needs, then copy
47 your binary files as well as the shared libraries they need to run, and
48 finally, it will copy certain configuration components from your /etc
49 directory including your passwd file. And finally, it will collect the
50 information necessary to restore all your harddisks. You can find that
51 information in /bacula after the disk has booted. /bacula/bin will
52 contain a statically linked version of the current beta Bacula fd and
53 a default bacula-fd.conf file.
55 The ISO image will be left in:
59 When you boot the CD, always choose the default by hitting return.
60 When the system finishes booting you will be presented with a login
61 prompt at which point, you should login as root using the root password
62 from your system. Boot options other than the default have not be tested
63 (actually, I am going to remove them), and logging into any user other
64 than root is not likely to work.
67 - static-bacula-fd is not correctly built. This is probably due
68 to the fact that you have not pre-configured your Bacula source,
69 or that you have included options such as TLS that require
70 static libraries that are not loaded on your system. Try
71 simplifying your Bacula configure options, and try manually
72 building the static-bacula-fd.
73 - If your root account uses a shell other than /bin/sh, you will
74 need to add that shell to the rootsbin.list otherwise you
75 will not be able to login when you have booted your rescue
78 What do you have when you boot?
79 - Your kernel will be booted in a simplifed environment.
80 - Everything is running in a RAM disk file.
81 - Access to the CDROM in /cdrom and anything you put in cdtree will
82 be in the /cdrom directory.
83 - You will start in /root, with nothing unless you put it in
84 roottree/root before making the ISO.
85 - You will have a good number of standard Unix programs available.
86 Do an "ls -l /sbin" to see the list. To add more add them to
88 - A /lib containing all the shared libraries used by the programs in
89 /sbin. If you add more programs other than to rootsbin.list, you
90 will need to manually add any required shared libraries.
91 - A /lib/modules/kernel-name/ with all your kernel modules.
92 - An /etc directory containing a stripped down and modified version
93 of your system files. Everything is *vastly* simplified, and probably
94 not in the usual places, but many things such as your passwd file
96 - A /bacula-hostname directory containing the basic rescue disk contents
97 mentioned in the manual concerning the floppy rescue. Note,
98 hostname is the name of the host on which you built the CDROM
99 (this allows having multiple rescues on a single CDROM).
100 - A /bacula-hostname/bin directory containing a statically linked Bacula
101 from the current development stream, and a bacula-fd.conf file.
102 With this and the contents of the /bacula-hostname directory, you have
103 all the scripts necessary to reconstruct your hard disks, and to
104 launch a Bacula File daemon for restoring the system.
106 Adding your own files:
107 - Anything you put in the directory roottree will be
108 put into the initial ram disk, and loaded into memory.
109 This is the normal way to add files. However, the size of
110 the ramdisk file is limited to your machine's total
111 memory size. Currently, with the contents of a single
112 machine (you can actually put multiple machines on a
113 single CD), the size is about 50MB. Most machines today
115 - Anything you put in the directory cdtree will go on the
116 CDROM, but will not be loaded in memory. This means that
117 you must be able to mount the CDROM to read it -- normally
118 the CDROM should be automatically mounted when the system
119 boots, but the detection is not yet too good, so you may
120 need to manually mount it. On the other hand, anything you
121 add to cdtree can be read without booting it by simply
122 mounting the CDROM -- it also does not use precious
127 - make kernel --- rebuild the kernel files
128 - make binaries --- rebuild the binary files
129 - make bacula --- rebuild a static Bacula File daemon
130 and make a snapshot of your hard disk
132 - make initrd --- make a new ram disk image.
133 - make iso --- make a new ISO image.
134 - make scan --- use cdrecord to scan your scsi drivers for
136 - make blank --- blank a CD-RW disk (you may need to adjust
137 the dev= specification using the "make scan"
139 - make burn --- burn the ISO (you may need to adjust the
140 dev= specification using the "make scan" output).
144 - Test with SCSI boot.
145 - Look at doing some hardware detection in the second half of
148 The boot process works as follows:
149 - isolinux puts up the boot screen. According to what options you
150 select, it will boot.
151 - The whole roottree is in the initrd.img and will be loaded in
152 memory. It may take more time than you are used to to load.
153 - isolinux also loads the kernel and starts it. The kernel finds
155 - The script "linuxrc" in /roottree is run. This script is *very*
156 simple and doesn't do much other than mounting /proc and
157 remounting the root (/) read/write.
159 - When booting is complete, the init process is started and it calls
160 the script /etc/sysinit (in roottree) as determined by the setting
161 in /etc/inittab (i.e. the si entry).
163 - sysinit mounts the root filesystem as read write, sets up a few system
164 files, turns on logging, attempts to the cdrom on /cdrom. This is very
165 likely to fail. It is nothing to worry about, but means that unless
166 you manually mount the cdrom, you will not be able to access it.
167 To run the standard Bacula restore, there is no need to access the
168 cdrom after the boot. Then sysinit calls the
169 /etc/load_eth0 script, and finally, sysinit sets up the loop back interface.
171 - load_eth0 attempts to find and load the ethernet kernel module.
172 It does not, however, start the network.
174 - Then init follows the instructions in inittab for the run level
175 chosen (default 2), which is to call /etc/rc.d/rc 2
177 - rc tells init to switch to single user mode
179 - If the run level is greater than 2, rc calls /etc/start_network.sh,
180 which attempts to setup the network with dhcp. (some work needed here)
182 On a standard Linux system, the boot is almost the same. The root filesystem
183 and all the other files, including /linuxrc, that go in the initial ram image
184 (initrd) are made by the script /sbin/mkinitrd. Note, this is not used here,
185 we do the work ourselves in makeinitrd.
187 Reading an ISO image:
191 mount -o loop xxx.iso mnt
197 Unpacking an initrd.img:
200 mount -o loop xxx.iso mnt
201 cp mnt/isolinux/initrd.img initrd.gz
204 mount -o loop initrd mnt
206 mkbootdisk --device bootcd.iso --iso 2.6.10-1.770_FC3
208 http://www.xs4all.nl/~ekonijn/yaird/