Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Make your own Linux Distro challenge!
- happyland440
-
1000+ posts
Make your own Linux Distro challenge!
So we've got a bunch challenges running in the ATs, why not a challenge to build your own distro?
I'm doing a build of Linux from Scratch, but you can do what ever you like as long as it's bootable (even if it's just a shell and a few packages installed!).
Good luck!
I'm doing a build of Linux from Scratch, but you can do what ever you like as long as it's bootable (even if it's just a shell and a few packages installed!).
Good luck!
- nathanprocks
-
1000+ posts
Make your own Linux Distro challenge!
I done a LFS build (with systemd) a couple of years ago just for fun. I didn't add any extra software to it.
I also attempted a few years before that but failed because I was a noob back then.
I also attempted a few years before that but failed because I was a noob back then.

- Jonathan50
-
1000+ posts
Make your own Linux Distro challenge!
It sounds good, how will we be judged?
- happyland440
-
1000+ posts
Make your own Linux Distro challenge!
It sounds good, how will we be judged?
No judging, just a self challenge for yourself, but I'll compile a list of all the distros made, just like IcyCoder's other challenges (code editor and programming language).
Also, just built binutils! 1 down, about 30 to go!
Last edited by happyland440 (May 20, 2017 23:00:59)
- Jonathan50
-
1000+ posts
Make your own Linux Distro challenge!
Okay. No judging, just a self challenge for yourself, but I'll compile a list of all the distros made, just like IcyCoder's other challenges (code editor and programming language).
Also, just built binutils! 1 down, about 30 to go!Do you mean on target or host?
- happyland440
-
1000+ posts
Make your own Linux Distro challenge!
Okay. No judging, just a self challenge for yourself, but I'll compile a list of all the distros made, just like IcyCoder's other challenges (code editor and programming language).Also, just built binutils! 1 down, about 30 to go!Do you mean on target or host?
On the computer I'm making the distro on, so I guess that would be host?
- Jonathan50
-
1000+ posts
Make your own Linux Distro challenge!
I meant, are you compiling binutils to use on the host system to compile all the packages for use on the final system, or compiling it for use on the final system? Although if you have the same target on both systems (which you probably do unless you're working on Windows or macOS or a different CPU) you can use the same binaries or just compile everything for the final system with your distro binaries. On the computer I'm making the distro on, so I guess that would be host?
- happyland440
-
1000+ posts
Make your own Linux Distro challenge!
I meant, are you compiling binutils to use on the host system to compile all the packages for use on the final system, or compiling it for use on the final system? Although if you have the same target on both systems (which you probably do unless you're working on Windows or macOS or a different CPU) you can use the same binaries or just compile everything for the final system with your distro binaries. On the computer I'm making the distro on, so I guess that would be host?
I'm using it to compile all the packages on the final system.
- Jonathan50
-
1000+ posts
Make your own Linux Distro challenge!
I think I wrote a mini package manager thing to build all the packages for me without requiring my attention. Yay
Last edited by Jonathan50 (May 21, 2017 01:44:48)
- herohamp
-
1000+ posts
Make your own Linux Distro challenge!
Can I base the distro off another? Or just the linux kernal?
- happyland440
-
1000+ posts
Make your own Linux Distro challenge!
Can I base the distro off another? Or just the linux kernal?
Sure, just make it your own.
- happyland440
-
1000+ posts
Make your own Linux Distro challenge!
I have a problem.
I am building libstdc++, however I can't make a build directory because I've already built gcc in that same directory. Re-unpacking the tarball doesn't do anything, it doesn't create a new directory. Help?
I am building libstdc++, however I can't make a build directory because I've already built gcc in that same directory. Re-unpacking the tarball doesn't do anything, it doesn't create a new directory. Help?
- nathanprocks
-
1000+ posts
Make your own Linux Distro challenge!
The LFS book says to create a directory called ‘gcc-build’ in the gcc directory, cd into it, then configure, make, make install from in that directory. I have a problem.
I am building libstdc++, however I can't make a build directory because I've already built gcc in that same directory. Re-unpacking the tarball doesn't do anything, it doesn't create a new directory. Help?
When something isn't working correctly, you should go back and reread it carefully.

- happyland440
-
1000+ posts
Make your own Linux Distro challenge!
The LFS book says to create a directory called ‘gcc-build’ in the gcc directory, cd into it, then configure, make, make install from in that directory. I have a problem.
I am building libstdc++, however I can't make a build directory because I've already built gcc in that same directory. Re-unpacking the tarball doesn't do anything, it doesn't create a new directory. Help?
When something isn't working correctly, you should go back and reread it carefully.
RIP
I'm pretty sure it said “build”, not “gcc-build”. Thanks anyway.
EDIT: Yep, pretty sure.

make -j4 works, but make install doesn't. This is in a directory called gcc-build. Errors:
../libtool: line 1132: x86_64-lfs-linux-gnu-ranlib: command not found
Makefile:595: recipe for target 'install-toolexeclibLTLIBRARIES' failed
make[2]: *** [install-toolexeclibLTLIBRARIES] Error 127
make[2]: Leaving directory '/mnt/lfs/sources/gcc-6.3.0/gcc-build/libsupc++'
Makefile:725: recipe for target 'install-am' failed
make[1]: *** [install-am] Error 2
make[1]: Leaving directory '/mnt/lfs/sources/gcc-6.3.0/gcc-build/libsupc++'
Makefile:507: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
Still need help.
Last edited by happyland440 (May 23, 2017 00:34:16)
- nathanprocks
-
1000+ posts
Make your own Linux Distro challenge!
Ah, I have a local copy of LFS which is outdated. I should have looked up the latest version.The LFS book says to create a directory called ‘gcc-build’ in the gcc directory, cd into it, then configure, make, make install from in that directory. I have a problem.
I am building libstdc++, however I can't make a build directory because I've already built gcc in that same directory. Re-unpacking the tarball doesn't do anything, it doesn't create a new directory. Help?
When something isn't working correctly, you should go back and reread it carefully.
RIP
I'm pretty sure it said “build”, not “gcc-build”. Thanks anyway.
EDIT: Yep, pretty sure.
make -j4 works, but make install doesn't. This is in a directory called gcc-build. Errors:../libtool: line 1132: x86_64-lfs-linux-gnu-ranlib: command not found
Makefile:595: recipe for target 'install-toolexeclibLTLIBRARIES' failed
make[2]: *** [install-toolexeclibLTLIBRARIES] Error 127
make[2]: Leaving directory '/mnt/lfs/sources/gcc-6.3.0/gcc-build/libsupc++'
Makefile:725: recipe for target 'install-am' failed
make[1]: *** [install-am] Error 2
make[1]: Leaving directory '/mnt/lfs/sources/gcc-6.3.0/gcc-build/libsupc++'
Makefile:507: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
Still need help.

The name of the build directory doesn't actually matter. Run ‘make clean’ and try again. If that doesn't work, you may have to go back and check that you done everything else correctly. Also, did you check that all of the required packages are installed on your host system? (2.2. Host System Requirements).
- Jonathan50
-
1000+ posts
Make your own Linux Distro challenge!
Well now I can build individual packages without recompiling ones already finished, it's still a rudimentary way to do what I want (I could just make it only configure each package if it hasn't already been configured but run make again each time with no effect unless something has been changed) but this will still be helpful yay 

Last edited by Jonathan50 (May 23, 2017 02:40:33)
- Jonathan50
-
1000+ posts
Make your own Linux Distro challenge!
I put a basic system on a USB drive and got it running on QEMU, time to try it on my real PC 

- Jonathan50
-
1000+ posts
Make your own Linux Distro challenge!
No matter what value I put in for root= Linux always can't mount root 
I'm using a USB drive, Linux recognizes my internal HDD (sda) but not the drive its running on (sdb), and of course mknod can't solve the problem because root hasn't been mounted yet. Do I need to make an initramfs?
Well I've already got the USB Mass Storage and SCSI disk things checked, and not checked as modules, there is an option for a Lexar Jumpdisk though I have a Lexar disk I don't think it's a jumpdisk but I'll try just in case.

I'm using a USB drive, Linux recognizes my internal HDD (sda) but not the drive its running on (sdb), and of course mknod can't solve the problem because root hasn't been mounted yet. Do I need to make an initramfs?
Well I've already got the USB Mass Storage and SCSI disk things checked, and not checked as modules, there is an option for a Lexar Jumpdisk though I have a Lexar disk I don't think it's a jumpdisk but I'll try just in case.
Last edited by Jonathan50 (May 23, 2017 04:59:05)
- Jonathan50
-
1000+ posts
Make your own Linux Distro challenge!
Jumpdisk Jumpshot though I have a Lexar disk I don't think it's a jumpdisk jumpshot but I'll try just in case.It doesn't work! Well I've already got the USB Mass Storage and SCSI disk things checked, and not checked as modules, there is an option for a Lexar

Last edited by Jonathan50 (May 23, 2017 06:04:05)
- Jonathan50
-
1000+ posts
Make your own Linux Distro challenge!
I copied it to another disk and it still doesn't work
Does anybody know what to do?

Last edited by Jonathan50 (May 23, 2017 06:39:34)
- Discussion Forums
- » Advanced Topics
-
» Make your own Linux Distro challenge!