Alan Feuerbacher wrote:

What are the implications of doing most BLFS stuff on the host system in
chroot, as opposed to doing it on the running target system? In my
ignorance, I would have thought that using chroot on the target system
was the way to go.

For a standard system, most packages can be built in chroot. Some packages may require virtual file systems to be mounted. I'll include my script below.

For systemd, I suspect that building in chroot may not be so easy, especially if the host is not running systemd.

Personally, my preference is to build ssl/ssh and build everything via and ssh login to the new system. That works for virtual systems like qemu or vmware too. One issue though is that some graphical packages require to be on the hardware to run checks.

  -- Bruce



#!/bin/bash

function mountbind
{
   if ! mountpoint $LFS/$1 >/dev/null; then
     $SUDO mount --bind /$1 $LFS/$1
     echo $LFS/$1 mounted
   else
     echo $LFS/$1 already mounted
   fi
}

function mounttype
{
   if ! mountpoint $LFS/$1 >/dev/null; then
     $SUDO mount -t $2 $3 $4 $5 $LFS/$1
     echo $LFS/$1 mounted
   else
     echo $LFS/$1 already mounted
   fi
}

if [ $EUID -ne 0 ]; then
  SUDO=sudo
else
  SUDO=""
fi

if [ x$LFS == x ]; then
  echo "LFS not set"
  exit 1
fi


mountbind dev
mounttype dev/pts devpts devpts -o gid=5,mode=620
mounttype proc    proc   proc
mounttype sys     sysfs  sysfs
mounttype run     tmpfs  run
mkdir $LFS/run/shm
mountbind /usr/src
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style

Reply via email to