by deathanatos · 10y ago · 0 comments
# Stage the data we want in our image:
mkdir -p isofiles/boot/grub
cp grub.cfg isofiles/boot/grub/.
cp kernel.bin isofiles/boot/.
# Make the image:
grub2-mkrescue -o os.iso isofiles
# Clean up:
rm -rf isofiles
Which I got from the tutorial here[1], which is also excellent.Linux has made progress here, such as FUSE for mounting in user space. But FUSE doesn't support file systems that the OS inherently supports, for example. My understanding is that you need to write a FUSE driver for, e.g., ext2, even though Linux is perfectly capable of mounting ext2 as root.
Block devices and partition tables present another hassle.
I suspect ISOs are more easily done simply because non-root users have more need to create them: UI applications for making ISOs readily exist, but I can't think of any common applications that deal with disk images that don't already have root.