<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/nl/liveusb.xml,v 1.3 2012/06/30 18:42:54 swift Exp $ -->
<guide disclaimer="obsolete" lang="nl">
<title>Gentoo Linux LiveUSB HOWTO</title>

<author title="Auteur">
  <mail link="henrik@brixandersen.dk">Henrik Brix Andersen</mail>
</author>
<author title="Vertaler">
  <mail link="diox@gentoo.org">Dimitry Bradt</mail>
</author>
<author title="Vertaler">
  <mail link="mail@vincentcelis.be">Celis Vincent</mail>
</author>

<abstract>
Deze HOWTO legt uit hoe u een Gentoo LiveUSB maakt of, in andere
woorden, hoe u een Gentoo Linux Installatie CD emuleert door gebruik te maken
van een USB flash drive.
</abstract>

<!-- The content of this document is licensed under the CC-BY-SA license -->
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>

<version>1.6</version>
<date>2006-09-18</date>

<chapter>
<title>Introductie</title>
<section>
<title>De LiveUSB</title>
<body>

<p>
Deze HOWTO legt uit hoe u een <e>Gentoo Linux LiveUSB</e> maakt of, in andere
woorden, hoe u een Gentoo Linux Installatie CD emuleert door gebruik te maken
van een USB flash drive. Dit is vooral handig voor de installatie van Gentoo
Linux op een moderne laptop zonder CD-ROM drive.
</p>

<p>
Hoewel de instructies in dit document bedoelt zijn voor het maken van een gentoo
Linux Installatie CD door gebruik te maken van een USB flash drive, zullen deze
ook werken voor elk willekeurig block device zolang u de device paths aanpast.
</p>

</body>
</section>
<section>
<title>Vereisten</title>
<body>

<p>
Je hebt de volgende dingen nodig om een Gentoo Linux LiveUSB te gebruiken:
</p>

<ul>
  <li>Bootable USB flash drive (minstens 64MB)</li>
  <li>x86 computer met ondersteuning voor het booten van USB</li>
</ul>

<p>
U hebt ook toegang tot het volgende nodig voor het maken van een LiveUSB:
</p>

<ul>
  <li>
    Een computer met Gentoo Linux (of een andere Linux distributie)
  </li>
</ul>

</body>
</section>
</chapter>
<chapter>
<title>De USB flash drive voorbereiden</title>
<section>
<title>Partitioneren van de drive</title>
<body>

<warn>
Deze instructies zullen al de data van de USB flash drive verwijderen. Verzeker
u ervan dat de data gebackupt is.
</warn>

<impo>
Deze HOWTO gaat er van uit dat <path>/dev/sda</path> overeenkomt met uw USB
flash drive. Indien u andere SCSI-like devices heeft, verzeker u er dan van dat
u de juiste device node gebruikt.
</impo>

<p>
Maak een FAT32 partitie op uw USB flash drive en maak het bootable door gebruik
te maken van <c>fdisk</c>. Hier is een voorbeeld van een partitie schema:
</p>

<pre caption="Voorbeeld van een partitie schema">
# <i>fdisk -l /dev/sda</i>

Disk /dev/sda: 1048 MB, 1048313856 bytes
33 heads, 61 sectors/track, 1017 cylinders
Units = cylinders of 2013 * 512 = 1030656 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1017     1023580    b  W95 FAT32
</pre>

</body>
</section>
<section>
<title>Het filesystem maken</title>
<body>

<p>
Maak een FAT32 filesystem op de USB flash drive door gebruik te maken van
<c>mkdosfs</c>:
</p>

<pre caption="mkdosfs gebruiken">
<comment>(Verzeker u ervan dat sys-fs/dosfstools is geinstalleerd)</comment>
# <i>emerge -av sys-fs/dosfstools</i>
# <i>mkdosfs -F 32 /dev/sda1</i>
mkdosfs 2.11 (12 Mar 2005)
</pre>

