LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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


Reply
  Search this Thread
Old 04-05-2016, 12:22 PM   #1
lfs_novice
LQ Newbie
 
Registered: Mar 2016
Posts: 29

Rep: Reputation: Disabled
ch. 8.3: Segmentation fault after make mrproper


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#
What can I do now?

Many Thanks in advanced
 
Old 04-05-2016, 02:40 PM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,682
Blog Entries: 19

Rep: Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492
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.
 
Old 04-06-2016, 12:59 AM   #3
lfs_novice
LQ Newbie
 
Registered: Mar 2016
Posts: 29

Original Poster
Rep: Reputation: Disabled
That's what I used as described in ch. 6.72
Quote:
chroot "$LFS" /usr/bin/env -i \
HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin \
/bin/bash --login
and my fstab looks like this (I'm using separate partitions for each dirctory as mentioned in 2.2.1.3. Convenience Partitions):
Quote:
# Begin /etc/fstab

# file system mount-point type options dump fsck
# order

/dev/sda3 / ext4 defaults 1 1
/dev/sda5 swap swap pri=1 0 0
/dev/sda7 /boot ext4 defaults 1 1
/dev/sda8 /usr/src ext4 defaults 1 1
/dev/sda9 /tmp ext4 defaults 1 1
/dev/sda10 /home ext4 defaults 1 1
/dev/sda11 /usr ext4 defaults 1 1
/dev/sda12 /opt ext4 defaults 1 1
/dev/sda6 /mnt/daten vfat noauto,user,quiet,showexec,iocharset=ISO-8859-15,codepage=850
1 1

# End /etc/fstab
Is there anything wrong?
 
Old 04-06-2016, 01:27 AM   #4
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,682
Blog Entries: 19

Rep: Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492
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.
 
Old 04-06-2016, 12:37 PM   #5
lfs_novice
LQ Newbie
 
Registered: Mar 2016
Posts: 29

Original Poster
Rep: Reputation: Disabled
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#
 
Old 04-06-2016, 05:14 PM   #6
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,157

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
You need to mountncertain hostbsystem directorys on $LFS BEFORE chrooting ie:
Code:
mount -v --bind /dev $LFS/dev
mount -vt devpts devpts $LFS/dev/pts -o gid=5,mode=620
mount -vt proc proc $LFS/proc
mount -vt sysfs sysfs $LFS/sys
mount -vt tmpfs tmpfs $LFS/run
Where LFS= your lfs system.
These commands need to be run as root, after exiting the chroot don't forget to unmount them.
 
Old 04-08-2016, 09:53 AM   #7
lfs_novice
LQ Newbie
 
Registered: Mar 2016
Posts: 29

Original Poster
Rep: Reputation: Disabled
[solved] ch. 8.3: Segmentation fault after make mrproper

Thank you very much for your help! It took me three or four attempts (i couldn't chroot anymore) but now it is working.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mrproper gives Segmentation fault (core dumped) M4tic Linux - General 1 10-03-2015 05:13 PM
Chapter 6.7 LFS version 7.7, Segmentation fault on make mrproper vicz Linux From Scratch 3 07-27-2015 02:26 PM
make: *** No rule to make target `mrproper'. Stop. dauphinfay Linux - General 7 11-24-2014 07:35 AM
yast segmentation fault, system freezing - nvidia driver at fault? BaltikaTroika SUSE / openSUSE 2 12-02-2005 09:34 AM
./autogen.sh and make segmentation fault Seiken Slackware 4 11-20-2005 12:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 09:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration