-   Terms of Use and Privacy
GNU/Linux® Reference OS
  -   Terms of Use and Privacy
GNU/Linux® Reference OS

<<   <   >   >>

GNU/Linux® Reference OS | l1g3r_root_fs

These instructions assume that you have a network connection. If you don't have a network connection, view the nonic.html file at the root of whatever media you have, and it will have instructions on how to bootstrap an OS without a network connection. If you have occasional network connectivity, instructions can be found here. The instructions also assume you have moderate experience with GNU/Linux, although it shouldn't be that difficult to just bring up the image in a VM.

The final OS is constructed as a series of build steps that are mostly in order. I've been building these kinds of systems for years, using the general procedures found on Linux From Scratch. The problem with the existing documentation there, is that it is general. This is a particular slice of knowledge with a goal of running a journal system and modeling tools, my mountain climbing base camp. I've unravelled the dependencies. This slice works, at least to enough of an extent that you can prepare for an ascent of whatever peak you are attempting.

Nothing beats a picture. Here is the OS running the program I'm using to write this article:

To bootstrap the os, download l1g3r-os-orig202010.img.xz using the same location as the source packages, extract it with xz, and use dd to write to a disk device. If you aren't familiar with disk partitions and the dd command, it is probably best if you do this in a VM.

This command works for me, YMMV:

qemu -enable-kvm -cpu host -net nic -net user,hostfwd=tcp::5252-:22 -drive file=l1g3r-os-orig202010.img,format=raw -boot d -m 4G

This lets you use ssh to access the guest from the host:

ssh -p 5252 [email protected]

Use Knoppix to prepare your filesystem with dd as well as grab a copy of /lib/firmware. The config file is from Knoppix 8.6.1, but upgraded to kernel 5.3.18.

If you would like to build L1G3R from a regular GNU/Linux distribution, these are the Debian packages needed for the UI:

python3-wxgtk-media     4.0 4.0.7+dfsg-2build1
python3-wxgtk-webview   4.0 4.0.7+dfsg-2build1
python3-wxgtk4.0        4.0.7+dfsg-2build1 

The steps package has every build command in sequence, as well at the output. It matches the build steps on this site, but if you use it with man it is easy to run and modify.

linux-5.3.18.tar.xz 476a951b344356dc6f459bed4a6e9eb2
config-5.3.18.txt 66879f41b10dacea82d75da172aa9d8f
l1g3r-os-orig202010.img.xz 5568cec8a8b3184af263449083ad2af3
nonic-os-orig202010.img.xz 2aeb5d938ca0a5472cc7b106a946669f
steps-l1g-20201231.tar.xz 66476426f139af66a1a90c2fa86c8d49
steps-nic-20201231.tar.xz b0e9e7ea7d6f38f82a75079c7df04413

The nonic image is 32 bit. Password=password

If you need to add software to the image, run this command:

#losetup -f

In this case we use loop1:

# losetup -P /dev/loop1 l1g3r-os-orig202010.img
# ls /dev/loop1p*
/dev/loop1p1 /dev/loop1p2
# mount /dev/loop1p1 /mnt
# cd /mnt
# mkdir sources
# cd sources

Put any sources you like in sources to compile. Remove the image with this command:

losetup -d /dev/loop0

The img files end at step 71, so pick your width (64 or 32 bits) and run through L1G3R to the end. While this is enough to run MCJ, additional software is added to the sequence on N🚫NIC at step 32. This keeps L1G3R constrained just to the requirements of MCJ, but allows for expansion.

linux-5.3.18.tar.xz 476a951b344356dc6f459bed4a6e9eb2
config-5.3.18.txt 66879f41b10dacea82d75da172aa9d8f

Run these commands to compile and install:

