Gentoo Linux

Arwen
Posts: 145
Joined: Sun Nov 20, 2011 10:43 pm

Gentoo Linux

Post by Arwen »

My order for the fitlet-iA10 is in, and my intended OS is the Gentoo distro of Linux.

Initially I will play with using the fitlet as a desktop, to get a feel for it's speed & I/O.
Later, it will replace my old, but reliable fit-PC1 which is my media server, (and has
serial console).

So this thread is to discuss using Gentoo Linux on the fitlet, (either stripped down
server, or as a full desktop).

Anyone else planning on Gentoo?
Last edited by Arwen on Thu Jun 11, 2015 4:27 am, edited 1 time in total.
Arwen Evenstar
Rivendale, Middle Earth

Arwen
Posts: 145
Joined: Sun Nov 20, 2011 10:43 pm

Re: Gentoo Linux

Post by Arwen »

My Linux build may have these features;
  • Linux 4.0 kernel
  • Root on ZFS
  • UASP driver, (SCSI Protocol over USB)
  • Grub 2.x
Hopefully the Linux 4.0 kernel will be released soon.
And looks like 0.6.4 release of ZFS on Linux may also be released this month. Though I
would use the 0.6.3 release if newer is not available.

ZFS gets me mirroring of data, (copies=2), for some datasets, (aka file systems). Even
on a single disk device. So a mSATA drive for the OS is not too bad. Might last >4 years.
That way I get a bit of file system redundancy for "/" and "/home, and save space for things
that backups are more than adequate, like "/usr/src" and "/usr/portage/distfiles".
Arwen Evenstar
Rivendale, Middle Earth

Arwen
Posts: 145
Joined: Sun Nov 20, 2011 10:43 pm

Re: Gentoo Linux

Post by Arwen »

Linux kernel 4.0.0 is loaded and working. (Though I am still learning the AMD Turbo
mode.) In the short term it's using Grub 0.97.x since Grub 2.x is pretty different. And
again in the short term, it's using EXT4 file system instead of ZFS. The older ZFS
0.6.3 packages won't load with Kernel 4.0. But, ZFS 0.6.4 was released, just waiting
on a package for Gentoo Linux.
Arwen Evenstar
Rivendale, Middle Earth

Arwen
Posts: 145
Joined: Sun Nov 20, 2011 10:43 pm

Re: Gentoo Linux

Post by Arwen »

My fitlet-iA10 now has;
  • Gentoo Linux
  • Kernel 4.0.4
  • Grub2
  • Dracut, (for initial RAM FS)
  • ZFS for root FS
  • Serial console, (and boot time messages, but not Grub2)
  • Remote terminal server for serial console
ZFS gives me 2 things the Linux BTRFS does not;
  • Easy display of file system usage using "df" command.
  • Selectable redundancy per FS, even with a single mSATA drive
Now I am working on alternate boot environments using ZFS snapshots & clones.
Those get me an easy way to perform updates. If an update goes south, I simply boot
back to a prior boot environment. Then later try again.

