Anda di halaman 1dari 17

ToDo: update for the Backports change Note: Almost all content here will eventually be revised and

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: I downloaded a prebuilt live image. How do I put it on a USB stick?


A: See http://live.debian.net/manual/html/ch03s03.html#id533300

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/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).

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

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.

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: To use Fluxbox in Debian Live: 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

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 use custom repositories?


A: See DebianLive/Configuration.

Q: How do I customize the artwork for the live CD (grub or syslinux boot splash, usplash, etc.)?
A: See DebianLive/Howto/Custom_Artwork.

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

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: How do I add software not in Debian ?


A: See DebianLive/Configuration.

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?


A: No. You can use qemu, an emulator. Note: you must use qemu >= 0.8.

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?


A: 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

Note: the packages lists can be found in /usr/share/live-helper/lists/ directory.

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, DebianLive/Howto/Creating_a_Netboot_Image may help.

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 here. 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

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

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?


A: See DebianLive/l10n.

Q: How do I get past boot prompt without a working keyboard?


The answer to this question has been moved to the manual. Please see http://live.debian.net/manual/html/bootup.html Note: boot from an USB-HDD on an iMac with GRUB did not work.

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>. 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: 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/livehelper/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 squashfsmodules-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/archivekey.asc -O config/chroot_sources/backports-kernel.chroot.gpg $ wget http://unsupported.debian-maintainers.org/backports-kernel/archivekey.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?


I own an i386 arch based computer and I want to create an amd64 live cd image. How could I do this?. (where i386 is any arch and amd64 is any other arch). 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

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.

Q: Can I have a splash screen?


A: 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_localhooks/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 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: 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/bnx2* ${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 Option "XkbLayout" "XkbOptions" "us,il" "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


A: See http://live.debian.net/README.images

DebianLive/FAQ (last edited 2010-09-07 01:43:20 by PaulWise)

Anda mungkin juga menyukai