注意:

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

Difference between revisions of "F2FS Install Guide"

From Funtoo
Jump to navigation Jump to search
(Starting to format the mess I wrote)
(cleaning...)
Line 28: Line 28:
apt-get update; apt-get install f2fs-tools elinks
apt-get update; apt-get install f2fs-tools elinks
</console>
</console>
F2FS is not included in current linux kernels, and elinks is us ed to download the stage3 tarball
F2FS is not included in current linux kernels, and elinks is used to download the stage3 tarball




Line 35: Line 35:
cfdisk /dev/sda
cfdisk /dev/sda
</console>
</console>
1st partition- 500M 8300<br>
Your partition layout should be similar to
2nd partition- 2G 8200<br>
 
3rd partition- 20G 8300<br>
{{TableStart}}
4th partition 40G 8300<br>
<tr class="active"><th>Partition</th>
<br>
<th>Size</th>
mkfs.ext2 /dev/sda1<br>
<th>MBR Block Device (<code>fdisk</code>)</th>
mkswap /dev/sda2<br>
<th>MBR Code</th>
swapon /dev/sda2<br>
</tr><tr>
mkfs.f2fs /dev/sda3<br>
<td><code>/boot</code></td>
mkfs.ext4 /dev/sda4<br>
<td>512 MB</td>
mkdir /mnt/funtoo<br>
<td><code>/dev/sda1</code></td>
mount -t f2fs /dev/sda3 /mnt/funtoo<br>
<td>83</td>
mkdir /mnt/funtoo/boot<br>
</tr><tr>
mount /dev/sda1 /mnt/funtoo/boot<br>
<td>swap</td>
mkdir /mnt/funtoo/home<br>
<td>1.5 to 2x RAM for low-memory systems and production servers; otherwise 2GB.</td>
mount -o noatime /dev/sda4 /mnt/funtoo/home<br>
<td><code>/dev/sda2</code></td>
cd /mnt/funtoo/<br>
<td>82</td>
elinks build.funtoo.org<br>
</tr><tr>
#save stage3 for your arch<br>
<td><code>/</code> (root)</td>
tar xpfv stage3-latest.tar.xz<br>
<td>minimum of 10GB.  Note: to compile the <code>debian-sources</code> kernel, requires a minimum of 14GB free space in <code>/tmp</code>; consider a minimum of 20GB in this case.</td>
cp /etc/resolv.conf etc<br>
<td><code>/dev/sda3</code></td>
cd /mnt/funtoo<br>
<td>83</td>
</tr><tr>
<td><code>/home</code></td>
<td>User storage and media. Typically most of the disk.</td>
<td><code>/dev/sda4</code> (if created)</td>
<td>83</td>
</tr><tr>
</tr>{{TableEnd}}
==Formatting==
<console>
mkfs.ext2 /dev/sda1
mkswap /dev/sda2
swapon /dev/sda2
mkfs.f2fs /dev/sda3
mkfs.ext4 /dev/sda4
</console>
 
 
===Mounting the new system===
<console>
mkdir /mnt/funtoo
mount -t f2fs /dev/sda3 /mnt/funtoo
mkdir /mnt/funtoo/boot
mount /dev/sda1 /mnt/funtoo/boot
mkdir /mnt/funtoo/home
mount -o noatime /dev/sda4 /mnt/funtoo/home
</console>
 
===Downloading the system===
<console>
cd /mnt/funtoo/
elinks build.funtoo.org
<console/>
Navigate to your arch, your subarch and save stage3
 
==Installing stage3==
<console>
tar xpfv stage3-latest.tar.xz
cp /etc/resolv.conf etc
</console>
 
 
===chrooting into the new system
mount -t proc none proc<br>
mount -t proc none proc<br>
mount --rbind /sys sys<br>
mount --rbind /sys sys<br>

Revision as of 19:12, November 3, 2014

Introduction

These docs assume you have a "PC compatible" computer system with a standard PC BIOS. Many new computers support UEFI for booting, which is a new firmware interface that frequently replaces the older MBR-based BIOS. If you have a system with UEFI, you will want to use this documentation along with the UEFI Install Guide, which will augment these instructions and explain how to get your system to boot. You may need to change your PC BIOS settings to enable or disable UEFI booting. The UEFI Install Guide has more information on this, and steps on how to determine if your system supports UEFI.

