diff options
author | William Harrington <kb0iic@berzerkula.org> | 2014-11-27 16:29:31 -0600 |
---|---|---|
committer | William Harrington <kb0iic@berzerkula.org> | 2014-11-27 16:29:31 -0600 |
commit | 7df987a652b93d55dd8eca363706d3bacc469b55 (patch) | |
tree | 17f84ce0fee76a3a0476b714eae09486ab2470e6 /book/building.html |
Diffstat (limited to 'book/building.html')
-rw-r--r-- | book/building.html | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/book/building.html b/book/building.html new file mode 100644 index 0000000..68b6794 --- /dev/null +++ b/book/building.html @@ -0,0 +1,22 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><title>6.1. Building the USB live system</title><link rel="stylesheet" href="stylesheets/lfs.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="stylesheet" href="stylesheets/lfs-print.css" type="text/css" media="print" /></head><body class="lfs" id="lfs-0.3"><div class="navheader"><h4>LFS live howto - Version 0.3</h4><h3>Chapter 6. Building the USB live system</h3><ul><li class="prev"><a accesskey="p" href="ch06.html" title="Building the USB live system">Prev</a><p>Building the USB live system</p></li><li class="next"><a accesskey="n" href="ch07.html" title="Making the USB live system bootable">Next</a><p>Making the USB live system bootable</p></li><li class="up"><a accesskey="u" href="ch06.html" title="Chapter 6. Building the USB live system">Up</a></li><li class="home"><a accesskey="h" href="index.html" title="LFS live howto - Version 0.3">Home</a></li></ul></div><div class="sect1" lang="en" xml:lang="en"><h1 class="sect1"><a id="building_usb" name="building_usb"></a>6.1. Building the USB live system</h1><p>Creating the USB live system is quite easy. Either install your LFS/BLS system on the USB media, if you used a package manager, or copy your system to the USB media:</p><p>Because you're propably running the wanted system now, let's repeat a little part of the LFS book; create the directory structure</p><pre class="userinput"><kbd class="command">mkdir -pv -m 755 $LFSMOUNT/{bin,boot,dev/{pts,shm},etc,home,include,lib,media,mnt,opt,proc,run,sbin,share,srv,sys,usr} +mkdir -pv -m 755 $LFSMOUNT/var/{opt,cache,lib/{misc,locate},local,log,mail,spool} +install -dv -m 0750 $LFSMOUNT/root +install -dv -m 1777 $LFSMOUNT/tmp $LFSMOUNT/var/tmp +ln -s /run $LFSMOUNT/var/run +ln -s /run/lock $LFSMOUNT/var/lock</kbd></pre><p>Udev populates /dev so copying /dev is not necessary. However create some basic device nodes:</p><pre class="userinput"><kbd class="command">mknod -m 600 $LFSMOUNT/dev/console c 5 1 +mknod -m 666 $LFSMOUNT/dev/null c 1 3 +mknod $LFSMOUNT/dev/ram0 b 1 0 </kbd></pre><p>Now copy the system:</p><pre class="userinput"><kbd class="command">cp -av /bin /boot /etc /include /lib /opt /sbin /share /srv /usr $LFSMOUNT</kbd></pre><p>Modify mtab and fstab in etc</p><pre class="userinput"><kbd class="command">echo "" > $LFSMOUNT/etc/mtab +echo "# Begin /etc/fstab" > $LFSMOUNT/etc/fstab +echo >> $LFSMOUNT/etc/fstab +echo "# file system mount-point type options dump fsck" >> $LFSMOUNT/etc/fstab +echo "# order" >> $LFSMOUNT/etc/fstab +echo >> $LFSMOUNT/etc/fstab +echo "LABEL=$LFSLIVE / ext3 defaults 1 1" >> $LFSMOUNT/etc/fstab +echo "proc /proc proc defaults 0 0" >> $LFSMOUNT/etc/fstab +echo "sysfs /sys sysfs defaults 0 0" >> $LFSMOUNT/etc/fstab +echo "devpts /dev/pts devpts gid=4,mode=620 0 0" >> $LFSMOUNT/etc/fstab +echo "tmpfs /run tmpfs defaults 0 0" >> $LFSMOUNT/etc/fstab +echo >> $LFSMOUNT/etc/fstab +echo "# End /etc/fstab" >> $LFSMOUNT/etc/fstab +</kbd></pre><p>Copy our previous created initrd.gz to /boot of the media.</p><pre class="userinput"><kbd class="command">cp <PATH-TO-INITRD>/initrd.gz $LFSMOUNT/boot</kbd></pre><p></p></div><div class="navfooter"><ul><li class="prev"><a accesskey="p" href="ch06.html" title="Building the USB live system">Prev</a><p>Building the USB live system</p></li><li class="next"><a accesskey="n" href="ch07.html" title="Making the USB live system bootable">Next</a><p>Making the USB live system bootable</p></li><li class="up"><a accesskey="u" href="ch06.html" title="Chapter 6. Building the USB live system">Up</a></li><li class="home"><a accesskey="h" href="index.html" title="LFS live howto - Version 0.3">Home</a></li></ul></div></body></html> |