cd /usr/src/
rm -rf linux-5.3.18
tar -xJf /sources/linux-5.3.18.tar.xz
cd linux-5.3.18
make mrproper
make INSTALL_HDR_PATH=dest headers_install
find dest/include \( -name .install -o -name ..install.cmd \) -delete
cp -rv dest/include/* /usr/include
cp /sources/config-5.3.18.txt ./.config

You should see something like this as output:

  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/unifdef
  WRAP    arch/x86/include/generated/uapi/asm/bpf_perf_event.h
  WRAP    arch/x86/include/generated/uapi/asm/poll.h
  WRAP    arch/x86/include/generated/uapi/asm/socket.h
  WRAP    arch/x86/include/generated/uapi/asm/sockios.h
  SYSTBL  arch/x86/include/generated/asm/syscalls_32.h
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_32.h
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_64.h
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_x32.h
  HOSTCC  arch/x86/tools/relocs_32.o
  HOSTCC  arch/x86/tools/relocs_64.o
  HOSTCC  arch/x86/tools/relocs_common.o
  HOSTLD  arch/x86/tools/relocs
  UPD     include/generated/uapi/linux/version.h
  HDRINST usr/include/scsi/scsi_netlink.h
  HDRINST usr/include/scsi/cxlflash_ioctl.h
  HDRINST usr/include/scsi/fc/fc_ns.h
  HDRINST usr/include/scsi/fc/fc_fs.h
  HDRINST usr/include/scsi/fc/fc_els.h
  HDRINST usr/include/scsi/fc/fc_gs.h
  HDRINST usr/include/scsi/scsi_bsg_ufs.h
  HDRINST usr/include/scsi/scsi_netlink_fc.h
  HDRINST usr/include/scsi/scsi_bsg_fc.h
  HDRINST usr/include/sound/sof/fw.h
  HDRINST usr/include/sound/sof/header.h
  HDRINST usr/include/sound/sof/tokens.h
  HDRINST usr/include/sound/sof/abi.h
  HDRINST usr/include/sound/compress_offload.h
  HDRINST usr/include/sound/compress_params.h
  HDRINST usr/include/sound/hdsp.h
  HDRINST usr/include/sound/sfnt_info.h
  HDRINST usr/include/sound/asound.h
  HDRINST usr/include/sound/tlv.h
  HDRINST usr/include/sound/skl-tplg-interface.h
  HDRINST usr/include/sound/firewire.h
  HDRINST usr/include/sound/asoc.h
  HDRINST usr/include/sound/snd_sst_tokens.h
  HDRINST usr/include/sound/asound_fm.h
  HDRINST usr/include/sound/asequencer.h
'dest/include/rdma/rdma_user_rxe.h' -> '/usr/include/rdma/rdma_user_rxe.h'
'dest/include/rdma/rvt-abi.h' -> '/usr/include/rdma/rvt-abi.h'
'dest/include/rdma/siw-abi.h' -> '/usr/include/rdma/siw-abi.h'
'dest/include/rdma/vmw_pvrdma-abi.h' -> '/usr/include/rdma/vmw_pvrdma-abi.h'
'dest/include/scsi/cxlflash_ioctl.h' -> '/usr/include/scsi/cxlflash_ioctl.h'
'dest/include/scsi/scsi_bsg_fc.h' -> '/usr/include/scsi/scsi_bsg_fc.h'
'dest/include/scsi/scsi_bsg_ufs.h' -> '/usr/include/scsi/scsi_bsg_ufs.h'
'dest/include/scsi/scsi_netlink.h' -> '/usr/include/scsi/scsi_netlink.h'
'dest/include/scsi/scsi_netlink_fc.h' -> '/usr/include/scsi/scsi_netlink_fc.h'
'dest/include/scsi/fc/fc_els.h' -> '/usr/include/scsi/fc/fc_els.h'
'dest/include/scsi/fc/fc_fs.h' -> '/usr/include/scsi/fc/fc_fs.h'
'dest/include/scsi/fc/fc_gs.h' -> '/usr/include/scsi/fc/fc_gs.h'
'dest/include/scsi/fc/fc_ns.h' -> '/usr/include/scsi/fc/fc_ns.h'
'dest/include/sound/sof/abi.h' -> '/usr/include/sound/sof/abi.h'
'dest/include/sound/sof/fw.h' -> '/usr/include/sound/sof/fw.h'
'dest/include/sound/sof/header.h' -> '/usr/include/sound/sof/header.h'
'dest/include/sound/sof/tokens.h' -> '/usr/include/sound/sof/tokens.h'
'dest/include/sound/asequencer.h' -> '/usr/include/sound/asequencer.h'
'dest/include/sound/asoc.h' -> '/usr/include/sound/asoc.h'
'dest/include/sound/asound.h' -> '/usr/include/sound/asound.h'
'dest/include/sound/asound_fm.h' -> '/usr/include/sound/asound_fm.h'
'dest/include/sound/compress_offload.h' -> '/usr/include/sound/compress_offload.h'
'dest/include/sound/compress_params.h' -> '/usr/include/sound/compress_params.h'
'dest/include/sound/emu10k1.h' -> '/usr/include/sound/emu10k1.h'
'dest/include/sound/firewire.h' -> '/usr/include/sound/firewire.h'
'dest/include/sound/hdsp.h' -> '/usr/include/sound/hdsp.h'
'dest/include/sound/hdspm.h' -> '/usr/include/sound/hdspm.h'
'dest/include/sound/sb16_csp.h' -> '/usr/include/sound/sb16_csp.h'
'dest/include/sound/sfnt_info.h' -> '/usr/include/sound/sfnt_info.h'
'dest/include/sound/skl-tplg-interface.h' -> '/usr/include/sound/skl-tplg-interface.h'
'dest/include/sound/snd_sst_tokens.h' -> '/usr/include/sound/snd_sst_tokens.h'
'dest/include/sound/tlv.h' -> '/usr/include/sound/tlv.h'
'dest/include/sound/usb_stream.h' -> '/usr/include/sound/usb_stream.h'
'dest/include/video/edid.h' -> '/usr/include/video/edid.h'
'dest/include/video/sisfb.h' -> '/usr/include/video/sisfb.h'
'dest/include/video/uvesafb.h' -> '/usr/include/video/uvesafb.h'
'dest/include/xen/evtchn.h' -> '/usr/include/xen/evtchn.h'
'dest/include/xen/gntalloc.h' -> '/usr/include/xen/gntalloc.h'
'dest/include/xen/gntdev.h' -> '/usr/include/xen/gntdev.h'
'dest/include/xen/privcmd.h' -> '/usr/include/xen/privcmd.h'

full raw output

Much of the knowledge of this site came from the Linux From Scratch project and the contributors. I salute you. You rock. Linux is an operating system kernel that is a registered trademark of Linus Torvalds. GNU is an operating system started by Richard Stallman with a goal of freedom for computer users. Jean-Michel Jarre and Moby have accompanied me on my head phones through much of L1G3R. I've been listening to Jarre since Equinoxe. Jarre's goal is to create "anti-pattern electronic music", music that, even when repetitive, "is still in constant evolution". Moby has also had quite a bit of play on my headphones during L1G3R. His goal is "simply trying to make music that I love". I agree with Moby. I've loved everything there was here. Thank you, mountain, for the click of life. My goal is to fix chinks in the web, but I'll never know if I do; it is simply an honor to be able to climb.