Q: I downloaded a prebuilt live image. How do I put it on a USB stick?
A: See Section 3.3.1, “Copying USB/HDD image to a USB stick” "Copying USB/HDD image to a USB stick"
Q: How do I log my build?
A: You could use script, screen or tee:
$ lh_build 2>&1 | tee build.log
Q: How can I convert an already installed standard Debian partition into a Debian Live system?
A: Save the list of installed packages and load it into your new Debian Live System. Copy your /etc to config/chroot_local-includes
Q: What does 'losetup: could not find any free loop device' mean and how do I fix it?
A: Loop devices are used during the build; there probably aren't any free if you've aborted several builds. Something like: for l in /dev/loop0 /dev/loop1 /dev/loop2 /dev/loop3 /dev/loop4 /dev/loop5 /dev/loop6 /dev/loop7 ; do losetup -d $l ; done should rectify the situation (assuming all loop devices in use were created by lh_build; if in doubt, check the contents of each loop device before deleting them with losetup -d).
Q: How do I launch an interactive shell during the chroot stage?
A: To enable interactive shell:
$ lh_config --interactive shell
To continue the build process:
# logout
or
# exit
To disable interactive shell, set LH_INTERACTIVE to "disabled" in config/chroot.
Q: What is the root /user password?
A: The user password for the live user is 'live'. By default, there is not any root password. You can switch to root with
sudo -i
or set a password for root with
sudo passwd
Q: How do I change root or any user password?
A: Add a chroot local hook script to change root or any user password each time you build an image.
e.g. config/chroot_local-hooks/01-update_password.sh to set root password to "nopasswd"
#!/bin/sh echo "I: update password" echo "root:nopasswd" | chpasswd
$ chmod +x config/chroot_local-hooks/01-update_password.sh
mkdir -p config/chroot_local-includes/usr/share/initramfs-tools/scripts/live-bottom/ cp /usr/share/initramfs-tools/scripts/live-bottom/10adduser config/chroot_local-includes/usr/share/initramfs-tools/scripts/live-bottom/
Then edit the config/chroot_local-includes/usr/share/initramfs-tools/scripts/live-bottom/10adduser and paste in the new user_crypted password that you make with:
echo "newlivepass" | mkpasswd -s.
Or add an hook file in config/chroot_local-hooks/ with something like the below:
#!/bin/sh # Change the autogenerated user password to "debianlive" plain_password="debianlive" password=$(echo "${plain_password}" | mkpasswd -s) sed -i -e 's/\(user_crypted=\)\(.*\)\( #.*\)/\1\"'${password}'\"\3/' /usr/share/initramfs-tools/scripts/live-bottom/10adduser update-initramfs -tu -kall
The latter (hook model) could be more future proof than the former solution since it modifies just one string selectively but it requires the package "whois" to be installed on the target system (for mkpasswd) or that you generate the $password string not at build time and include it crypted in the above script.
Q: How to disable autologin?
A1: use the commandline parameter
lh config --bootappend-live "noautologin"
A2: You need to set boot=noautologin noxautologin as described in man
live-initramfs
If you boot via TFTP you want to insert
the option to pxelinux.cfg/default
Q: How do I change default hostname or username?
A: To change default hostname or username:
$ lh_config --hostname myhostname $ lh_config --username myusername
Q: How do I make the final image smaller?
A: Clean orphaned apps/libs: Install package "deborphan" and then run 'sudo deborphan -n' . Delete unwanted packages. Remove the apt cache. Purge unwanted locales (see "localepurge" package).
Q: How do I customize bash-config permanently (aliases, bash-completion etc.)?
A: Add your own .bashrc config/chroot_local-includes/etc/skel/.bashrc
Q: How do I disable services permanently? (Be careful!)
A: Add a chroot local hook script to disable a service each time you build an image:
e.g. config/chroot_local-hooks/01-disable_service.sh
#!/bin/sh echo "I: disable service" update-rc.d -f 〈service name 〉 remove
$ chmod +x config/chroot_local-hooks/01-disable_service.sh
Q: How do I enable | disable the md5checksum at the ISO building?
lh_config --checksums enabled|disabled
Or change the LH_CHECKSUMS value.
Q: How to disable the generation of the .tar.gz file?
lh_config --net-tarball none|gzip
Or change the LH_NET_TARBALL value. (only available in snapsshot version at the moment 2008/Feb/28)
Q: How do I "build a new image" ?
A: Run commands:
$ sudo lh_clean --binary $ sudo lh_build
Hint: If the configuration had changed you should leave "--binary" out. This will clean your chroot directory too.
Q: How do I use Fluxbox ?
A: Add a new lists file with the fluxbox packages you want.
Create /home/$USERNAME/.dmrc file (default username is "user").
$ cat .dmrc [Desktop] Session=fluxbox
See also http://wiki.debian.org/Fluxbox
A short HOWTO can be found here: http://wiki.debian.org/MichaelAblassmeier/CustomLiveCD
Q: How do I use custom repositories?
Q: How do I customize the artwork for the live CD (grub or syslinux boot splash, usplash, etc.)?
A: See DebianLive/Howto/Custom_Artwork. FIXME: NEED TO UPDATE
Q: How do I customize desktop environment (KDE, GNOME, XFCE, etc...) look?
A: Start the live system in qemu:
$ qemu -m 256 -cdrom binary.iso -boot d -redir tcp:4222:10.0.2.15:22
Q: How do I execute a custom shell script inside the chroot system after the chroot stage?
A: Add your script in config/chroot_local-hooks.
Q: How do I add a script running immediately after all other scripts when the live system boots?
A: Add your script in config/chroot_local-includes/usr/share/initramfs-tools/scripts/live-bottom/99script
$ chmod +x config/chroot_local-includes/usr/share/initramfs-tools/scripts/live-bottom/99script
You must also use the example script /usr/share/live-helper/examples/hooks/update-initramfs.sh to ensure your script gets built into the initramfs (read the comment header for instructions).
Q: How do I add software not in Debian ?
A: See Section 5.1, “Customising package installation” Customising package installation
Q: What is the manifest with Ubuntu used for?
A: Manifest is just the package list, which ubuntu does $something with. Don't worry about it.
Q: What is this {p} syntax with mtools{p} and parted{p} ?
A: That's aptitude.
Q: Do I need to write the image on USB stick to test it?
Q: What is /cow ?
A: Copy-on-write, the 'diff' from unionfs.
Q: Is /usr/share/live-helper/lists/standard-x11 like preseed or is preseed something else entirely?
A: It is not. It is a package list, not a debconf preseeding.
Q: What is the difference between standard and minimal?
standard: packages of priority standard and higher;
minimal: packages of priority essential and higher;
Q: What can the sections be used for? Aren't they BIG?
A: Someone maybe wants to include packages from contrib or non-free.
Q: memtest86+ ... is that used?
A: Yes
Q: How do I build using predefined packages lists?
A: e.g. to build using standard-x11 packages list:
$ sudo lh_config -p standard-x11 $ sudo lh_build
Q: How do I rebuild without downloading all the packages again?
A: All packages are cached in cache subdirectory. They remain until a clean purge:
$ sudo lh_clean --purge
You do not have to do anything to prevent packages from being re-downloaded. You need to remember to clean whichever stages you want to rebuild first.
e.g. to rebuild from the cached bootstrap, chroot packages and build a new image.
$ sudo lh_clean $ sudo lh_build
Q: How do I boot USB debian-live on systems not supporting USB boot?
A: Make a boot CD with grub, configured to boot from a debian-live kernel copied on the cd structure.
$ mkdir -p iso/boot/grub $ cp /usr/lib/grub/i386-pc/stage2_eltorito iso/boot/grub $ cp chroot/boot/* iso/boot/
Create iso/boot/grub/menu.lst
default 0 timeout 5 color cyan/blue white/blue title Debian Live root (cd) kernel /boot/vmlinuz boot=live initrd /boot/initrd.img
Create the iso image
$ mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot \ -boot-load-size 4 -boot-info-table -o grub.iso iso
Burn the image.
Q: How do I boot debian-live on systems not supporting CDROM or USB boot?
A: If you have a floppy drive, you may be able to use it, otherwise you will need to use loadlin/grub4dos/win32-loader. If you have a second system to serve up the image over the network, See DebianLive/Howto/Creating_a_Netboot_Image. FIXME LINK
Q: The X configuration does not seems to work, the resolution is too low. What can I do?
A: Use xdebconfigurator
$ lh_config --bootappend xdebconf $ lh_config --packages xdebconfigurator
Q: Apache has problems with static files
A: Sendfile does not work well on the unionfs used by Debian Live. Add the following to apache's configuration:
EnableSendfile off
Q: How do I make hard disk partitions auto-mountable?
A: Short answer: Right now the best is to use a script that will populate the fstab when the CD is booting. Such a script can be found FIXME BROKEN LINK . A proper solution based on HAL will be described here in a hopefully near future.
A: Long Answer: Since 55_nonpolkit-mount-policy.patch in HAL, debian-storage-policy-fixed-drives.fdi is not available anymore and the previous trick that consisted to remove this file to enable automounting of fixed drives as a consequence is obsolete.
Eventually, it will be possible to combine HAL and PolicyKit to enable different permissions and actions to achieve advanced (auto)mounting for non-root users. Until then, because the live scripts are only touching to the fstab to add a swap partition if discovered at boot time, the only way to have fixed drives mounted automatically is to use a script that will populate the fstab file at the end of the multiuser runlevel.
To achieve this, you can do, for example, the following:
download the diskmounter.sh script FIXME BROKEN LINK
Create the chroot_local-includes/sbin directory, and move the script inside
Make sure the script is executable (chmod +x diskmounter.sh)
create the chroot_local-includes/etc/rc.local file and call the diskmounter from there (see this rc.local FIXME BROKEN LINK
When called correctly, the script detects ext2, ext3, reiserfs, xfs, FAT32, HFS+ and NTFS partitions and mount them read-write, except for NTFS. This will change soon and an option will be available to use ntfs-3g to mount NTFS as read-write.
comments, patches and other things about this script and issue: http://code.goto10.org/projects/puredyne/ticket/463
Q: Boot fails with panic: can't open /scripts/live
A: Add latest live-initramfs deb package into config/chroot_local-packages directory and rebuild.
Q: How do I configure the locale and the keyboard?
Q: How do I get past boot prompt without a working keyboard?
A: See Section 5.4, “Customising the bootup process” Customising the bootup process
Q: Can I serve the root image from a web or ftp server?
A: Since live-initramfs 1.99, it should be possible to use the fetch= argument on the kernel command line. You can build a netboot image as usual, and when you are done edit the tftpboot/pxelinux.cfg/default file. Remove the references to network boot (netboot, nfsroot, nfsopts), and replace with fetch= 〈url where you placed the root image>.
$ lh_config --packages wget
Q: Why doesn't quickreboot (or some other boot parameter) work?
A: If you are building an etch image (which was the default up to 2007/09/14) you have a very old version of casper which does not support quickreboot and possibly other boot parameters as well. You could configure your sources to use live-backports (see /usr/share/live-helper/examples/sources/live-backports) and switch to live-initramfs, or better yet, build a lenny image instead, which is the new default.
$ lh_config --distribution lenny $ lh_config --initramfs live-initramfs
Q: How do I fix "Could not find kernel image" issue with syslinux bootloader?
A: Add a binary local hook script to fix kernel and initrd path each time you build an image.
e.g. config/binary_local-hooks/01-fix_syslinux.sh
#!/bin/sh SYSLINUXCFG=`find binary -type f -name syslinux.cfg` sed -i "s|kernel /vmlinuz|kernel vmlinuz|g" ${SYSLINUXCFG} sed -i "s|initrd=/initrd|initrd=initrd|g" ${SYSLINUXCFG}
$ chmod +x config/binary_local-hooks/01-fix_syslinux.sh
Q: How do I use a newer kernel with lenny?
A: A build with backports.org kernels will fail as that repository lacks the necessary module packages (linux-modules-extra-2.6, aufs, etc.). Use the kernel backports http://unsupported.debian-maintainers.org/backports-kernel/.
The quick way to success:
$ lh_config --linux-packages 'linux-image-2.6 aufs-modules-2.6 squashfs-modules-2.6' $ echo 'deb http://unsupported.debian-maintainers.org/backports-kernel/ ./' > config/chroot_sources/backports-kernel.chroot $ echo 'deb http://unsupported.debian-maintainers.org/backports-kernel/ ./' > config/chroot_sources/backports-kernel.binary $ wget http://unsupported.debian-maintainers.org/backports-kernel/archive-key.asc -O config/chroot_sources/backports-kernel.chroot.gpg $ wget http://unsupported.debian-maintainers.org/backports-kernel/archive-key.asc -O config/chroot_sources/backports-kernel.binary.gpg $ lh_build
Q: How do I use a custom kernel?
〉 Is there a nice way of booting debian-live with a custom kernel (not in an apt repo)?
A: Copy it into config/chroot_local-packages and set LH_LINUX_PACKAGES="none" or use lh config --linux-packages " "
Don't forget to compile your kernel with an union filesystem (unionfs or aufs), squashfs modules, and initrd support.
〉 I can cause the kernel to be installed but it seems this happens later than grub/syslinux is configured so it's not listed and casper/ and the menu require munging.
You need to follow the debian scheme, e.g. placing the files in /boot as vmlinuz-$version and initrd.img-$version etc.
I personally wouldn't go that way which is too much of a hassle, and just use make-kpkg to produce custom kernel deb packages. They should integrate nicely if you just put them into config/chroot_local-packages and set LH_LINUX_PACKAGES="".
Hint: to work around an error, which lh_binary_syslinux will throw on custom kernels if there is not an 468/686 in the kernel-name, you need to set CONFIG_LOCALVERSION="-486" or "-686" within the kernel configuration (-> General setup -> Local version set to -486 or -686) corresponding to LH_LINUX_FLAVOURS="" or "686". this at least up till live-helper version 1.0~a40-1
see
http://lists.alioth.debian.org/pipermail/debian-live-devel/2007-July/001947.html
and
http://lists.alioth.debian.org/pipermail/debian-live-devel/2007-November/002581.html
Q: How do I create a cross arch live CD image?
A: In short: You can't. Read on:
The procedure to create a live CD is based on creating a chroot that contains the files that will be finally available on the live CD. The live CD building procedure includes chrooting into the chroot dir and so some operations. chrooting means that the terminal you chroot on will behave as a different system so your real system and the chroot environment is decoupled somehow.
Once the live CD scripts chroots into the chroot dir they have some operations to do inside that environment and your real system won't be able to run them unless you are using the same architecture.
So you only are able to make live CD for the arch you run on. But this doesn't prevent you run qemu or some other machine emulator that make this possible.
Q: When is a lh_clean necessary?
lh_clean is a script in /usr/bin/
A: That depends what you've changed between builds
If, for example, you've built an iso image and you want a usb image, you only need to run lh_clean --binary before you run lh_build again.
If you've changed anything in the chroot , you'll need to cleanup both chroot and binary with lh_clean before continuing
Q: How can i set boot= parameters?
A: Set LH_BOOTAPPEND_LIVE in config/binary
Q: How do I include different modules to load when the live system boots?
A: Configure config/chroot_local-includes/etc/initramfs-tools/
The lh_chroot_hacks helper rebuilds the live/initrd1.img using the default initramfs.conf "MODULES = most". You may override that by supplying your own initramfs.conf, or else just add your own modules, e.g.
mkdir -p config/chroot_local-includes/etc/initramfs-tools/ echo "atl2" >> config/chroot_local-includes/etc/initramfs-tools/modules
Q: Can I have a splash screen?
A: Yes you can
You will not know what is going on when the splash screen is active, it may fail to activate on some hardware or break X on other (both usplash and splashy use libdirectfb which does some evil voodoo and may break you graphics or input until you reboot). However, you can install and activate it just as you would on any other Debian system.
To use splashy:
1) install splashy and read the README, the manpages are useless for setting it up. Add some parameters to your kernel command line, such as in your pxelinux configuration or in LH_BOOTAPPEND_LIVE in config/binary in debian-live configuration:
vga=792 splash quiet
vga
to select video mode, splash
to activate splashy, quiet
to suppress most
kernel messages that you cannot see anyway but would scroll past before
splashy manages to paint the graphics on your screen.
You might want to add splashy to the list of packages installed in your image:
echo splashy > config/chroot_local-packageslists/splashy echo splashy-themes >> config/chroot_local-packageslists/splashy
and select a theme:
echo '#!/bin/sh' > config/chroot_local-hooks/splashy echo splashy_config -s debian-moreblue '||' true >> config/chroot_local-hooks/splashy # update the ramdisk to include the splash screen echo update-initramfs -u -k all >> config/chroot_local-hooks/splashy chmod 755 config/chroot_local-hooks/splashy
After you rebuild your live system you should observe a bluish splash screen while booting. Nothing happens while initramfs is running because there is no splashy support in initramfs-tools. Once the init starts the progress bar should start to fill.
If vga=something
sets a mode that your screen cannot
show or your card cannot do vesa 2.0 (and thus you get plain text mode and
no splashy) read the splashy faq.
Q: Howto use my Broadcom eXtrem 2 network card (module bnx2) ?
A: Add the firmwares to the initrd image.
You need to install the non-free package "firmware-bnx2". Uncompress your initrd image, then copy files :
cp /lib/firmware/bnx2x-e1-4.8.53.0.fw /lib/firmware/bnx2x-e1-5.0.21.0.fw /lib/firmware/bnx2x-e1h-4.8.53.0.fw /lib/firmware/bnx2x-e1h-5.0.21.0.fw ${INITRD}/lib/firmware/ cp /lib/udev/firmware.agent ${INITRD}/lib/udev/
Recompress your initrd image and boot: it works !
Q: X is broken (the system boots, messages scroll by, and then the screen goes blank). What do I do?
On my system starting X completely disables graphics so that I do not see anything even after X bails out and I am back to the console. To prevent this you can change the driver Xorg uses.
If you have a working splash screen or at least graphical console you can use
live xdriver=fbdev
when booting the live system (instead of just enter).
Another driver you might want to try is vesa.
If all fails you might try to set xdriver to some wrong value so that Xorg fails to start and you can examine the system while you still see something on the console.
live xdriver=none
Q: How can I get Debian first stable versions?
I'm developing software and testing it on Live-CD. Thanks for the LiveCD project. To be sure my development is fully compatible with the "etch" version, I need the same scenario when Debian GNU/Linux 4.0 was published as stable (I believe 2007.04.08). If there was some bug on 2007.04.08 that was corrected one week later, I need to test software foreseeing that scenario without the bug solved.
Q: I get "fopen: Permission denied"-warnings from apt on building/at the live-system
That's a harmless bug in apt. However, if you want to get off this warnings in the live-system, add a file in chroot_local-hooks with follow row:
chown -R man.man /var/cache/man
Q: Why I always fail during "Retrieving Packages" stage when running lh_build? I have already set apt-http-proxy and so on.
A: lh_build retrieves packages via wget, as a result you need to enable the proxy settings in /etc/wgetrc before running lh_build.
Q: How do I edit Xorg.conf?
A: Xorg.conf is generated every time system boots, so it's useless to put modifed Xorg.conf in config/choort_local-includes/etc/X11, because it will be overwritten during boot. However, you can edit /usr/bin/dexconf, which generate xorg.conf during boot, so the result will be modified Xorg.conf. The modified dexconf has to be put in config/choort_local-includes/usr/bin. e.g.: you can configure Xorg.conf for two or more keyboards layouts with alt+shift toggle by editing dexconf and replacing the line:
Option "XkbLayout" "$XKB_LAYOUT"
with the lines:
Option "XkbLayout" "us,il" Option "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll"
when "us,il" are the wanted keyboard layouts.
You can force default screen resulotion (e.g. 1024*768) by adding the lines: .
SubSection "Display" Modes "1024x768" EndSubSection
between the lines:
Section "Screen" Identifier "Default Screen" Monitor "Configured Monitor" . . . . . . . SECTION printf "EndSection\n" 〉 &4
Q: Where are the build parameters for the prebuilt images