File: FAQ.bootcd

package info (click to toggle)
bootcd 4.05
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 544 kB
  • sloc: sh: 4,921; makefile: 90
file content (358 lines) | stat: -rw-r--r-- 13,301 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
Contents
0. Where to get help
1. Before Creating a bootcd
2. Creating a bootcd image
3. Burning the image or creating a liveusbstick
4. Booting from bootcd
5. Installing bootcd on Harddisk
6. Other
7. Known Bugs


0. Where to get help

0.1 
Q: What can I do if I find a bug in bootcd ?
A: Please send bootcd bugreports to debian


1. Before Creating a bootcd

1.1
Q: What has to be compiled in the kernel?
A: First of all, if you use a standard debian kernel from the rescue-disk
   everything should work. 
   
   This Question is only important for you if you have compiled your
   own kernel.

   To boot from bootcd the kernel must be able to read from cdrom.  
   A ramdisk is necessary to run bootcd. This has to be compiled built-in 
   in the kernel because it is needed before the kernel is able to load 
   additional modules.
   
   <*> means you must configure the feature as built-in.  <M> means you can
   configure the feature as built-in or as module. 
   If you use modules you have to make sure that the modules are loaded by
   editing /etc/modules.

   To build a bootcd with bootcdwrite you need:

     Block devices --->
       <M> Loopback device support	                    CONFIG_BLK_DEV_LOOP

     If you have an IDE Writer you need:
     							        BLK_DEV_IDESCSI 

       If your IDE Writer is normally accessable as 
       /dev/hdc for example you also have to put the 
       following in lilo.conf and run lilo:
         append="hdc=ide-scsi"

   To boot from bootcd you need:

     Block devices --->
       <*> RAM disk support                                  CONFIG_BLK_DEV_RAM
       <*> Initial RAM disk (initrd) support              CONFIG_BLK_DEV_INITRD

     File systems --->
       <*> Second extended fs support (for RAMDISK)              CONFIG_EXT2_FS
       <*> ISO 9660 CDROM file system support                 CONFIG_ISO9660_FS

     If you have a scsi CDROM Drive you need
       SCSI support --->
         <*> SCSI support
         <*> SCSI CD-ROM support      
         SCSI low-level drivers --->
           <*> "Driver for your scsi-card"

     If you have a non scsi CDROM Drive you need either:

       ATA/IDE/MFM/RLL support --->
         <*> ATA/IDE/MFM/RLL support
	 IDE, ATA and ATAPI Block devices --->
	   <*> Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support
	   <*> Include IDE/ATAPI CDROM support

     or you need:

       Old CD-ROM drivers (not SCSI, not IDE)  --->
         [*] Support non-SCSI/IDE/ATAPI CDROM drives
         <*> "Driver for your CDROM"

     If your CDROM doesn't support booting from it, you have to
     boot from an MSDOS Floppy. You need:

       File systems --->
         <*> DOS FAT fs support                                   CONFIG_FAT_FS
         <*> MSDOS fs support                                   CONFIG_MSDOS_FS
	 <*> VFAT (Windows-95) fs support                        CONFIG_VFAT_FS

1.2
Q: When I boot from bootcd I get error messages from depmod. What should I
   do?
A: depmod tries to write module dependencies on a read-only file on bootcd.
   Because nothing has changed, you can simply ignore this message. If you do 
   not want the message you have to change "depmod -a" to "depmod -A" in 
   /etc/init.d/modutils before running bootcdwrite.

1.3
Q: I want to use initrd. Can I use the default /boot/initrd.img-<KernelVersion>
A: You have to install bootcd-mkinitramfs. This will update your initrd.

1.4
Q: How can I enable DEVFS?
A: 1. Read /usr/src/linux/Documentation/filesystems/devfs/README
   2. Install devfsd (apt-get install devfsd)
   3. Read /usr/doc/devfsd/README.Debian 
   4. Compile your kernel with CONFIG_EXPERIMENTAL=y, CONFIG_DEVFS_FS=y and
      CONFIG_DEVFS_MOUNT=y
   5. Reboot

1.5 
Q: How can I use compression to get more data on one CD ?
A: You can use the transparent-compression ISO 9660/Rock Ridge filesystem.
   To do this you have to make sure your Kernel has the following Options:

     File systems  --->
     <*> ISO 9660 CDROM file system support                   CONFIG_ISO9660_FS
     [*]   Transparent decompression extension                    CONFIG_ZISOFS

1.6 
Q: How can I rebuild an initrd with initramfs-tools
A: update-initramfs -tu

1.7
Q: How can I reset network configuration on a bootcd ?
A: This is described in bootcdwrite.conf in the function extra_changes().

   
2. Creating a bootcd

