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)
25 cd <bacula-source>/rescue/linux/cdrom
37 When running these scripts, you should have few or no warnings.
39 You will probably also have a number of "Could not finds" under
42 As long as the script runs to completion, you can probably ignore
45 The Makefile will copy your kernel and some files it needs, then copy
46 your binary files as well as the shared libraries they need to run, and
47 finally, it will copy certain configuration components from your /etc
48 directory including your passwd file. And finally, it will collect the
49 information necessary to restore all your harddisks. You can find that
50 information in /bacula after the disk has booted. /bacula/bin will
51 contain a statically linked version of the current beta Bacula fd and
52 a default bacula-fd.conf file.
54 The ISO image will be left in:
58 When you boot the CD, always choose the default by hitting return.
59 When the system finishes booting you will be presented with a login
60 prompt at which point, you should login as root using the root password
61 from your system. Boot options other than the default have not be tested
62 (actually, I am going to remove them), and logging into any user other
63 than root is not likely to work.
65 What do you have when you boot?
66 - Your kernel will be booted in a simplifed environment.
67 - Everything is running in a RAM disk file.
68 - Access to the CDROM in /cdrom and anything you put in cdtree will
69 be in the /cdrom directory.
70 - You will start in /root, with nothing unless you put it in
71 roottree/root before making the ISO.
72 - You will have a good number of standard Unix programs available.
73 Do an "ls -l /sbin" to see the list. To add more add them to
75 - A /lib containing all the shared libraries used by the programs in
76 /sbin. If you add more programs other than to rootsbin.list, you
77 will need to manually add any required shared libraries.
78 - A /lib/modules/kernel-name/ with all your kernel modules.
79 - An /etc directory containing a stripped down and modified version
80 of your system files. Everything is *vastly* simplified, and probably
81 not in the usual places, but many things such as your passwd file
83 - A /bacula-hostname directory containing the basic rescue disk contents
84 mentioned in the manual concerning the floppy rescue. Note,
85 hostname is the name of the host on which you built the CDROM
86 (this allows having multiple rescues on a single CDROM).
87 - A /bacula-hostname/bin directory containing a statically linked Bacula
88 from the current development stream, and a bacula-fd.conf file.
89 With this and the contents of the /bacula-hostname directory, you have
90 all the scripts necessary to reconstruct your hard disks, and to
91 launch a Bacula File daemon for restoring the system.
93 Adding your own files:
94 - Anything you put in the directory roottree will be
95 put into the initial ram disk, and loaded into memory.
96 This is the normal way to add files. However, the size of
97 the ramdisk file is limited to your machine's total
98 memory size. Currently, with the contents of a single
99 machine (you can actually put multiple machines on a
100 single CD), the size is about 50MB. Most machines today
102 - Anything you put in the directory cdtree will go on the
103 CDROM, but will not be loaded in memory. This means that
104 you must be able to mount the CDROM to read it -- normally
105 the CDROM should be automatically mounted when the system
106 boots, but the detection is not yet too good, so you may
107 need to manually mount it. On the other hand, anything you
108 add to cdtree can be read without booting it by simply
109 mounting the CDROM -- it also does not use precious
114 - make kernel --- rebuild the kernel files
115 - make binaries --- rebuild the binary files
116 - make bacula --- rebuild a static Bacula File daemon
117 and make a snapshot of your hard disk
119 - make initrd --- make a new ram disk image.
120 - make iso --- make a new ISO image.
121 - make scan --- use cdrecord to scan your scsi drivers for
123 - make blank --- blank a CD-RW disk (you may need to adjust
124 the dev= specification using the "make scan"
126 - make burn --- burn the ISO (you may need to adjust the
127 dev= specification using the "make scan" output).
131 - Test with SCSI boot.
132 - Look at doing some hardware detection in the second half of
135 The boot process works as follows:
136 - isolinux puts up the boot screen. According to what options you
137 select, it will boot.
138 - The whole roottree is in the initrd.img and will be loaded in
139 memory. It may take more time than you are used to to load.
140 - isolinux also loads the kernel and starts it. The kernel finds
142 - The script "linuxrc" in /roottree is run. This script is *very*
143 simple and doesn't do much other than mounting /proc and
144 remounting the root (/) read/write.
146 - When booting is complete, the init process is started and it calls
147 the script /etc/sysinit (in roottree) as determined by the setting
148 in /etc/inittab (i.e. the si entry).
150 - sysinit mounts the root filesystem as read write, sets up a few system
151 files, turns on logging, attempts to the cdrom on /cdrom. This is very
152 likely to fail. It is nothing to worry about, but means that unless
153 you manually mount the cdrom, you will not be able to access it.
154 To run the standard Bacula restore, there is no need to access the
155 cdrom after the boot. Then sysinit calls the
156 /etc/load_eth0 script, and finally, sysinit sets up the loop back interface.
158 - load_eth0 attempts to find and load the ethernet kernel module.
159 It does not, however, start the network.
161 - Then init follows the instructions in inittab for the run level
162 chosen (default 2), which is to call /etc/rc.d/rc 2
164 - rc tells init to switch to single user mode
166 - If the run level is greater than 2, rc calls /etc/start_network.sh,
167 which attempts to setup the network with dhcp. (some work needed here)
169 On a standard Linux system, the boot is almost the same. The root filesystem
170 and all the other files, including /linuxrc, that go in the initial ram image
171 (initrd) are made by the script /sbin/mkinitrd. Note, this is not used here,
172 we do the work ourselves in makeinitrd.
174 Reading an ISO image:
178 mount -o loop xxx.iso mnt
184 Unpacking an initrd.img:
187 mount -o loop xxx.iso mnt
188 cp mnt/isolinux/initrd.img initrd.gz
191 mount -o loop initrd mnt
193 mkbootdisk --device bootcd.iso --iso 2.6.10-1.770_FC3
195 http://www.xs4all.nl/~ekonijn/yaird/