Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
starting in chapter 8.3 with "make mrproper" I get the message
Quote:
Segmentation fault (core dumped)
Ok I was trying to use linux 4.5 instead of 4.4.2
Quote:
root:/sources# ls linux*
linux-4.5.tar.xz
root:/sources# cd linux-4.5
root:/sources/linux-4.5# make mrproper
Segmentation fault (core dumped)
root:/sources/linux-4.5#
The segmentation error comes from make. It happened to me too! The cause is not having your device directory set up properly, which is an easy mistake to make in chroot. Go back to the section on setting up the chroot environment in Chapter 6. Check each of the mounts/bindings specified and compare with the actual ones as output by mount. One of them will be missing. Add it in and try again.
The fstab doesn't matter. What matters is the current state of what is mounted, as shown by the mount command. And I seem not to have make myself quite clear; it isn't the chroot command itself that has gone wrong but the mounting and binding of the various host dynamic filesystems just before you chroot. Something was missed out. It's easy to do; the eye slides over one line and there you are!
Open a terminal in the host and run mount from there. Check that everything that should be mounted on $LFS is there: proc, sys, dev, dev/pts.
I don't know if there is anything missing...
Thats what I get back running the mount command in the host system
Quote:
user@Lifebook:/etc$ mount
/dev/sda3 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
/dev/sda6 on /media/Daten type vfat (rw,uid=1000,umask=0022)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=user)
/dev/sda4 on /mnt/lfs type ext4 (rw)
/dev/sda7 on /mnt/lfs/boot type ext4 (rw)
/dev/sda10 on /mnt/lfs/home type ext4 (rw)
/dev/sda11 on /mnt/lfs/usr type ext4 (rw)
/dev/sda12 on /mnt/lfs/opt type ext4 (rw)
/dev/sda9 on /mnt/lfs/tmp type ext4 (rw)
/dev/sda8 on /mnt/lfs/usr/src type ext4 (rw)
gvfsd-fuse on /home/user/.gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev)
if I run mount in chroot I get this:
Quote:
root:/sources/linux-4.5# mount
mount: failed to read mtab: No such file or directory
How should it look like regarding proc, sys, dev, dev/pts? I don't see a /dev/pts directory in chroot environment:
Quote:
root:/proc# ls --> empty
root:/proc# cd /sys
root:/sys# ls --> empty
root:/sys# cd /dev
root:/dev# ls --> only two files, no /dev/pts
console null
root:/dev#
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.