Discussion:
[lfs-support] lfs-support Digest, Vol 969, Issue 1
Alan Corey
2018-07-09 15:14:14 UTC
Permalink
Please bear with me, I just turned off digest mode. I'll use filters
and folders to deal with random traffic. I'm on Gmail, mostly use the
web client. I'm still on half a dozen mailing lists but mostly I use
forums these days. Trying to set up a real mail reader that does
quoting properly. It probably won't be Thunderbird. I have years
worth of mail in my Gmail account which with imap usually isn't a
problem. Thunderbird is taking hours over this cell phone connection
downloading something to catch up. My second choice would be Alpine.
Anyway, trying to fudge some quoting here.
Untar package cd package dir follow book, always remove the used dir
after you have built it.
Hmm, doesn't removing the directory cause "make uninstall" to not
work? Guess I'll find out.
Did you also run the version check script chapter 2.2?
Yes, looks fine.
Whys is there no lost+found in /mnt/lfs? If you mounted your lfs
partition on /mnt, it should be there. However the rest looks OK.
The lost+found is in the partition outside the lfs dir. That's part
of what I meant by it being confusing what you wanted. I initially
created an /lfs mountpoint. This is /dev/sda2 mounted on /mnt and it
has an lfs directory in it.
/tools -> /mnt/lfs/tools
It's there as of yesterday. I'm trying to think of what the chroot is
going to see, if I do a chroot /mnt/lfs it will see the tools dir as
/tools so it works like the symink when I'm not chrooted. Got it.
So your CPU is ARM, isn't it? I guess not many people on this list have
experience with that architecture. This does not mean they can't help, but
their support may be limited.
Yes it is. The most significant differences I've found are the boot
methods and the video coming from a GPU sharing board and memory with
the CPU. And the default file system is an SD card. Other than that
this $35 cigarette pack sized computer thinks it's a mainframe. I'm
in the Debian, OpenBSD, NetBSD and FreeBSD ARM mailing lists BTW, 635
posts on https://www.raspberrypi.org/forums/. LFS is the new kid on
my block.
Does compiling a simple program work?
Yes, I do it several times a week at least. I'd really rather be
writing C than messing around with operating systems. But I sort of
made a career of replacing operating systems, mostly Windows, retired
now.
together is easiest if you have a spare x86_64 partition where you
I do, but not on this machine. Thinking ahead, I should be able to
able to build images to work on several different types of
architectures with this tools collection I'm setting up. One of those
is x86_64, also a couple different arm64 ones.
If that machine is some sort of Raspberry Pi,
Yes, I have 5 of them now. This is running Debian:
Linux version 4.16.0-2-arm64 (debian-***@lists.debian.org) (gcc
version 7.3.0 (Debian 7.3.0-23)) #1 SMP Debian 4.16.16-2
(2018-06-22)

The rest run Raspbian. I also have a Rock64 and a Pocket Beagle both
with Debian. The ARMs outnumber the Intel and AMD about 3:1.
Another thing that trips up new users is doing some things as root.
I confess I've never administered a multi-user unix machine. I'm used
to doing everything as root, it's hard to remember what works as
non-root. But I'm trying to do as much of this as possible as the lfs
user so lfs will own files and dirs.

I hope to build arm64 images to run on the Raspberry Pis and Rock64,
and an x86_64 to replace a dead Debian partition on a laptop. Maybe I
should do the x86_64 first since there aren't booting issues. I can
burn it a CD/DVD and copy it to the laptop.
Send lfs-support mailing list submissions to
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.linuxfromscratch.org/listinfo/lfs-support
or, via email, send a message with subject or body 'help' to
You can reach the person managing the list at
When replying, please edit your Subject line so it is more specific
than "Re: Contents of lfs-support digest..."
1. Re: Booting LFS with systemd (Michael Shell)
2. Building LFS under Debian (Alan Corey)
3. Re: Building LFS under Debian (spiky)
4. Re: Building LFS under Debian (spiky)
5. Re: Building LFS under Debian (Bruce Dubbs)
----------------------------------------------------------------------
Message: 1
Date: Sat, 7 Jul 2018 23:34:29 -0400
Subject: Re: [lfs-support] Booting LFS with systemd
Content-Type: text/plain; charset=US-ASCII
On Sat, 07 Jul 2018 14:38:36 +0800
For example I can insert
log_info("I am still alive!!!");
into systemd source code somewhere.
Xi,
Thanks! Yeah, that's a good approach for developers. But, a lot of users
aren't going to be able to do that.
Systemd seems to handle errors well (most of time). SIGABRT is strange.
Someone said "-D_FORTIFY_SOURCE=2" may cause systemd to SIGABRT.
That's something else Frans can try (disable D_FORTIFY_SOURCE when
compiling systemd). Also, doing a search based on the above, I found this
https://lists.libreswan.org/pipermail/swan-dev/2016-July/001587.html
edit /etc/systmed/system/ipsec.service and set
WatchdogSec=0
and see if that changes anything.
Cheers,
Mike
------------------------------
Message: 2
Date: Sun, 8 Jul 2018 12:25:43 -0400
Subject: [lfs-support] Building LFS under Debian
Content-Type: text/plain; charset="utf-8"
LFS is a work of art, I can't believe it's been around 20 years and
I'd never heard of it. 20 years ago I was downloading Slackware on
floppies and lugging them home from college.
The paths are sort of intricate to a newcomer though. There are the
paths I see, the paths the chroot is going to see, then paths used as
prefix and lib-path. At couple diagrams might help in the beginning.
I'm still stuck on binutils, chapter 5,
http://www.linuxfromscratch.org/lfs/view/stable/chapter05/binutils-pass1.html
I started out making a mountpoint called /lfs to mount the partition
I'm working in, then decided it was a bad idea. What I have looks
/lost+found
/media
/mnt
lfs
sources
binutils-2.30
build
tools
/opt
/proc
Filezilla has nice directory trees BTW if somebody wants to do
screenshots for documenting. :) Anyway I'm not sure that's right.
Does the page mean to make build inside of binutils or is it outside
to be used again later? My $LFS is set to /mnt/lfs
I made a little cfg script for consistency rather than doing it from
#!/bin/sh
../configure --prefix=/tools \
--with-sysroot=$LFS \
--with-lib-path=/tools/lib \
--target=$LFS_TGT \
--disable-nls \
--disable-werror
configure echos it back as
../configure --prefix=/tools --with-sysroot=/mnt/lfs
--with-lib-path=/tools/lib --target=aarch64-lfs-linux-gnu
--disable-nls --disable-werror
in the config.log. OK, I'll attach the log.
What worries me is the
gcc: error trying to exec 'as': execvp: Too many levels of symbolic links
In the conftest. Debian has this kludgy alternatives system where gcc
is /usr/bin/gcc but that's
lrwxrwxrwx 1 root root 5 Apr 4 06:16 gcc -> gcc-7
and that's
lrwxrwxrwx 1 root root 23 Jun 26 03:52 gcc-7 -> aarch64-linux-gnu-gcc-7
And aarch64-linux-gnu-gcc-7 is the real name of gcc 7
maybe that's just part of conftest but configure dies with an error
as -> aarch64-linux-gnu-as in /usr/bin
These kludgy scripts, and PAM/Selinux/Apparmor are what I'm hoping to
get away from with linuxfromscratch. Yes, I usually have a few gcc
and as and g++ versions around but it seems like there should be a
better way.
Alan
--
-------------
No, I won't call it "climate change", do you have a "reality problem"? -
AB1JX
Impeach Impeach Impeach Impeach Impeach Impeach Impeach Impeach
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log
Type: text/x-log
Size: 12176 bytes
Desc: not available
<http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/20180708/33eb71ff/attachment-0001.bin>
------------------------------
Message: 3
Date: Sun, 8 Jul 2018 17:31:30 +0100
Subject: Re: [lfs-support] Building LFS under Debian
Content-Type: text/plain; charset="utf-8"; Format="flowed"
LFS is a work of art, I can't believe it's been around 20 years and
I'd never heard of it. 20 years ago I was downloading Slackware on
floppies and lugging them home from college.
The paths are sort of intricate to a newcomer though. There are the
paths I see, the paths the chroot is going to see, then paths used as
prefix and lib-path. At couple diagrams might help in the beginning.
I'm still stuck on binutils, chapter 5,
http://www.linuxfromscratch.org/lfs/view/stable/chapter05/binutils-pass1.html
I started out making a mountpoint called /lfs to mount the partition
I'm working in, then decided it was a bad idea. What I have looks
/lost+found
/media
/mnt
lfs
sources
binutils-2.30
build
tools
/opt
/proc
Filezilla has nice directory trees BTW if somebody wants to do
screenshots for documenting. :) Anyway I'm not sure that's right.
Does the page mean to make build inside of binutils or is it outside
to be used again later? My $LFS is set to /mnt/lfs
I made a little cfg script for consistency rather than doing it from
#!/bin/sh
../configure --prefix=/tools \
--with-sysroot=$LFS \
--with-lib-path=/tools/lib \
--target=$LFS_TGT \
--disable-nls \
--disable-werror
configure echos it back as
../configure --prefix=/tools --with-sysroot=/mnt/lfs
--with-lib-path=/tools/lib --target=aarch64-lfs-linux-gnu
--disable-nls --disable-werror
in the config.log. OK, I'll attach the log.
What worries me is the
gcc: error trying to exec 'as': execvp: Too many levels of symbolic links
In the conftest. Debian has this kludgy alternatives system where gcc
is /usr/bin/gcc but that's
lrwxrwxrwx 1 root root 5 Apr 4 06:16 gcc -> gcc-7
and that's
lrwxrwxrwx 1 root root 23 Jun 26 03:52 gcc-7 -> aarch64-linux-gnu-gcc-7
And aarch64-linux-gnu-gcc-7 is the real name of gcc 7
maybe that's just part of conftest but configure dies with an error
as -> aarch64-linux-gnu-as in /usr/bin
These kludgy scripts, and PAM/Selinux/Apparmor are what I'm hoping to
get away from with linuxfromscratch. Yes, I usually have a few gcc
and as and g++ versions around but it seems like there should be a
better way.
Alan
The build dir gose inside binutils.
Untar package cd package dir follow book, always remove the used dir
after you have built it.
-------------- next part --------------
An HTML attachment was scrubbed...
<http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/20180708/ddce0ab8/attachment-0001.html>
------------------------------
Message: 4
Date: Sun, 8 Jul 2018 18:15:52 +0100
Subject: Re: [lfs-support] Building LFS under Debian
Content-Type: text/plain; charset="utf-8"; Format="flowed"
LFS is a work of art, I can't believe it's been around 20 years and
I'd never heard of it. 20 years ago I was downloading Slackware on
floppies and lugging them home from college.
The paths are sort of intricate to a newcomer though. There are the
paths I see, the paths the chroot is going to see, then paths used as
prefix and lib-path. At couple diagrams might help in the beginning.
I'm still stuck on binutils, chapter 5,
http://www.linuxfromscratch.org/lfs/view/stable/chapter05/binutils-pass1.html
I started out making a mountpoint called /lfs to mount the partition
I'm working in, then decided it was a bad idea. What I have looks
/lost+found
/media
/mnt
lfs
sources
binutils-2.30
build
tools
/opt
/proc
Filezilla has nice directory trees BTW if somebody wants to do
screenshots for documenting. :) Anyway I'm not sure that's right.
Does the page mean to make build inside of binutils or is it outside
to be used again later? My $LFS is set to /mnt/lfs
I made a little cfg script for consistency rather than doing it from
#!/bin/sh
../configure --prefix=/tools \
--with-sysroot=$LFS \
--with-lib-path=/tools/lib \
--target=$LFS_TGT \
--disable-nls \
--disable-werror
configure echos it back as
../configure --prefix=/tools --with-sysroot=/mnt/lfs
--with-lib-path=/tools/lib --target=aarch64-lfs-linux-gnu
--disable-nls --disable-werror
in the config.log. OK, I'll attach the log.
What worries me is the
gcc: error trying to exec 'as': execvp: Too many levels of symbolic links
In the conftest. Debian has this kludgy alternatives system where gcc
is /usr/bin/gcc but that's
lrwxrwxrwx 1 root root 5 Apr 4 06:16 gcc -> gcc-7
and that's
lrwxrwxrwx 1 root root 23 Jun 26 03:52 gcc-7 -> aarch64-linux-gnu-gcc-7
And aarch64-linux-gnu-gcc-7 is the real name of gcc 7
maybe that's just part of conftest but configure dies with an error
as -> aarch64-linux-gnu-as in /usr/bin
These kludgy scripts, and PAM/Selinux/Apparmor are what I'm hoping to
get away from with linuxfromscratch. Yes, I usually have a few gcc
and as and g++ versions around but it seems like there should be a
better way.
Alan
Did you also run the version check script chapter 2.2?
-------------- next part --------------
An HTML attachment was scrubbed...
<http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/20180708/67507eeb/attachment-0001.html>
------------------------------
Message: 5
Date: Sun, 8 Jul 2018 12:18:03 -0500
Subject: Re: [lfs-support] Building LFS under Debian
Content-Type: text/plain; charset=utf-8; format=flowed
LFS is a work of art, I can't believe it's been around 20 years and
I'd never heard of it. 20 years ago I was downloading Slackware on
floppies and lugging them home from college.
The paths are sort of intricate to a newcomer though. There are the
paths I see, the paths the chroot is going to see, then paths used as
prefix and lib-path. At couple diagrams might help in the beginning.
I'm still stuck on binutils, chapter 5,
http://www.linuxfromscratch.org/lfs/view/stable/chapter05/binutils-pass1.html
I started out making a mountpoint called /lfs to mount the partition
I'm working in, then decided it was a bad idea. What I have looks
/lost+found
/media
/mnt
lfs
sources
binutils-2.30
build
tools
/opt
/proc
Whys is there no lost+found in /mnt/lfs? If you mounted your lfs
partition on /mnt, it should be there. However the rest looks OK.
Filezilla has nice directory trees BTW if somebody wants to do
screenshots for documenting. :) Anyway I'm not sure that's right.
Does the page mean to make build inside of binutils or is it outside
to be used again later? My $LFS is set to /mnt/lfs
It should be inside. One issue that trips many up is that the
untar
cd
follow instructions as written
cd back to sources
rm expanded directory
Every time.
Another thing that trips up new users is doing some things as root. The
LFS environment variable needs to be set for root also. See the caution
in Sectipn 2.6. Setting The $LFS Variable.
I made a little cfg script for consistency rather than doing it from
#!/bin/sh
../configure --prefix=/tools \
--with-sysroot=$LFS \
--with-lib-path=/tools/lib \
--target=$LFS_TGT \
--disable-nls \
--disable-werror
configure echos it back as
../configure --prefix=/tools --with-sysroot=/mnt/lfs
--with-lib-path=/tools/lib --target=aarch64-lfs-linux-gnu
--disable-nls --disable-werror
We do not test LFS on an ARM processor. What you have above looks OK,
but I cannot say the system will be built properly or not. I suggest
double checking the host system requirements (Section 2.2).
in the config.log. OK, I'll attach the log.
What worries me is the
gcc: error trying to exec 'as': execvp: Too many levels of symbolic links
In the conftest. Debian has this kludgy alternatives system where gcc
is /usr/bin/gcc but that's
lrwxrwxrwx 1 root root 5 Apr 4 06:16 gcc -> gcc-7
and that's
lrwxrwxrwx 1 root root 23 Jun 26 03:52 gcc-7 -> aarch64-linux-gnu-gcc-7
And aarch64-linux-gnu-gcc-7 is the real name of gcc 7
maybe that's just part of conftest but configure dies with an error
as -> aarch64-linux-gnu-as in /usr/bin
Those symlinks are probably OK. Debian uses the same thing on x86_64.
-- Bruce
These kludgy scripts, and PAM/Selinux/Apparmor are what I'm hoping to
get away from with linuxfromscratch. Yes, I usually have a few gcc
and as and g++ versions around but it seems like there should be a
better way.
Alan
------------------------------
Subject: Digest Footer
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
------------------------------
End of lfs-support Digest, Vol 969, Issue 1
*******************************************
--
-------------
No, I won't call it "climate change", do you have a "reality problem"? - AB1JX
Impeach Impeach Impeach Impeach Impeach Impeach Impeach Impeach
--
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 i
Bruce Dubbs
2018-07-09 16:12:11 UTC
Permalink
Post by Alan Corey
Please bear with me, I just turned off digest mode. I'll use filters
and folders to deal with random traffic. I'm on Gmail, mostly use the
web client. I'm still on half a dozen mailing lists but mostly I use
forums these days. Trying to set up a real mail reader that does
quoting properly. It probably won't be Thunderbird. I have years
worth of mail in my Gmail account which with imap usually isn't a
problem. Thunderbird is taking hours over this cell phone connection
downloading something to catch up. My second choice would be Alpine.
Anyway, trying to fudge some quoting here.
Untar package cd package dir follow book, always remove the used dir
after you have built it.
Hmm, doesn't removing the directory cause "make uninstall" to not
work? Guess I'll find out.
We don't really address uninstall. That's really part of package
management which we do not directly support.
Post by Alan Corey
Did you also run the version check script chapter 2.2?
Yes, looks fine.
Whys is there no lost+found in /mnt/lfs? If you mounted your lfs
partition on /mnt, it should be there. However the rest looks OK.
The lost+found is in the partition outside the lfs dir. That's part
of what I meant by it being confusing what you wanted. I initially
created an /lfs mountpoint. This is /dev/sda2 mounted on /mnt and it
has an lfs directory in it.
That will not work. When you get to the point of rebooting into LFS,
you need your build to be at the root of the file system. I suggest:

umount /lfs
mkdir -p /mnt/lfs
mount /dev/sd?? /mnt/lfs
Post by Alan Corey
/tools -> /mnt/lfs/tools
It's there as of yesterday. I'm trying to think of what the chroot is
going to see, if I do a chroot /mnt/lfs it will see the tools dir as
/tools so it works like the symink when I'm not chrooted. Got it.
So your CPU is ARM, isn't it? I guess not many people on this list have
experience with that architecture. This does not mean they can't help, but
their support may be limited.
Yes it is. The most significant differences I've found are the boot
methods and the video coming from a GPU sharing board and memory with
the CPU. And the default file system is an SD card. Other than that
this $35 cigarette pack sized computer thinks it's a mainframe. I'm
in the Debian, OpenBSD, NetBSD and FreeBSD ARM mailing lists BTW, 635
posts on https://www.raspberrypi.org/forums/. LFS is the new kid on
my block.
Does compiling a simple program work?
Yes, I do it several times a week at least. I'd really rather be
writing C than messing around with operating systems. But I sort of
made a career of replacing operating systems, mostly Windows, retired
now.
together is easiest if you have a spare x86_64 partition where you
I do, but not on this machine. Thinking ahead, I should be able to
able to build images to work on several different types of
architectures with this tools collection I'm setting up. One of those
is x86_64, also a couple different arm64 ones
That sounds good, but we suggest your first build be on x86_64 to
minimize problems that may come up.
Post by Alan Corey
If that machine is some sort of Raspberry Pi,
version 7.3.0 (Debian 7.3.0-23)) #1 SMP Debian 4.16.16-2
(2018-06-22)
The rest run Raspbian. I also have a Rock64 and a Pocket Beagle both
with Debian. The ARMs outnumber the Intel and AMD about 3:1.
Another thing that trips up new users is doing some things as root.
I confess I've never administered a multi-user unix machine. I'm used
to doing everything as root, it's hard to remember what works as
non-root. But I'm trying to do as much of this as possible as the lfs
user so lfs will own files and dirs.
Doing everything as root is a recipe for problems. Eventually you will
make a mistake you will regret. That is why we build Chapter 5 as user
lfs. If a mistake is made, it won't hose the host. Same rationale for
building Chapters 6,7,8 in chroot.
Post by Alan Corey
I hope to build arm64 images to run on the Raspberry Pis and Rock64,
and an x86_64 to replace a dead Debian partition on a laptop. Maybe I
should do the x86_64 first since there aren't booting issues. I can
burn it a CD/DVD and copy it to the laptop.
That can be done, but you have to be careful when copying to a lesser
CPU. See the second note in Section 6.17. GMP-6.1.2.

