Jump to content
xisto Community
Sign in to follow this  
Giniu

Linux From Scratch + Xfs + Se Linux... Gathering information...

Recommended Posts

Hi...

 

I tried a lot of distros/projects...

 

first there was Debian - but it has strongly modified kernel and I just doesn't liked it, to large, too many things in one place... then time came for Gentoo - great performance, but also great build time and when you are using premade packages, you spare time, but then it is just usual distro without it's most strong point... then time came for Slackware - It gives performance similar to Gentoo, but without any effort in compilacion, it has clean package system, nice upgrade system and was running on vanilla kernel... I'm running it right now, and it's ideal, but I'm searching now for something realy, realy made for my needs... so I decided...

 

time to make my own Linux :), well not exactly, but... I want to build system based on Beyond Hardened Linux From Scratch and SE Linux (Security-Enhanced Linux from NSA), and I want to use XFS... I am gathering knowledge... has anyone there was building something like this and can post there some knowledge about it?

 

Also I want to know what compatibility diferences there are betwen Glibc and uClibc?

 

PS.: I know that XFS need to be created with -isize=512, but this is only one thing that I know about that combination...

Share this post


Link to post
Share on other sites

Also I want to know what compatibility diferences there are betwen Glibc and uClibc?

Its complicated... think of uClibc as a cut down version of Glibc.
Just use Glibc !

My advice would be to put seriouse thought about how you are going to use some kind of package management.

LFS has no in built package management system, so installing / updating / un-installing can somtimes be annoying.

after the minimal LFS is built, try to either create a new user for each major package install, or a different --prefix while configureing.

building LFS isnt too difficult, but keeping it up to date without breaking other prgrams / causing conflicts etc can be difficult !

Share this post


Link to post
Share on other sites

Thanks for reply, you helped me to make a decision with glibc/uclibc... I know that LFS doesn't have package managment, but I was thinking about something like this...just before make install save list of files to one file (just some directories, I would manualy set those), then make install, save list of files to another file and then the diff of them would be files installed by that package - when I know what files was installed and where, upgrade and un-install would be much easier. Of course then large files would be removed and diff of them would be stored in separate directory, for example /var/packages or just whatever... what do you think?later I was thinking about something similar to Slackware package managment (without pkgtool, just makepkg, installpkg, removepkg, upgradepkg)... but this would require a lot of experiments on ready system... (of course I don't want to use ready package system, this is Pat's work, and only thing I wanted to borrow is gzipped tar as package, and philozofy of 4 scripts to do anything...)oh - I have one more question... does GRSecurity has some restrictions to Root File System, as SE Linux has? SE Linux for example cannot be used with Reiser FS...

Share this post


Link to post
Share on other sites

Ive never experimented with GRSecurity so i wouldnt know.You package management proposal sounds great,if you could also find a way of parsing the configure script to generate a list of dependency's, and check to make sure unnstalling / upgrading one package wouldnt break a different one, you will be well on the way to a complete packag managemnt system.Ohh, and have a look on the gentoo forum for keywords "Stage 4"their are tutorials on how to properly backup your root filesystem while it is booted, and store to a compressed archive.you would not believe how annoying it is to make a mistake, and have to start again after 30 hours downloading, configureing and compiling.Good luck anywys, let us know how it turns out.

Share this post


Link to post
Share on other sites

I would think about parsing a configure script... but Slackware package managment doesn't have dependecy check, and it works just great, I'm using it for long years and, it is most clean and easy PMS that I saw... back to LFS...

I have two hard drives, so it would be easier to do my experiments, since I would keep my Slack install and all compilation/installation of LFS would be made from LFS live CD, to keep maximum of compatibility while compiling... also this would secure my base OS...

you would not believe how annoying it is to make a mistake, and have to start again after 30 hours downloading, configureing and compiling.