Even got it working last night for the use intended, media server. Of course the
installed 500GB mSATA flash drive is too small :-(, for all my media. I need another
750GBs at least. (Why can't vendors make a 1.5TB or 2TB mSATA drive?) I guess
it's time to look at external 2.5" drive chassis. (The eSATA port is why I bought from
the fitlet-i model line.)

Still have a few things to take care of;
  • Serial access to Grub2
  • Serial access to BIOS, (awaiting vendor BIOS update)
  • Installation of the remote A.C. power switch for both fitlet-iA10 & terminal server
Last edited by Arwen on Sun Dec 06, 2015 12:12 am, edited 1 time in total.
Arwen Evenstar
Rivendale, Middle Earth

irads

Re: Gentoo Linux

Post by irads »

Thanks for sharing.
I'll check progress with serial support.

Arwen
Posts: 145
Joined: Sun Nov 20, 2011 10:43 pm

Re: Gentoo Linux

Post by Arwen »

Great. I look forward to serial support, (either initially exposing COM1 so I can use it
with Grub, or full BIOS re-direction).
Arwen Evenstar
Rivendale, Middle Earth

mbirger

Re: Gentoo Linux

Post by mbirger »

We'll issue a BIOS release in about 2 weeks or so, that will include serial ports operation (on the back panel and on the GPIO connector). Console redirection is still under development and will be ready for the next BIOS release.

Arwen
Posts: 145
Joined: Sun Nov 20, 2011 10:43 pm

Re: Gentoo Linux

Post by Arwen »

Got alternate boot environments working using ZFS snapshots and clones. Found I
don't even have to update the initial RAM disk after an update. Here is an simplified
example;

Code: Select all

root@fitlet:~# df -h
Filesystem                  Size  Used Avail Use% Mounted on
rpool/root/20150610          14G  4.3G  9.5G  31% /
rpool/root/20150610/var     9.7G  122M  9.5G   2% /var
/dev/sda3                   190M   48M  128M  28% /boot
rpool/home                  1.0G   18M 1007M   2% /home
rpool/Media                 442G  215G  227G  49% /Media

root@fitlet:~# zfs list
NAME                         USED  AVAIL  REFER  MOUNTPOINT
rpool                        226G   222G   144K  /rpool
rpool/root                  9.49G  5.51G   176K  /rpool/root
rpool/root/20150523         4.03G  9.48G  3.89G  legacy
rpool/root/20150523/var      133M  9.48G   120M  legacy
rpool/root/20150610          386M  5.51G  4.21G  legacy
rpool/root/20150610/var     20.3M  5.51G   121M  legacy
rpool/home                  17.9M  1006M  17.9M  /home
rpool/Media                  215G   226G   215G  /Media

root@fitlet:~# cat /etc/fstab
/dev/sda3               /boot   ext4    async,journal_checksum,relatime,nodiratime,discard      1 2
/dev/sda4               none    swap    sw,discard,pri=1        0 0
rpool/root/20150610     /       zfs     defaults                0 0
rpool/root/20150610/var /var    zfs     defaults                0 0
rpool/root/20150523	  /abe/20150523	  zfs	noauto,defaults		0 0
rpool/root/20150523/var /abe/20150523/var zfs	noauto,defaults		0 0

root@fitlet:~# grep linux /boot/grub/grub.cfg
   linux /linux-4.0.4-gentoo.4 rootfstype=zfs root=ZFS=rpool/root/20150610 ro console=ttyS0,115200n8r
   linux /linux-4.0.4-gentoo.3 rootfstype=zfs root=ZFS=rpool/root/20150523 ro console=ttyS0,115200n8r
I really wish plain old Linux distributions supported ABEs. Makes updates much
nicer. Some of the Unix based appliance distros, (FreeNAS for example), use ABEs
for their updates.
Arwen Evenstar
Rivendale, Middle Earth

Arwen
Posts: 145
Joined: Sun Nov 20, 2011 10:43 pm

Re: Gentoo Linux

Post by Arwen »

The migration from fitlet-iA10 to fitlet-H, (which has builtin 2.5" SATA drive bay), went
smooth. So now my storage is this;

1TB mSATA
2TB spinning drive SATA

All my media is on the 2TB drive, (1.4T currently in use). With the OS on the mSATA SSD
in a 20GB partition. Thus, reserving the 950GB remainder in case I have to grow my
media storage.

Even went a bit fancy and carved out a 20GB slice from the 2TB drive. Instead of using
ZFS "copies=2" for redundancy, I now use ZFS mirroring. It's a bit silly, mirroring my OS
from a very fast SSD to a slow model of spinning disk. But, it both works and gives me
mirroring across 2 devices. Less chance of both devices experiencing complete failure
at the same time.

This seems to work great as both Media server and a bit of dumping ground for misc.
things, (like master copy of my web development).

Doing updates with alternate boot environments, (ABEs), is fast. About 30 minutes per
time, done once a month. Plus, confidence that if the update goes poorly, I can restore
service in minutes by booting off the prior boot environment.
Arwen Evenstar
Rivendale, Middle Earth

Arwen
Posts: 145
Joined: Sun Nov 20, 2011 10:43 pm

Re: Gentoo Linux

Post by Arwen »

This fitlet-H is continuing to work great as a media server. Updates performed
once a month are installed without problems. But even if I experience problems
the ZFS alternate boot environments would allow me to back out my change
in a simple reboot.

The addition of a fit Uptime battery makes it more robust, though I've not had
any power outages since I got the UPS.
Arwen Evenstar
Rivendale, Middle Earth

Post Reply

Return to “Linux on MintBox Mini / Linux on fitlet”