If the laptop boots now, you don't need to burn a DVD. Just create a
tarball of /mnt/lfs and extract it to an empty partition on the other
system. There will need to be some customization in fstab and
networking. If the laptop does not already have grub installed, you will
need to install it separately.

-- Bruce
--
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/Posti
Alan Corey
2018-07-09 19:02:46 UTC
Permalink
Please bear with me, I just turned off digest mode.  I'll use filters
and folders to deal with random traffic.  I'm on Gmail, mostly use the
web client.  I'm still on half a dozen mailing lists but mostly I use
forums these days.  Trying to set up a real mail reader that does
quoting properly.  It probably won't be Thunderbird.  I have years
worth of mail in my Gmail account which with imap usually isn't a
problem.  Thunderbird is taking hours over this cell phone connection
downloading something to catch up.  My second choice would be Alpine.
Anyway, trying to fudge some quoting here.
Untar package cd package dir follow book, always remove the used dir
after you have built it.
Hmm, doesn't removing the directory cause "make uninstall" to not
work?  Guess I'll find out.
We don't really address uninstall.  That's really part of package
management which we do not directly support.
I suppose that's fine in my case, I tend to use software for a few years
anyway.
Did you also run the version check script chapter 2.2?
Yes, looks fine.
Whys is there no lost+found in /mnt/lfs?  If you mounted your lfs
partition on /mnt, it should be there.  However the rest looks OK.
The lost+found is in the partition outside the lfs dir.  That's part
of what I meant by it being confusing what you wanted.  I initially
created an /lfs mountpoint.  This is /dev/sda2 mounted on /mnt and it
has an lfs directory in it.
That will not work.  When you get to the point of rebooting into LFS,
umount /lfs
mkdir -p /mnt/lfs
mount /dev/sd?? /mnt/lfs
As far as booting, with an ARM machine you can edit cmdline.txt which is
a string that gets fed to the kernel and change root=/dev/mmcblk0p2 to
something else.  You also have to set the /etc/fstab but that's the one
inside the image you're booting.  The trick with one of these things is
that the GPU boots first then that boots the CPU.  There are open source
ways to do that now, qemu I think mainly.  But you also need an SD card
driver.  I changed it so /mnt/lfs is a mountpoint.
/tools -> /mnt/lfs/tools
It's there as of yesterday.  I'm trying to think of what the chroot is
going to see, if I do a chroot /mnt/lfs it will see the tools dir as
/tools so it works like the symink when I'm not chrooted.  Got it.
So your CPU is ARM, isn't it? I guess not many people on this list have
experience with that architecture. This does not mean they can't help, but
their support may be limited.
Yes it is.  The most significant differences I've found are the boot
methods and the video coming from a GPU sharing board and memory with
the CPU.  And the default file system is an SD card.  Other than that
this $35 cigarette pack sized computer thinks it's a mainframe. I'm
in the Debian, OpenBSD, NetBSD and FreeBSD ARM mailing lists BTW, 635
posts on https://www.raspberrypi.org/forums/.  LFS is the new kid on
my block.
Does compiling a simple program work?
Yes, I do it several times a week at least.  I'd really rather be
writing C than messing around with operating systems.  But I sort of
made a career of replacing operating systems, mostly Windows, retired
now.
together is easiest if you have a spare x86_64 partition where you
I do, but not on this machine.  Thinking ahead, I should be able to
able to build images to work on several different types of
architectures with this tools collection I'm setting up.  One of those
is x86_64, also a couple different arm64 ones
That sounds good, but we suggest your first build be on x86_64 to
minimize problems that may come up.
Hmm, could I do it from OpenBSD?  That's where the dead Linux partition
is, I could only boot it into Linux from a livecd, or maybe something
connected over USB.  OpenBSD can read/write extfs2 but nothing later. 
It's a laptop, I can't just plug another drive into it.  When it works
right it triple boots OpenBSD, Linux  or XP.  Seems like it might work,
if I could cross compile from OpenBSD to Linux.
If that machine is some sort of Raspberry Pi,
version 7.3.0 (Debian    7.3.0-23)) #1 SMP Debian 4.16.16-2
(2018-06-22)
The rest run Raspbian.  I also have a Rock64 and a Pocket Beagle both
with Debian.  The ARMs outnumber the Intel and AMD about 3:1.
Another thing that trips up new users is doing some things as root.
I confess I've never administered a multi-user unix machine. I'm used
to doing everything as root, it's hard to remember what works as
non-root.  But I'm trying to do as much of this as possible as the lfs
user so lfs will own files and dirs.
Doing everything as root is a recipe for problems.  Eventually you
will make a mistake you will regret.   That is why we build Chapter 5
as user lfs.  If a mistake is made, it won't hose the host.  Same
rationale for building Chapters 6,7,8 in chroot.
I've made mistakes and learned from them, I've been doing it for 20
years.  I'm more concerned about creating things that the lfs user won't
be able to access or run because they'll be owned by root.  So I'm
compiling as the lfs user.
I hope to build arm64 images to run on the Raspberry Pis and Rock64,
and an x86_64 to replace a dead Debian partition on a laptop. Maybe I
should do the x86_64 first since there aren't booting issues.  I can
burn it a CD/DVD and copy it to the laptop.
That can be done, but you have to be careful when copying to a lesser
CPU.  See the second note in Section 6.17. GMP-6.1.2.
Yes, half of my Raspberry Pis are actually Zeros ($5-10) and they're
32-bit.  The CPU in the Pis can be switched.  If you put
arm_control=0x20 in your config.txt the GPU boots the CPU into armv8
mode (64 bit) instead of armv7 (32 bit).  The Zeros are armv6.  No
Valgrind for those.  But 1 Raspbian image works on either, even the same
SD card.
If the laptop boots now, you don't need to burn a DVD.  Just create a
tarball of /mnt/lfs and extract it to an empty partition on the other
system.  There will need to be some customization in fstab and
networking. If the laptop does not already have grub installed, you
will need to install it separately.
DVD was mostly a figure of speech, a USB stick or an SD card in a USB
reader is more likely.  I could use a crossover cable and connect them
by ethernet.  It doesn't have grub, I used the XP boot menu.  You boot
into the target OS and use dd to copy the bootsector (1st sector of the
partition) to a file, copy that to the XP partition and point the boot
menu to it.  Maybe there's grub for the Linux, that hasn't worked in a
few years.  It was Debian and I installed stuff from testing before I
knew better, can't undo that.
  -- Bruce
