Meaty Skeleton: Why isodir and sysroot is seperate?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
yasar11732
Member
Member
Posts: 28
Joined: Thu Sep 27, 2018 5:10 pm
Libera.chat IRC: yasar
Location: Turkey
Contact:

Meaty Skeleton: Why isodir and sysroot is seperate?

Post by yasar11732 »

Hi,

I am reading Meaty Skeleton Tutorial along with its Git Repository.

While reading the earlier bare bones tutorial, I thought isodir would act as my sysroot because anything installed in sysroot should also be part of iso image.

Is there a technical reason why these two folders are separeted? Or is it just a personal preference?

Best Regards,
User avatar
max
Member
Member
Posts: 616
Joined: Mon Mar 05, 2012 11:23 am
Libera.chat IRC: maxdev
Location: Germany
Contact:

Re: Meaty Skeleton: Why isodir and sysroot is seperate?

Post by max »

Hey,

usually the sysroot folder is the same as the root of your live filesystem. Not sure about that tutorial in detail, but you want to have all the headers, libs and binaries that are built for your target architecture to also be available within your system.

Greets
klange
Member
Member
Posts: 679
Joined: Wed Mar 30, 2011 12:31 am
Libera.chat IRC: klange
Discord: klange

Re: Meaty Skeleton: Why isodir and sysroot is seperate?

Post by klange »

The Meaty Skeleton is based on some architectural design decisions sortie made in Sortix, though since it's only a skeleton it doesn't reach the stage where those decisions really become relevant.

The reason to not use the source directory for the CD ISO as your sysroot is because you're almost definitely not going to be mounting a CD directly as your root filesystem when you get to the point where you have a filesystem at all - you'll probably have some form of ramdisk that exists as an individual file on the CD, alongside your kernel and any other boot dependencies. While ISO9660 has extensions to make it a reasonably viable read-only filesystem capable of storing Unix permission data, it's just not a great idea to actually use it as one. Even if you don't go for the ramdisk approach, a common alternative is having a writable hard disk image that goes alongside your "boot disk" CD image.

When I build my CDs, I have three filesystems:
- a gzipped USTAR tarball as a ramdisk, containing the whole contents of my sysroot
- a FAT image containing the ramdisk, kernel, and EFI loader
- the ISO9660 CD image that overlays the FAT (they both have file structures pointing to the same data)
User avatar
eekee
Member
Member
Posts: 891
Joined: Mon May 22, 2017 5:56 am
Location: Kerbin
Discord: eekee
Contact:

Re: Meaty Skeleton: Why isodir and sysroot is seperate?

Post by eekee »

When I was last mucking about with Linux live-CDs, (years ago,) the majority of the filesystem was an image file on the CD. I suppose the reason was all the system components which, for security reasons, are fussy about Unix-style file permissions.
Kaph — a modular OS intended to be easy and fun to administer and code for.
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
Post Reply