Installing on F2FS isn't terribly different from installing on XFS or EXT4;; but there are enough factors that warrant a guide of its own


Live CD

Funtoo doesn't provide an "official" Funtoo Live CD, but there are plenty of good ones out there to choose from. A great choice is the Debian-based GRML as it contains lots of tools and utilities and supports both 32-bit and 64-bit systems.

It is also possible to install Funtoo Linux using many other Linux-based live CDs. Generally, any modern bootable Linux live CD or live USB media will work. See requirements for an overview of what the Live Media must provide to allow a problem-free install of Funtoo Linux.

To begin a Funtoo Linux installation, boot your preferred live media & start a commandline session.


Starting an SSH session

This is only required if you wish to perform the installation process on a computer other than where you are installing funtoo to

service ssh start; passwd; ifconfig

This starts SSH, asks for a root password, and then displays the IP address


Install required programs

apt-get update; apt-get install f2fs-tools elinks

F2FS is not included in current linux kernels, and elinks is used to download the stage3 tarball


Partitioning

cfdisk /dev/sda

Your partition layout should be similar to

Partition Size MBR Block Device (fdisk) MBR Code
/boot 512 MB /dev/sda1 83
swap 1.5 to 2x RAM for low-memory systems and production servers; otherwise 2GB. /dev/sda2 82
/ (root) minimum of 10GB. Note: to compile the debian-sources kernel, requires a minimum of 14GB free space in /tmp; consider a minimum of 20GB in this case. /dev/sda3 83
/home User storage and media. Typically most of the disk. /dev/sda4 (if created) 83

Formatting

mkfs.ext2 /dev/sda1
mkswap /dev/sda2
swapon /dev/sda2
mkfs.f2fs /dev/sda3
mkfs.ext4 /dev/sda4


Mounting the new system

mkdir /mnt/funtoo
mount -t f2fs /dev/sda3 /mnt/funtoo
mkdir /mnt/funtoo/boot
mount /dev/sda1 /mnt/funtoo/boot
mkdir /mnt/funtoo/home
mount -o noatime /dev/sda4 /mnt/funtoo/home

Downloading the system

cd /mnt/funtoo/
elinks build.funtoo.org
<console/>
Navigate to your arch, your subarch and save stage3

==Installing stage3==
<console>
tar xpfv stage3-latest.tar.xz
cp /etc/resolv.conf etc


===chrooting into the new system mount -t proc none proc
mount --rbind /sys sys
mount --rbind /dev dev
env -i HOME=/root TERM=$TERM; chroot . bash -l
export PS1="(chroot) $PS1"
emerge --sync
nano /etc/fstab
/dev/sda1 /boot ext2 noauto,noatime 1 2
/dev/sda2 none swap sw 0 0
/dev/sda3 / f2fs rw,acl,active_logs=6,background_gc=on,user_xattr 0 1
/dev/sda4 /home ext4 noatime 0 1
#/dev/cdrom /mnt/cdrom auto noauto,ro 0 0

nproc
nano /etc/make.conf
CFLAGS="-mtune=generic -O2 -pipe"
CXXFLAGS="-mtune=generic -O2 -pipe"
MAKEOPTS="-j3"

emerge -auDN @world
emerge --depclean
mkdir /etc/portage/sets
emerge -av sys-kernel/gentoo-sources sys-kernel/genkernel f2fs-tools
cd /usr/src/linux; make menuconfig

  1. Filesystems->Miscellaneous->F2FS
  2. Save config as 'f2fs.config'

echo 'f2fs' >> /etc/conf.d/modules
genkernel --kernel-config=f2fs.config all

  1. The next three steps are the same as listed here

emerge grub boot-update
grub-install --no-floppy /dev/sda
boot-update
genkernel initramfs
rc-update add dhcpcd default
passwd

Next Steps

If you are brand new to Funtoo Linux and Gentoo Linux, please check out Funtoo Linux First Steps, which will help get you acquainted with your new system. We also have a category for our official documentation, which includes all docs that we officially maintain for installation and operation of Funtoo Linux.

We also have a number of pages dedicated to setting up your system, which you can find below. If you are interested in adding a page to this list, add it to the "First Steps" MediaWiki category.

{{#ask: | format=ul }}

If your system did not boot correctly, see Installation Troubleshooting for steps you can take to resolve the problem.