summaryrefslogtreecommitdiffstats
path: root/bootable_usb.xml
blob: 5a89ae2450bb16852e3b158f22a785418fad22cf (plain)
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
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<sect1>
  <?dbhtml filename="bootable_usb.html"?>
  <title>Making the USB live system bootable</title>
  <para>This chapter assume you use grub2 for your LFS.</para>
  <para>Install the GRUB files into /boot/grub, assuming you are installing LFS on sda[x]:</para>
  <screen><userinput>mount --bind /dev $LFSMOUNT/dev
mount --bind /sys $LFSMOUNT/sys
mount --bind /proc $LFSMOUNT/proc
chroot $LFSMOUNT
grub-install /dev/sda
exit
umount $LFSMOUNT/proc
umount $LFSMOUNT/sys
umount $LFSMOUNT/dev</userinput></screen>
  <para>Issue the following to create the file grub.cfg:</para>
  <screen><userinput>cd $LFSMOUNT
echo 'menuentry "LFS" {' > boot/grub/grub.cfg
echo "   search -n -l $LFSLIVE -s" >> boot/grub/grub.cfg
echo "        linux   /boot/lfskernel root=LABEL=$LFSLIVE quiet rootdelay=10" >> boot/grub/grub.cfg
echo "        initrd  /boot/initrd.gz" >> boot/grub/grub.cfg
echo "}" >> boot/grub/grub.cfg
</userinput></screen>
  <para>Rename kernel, according to menu.lst:</para>
  <screen><userinput>mv -v boot/lfskernel-&lt;version&gt; boot/lfskernel</userinput></screen>
  <para>Where &lt;version&gt; is your kernel version</para>
  <para>Enjoy the livekey !</para>
</sect1>