</body>
</section>
<section>
<title>Installatie van een Master Boot Record</title>
<body>

<p>
Installeer het precompiled Master Boot Record (MBR) van <c>syslinux</c> op de
USB flash drive:
</p>

<pre caption="Installeren van een master boot record">
<comment>(Verzeker u ervan dat sys-boot/syslinux-3.00 of later is geinstalleerd)</comment>
# <i>emerge -av '>=sys-boot/syslinux-3*'</i>
# <i>dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda</i>
0+1 records in
0+1 records out
</pre>

</body>
</section>
</chapter>
<chapter>
<title>Copieren van de bestanden</title>
<section>
<title>Mouten van de Gentoo Linux Installatie CD</title>
<body>

<warn>
Deze handeleiding is alleen van toepassing op het gebruik met Gentoo 2006.0.
Probeer niet gebruik te maken van een 2006.1 CD of nieuwer, dit zal leiden tot
een niet bootable USB disk.
</warn>

<p>
Download de <path>install-x86-minimal-2006.0.iso</path> image van uw lokale
Gentoo Linux <uri link="/main/en/where.xml">mirror</uri> en mount de ISO image
op <path>/mnt/cdrom/</path> zoals hieronder:
</p>

<pre caption="Mounten van de Gentoo Linux Installatie CD ISO image">
<comment>(Maak het /mnt/cdrom/ mount point indien nodig)</comment>
# <i>mkdir -p /mnt/cdrom</i>
# <i>mount -o loop,ro -t iso9660 install-x86-minimal-2006.0.iso /mnt/cdrom/</i>
</pre>

<note>
Indien u de boodschap <e>Could not find any loop device</e> krijgt wanneer u de
iso probeert te mounten zal u de <c>Loopback device support</c> optie moeten
enablen in uw kernel configuratie.
</note>

</body>
</section>
<section>
<title>Mounten van de LiveUSB</title>
<body>

<p>
Mount de geformateerde USB flash drive op <path>/mnt/usb/</path> zoals
hieronder:
</p>

<pre caption="Mounten van de USB flash drive">
<comment>(Maak het /mnt/usb/ mount point indien nodig)</comment>
# <i>mkdir -p /mnt/usb</i>
# <i>mount -t vfat /dev/sda1 /mnt/usb/</i>
</pre>

</body>
</section>
<section>
<title>Kopiëren van de bestanden</title>
<body>

<p>
Copieer de bestanden van de Gentoo Linux Installatie CD naar de LiveUSB. De
bestanden zullen gereorganiseerd moeten worden doordat we gebruikmaken van de
<c>syslinux</c> bootloader in plaats van de <c>isolinux</c> bootloader:
</p>

<pre caption="Copieren van de bestanden">
# <i>cp -r /mnt/cdrom/* /mnt/usb/</i>
# <i>mv /mnt/usb/isolinux/* /mnt/usb/</i>
# <i>mv /mnt/usb/isolinux.cfg /mnt/usb/syslinux.cfg</i>
# <i>rm -rf /mnt/usb/isolinux*</i>

<comment>(De memtest86 kernel zal hernoemt moeten worden voor het gebruik met syslinux)</comment>
# <i>mv /mnt/usb/memtest86 /mnt/usb/memtest</i>
</pre>

<p>
U kan nu de ISO image unmounten:
</p>

<pre caption="Unmounten van de ISO image">
# <i>umount /mnt/cdrom/</i>
</pre>

</body>
</section>
<section>
<title>Aanpassen van de bootloader configuratie</title>
<body>

<p>
Pas het syslinux configuratie bestand aan door gebruik te maken van <c>sed</c>
zoals hieronder. De <c>dobladecenter</c> parameter zal voor enkele extra delays
zorgen vooralleer het mounten van het filesystem. Dit is nodig om de USB flash
drive te laten detecteren.
</p>

