LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-05-2015, 03:13 AM   #16
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411

Quote:
but in creating the community that will then support the distro
Concurring with that, a distro IS the community, remember
 
Old 10-05-2015, 04:43 AM   #17
xamaco
Member
 
Registered: Sep 2009
Location: Bastelicaccia, Corsica
Distribution: Crux
Posts: 48

Rep: Reputation: 7
To build a small distro as a learning experience, I would suggest to use busybox (or toybox or tools from suckless.org, heirloom project...).
If you build a statically linked busybox with most of the options, you end up with all the tools needed to start an run a small distro. Busybox is easy to configure (make menuconfig, ...).
If you choose this way, building a small distro boils down to:
  • Build a file hierarchy and create a few nodes in dev
  • Compile and install a kernel
  • Install a boot loader
  • Compile and install busybox
  • Create an init script
I'd suggest to build all of this in a disk image. A disk image can be mounted, chrooted in, ... AND in the end, you'll be able to boot your magnificent Linux distro in a virtual machine (qemu, virtualbox, ...).

You can create a raw disk image with dd (or qemu-img). To mount it, the easiest way is to use 'losetup'. I you use qemu, you can use the raw image directly. With virtualbox, I'm not sure, but I think you would need to convert it first (there are tools to do that).

I don't have time to add much more on this, but I would suggest to look at Pocket Linux. Interesting stuff I know of can be found with Alpine Linux, Aboriginal Linux, Morpheus Linux, Sabotage Linux, suckless.org and many more I forgot ...
 
Old 10-05-2015, 05:23 AM   #18
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
Quote:
Originally Posted by Red Squirrel View Post
I don't think I've ever succeeded at transplanting an installation from one system to the other. Heck even going from physical to VM. Usually it wont boot. Probably because the proper drivers arn't loaded. So no, it's not plug and play like you think it is.
It isn't plug and play, but it can still be done and done easily, even on windows.

Windows Process: Use System Image Manager to create an automated answer file for the setup sequence, build the system, copy sysprep with the answer file over to the machine and then run "sysprep /generalize /shutdown" and make an image of the machine.

Linux: Build a kernel for the target, copy modules, rm the udev database and set it generate the hwdb on first boot, make sure /etc/fstab and /boot/grub/grub.cfg are ready and the grub bootsector or efi chainloader is in place. Very similar process for BSD.
 
Old 10-05-2015, 05:35 AM   #19
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
Forgot to add, if you really are interesting in cross-architecture compiling then Cross Linux From Scratch is a good place to start.
 
Old 10-05-2015, 07:07 PM   #20
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336

Original Poster
Rep: Reputation: 54
Quote:
Originally Posted by xamaco View Post
To build a small distro as a learning experience, I would suggest to use busybox (or toybox or tools from suckless.org, heirloom project...).
If you build a statically linked busybox with most of the options, you end up with all the tools needed to start an run a small distro. Busybox is easy to configure (make menuconfig, ...).
If you choose this way, building a small distro boils down to:
  • Build a file hierarchy and create a few nodes in dev
  • Compile and install a kernel
  • Install a boot loader
  • Compile and install busybox
  • Create an init script
Yep that's the stuff I'd like to learn to do. Any good reading resource on how I'd do those things?
 
Old 10-06-2015, 03:17 AM   #21
xamaco
Member
 
Registered: Sep 2009
Location: Bastelicaccia, Corsica
Distribution: Crux
Posts: 48

Rep: Reputation: 7
Quote:
Any good reading resource on how I'd do those things?
I don't know about one site giving you everything neatly packed. I started with the Pocket Linux Guide I mentioned above changing the floppy disk stuff with a disk image. After that I did a lot of googling and reading to get further and have a small distro with network, etc... Most of the info you can gather on the web is about making embedded Linux stuff. Have a look a the web site of busybox and the various sites of the linux distro I mentioned above.

Right now, I'm too busy to give you more info. I have some notes on all what I did. Let me know it you're still interested and in a few days, I'll post a basic guide to get started.

[Edit] I found back another useful howto I used The Linux Bootdisk

Last edited by xamaco; 10-06-2015 at 07:22 AM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
New to Linux *again* - I have some questions about making better distro installs micropup Linux - Newbie 6 05-20-2015 01:35 PM
What Is the Best Distro for making your own... knoppixguy Linux - General 6 04-15-2006 09:50 PM
making own distro ankscorek VectorLinux 2 09-06-2005 07:25 AM
Making your own Linux distro Cron Linux - Distributions 2 12-03-2004 08:22 AM
a thanks, and about making my own distro mr0w1 Linux - Software 4 01-21-2004 12:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:18 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