Skip to content

Instantly share code, notes, and snippets.

@laozhu
Last active December 15, 2015 04:59
Show Gist options
  • Select an option

  • Save laozhu/5205172 to your computer and use it in GitHub Desktop.

Select an option

Save laozhu/5205172 to your computer and use it in GitHub Desktop.
Install Funtoo Desktop on Dell Inspiron 7520 SE
# emerge --sync
# emerge -av wqy-microhei 

GPT/GUID partition table

gdisk /dev/sda

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          411647   200.0 MiB   8300  Linux filesystem
   2          411648          923647   250.0 MiB   EF00  EFI System
   3          923648        17700863   8.0 GiB     8200  Linux swap
   4        17700864       227416063   100.0 GiB   8300  Linux filesystem
   5       227416064      1465149134   590.2 GiB   8300  Linux filesystem

filesystem creation

mkfs.ext2 /dev/sda1
mkfs.vfat -F 32 /dev/sda2
mkswap /dev/sda3
mkfs.ext4 /dev/sda4
mkfs.xfs /dev/sda5

install -d /mnt/funtoo
swapon /dev/sda3
mount /dev/sda4 /mnt/funtoo
install -d /mnt/funtoo/{boot,home}
mount /dev/sda1 /mnt/funtoo/boot
mount /dev/sda5 /mnt/funtoo/home
install -d /mnt/funtoo/boot/efi    
mount /dev/sda2 /mnt/funtoo/boot/efi

download stage and portage

cd /mnt/funtoo

elinks http://ftp.osuosl.org/pub/funtoo/funtoo-current/x86-64bit/corei7/
elinks http://ftp.heanet.ie/mirrors/funtoo/funtoo-current/x86-64bit/corei7/

stage3-latest.tar.xz

elinks http://ftp.osuosl.org/pub/funtoo/funtoo-current/snapshots/
elinks http://ftp.heanet.ie/mirrors/funtoo/funtoo-current/snapshots/

portage-latest.tar.xz

tar xfvpJ stage3-latest.tar.xz
cd /mnt/funtoo/usr
tar xfvpJ ../portage-latest.tar.xz

Chrooting

mount -t proc none /mnt/funtoo/proc
mount --bind /dev /mnt/funtoo/dev
mount --bind /sys /mnt/funtoo/sys
cp -L /etc/resolv.conf /mnt/funtoo/etc
env -i HOME=/root TERM=$TERM SHELL=/bin/bash
chroot /mnt/funtoo /bin/bash
source /etc/profile && env-update
export PS1="(chroot) $PS1"

Updating the Portage tree

cd /usr/portage/
git checkout funtoo.org
emerge --sync
eselect news read all

Setting the default options

  1. /etc/env.d/99editor

    emerge -av vim eselect editor set /usr/bin/vi eselect vi set vim

  2. /etc/make.conf

    eselect profile set-flavor 4 funtoo/1.0/linux-gnu/build/current

    eselect profile set-flavor 7 funtoo/1.0/linux-gnu/build/current

    vim /etc/make.conf

  3. /etc/fstab

  4. /etc/resolv.conf

  5. /etc/conf.d/hostname

  6. /etc/localtime

  7. /etc/conf.d/modules

  8. /etc/locale.gen

  9. /etc/env.d/02locales

install efi stub

echo "root=/dev/sda4 ro quiet" | iconv -f ascii -t ucs2 | efibootmgr -c -L "Funtoo Linux" -l '\linux\bootx64.efi' -d /dev/sda -p 2 --append-binary-args -

efibootmgr

BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0003,0001,2001,0000,0001
Boot0000* UEFI Onboard LAN IPv4
Boot0001* UEFI Onboard LAN IPv6
Boot0002* UEFI DVD1 PATH1 (PLDS DVD+/-RW DS-8A9SH)
Boot0003* Funtoo Linux
Boot2001* EFI USB Device

efibootmgr -o 0003,0001,2001,0000,0001

BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0003,0001,2001,0000,0001
Boot0000* UEFI Onboard LAN IPv4
Boot0001* UEFI Onboard LAN IPv6
Boot0002* UEFI DVD1 PATH1 (PLDS DVD+/-RW DS-8A9SH)
Boot0003* Funtoo Linux
Boot2001* EFI USB Device
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment