<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://lfscript.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=NilsB</id>
	<title>LFScript - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://lfscript.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=NilsB"/>
	<link rel="alternate" type="text/html" href="https://lfscript.org/wiki/Special:Contributions/NilsB"/>
	<updated>2026-05-13T14:27:52Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://lfscript.org/w/index.php?title=Quick_Start&amp;diff=1289</id>
		<title>Quick Start</title>
		<link rel="alternate" type="text/html" href="https://lfscript.org/w/index.php?title=Quick_Start&amp;diff=1289"/>
		<updated>2017-11-28T10:53:54Z</updated>

		<summary type="html">&lt;p&gt;NilsB: align the scripts compression method to the main page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Documentation]]&lt;br /&gt;
This page will explain how to set up your computer so that you can run LFScript for the first time. It assumes that you have read [http://www.linuxfromscratch.org/lfs/view/development/ Linux From Scratch] at least once and that you know [[Documentation|what LFScript is]].&lt;br /&gt;
&lt;br /&gt;
There also is a video tutorial available, which shows you exactly what happens when you execute the commands presented here.&lt;br /&gt;
&amp;lt;youtube&amp;gt;E8v11lKqBRM&amp;lt;/youtube&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Before you start ==&lt;br /&gt;
It is recommended that you use LFScript on a virtual machine like [[Setting up Virtualbox|VirtualBox]]. This allows you to experiment freely without any risk that you destroy your host system. You can use the [[fsOS]] Live CD to boot the virtual machine.&lt;br /&gt;
&lt;br /&gt;
=== System requirements ===&lt;br /&gt;
Before you run LFScript, make sure your system meets the [[Host System Requirements]].&lt;br /&gt;
&lt;br /&gt;
It has been reported that the build of &amp;lt;code&amp;gt;GCC&amp;lt;/code&amp;gt; will fail if you have less than 1 GigaByte of memory. LFScript will not run unless you have at least that amount of memory, or if you acknowledge that you have less by giving the &amp;lt;code&amp;gt;-M&amp;lt;/code&amp;gt; switch to LFScript. You could try to set up SWAP space to overcome memory issues, but this may slow down the build.&lt;br /&gt;
&lt;br /&gt;
== Log in as the root user ==&lt;br /&gt;
LFScript requires root access (which is another great reason to build only in a virtual machine).&lt;br /&gt;
&lt;br /&gt;
If you have not logged in as the root user (or if this is disabled on your host system), run the following command to become root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;su - root&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Ubuntu (and probably other systems where you can not log in as root), you may need &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; to become root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo su - root&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Preparing the host system ==&lt;br /&gt;
Building an OS from source requires a lot of free space. Luckily, modern computers come with very large hard disks. Running LFScript could require up to 20 GB of free disk space.&lt;br /&gt;
&lt;br /&gt;
Depending on your use of a Live CD, you should execute the commands from one of the following subsections:&lt;br /&gt;
&lt;br /&gt;
=== Preparing the hard disk (if you use a Live CD) ===&lt;br /&gt;
If you are running in a virtual machine as recommended, you need to partition and format your virtual hard disk first.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;cfdisk&amp;lt;/code&amp;gt; utility makes it easy to partition your hard disk.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cfdisk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to install your system later, you need to reserve at least one extra partition for your new OS.&lt;br /&gt;
&lt;br /&gt;
The page that explains the [[Installing your system|installation of your system]] assumes that you have created &#039;&#039;&#039;four&#039;&#039;&#039; partitions on your hard disk:&lt;br /&gt;
* &#039;&#039;&#039;sda1&#039;&#039;&#039; (Linux filesystem, Bootable) is where the root file system of your new OS will be.&lt;br /&gt;
* &#039;&#039;&#039;sda2&#039;&#039;&#039; (Linux filesystem) is where &amp;lt;code&amp;gt;/usr&amp;lt;/code&amp;gt; will be mounted (optional).&lt;br /&gt;
* &#039;&#039;&#039;sda3&#039;&#039;&#039; (SWAP) will be used as SWAP space.&lt;br /&gt;
* &#039;&#039;&#039;sda4&#039;&#039;&#039; (Linux filesystem) is where we will run LFScript.&lt;br /&gt;
&lt;br /&gt;
If you only want to build a Live CD of your system you will only need one partition though.&lt;br /&gt;
&lt;br /&gt;
You can bring any SWAP space online immediately, which is recommended if you are running low on memory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkswap /dev/sda3&lt;br /&gt;
swapon /dev/sda3&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format and mount the partition you want to use for building your system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir /mnt/lfscript&lt;br /&gt;
mkfs.ext4 /dev/sda4&lt;br /&gt;
mount /dev/sda4 /mnt/lfscript&lt;br /&gt;
cd /mnt/lfscript&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Choose a directory (only if you don&#039;t use a Live CD) ===&lt;br /&gt;
Although it is started by root, LFScript will reduce it&#039;s privileges when it builds the temporary toolchain. For this reason, you must choose a directory which is accessible (and writable) by all users but has enough space to run LFScript.&lt;br /&gt;
&lt;br /&gt;
You may choose to use a separate partition for this, but any directory will do.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir /home/lfscript_tmp&lt;br /&gt;
cd /home/lfscript_tmp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Fetch and go! ==&lt;br /&gt;
One of the core features of LFScript is that it should be extremely easy to use.&lt;br /&gt;
&lt;br /&gt;
Download the latest version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;#119;get lfscript.org/latest.tar.xz&lt;br /&gt;
tar xf *.tar.xz&lt;br /&gt;
cd lfscript4-revision*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: [[Kernel configuration|Configure your kernel]]. If you don&#039;t, you may need to rebuild your kernel later.&lt;br /&gt;
&lt;br /&gt;
You can now build your system using LFScript.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;./lfscript -B&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the most basic command you can give to LFScript. It instructs it to build the full basic system (LFS).&lt;br /&gt;
&lt;br /&gt;
You can also instruct it to build extra packages, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;./lfscript -Bx &amp;quot;nano &amp;amp;#119;get x-window-system&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That command would build LFS, &amp;lt;code&amp;gt;nano&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; and everything it needs for the X Window System.&lt;br /&gt;
&lt;br /&gt;
== Important further reading ==&lt;br /&gt;
* [[LFScript Switches]]&lt;br /&gt;
* [[Aborting and Resuming]]&lt;/div&gt;</summary>
		<author><name>NilsB</name></author>
	</entry>
</feed>