--
---
Sent from my 64-bit Raspberry Pi
--
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-
Bruce Dubbs
2018-07-09 19:21:35 UTC
Permalink
Post by Alan Corey
Post by Bruce Dubbs
That sounds good, but we suggest your first build be on x86_64 to
minimize problems that may come up.
Hmm, could I do it from OpenBSD?  That's where the dead Linux partition
is, I could only boot it into Linux from a livecd, or maybe something
connected over USB.  OpenBSD can read/write extfs2 but nothing later.
It's a laptop, I can't just plug another drive into it.  When it works
right it triple boots OpenBSD, Linux  or XP.  Seems like it might work,
if I could cross compile from OpenBSD to Linux.
Interesting concept, but I don't think it can be done easily. What you
are talking about is a full cross compile from one OS to another. What
would be easier is to do it from a live CD/DVD boot.
Post by Alan Corey
Post by Bruce Dubbs
I confess I've never administered a multi-user unix machine. I'm used
to doing everything as root, it's hard to remember what works as
non-root.  But I'm trying to do as much of this as possible as the lfs
user so lfs will own files and dirs.
Doing everything as root is a recipe for problems.  Eventually you
will make a mistake you will regret.   That is why we build Chapter 5
as user lfs.  If a mistake is made, it won't hose the host.  Same
rationale for building Chapters 6,7,8 in chroot.
I've made mistakes and learned from them, I've been doing it for 20
years.  I'm more concerned about creating things that the lfs user won't
be able to access or run because they'll be owned by root.  So I'm
compiling as the lfs user.
You still need to protect the system from yourself. sudo is your friend
for those things that need root privileges.

-- Bruce
--
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-mai
Loading...