Page 1 of 1
Meaty Skeleton: Why isodir and sysroot is seperate?
Posted: Sun Feb 20, 2022 3:39 am
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,
Re: Meaty Skeleton: Why isodir and sysroot is seperate?
Posted: Wed Mar 23, 2022 4:57 am
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
Re: Meaty Skeleton: Why isodir and sysroot is seperate?
Posted: Wed Mar 23, 2022 5:23 am
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)
Re: Meaty Skeleton: Why isodir and sysroot is seperate?
Posted: Wed Mar 23, 2022 10:25 am
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.