Re: [blfs-support] Is it worth jumping in for me? / Can LFS be even more simple?
On 2/6/21 8:16 PM, 5--- via blfs-support wrote: Sure, that is the 'init' program (/sbin/init) which needs to be replaced. Than you can strip down your system to be a two-files-OS (1. kernel, 2. your init). Doubt whether it is really fun ;-) Thank you everyone for the replies. I tried this on a full linux distro and ran into trouble. A tutorial on this would be interesting. How to put together a kernel, bootloader, and init script or binary (preferably one simple enough you can write yourself), sorting out the initrd if necessary, statically compiling any binaries so you can start with an absolute minimum. Well you theoretically could modify a shell to run without glibc, but portions of it would need to drop to assembly language to make calls ot the kernel. You can read this to give you clues: http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html Have fun. -- Bruce -- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
Re: [blfs-support] Is it worth jumping in for me? / Can LFS be even more simple?
Sure, that is the 'init' program (/sbin/init) which needs to be replaced. Than you can strip down your system to be a two-files-OS (1. kernel, 2. your init). Doubt whether it is really fun ;-) Thank you everyone for the replies. I tried this on a full linux distro and ran into trouble. A tutorial on this would be interesting. How to put together a kernel, bootloader, and init script or binary (preferably one simple enough you can write yourself), sorting out the initrd if necessary, statically compiling any binaries so you can start with an absolute minimum. -- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
Re: [blfs-support] Is it worth jumping in for me? / Can LFS be even more simple?
Am Mittwoch, dem 06.01.2021 um 22:24 -0600 schrieb Paul via blfs- support: > I am interested in the idea of LFS to better understand Unix/Linux. I > have been using Linux (Ubuntu/Debian/Arch) as my desktop for several > years and it bothers me that I still don't understand A LOT about how it > works. I like the idea of being able to simplify to the point where I > understand the whole thing. However, looking through some of the LFS > book (I haven't actually done it) I am concerned that the final system > may still not be simplified to the point where I will have time to > understand it all. > > Question 1: If I thoughtfully work through LFS, will I understand what > every file on my system is for and what every process in userspace is doing? Definitly not every single file/process. There are still (even LFS is quite lightweight) thousands of them, at least files - so i don't think there's someone who knows them all by name. But for sure you'll get a better understanding of how they are organized on disk and probably a better understanding of where to look when searching for something. > > Question 2: Is it possible to run a system using only the kernel, grub > (or other bootloader), maybe a compiler/libc if I need it, and a single > executible loaded by the kernel that I would write in C? Kind of like a > "hello world" exercise that would turn my computer into a single > text-based game, a super super super simple shell, or literally printing > "hello world" on the monitor? Sure, that is the 'init' program (/sbin/init) which needs to be replaced. Than you can strip down your system to be a two-files-OS (1. kernel, 2. your init). Doubt whether it is really fun ;-) > > Thanks! -Paul > -- Thomas -- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
Re: [blfs-support] Is it worth jumping in for me? / Can LFS be even more simple?
On Wed, 6 Jan 2021 22:24:21 -0600 Paul via blfs-support wrote: > Question 2: Is it possible to run a system using only the kernel, grub > (or other bootloader), maybe a compiler/libc if I need it, and a single > executible loaded by the kernel that I would write in C? Just for the record, yes. What you are asking concerns the use of a custom init process, which is the initial "mother" process that all the other/later processes are spawned from. Your custom "init" program (if called something other than the system default /sbin/init ) can be specified via the init= kernel option: https://unix.stackexchange.com/questions/428347/how-to-pass-arguments-to-a-linux-kernel-init-bootparam https://www.cyberciti.biz/tips/10-boot-time-parameters-you-should-know-about-the-linux-kernel.html and that process, and only that process, will be started after the kernel is loaded. Note that the kernel init= option has been used in the past to bypass login security: https://unix.stackexchange.com/questions/172651/disallow-change-of-init-kernel-parameter Most bootloaders have a security feature that allows init= to be disabled. However, in that regard, always bear in mind that it is a difficult/impossible task to totally secure a machine that a potential attacker has physical access to. Cheers, Mike Shell -- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
Re: [blfs-support] Is it worth jumping in for me? / Can LFS be even more simple?
On 1/7/21 10:14 AM, Paul via blfs-support wrote: On 1/7/21 1:34 AM, Christopher Gregory via blfs-support wrote: If you are strapped for time, there is an alternative. You could use jhalf to build the lfs system, and then you have a fully working base system, and then you could boot into lfs and then install gpm and dependencies, and then build the libraries first, as they are needed first off. That way you can still learn more about linux, but you are able to do it in stages whilst building a desktop system. Thanks for pointing out jhalfs, might save a big compiling exercise if I decide to give it a go. We never recommend jhalfs for a first time lfs build. Doing it manually at least once provides a significant learning opportunity. -- Bruce -- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
Re: [blfs-support] Is it worth jumping in for me? / Can LFS be even more simple?
On 1/7/21 1:34 AM, Christopher Gregory via blfs-support wrote: Sent: Thursday, January 07, 2021 at 6:48 PM From: "Bruce Dubbs via blfs-support" To: blfs-support@lists.linuxfromscratch.org Cc: "Bruce Dubbs" Subject: Re: [blfs-support] Is it worth jumping in for me? / Can LFS be even more simple? On 1/6/21 10:24 PM, Paul via blfs-support wrote: I am interested in the idea of LFS to better understand Unix/Linux. I have been using Linux (Ubuntu/Debian/Arch) as my desktop for several years and it bothers me that I still don't understand A LOT about how it works. I like the idea of being able to simplify to the point where I understand the whole thing. However, looking through some of the LFS book (I haven't actually done it) I am concerned that the final system may still not be simplified to the point where I will have time to understand it all. Question 1: If I thoughtfully work through LFS, will I understand what every file on my system is for and what every process in userspace is doing? Probably not.At least not without a lot of work. For instance there are three packages: gcc, glibc, and binutils that install a total of about 5000 files. Understanding every one is not practical. That said, a base LFS system is much more lightweight than any commercial distro. ok that's too bad. Question 2: Is it possible to run a system using only the kernel, grub (or other bootloader), maybe a compiler/libc if I need it, and a single executible loaded by the kernel that I would write in C? Kind of like a "hello world" exercise that would turn my computer into a single text-based game, a super super super simple shell, or literally printing "hello world" on the monitor? You can't get down to quite that few packages. but certainly you could do that from a base LFS system. For what you want would require bash and gcc and vim, but those require a lot of support packages, not the least of which include glibc, and the kernel. Building those packages requires a lot of support packages like sed, gawk, grep, binutils, bison, make, tar, etc. Building LFS will help you understand how all these tools and libraries interact, but understanding in detail everything is probably beyond any individual. What if I somehow cross compile a single statically linked executable on my normal desktop instead of trying to build the system from itself - is this possible? -- Bruce -- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Hello, When I first started with linux back in 1997 I had a 4 page leaflet of how to install it, along with a cd of the then current Debian. Within that leaflet was basic linux commands as well as how to set things up. From there I progressed through teaching myself basic linux, and in 2002 I worked for a friend's webhosting company as a systems administrator. I was taught a bit by the technical owner and was soon setting up new servers and troubleshooting various installation scripts that installed open source packages on the commercial webhosting platform known as cpanel. I would advise you to be really comfortable with the command line before installing LFS. Once you have achieved proficiency with the basics, ie extracting the tar archives and being able to create/delete directories, be able to use the mouse in which ever terminal that you use, ie gnome-shell (terminal in gnome) xterm or some other in another, change directories and list the contents. It would also be helpful for you to be able to copy and paste between the tty's, so you would need to install gpm as soon as possible. You would need to take a look at the dependencies and install them as soon after moving to chroot on the final build of lfs as possible. The prerequisites you mention shouldn't be a problem. If you are strapped for time, there is an alternative. You could use jhalf to build the lfs system, and then you have a fully working base system, and then you could boot into lfs and then install gpm and dependencies, and then build the libraries first, as they are needed first off. That way you can still learn more about linux, but you are able to do it in stages whilst building a desktop system. Thanks for pointing out jhalfs, might save a big compiling exercise if I decide to give it a go. Regards, Christopher. -- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
Re: [blfs-support] Is it worth jumping in for me? / Can LFS be even more simple?
> Sent: Thursday, January 07, 2021 at 6:48 PM > From: "Bruce Dubbs via blfs-support" > To: blfs-support@lists.linuxfromscratch.org > Cc: "Bruce Dubbs" > Subject: Re: [blfs-support] Is it worth jumping in for me? / Can LFS be even > more simple? > > On 1/6/21 10:24 PM, Paul via blfs-support wrote: > > I am interested in the idea of LFS to better understand Unix/Linux. I > > have been using Linux (Ubuntu/Debian/Arch) as my desktop for several > > years and it bothers me that I still don't understand A LOT about how it > > works. I like the idea of being able to simplify to the point where I > > understand the whole thing. However, looking through some of the LFS > > book (I haven't actually done it) I am concerned that the final system > > may still not be simplified to the point where I will have time to > > understand it all. > > > > Question 1: If I thoughtfully work through LFS, will I understand what > > every file on my system is for and what every process in userspace is > > doing? > > Probably not.At least not without a lot of work. For instance there are > three packages: gcc, glibc, and binutils that install a total of about > 5000 files. Understanding every one is not practical. > > That said, a base LFS system is much more lightweight than any > commercial distro. > > > Question 2: Is it possible to run a system using only the kernel, grub > > (or other bootloader), maybe a compiler/libc if I need it, and a single > > executible loaded by the kernel that I would write in C? Kind of like a > > "hello world" exercise that would turn my computer into a single > > text-based game, a super super super simple shell, or literally printing > > "hello world" on the monitor? > > You can't get down to quite that few packages. but certainly you could > do that from a base LFS system. For what you want would require bash > and gcc and vim, but those require a lot of support packages, not the > least of which include glibc, and the kernel. Building those packages > requires a lot of support packages like sed, gawk, grep, binutils, > bison, make, tar, etc. > > Building LFS will help you understand how all these tools and libraries > interact, but understanding in detail everything is probably beyond any > individual. > >-- Bruce > > -- > http://lists.linuxfromscratch.org/listinfo/blfs-support > FAQ: http://www.linuxfromscratch.org/blfs/faq.html > Unsubscribe: See the above information page > Hello, When I first started with linux back in 1997 I had a 4 page leaflet of how to install it, along with a cd of the then current Debian. Within that leaflet was basic linux commands as well as how to set things up. From there I progressed through teaching myself basic linux, and in 2002 I worked for a friend's webhosting company as a systems administrator. I was taught a bit by the technical owner and was soon setting up new servers and troubleshooting various installation scripts that installed open source packages on the commercial webhosting platform known as cpanel. I would advise you to be really comfortable with the command line before installing LFS. Once you have achieved proficiency with the basics, ie extracting the tar archives and being able to create/delete directories, be able to use the mouse in which ever terminal that you use, ie gnome-shell (terminal in gnome) xterm or some other in another, change directories and list the contents. It would also be helpful for you to be able to copy and paste between the tty's, so you would need to install gpm as soon as possible. You would need to take a look at the dependencies and install them as soon after moving to chroot on the final build of lfs as possible. If you are strapped for time, there is an alternative. You could use jhalf to build the lfs system, and then you have a fully working base system, and then you could boot into lfs and then install gpm and dependencies, and then build the libraries first, as they are needed first off. That way you can still learn more about linux, but you are able to do it in stages whilst building a desktop system. Regards, Christopher. -- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
Re: [blfs-support] Is it worth jumping in for me? / Can LFS be even more simple?
On 1/6/21 10:24 PM, Paul via blfs-support wrote: I am interested in the idea of LFS to better understand Unix/Linux. I have been using Linux (Ubuntu/Debian/Arch) as my desktop for several years and it bothers me that I still don't understand A LOT about how it works. I like the idea of being able to simplify to the point where I understand the whole thing. However, looking through some of the LFS book (I haven't actually done it) I am concerned that the final system may still not be simplified to the point where I will have time to understand it all. Question 1: If I thoughtfully work through LFS, will I understand what every file on my system is for and what every process in userspace is doing? Probably not.At least not without a lot of work. For instance there are three packages: gcc, glibc, and binutils that install a total of about 5000 files. Understanding every one is not practical. That said, a base LFS system is much more lightweight than any commercial distro. Question 2: Is it possible to run a system using only the kernel, grub (or other bootloader), maybe a compiler/libc if I need it, and a single executible loaded by the kernel that I would write in C? Kind of like a "hello world" exercise that would turn my computer into a single text-based game, a super super super simple shell, or literally printing "hello world" on the monitor? You can't get down to quite that few packages. but certainly you could do that from a base LFS system. For what you want would require bash and gcc and vim, but those require a lot of support packages, not the least of which include glibc, and the kernel. Building those packages requires a lot of support packages like sed, gawk, grep, binutils, bison, make, tar, etc. Building LFS will help you understand how all these tools and libraries interact, but understanding in detail everything is probably beyond any individual. -- Bruce -- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page