Création live cd avec bootcdwrite

Bonjour, je souhaite créer un live cd de ma distri debian au cas ou j’aurais un gros plantage du système.
J’utilise debian etch avec toutes les mises à jour.
Dans le fichier de conf de bootcdwrite j’ai bien mis le chemin complet vers le kernel et initrd. Lorsque je test le live ca me marque

begin mounting root filesystem /init : /init 151 syntax error 0xauto kernel panic not syncing attempted to kill init !

J’espère que quelqu’un aura une idée pour résoudre mon pb.
Si besoin je posterais le fichier de conf complet de bootcdwrite

Merci d’avance

Salut,

Ben, poste… :wink:

salut

Voici le fichier de conf de bootcdwrite

bootcdwrite.conf

look for man bootcdwrite.conf(5) for more informations

this path was added as prefix to KERNEL, INITRD, DISABLE_CRON, NOT_TO_CD

and NOT_TO_RAM, if this are relativ paths (without starting “/”)

SRCDISK=/

Define the kernel which is used

KERNEL=/boot/vmlinuz-2.6.18-5-686

size of each ramdisk ram1 and ram2 (ram1: /dev /etc /home /root /tmp,

(ram2: /var)

RAMDISK_SIZE=750000

typ is CD or DVD

TYP=DVD

specify one or more CD devices to boot from, first is default

“auto” try to find the bootcd on all SCSI and IDE CDROMS

CDDEV=“auto /dev/hda /dev/hdb /dev/hdc /dev/hdd /dev/scd0 /dev/scd1”

Text to Display at Boottime (see syslinux doku)

This option is not supported for hppa

DISPLAY="/usr/share/bootcd/default.txt"

do some checks or not

DO_CHECK=yes

additional options for the kernel

APPEND=""

exclude some files or directories from writing to cd

NOT_TO_CD=""

exclude some files or directories from loading to ram

Because most people’s home and root dir are to large to include

in RAM, subdirectories can be excluded:

NOT_TO_RAM="$(find $SRCDISK/home $SRCDISK/root -maxdepth 1 -mindepth 1 -type d)"

If you are using ssh it is helpful to have a unique ssh hostkey for

each CD.

SSHHOSTKEY=yes

logfile

ERRLOG=/var/log/bootcdwrite.log

where the image resists after build

VAR=/var/spool/bootcd

FLOPPY_RUNTIME_DEV=|""

When you boot from cd you read changes from this device.

FLOPPY_RUNTIME_DEV=/dev/fd0

BOOTFLOPPY=yes|no

If you want to boot from FLOPPY specify BOOTFLOPPY=yes. This reduces

space on floppy used by bootcdflopcp. For this to work FLOPPY_CREATE_DEV

has to be specified.

For hppa this option is not supported and must be set to no.

Default:

BOOTFLOPPY=no

BOOTFLOPPY=no

If you want to boot several machines from the same cdrom, you must have

the individual configuartion (exp: /etc/network/interfaces) on floppy.

If one can not be mounted it is a good idea to stop booting and to wait

for manual interaction instead of comming up with a wrong configuration.

BOOT_ONLY_WITH_FLOPPY=no

delete some chached files in /var

CLEAN_VAR=yes

If FASTBOOT=yes then additional images for the ramdisk will be created

by bootcdwrite and copied to CD. This allows faster booting,

but needs extra space on CD

FASTBOOT=yes

use isolinux (yes,no,auto), auto check for isolinux and use it

ISOLINUX=auto

use -s (save, slow, stupid) option on syslinux

SYSLINUX_SAVE=yes

choose the architecture

ARCH=auto|hppa|i386|ia64

ARCH=auto

use devfs or not

DEVFS=no

path to initrd

INITRD="/boot/initrd.img-2.6.18-5-686"

addiditionel entries to fstab

TO_FSTAB="/dev/hdc1 /home ext3 defaults 1 1

/dev/usb0 /mnt/usb ext3 defaults 1 1 "

TO_FSTAB=""

transparent compression of ISO 9660/Rock Ridge filessytem

(“auto” checks for space to compress the image on the local system)

COMPRESS=<yes|no|auto>

COMPRESS=“auto”

Files or Directory-Trees that should never be compressed on CD can be listed

here. You have to define the Path as it is on the CD, (with /var.ro

instead of /var)

NOTCOMPRESSED=""

Files listed in DISABLE_CRON will be on the cdrom with a .no_run_on_bootcd

suffix so run-parts won’t execute them. The original file will be a link to

/bin/true.

DISABLE_CRON=“etc/cron.daily/find etc/cron.daily/standard etc/cron.daily/security”

With this variable you can add or delete some options

given to mkisofs by bootcdwrite.

Please create debian-bugreports if you have to use special

options, not mentioned here. Then I can list this options here.

MKISOFS_CHNG=""

function extra_changes()

It is possible to define a function called extra_changes to have some

files modified on the ISO image. Here is an example:

function extra_changes() {

echo “noname” >$VAR/changes/etc.ro/hostname

mkdir -p $VAR/changes/etc.ro/network

( echo “auto lo”

echo “iface lo inet loopback”

echo “”

echo “auto eth0”

echo “iface eth0 inet static”

echo " address 0.0.0.0"

echo " netmask 255.255.255.0"

) >$VAR/changes/etc.ro/network/interfaces

echo “127.0.0.1 localhost noname” >$VAR/changes/etc.ro/hosts

cat $SRCDISK/etc/passwd |

grep -v -e “^bs:” -e “^bianca:” -e “^tim:” >$VAR/changes/etc.ro/passwd

cat $SRCDISK/etc/shadow |

grep -v -e “^bs:” -e “^bianca:” -e “^tim:” >$VAR/changes/etc.ro/shadow

cat $SRCDISK/etc/group |

grep -v -e “^bs:” -e “^bianca:” -e “^tim:” >$VAR/changes/etc.ro/group

}

BOOTCDMODPROBE=standard|bootcd|auto

If booted from initrd bootcd has to load the necessarry modules.

If only modules provided by initramfs-tools are needed you can

specify “standard” here. If bootcd should try extra hard to load

neccessary modules you can specify “bootcd” here.

Bootcd will use discover for this purpose. So discover has to be installed.

If you specify auto, bootcd will check if discover is installed.

If it is installed # BOOTCDMODPROBE=bootcd will be set, if not

BOOTCDMODPROBE=standard will be set.

Be aware that people have reported, that sometimes BOOTCDMODPROBE=bootcd

may not work but sometimes it is needed.

BOOTCDMODPROBE=standard

Je rajoute aussi ce que m’a affiché la console losque j’ai crée le live cd. Dans les logs j’ai rien vu qui puisse résoudre mon pb.

[code]debian:/home/yoshx# bootcdwrite
To see full output: tail -f /var/log/bootcdwrite.log
— Checking for possible Problems —
/var will be cleaned (apt-get clean) !

Ok to continue? (y/n) y

— Cleanup —
20924 blocks
— Sizes in KByte (du -klsc ) —
NOT_TO_CD = . . . . . . . . . . . . . . . . . . . . . . . . . . . 0
CD_ALL (SRCDISK v NOT_TO_CD) = . . . . . . . . . . . . . . . . . . 2391776
Needed = CD_ALL - NOT_TO_CD . . . . . . . . . . . . . . . . . . . 2391776
DVD+ (4.7 billion bytes) = . . . . . . . . . . . . . . . . . . . . 4700000
because of compression perhaps double size = . . . . . . . . . . . 9400000
OK - SRCDISK does fit on DVD (Needed <= DVD)
VAR = . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35694532
OK - enough space in /var/spool/bootcd (Needed <= VAR)
NOT_TO_RAMCD (NOT_TO_RAM v NOT_TO_CD) = . . . . . . . . . . . . . 17916
RAM_ALL (etc v home v root v NOT_TO_RAM v NOT_TO_CD) = . . . . . . 42720
Needed RAM (RAM_ALL - NOT_TO_RAMCD) = . . . . . . . . . . . . . . 24804
90 % of RAM = . . . . . . . . . . . . . . . . . . . . . . . . . . 675000
OK - enough RAM (Needed RAM <= 90 % of RAM)
— Building Modifications —
— Creating /ram[1|2].cpio.gz for FASTBOOT —
— Creating CD-Image —
— Building input_dir for compression —
— Compressing input_dir to compressed_dir —
Warning: using transparent compression. This is a nonstandard Rock Ridge
extension. The resulting filesystem can only be transparently
read on Linux. On other operating systems you need to call
mkzftree by hand to decompress the files.
Unknown file type (unallocated) /var/spool/bootcd/compressed_dir/… - ignoring and continuing.
Size of boot image is 4 sectors -> No emulation
474352 extents written (926 MB)
— OUTPUT from <mkisofs -z -R -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o /var/spool/bootcd/cdimage /var/spool/bootcd/compressed_dir> —
Unknown file type (unallocated) /var/spool/bootcd/compressed_dir/… - ignoring and continuing.
— (e)xit ®edo (i)gnore — i
— Testing CD-Image —
work is done… find images in “/var/spool/bootcd” now!\n
— Cleanup —
debian:/home/yoshx#[/code]

Désolé pour la longueur du post :unamused:

Bon, j’ai pas la solution, mais en attendant l’avis d’un connaisseur:NOT_TO_RAM="$(find $SRCDISK/home $SRCDISK/root -maxdepth 1 -mindepth 1 -type d)"
je trouve ça bizarre, root ayant certainement besoin d’être actif quelque part en ram, non?

Salut Yosh :laughing:
Je suis pas spécialiste de bootcdwrite mais je pense que le problème vient de ton noyau.Je m’explique:
Apparemment tu utilises le noyau générique fourni par debian.Or le support pour cd doit etre en module :arrow_right: le kernel a besoin de charger les modules pour le lecteur cd qui se trouvent sur le cd (tu me suis?)
Donc je dirais qu’il y a 2 possibilités:
-Tu recompile toi-meme ton noyau pour mettre les modules qu’il faut en dur
-Tu télécharge le noyau debian ici (l’initrd de cette page ne doit pas fonctionner pour un live-cd)
Ou encore 3 eme possibilté (peut etre la plus simple)
Tu oublie bootcdwrite et tu utilise live-helper

Merci pour les infos, je vais compiler le noyau. Je vais bien finir par dompter la machine :wink:

yoshx
Je croit qu’on a le même objectif :smt006
forum.debian-fr.org/viewtopic.php?t=9951

Salut,
Oui j’ai vu ça. Je vais compiler le noyau et si ca marche je ferais un retour sur le forum pour le dire à moin que tu ne réussisse avant moi auquel cas je prendrais ta solution :wink:

il faut que tu compile le noyaux avec make uniquement ensuite tu recupere le /i386/boot/bzImage

Pour le initrd je sais pas s’il faut faire la compile complète et l’extraire des .deb ? mai je ne pense pas qu’il soie utile si tu plantes les driver en dur :unamused:

le risque c’est que en dure il n’on pas d’ordre précis quand il sont charger et sa peux faire un confli, d’ou l’interet de les mettre en module par contre tu te farci l’initrd.

J’ai tester la construction du prog.
En fait d’après ton script tu utilise un dvd, c est dire que tu prend toute la config actuel bref un truc de ouf.

Le principal problème est de déterminer la liste des fichier a exclure. car /usr contiens pas moins de 3 go voire plus
j’ai bien vu la ligne

NOT_TO_CD=

Mai je me voit pas exclure chaque fichier a la mano ?
il suis donc 2 question:

Comment déterminer les fichier critique (indispensable) pour un boot en console.

Comment configurer le fichier de configuration en conséquences ?

il scan depuis \ , ja’ essayer de changer cela par un répertoire ou debootstrap avais télécharger un configuration d’une etch.
mai évidement sa plante. logique puis qu’il ne trouve pas les fichier a la configuration actuel.

l’idéal serai donc de completer celle téléchargée par debootstrap, avec la configuration actuel. mai la je ne voit pas comment on si prend. bref c’est l’histoire du serpant qui ce mort la queue.

Une idée ? Autrement on est obliger de passer par un dvd et c est même pas sur que sa marche:(

le top arriver a faire en sorte que sa puisse démarrer un installateur de debian (come un cd d’install de debian) et éventuellement de charger la config actuel.