[SCM] live-manual branch, debian, updated. debian/20100501-1-14-ga63aa62

Nick Niktaris niktaris at knoppel.org
Mon May 24 22:32:57 UTC 2010


The following commit has been merged in the debian branch:
commit a63aa621b2efa73d844e648643913222a507edb4
Author: Nick Niktaris <niktaris at knoppel.org>
Date:   Tue May 25 01:26:00 2010 +0300

    Adding FAQ from no1 to no11 from the wiki.

diff --git a/xml/chapters/basics.xml b/xml/chapters/basics.xml
index 49e5f95..715e24d 100644
--- a/xml/chapters/basics.xml
+++ b/xml/chapters/basics.xml
@@ -239,7 +239,7 @@ $ wodim binary.iso</screen>
 	<screen># lh build</screen>
 </para>
 
-<section>
+<section  id="image_copying">
 <title>Copying USB/HDD image to a USB stick</title>
 
 <para>
diff --git a/xml/chapters/faq.xml b/xml/chapters/faq.xml
index 2d7030c..64070b7 100644
--- a/xml/chapters/faq.xml
+++ b/xml/chapters/faq.xml
@@ -6,4 +6,97 @@
 <chapter id="faq">
 <title>Frequently asked questions (FAQ)</title>
 
+<itemizedlist>
+
+<listitem>
+	<para>Q: I downloaded a prebuilt live image. How do I put it on a USB stick?</para>
+	<para>A:  See  <xref linkend="image_copying" /> "Copying USB/HDD image to a USB stick"</para>
+</listitem>
+
+<listitem>
+	<para>Q: How do I log my build?</para>
+	<para>A: You could use script, screen or tee:
+		<screen>$ lh_build 2>&amp;1 | tee build.log</screen>
+	</para>
+</listitem>
+
+<listitem>
+	<para>Q: How can I convert an already installed standard Debian partition into a Debian Live system?</para>
+	<para>A: Save the list of installed packages and load it into your new Debian Live System. Copy your /etc to config/chroot_local-includes</para>
+</listitem>
+
+<listitem>
+	<para>Q: What does 'losetup: could not find any free loop device' mean and how do I fix it?</para>
+	<para>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).</para>
+</listitem>
+
+<listitem>
+	<para>Q: How do I launch an interactive shell during the chroot stage?</para>
+	<para>A: To enable interactive shell:
+		<screen>$ lh_config --interactive shell</screen>
+		To continue the build process:
+		<screen># logout</screen>
+		or
+		<screen># exit</screen>
+		To disable interactive shell, set LH_INTERACTIVE to "disabled" in config/chroot.
+	</para>
+</listitem>
+
+<listitem>
+	<para>Q: What is the root /user password?</para>
+	<para>A: The user password for the live user is 'live'. By default, there is not any root password. You can switch to root with <screen> sudo -i </screen> or set a password for root with  <screen>sudo passwd</screen></para>
+</listitem>
+
+<listitem>
+	<para>Q: How do I change root or any user password?</para>
+	<para>A: Add a chroot local hook script to change root or any user password each time you build an image.</para>
+	<para>e.g. config/chroot_local-hooks/01-update_password.sh to set root password to "nopasswd"</para>
+	<para>
+		<screen>#!/bin/sh
+echo "I: update password"
+echo "root:nopasswd" | chpasswd</screen>
+		<screen>$ chmod +x config/chroot_local-hooks/01-update_password.sh</screen>
+<note>For live user; you need to copy the /usr/share/initramfs-tools/scripts/live-bottom/10adduser your build folder:
+		<screen>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/</screen></note>
+		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: <screen> echo "newlivepass" | mkpasswd -s.</screen>
+		<para> Or add an hook file in config/chroot_local-hooks/ with something like the below: </para>
+		<screen> #!/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</screen>
+<para> 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. </para>
+	</para>
+</listitem>
+
+<listitem>
+	<para>Q: How to disable autologin?</para>
+	<para>A1: use the commandline parameter
+	<screen>lh config --bootappend-live "noautologin"</screen>
+	<para>A2: You need to set boot=noautologin noxautologin as described in man <filename>live-initramfs</filename> If you boot via TFTP you want to insert the option to pxelinux.cfg/default</para>
+	</para>
+</listitem>
+
+<listitem>
+	<para>Q: How do I change default hostname or username?</para>
+	<para>A: To change default hostname or username:
+	<screen>$ lh_config --hostname myhostname
+$ lh_config --username myusername</screen>
+	</para>
+</listitem>
+
+<listitem>
+	<para>Q: How do I make the final image smaller?</para>
+	<para>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).
+	</para>
+</listitem>
+
+<listitem>
+	<para>Q: How do I customize bash-config permanently (aliases, bash-completion etc.)?</para>
+	<para>A: Add your own .bashrc config/chroot_local-includes/etc/skel/.bashrc</para>
+</listitem>
+</itemizedlist>
+
 </chapter>

-- 
live-manual



More information about the debian-live-changes mailing list