merged into the livemanual. Please do not add new content to the wiki, but contribute to the manual directly.
Contents 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. Q: I downloaded a prebuilt live image. How do I put it on a USB stick? Q: How do I log my build? Q: How can I convert an already installed standard Debian partition into a Debian Live system? Q: What does 'losetup: could not find any free loop device' mean and how do I fix it? Q: How do I launch an interactive shell during the chroot stage? Q: What is the root /user password? Q: How do I change root or any user password? Q: How to disable autologin? Q: How do I change default hostname or username? Q: How do I make the final image smaller? Q: How do I customize bash-config permanently (aliases, bash-completion etc.)? Q: How do I disable services permanently? (Be careful!) Q: How do I enable | disable the md5checksum at the ISO building? Q: How to disable the generation of the .tar.gz file? Q: How do I "build a new image" ? Q: How do I use Fluxbox ? 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.)? Q: How do I customize desktop environment (KDE, GNOME, XFCE, etc...) look? Q: How do I execute a custom shell script inside the chroot system after the chroot stage? Q: How do I add a script running immediately after all other scripts when the live system boots? Q: How do I add software not in Debian ? Q: What is the manifest with Ubuntu used for? Q: What is this {p} syntax with mtools{p} and parted{p} ? Q: Do I need to write the image on USB stick to test it? Q: What is /cow ? Q: Is /usr/share/live-helper/lists/standard-x11 like preseed or is preseed something else entirely? Q: What is the difference between standard and minimal? Q: What can the sections be used for? Aren't they BIG? Q: memtest86+ ... is that used? Q: How do I build using predefined packages lists? Q: How do I rebuild without downloading all the packages again? Q: How do I boot USB debian-live on systems not supporting USB boot? Q: How do I boot debian-live on systems not supporting CDROM or USB boot? Q: The X configuration does not seems to work, the resolution is too low. What can I do? Q: Apache has problems with static files Q: How do I make hard disk partitions auto-mountable? Q: Boot fails with panic: can't open /scripts/live Q: How do I configure the locale and the keyboard? Q: How do I get past boot prompt without a working keyboard? Q: Can I serve the root image from a web or ftp server? Q: Why doesn't quickreboot (or some other boot parameter) work? Q: How do I fix "Could not find kernel image" issue with syslinux bootloader? Q: How do I use a newer kernel with lenny? Q: How do I use a custom kernel? Q: How do I create a cross arch live CD image? Q: When is a lh_clean necessary? Q: How can i set boot= parameters? Q: How do I include different modules to load when the live system boots? Q: Can I have a splash screen? Q: Howto use my Broadcom eXtrem 2 network card (module bnx2) ? Q: X is broken (the system boots, messages scroll by, and then the screen goes blank). What do I do? Q: How can I get Debian first stable versions? Q: I get "fopen: Permission denied"-warnings from apt on building/at the live-system Q: Why I always fail during "Retrieving Packages" stage when running lh_build? I have already set apt-http-proxy and so on. Q: How do I edit Xorg.conf? Q: Where are the build parameters for the prebuilt images
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/loop* ; 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).
or
# exit
Note for live user; you need to copy the /usr/share/initramfs-tools/scripts/live-bottom/10adduser your build folder:
mkdir -p config/chroot_local-includes/usr/share/initramfstools/scripts/live-bottom/ cp /usr/share/initramfs-tools/scripts/live-bottom/10adduser config/chroot_local-includes/usr/share/initramfs-tools/scripts/livebottom/
Then edit the config/chroot_local-includes/usr/share/initramfs-tools/scripts/livebottom/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.
$ chmod +x config/chroot_local-hooks/01-disable_service.sh
Or change the LH_NET_TARBALL value. (only available in snapsshot version at the moment 2008/Feb/28)
Hint: If the configuration had changed you should leave "--binary" out. This will clean your chroot directory too.
Note: .dmrc is owned by $USERNAME:$USERNAME. See also http://wiki.debian.org/Fluxbox A short HOWTO can be found here: http://wiki.debian.org/MichaelAblassmeier/CustomLiveCD
Q: How do I customize the artwork for the live CD (grub or syslinux boot splash, usplash, etc.)?
A: See DebianLive/Howto/Custom_Artwork.
Note: the -redir argument must be changed to meet your needs) Change everything you need (e.g. add icons to desktop, change background, set preferences). Compress and copy the /home/user from the live system to your host (using tools like scp). Include that directory under config/chroot_local-includes/etc/skel.
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/livebottom/99script Note: the hook script must be executable.
$ chmod +x config/chroot_local-includes/usr/share/initramfstools/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).
Note: Do not forget to lh_clean --chroot after making this change before you build again.
Q: What is /cow ?
A: Copy-on-write, the 'diff' from unionfs.
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
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
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
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
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 for an example) 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
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>. Note: you have to include wget in the chroot.
$ lh_config --packages wget
Note: It could work for other boot methods as well. However, I am not sure the live scripts configure the network when booting from a CD or USB disk.
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 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.
Note: Even though initramfs.conf(5) says "most adds all the framebuffer, acpi, file system, ide, sata, scsi and usb drivers", it actually includes network drivers as well. See auto_add_modules() in /usr/share/initramfs-tools/hook-functions for the complete list.
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
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 initramfstools. 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: 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: 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.
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