On Oct 15, 2018, at 10:37 PM, Thomas Trepl <[email protected]> wrote:
Am Montag, den 15.10.2018, 04:15 +0000 schrieb Hans Malissa:
Hi all,

I'm planning to install LFS (8.3-systemd) on a cheap laptop that uses built-in eMMC 
memory (64GB) instead of an internal hard drive. As far as I understand, eMMC is 
cheap flash memory, similar to what's used in SD cards and USB drives. I've been 
trying to figure out what needs to be done differently in this situation given the 
peculiarities of flash memory, in particular the limited number of write cycles 
that leads to wear & tear on the drive:
I've read that flash memory is not a good choice for a swap partition due to 
its slow read/write access times, and due to the limited number of write 
cycles. The system has 4GB of RAM, so I'm considering to skip the swap 
partition altogether. If unavoidable, I could use an external USB hard drive as 
a swap drive during compilation, but I don't think that would be necessary.
For the root file system, it seems that journalling (ext3, ext4) should be 
avoided on flash memory. Is ext2 a good choice here? What about the 'discard' 
mount option? Should the drive be mounted with the 'noatime'? Does anybody have 
experience with this?
I've read about the 'flash-friendly file system' (F2FS), which seems to be 
tailored to such application. It appears as if it's supported by the kernel, 
and there are user-space utilities (f2fs-tools). These are not included in LFS 
or BLFS, but I'm guessing that I could compile those anyway. Is that a suitable 
option for the LFS root file system? Has anyone tried doing something like this?
Is it advantageous to construct LFS on a partition on an external USB hard 
drive, and move them to the eMMC drive once it's complete? If yes, are there 
any pitfalls here?
That's all I can think of. Am I missing something? I guess it will take some 
experimentation to figure this out. If anyone has experiences with this, then 
I'd be interested to hear about it.

Leaving swap out at all is ok if the workload of the machine does not
required one.

Yes, you can build LFS somewhere else, tar it up and extract it on
other boxes. Don't forget to install the bootloader and some other
configurations on the target machine.

The only pitfall could be processor architecture. If you build on a
modern Xeon and the target runs on a VIA C3, it is likly that it will
not work. I do
ARCH=$(uname -m)
case $ARCH in
x86_64)
CFLAGS="-march=x86-64 -mtune=generic -O2"
CXXFLAGS="$CFLAGS"
;;
i686)
CFLAGS="-march=i686 -mtune=generic -O2"
CXXFLAGS="$CFLAGS"
;;
esac
export CFLAGS CXXFLAGS

before building each package and had no issues so far (but differences
in processor architecture are not that big here).

--
Thomas
 
This machine runs on x86_64. I'm thinking of building on an external USB hard 
drive on the same machine, so the architecture would be identical.
Is tar the best tool to copy the whole root file system? Will it preserve the 
symlinks and the attributes? What about rsync? What if source and target 
partition use a different file system?

Hans 
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-chat
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to