I know :) so i always first download all needed things and then install them from second HD...
results of my work wouldn't be fast, since I'm still on -1, collecting needed information, 0 would be download... so this would take some time... If it works, I would probably write some "LFS with that and other... - success story" :(

and GRSec question is still actual...

Share this post


Link to post
Share on other sites

maybe I spelled it wrong, but vanilla kernel is kernel just from Linus - standard kernel without any patches that Debian or Gentoo are including - vanilla kernel sometimes if slower than patched and optimised one, but gives you most compatibility... and yes - I agree with you - Slack is realy great - that's why I'm using it right now, but you never wanted to have something that you made yourself? Just be able to say... My Distro?? :P this is great to know what and where you have putted something... you never use search command or wait for distro packages to show up - you are your distro packager and you can do whatever you want :P Also you would install just needed software, you won't have one unnecessary file on your hard drive...

Share this post


Link to post
Share on other sites

well yes - you can use unix kernel (I think so), but then it wouldn't be linux but unix, so ask yourself what you want :P (remember that term Linux refers only to it's kernel... linux kernel + packages = linux distribution)...

Of course... the question - where to start - first of all you need some knowledge - you can get it building your own running Linux, go there: [Linux From Scratch] - Linux From Scratch isn't realy a distro, but book! that gives you info how you can build your own linux... First go though LFS, then you should read Beyond Linux From Scratch, you may be also interested in Hardened Linux From Scratch... when you get through those "step-by-step tutorial books" you can say you are ready to start thinking about creating your own distro, since you must adopt or invite some package managment system and instalation scripts that someone would be able to boot it from cd... but LFS is enough... so you can get some bootable live cd or dvd, put onto it packages and build scripts, and this is it - you install it by running linux and starting build scripts that you made...

I'm not expert in those things, I'm still just learning... but for sure LFS is best place to start... :P

Share this post


Link to post
Share on other sites

Hi again... :P

moment ago we was talking about Package Managment for LFS, I do some research and there is one, but base of it writen in C or C++, besides I wanted to create it myself (or with little help, but rule first: don't use, create :o) so I was learning by trying, and I managed to do something that could be a base for it (also remember, not Package Managment, but candidate for base of it :P)... First of all how it works:

just before running make install or anything else that would install files on hard drive, but when you have compiled it, create a test flag file, so system would be able refer to it's date of creation, and won't affect older files... then make install and run my script, it would search through specified dirs (now hard coded, this is only testing) and generate two files, one with files that changed, and second one, with dirs that changed... then when we would uninstall it further, we can remove files from one file, and if directories from second one is empty, also remove it... but if not, inform user about that... but what would I say - there is it:

#!/bin/bashPACKAGE_DIR="/var/packages"INSTAL_FILE="package.gpkg"PATH_TO_SEARCH="/bin /usr/local /usr/bin"TEST_FLAG="some_file.tf"if !(test -d "$PACKAGE_DIR"); then	if test -e "$PACKAGE_DIR"; then  echo "/var/packages exists, but it isn't directory, change your package dir!"  exit 1;	else  echo "welcome for the firs time, hope you would like this."  mkdir "$PACKAGE_DIR"	fifiDIR_LOG=$PACKAGE_DIR"/d_"$INSTAL_FILEFILE_LOG=$PACKAGE_DIR"/f_"$INSTAL_FILEINSTAL_LOG=$PACKAGE_DIR"/"$INSTAL_FILEfind $PATH_TO_SEARCH -newer $TEST_FLAG -fprint $INSTAL_LOGif test -e "$INSTAL_LOG"; then	LINES=$(wc $INSTAL_LOG|awk '{print $1}')	LINE_NUMBER="1"		if test -e "$DIR_LOG";then  rm "$DIR_LOG"	fi	touch $DIR_LOG	if test -e "$FILE_LOG";then  rm "$FILE_LOG"	fi	touch $FILE_LOG	while test $LINE_NUMBER -le $LINES	do  FILE=$(tail +$LINE_NUMBER $INSTAL_LOG|head -1)  if test -d "$FILE"; then 	 echo $FILE >> $DIR_LOG  else 	 echo $FILE >> $FILE_LOG  fi  LINE_NUMBER=`expr $LINE_NUMBER + 1`	doneelse	echo "cannot find any changes, adjust your search path!"firm "$INSTAL_LOG"
I'm still learning, what you think about it? comment would be nice, can something be done easier/faster? I'm looking forward to answers :o

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.