2.1
Q: How can I use bootcd to run a diskless PC?
A: 1. Install another PC (that has disk and cd-burner) as usual. Be sure 
      not to use more than 650 MB.
   2. Build a bootcd with bootcdwrite from this PC.
   3. Run the diskless PC from the CD. 
   4. Save changes to a floppy with bootcdflopcp.
   5. Next time you boot, be sure the bios tries to boot the cd before the
      floppy.

2.2
Q: How can I use bootcd to install many PCs?
A: 1. Install a PC (that has a cd-burner) as usual. Be sure not to use 
      more than 650 MB.
   2. Build a bootcd with bootcdwrite.
   3. Boot one of the PCs you want to install with the bootcd.
   4. Be sure /etc/bootcd/bootcd2disk.conf has all Variables set to "auto"
   5. Use bootcd2disk. This will format the first disk, copy the cd to it
      and make it bootable
   6. Now boot from the PC and change hostname, ip-address ...

2.3
Q: I get an Error saying: "mkisofs finds 2 files with the same Rock Ridge name"
A: It was not possible to reproduce this kind of error on the authors machine. 
   But the error in the bug report says:
     mkisofs: Error: '/mnt/etc/cron.daily/find' and 
     '/var/spool/bootcd/changes/etc.ro/cron.daily/find'
     have the same Rock Ridge name 'find'.
   The bugreporter said a workaround was, to add $SRCDISK/etc/cron.daily to 
   NOT_TO_CD.


3. Burning the image or creating a liveusbstick

3.1
Q: How can I burn the image ?
A: For cdrom install cdrecord and see man cdrecord(1). Example
     cdrecord -scanbus
     cdrecord dev=0,2,0 -v -eject blank=fast
     cdrecord dev=0,2,0 -v -eject /var/spool/bootcd/cdimage.iso
   For dvd install package dvd+rw-tools and see man growisofs(1m). Example: 
     dvd+rw-format /dev/dvd
     growisofs -dvd-compat -Z /dev/dvd=/var/spool/bootcd/cdimage.iso

3.2
Q: How can I create a floppy ?
A: If you need to boot from floppy and to save changes made in ram you can
   do this:
     mount -o loop /var/spool/bootcd/cdimage.iso /mnt
     dd if=/mnt/cdboot.img of=/dev/fd0
     syslinux /dev/fd0
   If you need it only to save changes made in ram you can do this:
     mke2fs /dev/fd0

3.3 
Q: How to create a LiveUsbBootStick from a bootcd-iso
A: for example:
   the usb-stick is /dev/sdx
   the bootcd-iso is /var/spool/bootcd/cdimage.iso

   # Deleting usb-stick and create new partitions
   sgdisk -Z /dev/sdx
   sgdisk -n 1:0:+20M  -c 1:"BIOS boot partition" -t 1:ef02 /dev/sdx
   sgdisk -n 2:0:+100M -c 2:"partition for iso"   -t 2:8300 /dev/sdx
   sgdisk -N 3         -c 3:"unused partition"    -t 3:8300 /dev/sdx

   # Format partition for iso and mount it
   mkfs.ext3 /dev/sdx2
   mkdir -p /mnt/stick
   mount /dev/sdx2 /mnt/stick

   # install Grub
   grub-install --root-directory=/mnt/stick /dev/sdx

   # install bootcd-iso and rename it
   cp /var/spool/bootcd/cdimage.iso /mnt/stick/cdimage_1.iso

   # create grub.cfg
  cat <<END > /mnt/stick/boot/grub/grub.cfg
set default=0
set timeout=5

menuentry 'bootcd 1' {
        search --file --set root --no-floppy /cdimage_1.iso
        loopback loop /cdimage.iso
        linux (loop)/isolinux/vmlinuz root=iso:auto:/cdimage_1.iso bootcd=standard
        initrd (loop)/isolinux/initrd
}
END
   # umount stick
   umount /mnt/stick


4. Booting from bootcd

4.1
Q: Can I change the amount of RAM available for ramdisk at boottime?
A: This is no longer needed. Now tmpfs is used for ramdisks. 
   With tmpfs only the needed ram is allocated. The size of each ramdisk 
   defaults to half of physical RAM. 

4.2
Q: How can I use my bootcd on a PC which detects the CDROM as another device
   (not the device defined in bootcdwrite.conf as CDDEV)
A: Start booting again from the bootcd, interrupt and continue with 
   "linux root=/dev/sr0" (Or whatever your CD device is)

4.3
Q: What can I do if bootcd hangs at boot time
A: If the CD is burned and you get an error at boot time it's not easy 
   to find the problem. Therefor it is a good idea to edit /etc/default/rcS
   on the system that will be copied to cd and to set SULOGIN=yes to let
   sulogin be spawned on bootup.

   You can then login and do the boot steps manually to find the problem. This
   would be very helpful in a bug report.

   After login go to /etc/init.d and start the scripts bootcdram and bootcdflop.

5. Installing bootcd on Harddisk

5.1
Q: Performance problem: bootcd2disk is too slow. What can I do?
A: If your DVD drive is slow. Or if you have bootet from an virtual DVD drive
   like you do with HP ILO, bootcd2disk can be very slow. 

   With "bootcd2disk -url ..." you can copy your bootcd to your swap Partition
   temporarily. This works much faster.

5.2
Q: bootcd2disk does not delete all old logical volumes
A: Only if the disk will be reused again, bootcd2disk tries to delete them.
   You can manually delete the disks with "dd if=/dev/zero of=<disk> bs=1k count=1".
   Then you have to reboot.


6. Other

6.1
Q: How can I create a bootable Floppy Disk from a bootcd ?
A: You have to write the file /cdboot.img from the bootcd to Floppy. 
   Example: dd if=/cdrom/cdboot.img of=/dev/fd0
   The floppy now has a FAT Filesystem. If needed you can edit the file 
   syslinux.cfg and change the root device (See 3.2).

6.2 
Q: bootcd displays Warnings, can I ignore it ?
A: That depends. Some commands print messages on stdout or stderr or 
   return with non zero exitcodes. If those messages are not known
   by bootcd a warning will be displayed with the command that produced it. 
   You can now look at the command's manpage, before trying to redo the
   command or to ignore the message.

6.3
Q: How can I copy bootcd to disk for higher performance and mount the disk 
   read-only for security reasons?
A: This works like creating a liveusbstick.

6.4
Q: Can I use an USB memory stick as floppy replacement?
A: Yes. First of all set FLOPPY_RUNTIME_DEV="/dev/sda1" in your
   /etc/bootcd/bootcdwrite.conf. If you use a static compiled kernel with all
   needed drivers compiled into it your are done. If you use an initrd kernel
   you need to tweak some files. 

   Make sure the following modules are loaded:
   usb-storage

   Make sure all needed kernel modules are included in initrd. For example:
   /lib/modules/2.4.18-1-586tsc/kernel/drivers/usb/usbcore.o
   /lib/modules/2.4.18-1-586tsc/kernel/drivers/usb/usb-uhci.o
   /lib/modules/2.4.18-1-586tsc/kernel/drivers/usb/usb-ohci.o
   /lib/modules/2.4.18-1-586tsc/kernel/drivers/usb/storage/usb-storage.o
 
6.7 
Q: How can I enable or disable the bootcd hardware detection

A: Since version 2.56 it is possible to disable or enable the bootcd 
   hardware discovery method implemented in /usr/share/bootcd/bootcdmodprobe.
   The default behaviour can be configured with 
   BOOTCDMODPROBE=standard|bootcd in bootcdwrite.conf.

   When booting from CD this option will be transferred as Kernel
   commandline option "bootcd=standard" or "bootcd=bootcd". 

   You can redefine the commandline from the isolinux prompt for example as:
   "kernel=/isolinux/vmlinuz initrd=/isolinux/initrd root=auto \
   bootcd=standard"

6.8 
Q: Can I use bootcd to backup and restore redhat or suse?
A: You can create a bootcd which contains a backup (<bootcd-with-backup>) of 
   almost any linux system (<target-system>). 
   
   You can either do this backup online, or offline. 
   Online is good, if you do not want to stop the <target-system>. but be aware 
   of the fact, that the backup of a running database may be corrupt. 
   If you want to be sure, that everything is stopped, you may prefer to create
   an offline backup.

6.9
Q: Network interfaces from different lan cards changing order from time to time
   on booting from CD/DVD.
A: The drivers for lan cards are loaded as modules and it happends that the
   order changed beetween two boots. Since udev exists, this problem is 
   resolved by using the script /etc/udev/rules.d/*persistent-net.rules. 
   Bootcdwrite removes this script (UDEV_FIXNET=yes) because of wrong
   behavior if you install the CD/DVD on other machines. But at boottime it
   will be recreated.
   If you have a problem with the order of your network interfaces on a
   booted CD or machine (after bootcd2disk) and you want to change this 
   order do the following things:
   - remove the network modules (modprobe -r <name>)
   - remove /etc/udev/rules.d/*persistent-net.rules
   - load modules in order you want it

   The file /etc/udev/rules.d/*persistent-net.rules is created by udev
   and the order is persitent from now on.

6.10
Q: What are mountpoints /mnt/bootcd.* used for ?
A: /mnt/bootcd.disc is used to mount the disc written by bootcd2disk or 
                    to mount the disc read by bootcdwrite or bootcdbackupwizard
   /mnt/bootcd.aufs is used while booting from bootcd and shows files changed
                    in RAM. Only for information.
   /mnt/bootcd.ro   is used while booting from bootcd and shows the mounted
                    bootcd