<pre caption="Aanpassen van de boot parameters">
# <i>sed -i \
    -e "s:cdroot:cdroot dobladecenter:" \
    -e "s:kernel memtest86:kernel memtest:" \
    /mnt/usb/syslinux.cfg</i>
</pre>

<note>
Overweeg het toevoegen van <c>docache</c> aan de boot paramaters. Dit zal er
voor zorgen dat het mogenlijk is om <c>umount /mnt/cdom/</c> uit te voeren na
het booten zodat u de USB flash drive kan ontkoppelen. Activeer deze optie niet
indien de computer minder dan 128 MB RAM ter beschikking heeft.
</note>

<!--
(2006.1 workaround) posted by nightmorph

Background:
After some lengthy discussion with Robin Johnson (robbat2) on IRC, it turns out
that the reason why 2006.1 fails to work with this guide is because inside the
initramfs, it specifies -t iso9660..but usb flash isn't this filetype, it's
vfat. 2006.0 was much better and just specified mount -t auto. so the thing is
to install an ~arch version of genkernel (3.4.4, still ~arch as of 2006-11-04)
and reconfigure syslinux.config to point at the renamed files.

Obviously, unmasking an ~arch version is never desirable in documentation, so we
need some more alternatives...since 3.4.4 was only created at the end of
october; not likely to go stable all that soon.

Procedure:
After adjusting the parameters, and before the disk is unmounted/bootloader
installed, the following must be done for ~arch genkernel. Please replace (dash)
with an actual - , since the damned xmllint throws a "comment not terminated"
error.

# echo "sys-kernel/genkernel" &gt;&gt; /etc/portage/package.keywords
# genkernel (dash)(dash)bootdir=/mnt/usb (dash)(dash)install all
(not sure if syslinux has been installed previously yet)
# nano -w syslinux.cfg
(Edit it to point at the new filenames installed by genkernel)
(might be worth renaming to the ones normally used by syslinux, as
if the kernel name is too long, "vfat might bite")

(might need to re-run syslinux as specified below to pick up the new names,
though maybe this renaming step should be in the section below?)
# syslinux /dev/sda1

TODO:
- if/when this document changes, brix requested some time ago that he be renamed
"Original Author" and be moved to the bottom of the credits list.
- if/when this fix goes in, robbat2 deserves credit: this is his solution after
  all, and it works.

-->

</body>
</section>
</chapter>
<chapter>
<title>Installatie van de bootloader</title>
<section>
<title>Unmounten van de drive</title>
<body>

<p>
Verzeker uzelf ervan dat de USB flash drive niet gemount is vooralleer het
installeren van de bootloader:
</p>

<pre caption="Unmounten van de USB flash drive">
# <i>umount /mnt/usb/</i>
</pre>

</body>
</section>
<section>
<title>Installeren van syslinux</title>
<body>

<p>
Als laatste, installeer de <c>syslinux</c> bootloader op de USB flash drive:
</p>

<pre caption="Installatie van syslinux">
# <i>syslinux /dev/sda1</i>
</pre>

<impo>
U zal elke keer <c>syslinux /dev/sda1</c> moeten uitvoeren wanneer u
aanpassingen maakt aan het <path>syslinux.cfg</path> bestand vooralleer deze in
werking treden.
</impo>

</body>
</section>
</chapter>
<chapter>
<title>Gebruiken van de LiveUSB</title>
<section>
<title>Booten</title>
<body>

<p>
Plug de USB flash drive in en zet de computer aan, uzelf er van verzekerd dat
het BIOS is ingesteld om te booten van USB. Als alles goed gaat zou u een
standaard syslinux prompt te zien krijgen.
</p>

<p>
Vanaf hier attributer zou u de instructies van het <uri
link="/doc/nl/handbook/">Gentoo Handbook</uri> moeten kunnen volgen.
</p>

</body>
</section>
</chapter>
</guide>
