- This topic has 55 replies, 10 voices, and was last updated Aug 27-2:18 pm by Brian Masinick.
- August 18, 2020 at 11:19 am #40460Memberolsztyn::
Thanks for sharing your experiment with syslinux.
As you already found out from research extlinux and syslinux appear to have merged. In my experiment it is not that I was able to ‘replace’ extlinux with syslinux to accomplish the same goal, but rather since they are supposed to be merged into the same I just copied all /syslinux from antiX Live to the hard disk /boot/syslinux, so I did not have to collect all those files separately.
So from reading the relevant documentation I understand that /boot/extlinux is virtually the same content as /boot/syslinux and the only difference I noticed was that extlinux.conf needed to be replaced with syslinux.cfg. I think syntax of both appears to be the same at first glance.
So if I remember details I copied /antiX folder from Live to sda1, copied /syslinux from Live to sda1 and replaced extlinux.conf with syslinux.cfg. Of course the initial step to prime MBR with extlinux (those 440 bites) boot code remains as extlinux.
From what I read I understand that due to merge if you prime MBR with boot code you can use either /extlinux or /syslinux and if both are there then /extlinux takes precedence. Similar with extlinux.conf and syslinux.cfg – if both are there then extlinux.conf takes precedence. However I did not have the time to do extensive testing.
As soon as I have some time I will try to test this sequence:
– Copy /antiX from Live to sda1
– Copy /boot/syslinux from Live to sda1
– Load MBR with extlinux/syslinux (merged?) boot code – those 440 bytes
– Edit syslinux.cfg or extlinux.conf labels to point to /antix on HD
All copy operations are just drag or copy/paste on file manager (I am using SpaceFM).
From what I read extlinux/syslinux boot code is standard in industry, unlike Grub2, and is used both for Linux and Windows. But I have not have an opportunity to dig into this so far…
Just an idea…
- This reply was modified 3 years, 3 months ago by olsztyn.
- This reply was modified 3 years, 3 months ago by Brian Masinick.
Live antiX Boot Options (Previously posted by Xecure):
http://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_ParametersAugust 19, 2020 at 8:17 am #40493Memberanilkagi::
if both are there then /extlinux takes precedence… if both are there then extlinux.conf takes precedence.
Ah! that’s an interesting finding.
You know @Olsztyn, bootloaders have always fascinated me. I always wanted to dig deep into bootloaders to understand them better. I really love what @Christophe did and shared, because I do not have the calibre to do all that research and trials he conducted. I can perceive the efforts that went into it. It was given to me on a platter, I mean the understanding of how extlinux or any bootloader for that matter works, or at least a glimpse of it. Now you did it with syslinux. Many thanks to you both guys. When I was doing the extlinux thing as per the steps, I felt, at last I got this beast under my control, now I call the shots. I felt, at last, I am inside the enigma, getting to look inside. Really that was a pleasurable moment. The bootloader is so critical. One missed step, one small mistake, and you will not see your OS. Your computer is a dead brick.
I just copied all /syslinux from antiX Live to the hard disk /boot/syslinux… I copied /antiX folder from Live to sda1, copied /syslinux from Live to sda1… All copy operations are just drag or copy/paste on file manager
This is also an interesting finding. It shows that the bootloader, at least extlinux and syslinux, are not integrated with OS, could be the case with grub too and even the android bootloader or any bootloader for that matter. When Christophe said that the steps need to be conducted in the same sequence, for this to work, I thought the installation of extlinux into /sda1, where ‘antix’ has been placed prior to it, would integrate both. From your experiment of just copying, it shows that the two namely the OS & the bootloader are not integrated with one another. It is just the conf file that tells the bootloader at the time of booting, the location and name of the OS. That’s it. It is just a play of name & address. The bootloader and the OS are not at all integrated. The bootloader just passes the batten to the OS and steps back. The conf file is the link between the two, or the delivery address, if my thinking is correct about all this. You place the name and address of a working OS inside the conf file and it is delivered.
I always thought, when a computer fails to boot, something has horribly gone wrong with the integration between the bootloader and the OS. No there isn’t much between them.
The thing is that, though I am not able for the code stuff, I am very much interested in getting to know the interlinks between the different sections and aspects of a computing device and what is their function. Thank you @Christophe & @Olsztyn, for throwing light upon this aspect.
Instead of editing the conf file for booting into different OSes, I experimented by placing different remastered versions of the OS, with different names inside the /media/sda1 or the /media/antix-Frugal folder. I would change the name of the OS that I wanted to boot into, to ‘antix’, that’s all. Then extlinux lets you boot into that OS, without me editing the conf file. I even interchanged different linuxfs files, placing them inside /antix with different names, but would change the name to linuxfs if I wanted to boot into a particular version of OS. It works fine.
It would be so interesting if different aspects of the OS were, this ‘modular’, like this. Just repairing the defective module or just replacing it with a new ready available section. We would be in so much control and it would be so much easier to get to grips with the OS. Or is it already there that I am not aware of. The Frugal install is also something of this kind. Just replace the defective linuxfs with another working one, by simply changing the names, ‘old’, ‘new’ etc. No need to install fresh. Its always fresh. Just changing one name can give you an entirely fresh OS. This is simply a great invention by the antix team. No words to thank them. (More on that later). We are so much in control of the device that we depend on so much. Computing was never so much fun. Anticapitalista has rightly said it. “Install frugal, have fun”. Really its fun. I am enjoying every bit of it.
August 19, 2020 at 8:57 am #40495Memberolsztyn::
- This reply was modified 3 years, 3 months ago by anilkagi.
- This reply was modified 3 years, 3 months ago by Brian Masinick. Reason: typos
This is also an interesting finding. It shows that the bootloder, at least extlinux and syslinux, are not integrated with OS, could be the case with grub too and even the android bootloder or any bootloader for that matter. When Christophe said that the steps need to be conducted in the same sequence, for this to work, I thought the installation of extlinux into /sda1, where ‘antix’ has been placed prior to it, would integrate both.
Bootloader such as syslinux/extlinux is not integrated with OS. You can have bootloader installed but no OS. I believe this is also for Grub. So at the point you install extlinux you may not have antiX but in order to boot OS you must have antiX (or another OS).
Extlinux is a flavor of syslinux to support booting on ext4 partitions. Bootloaders are most often included in installation of OS (such as Windows) as often you install OS on empty partition, so MBR boot code needs to know how to boot, and often MBR is replaced with what is convenient for the OS during install process.
E.e. Grub2 will destroy the existing, industry standard boot code (440 bytes) as well all related to syslinux/extlinux and will insist on installing itself, disregarding user’s boot loader preference. In a way Grub2 is a virus that managed to infect so many PCs with loads of junk it inserts in the file system… Well, perhaps it is a figure of speech…
So extlinux being a flavor of syslinux and merged into the same, the key to remember in addition to having /boot/syslinux or /boot/extlinux bootloader related files, which you can copy as Christophe described or just copy /syslinux from antiX Live, you need the following in order for extlinux boot loader to work:
– The one-time only prime MBR with extlinux bootcode (those 440 bytes) as documented by Christophe. It stays there even if you reformat partition.
– One-time extlinux –install instruction, also documented by Christophe. This in addition to copying ldlinux.sys bootloader into /boot/extlinux or /boot/syslinux, which is there already from prior copy, also installs syslinux boot code into the first sector on boot partition. This first sector stays there until you reformat that partition.
Once you have these few pieces in place it works like a charm, just make sure labels in extlinux.conf or syslinux.cfg point to antiX (I have multiple antiX Frugals on the menu). And you can have labels booting other OS’es, like Windows, if you want.
Just some points from my experience…
Live antiX Boot Options (Previously posted by Xecure):
http://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_ParametersAugust 19, 2020 at 9:10 am #40497Memberolsztyn::
Instead of editing the conf file for booting into different OSes, I experimented by placing different remasterd versions of the OS, with different names inside the /media/sda1 or the /media/antix-Frugal folder. I would change the name of the OS that I wanted to boot into, to ‘antix’, that’s all. Then extlinux lets you boot into that OS, without me editing the conf file. I even interchanged different linuxfs files, placing them inside /antix with different names, but would change the name to linuxfs if I wanted to boot into a particular version of OS. It works fine.
This is another example of beauty and power of antiX. The entire file system of antiX is compacted in one file – linuxfs. You can use your customized antiX linuxfs and homefs, if you want home persistence you also have homefs. If you finalize your flavor you just remaster the Frugal instance and run with no persistence.
Live antiX Boot Options (Previously posted by Xecure):
http://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_ParametersAugust 19, 2020 at 9:14 am #40498Memberolsztyn::
This is simply a great invention by the antix team. No words to thank them. (More on that later). We are so much in control of the device that we depend on so much. Computing was never so much fun. Anticapitalista has rightly said it. “Install frugal, have fun”. Really its fun. I am enjoying every bit of it.
Thanks to antiX team! Live/Frugal antiX is a masterpiece not possible find elsewhere…
http://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_ParametersAugust 20, 2020 at 6:40 am #40548Memberanilkagi::
Very informative post. Lots of great information.
Thanks for the painstaking explanation, @Olsztyn.October 25, 2020 at 5:36 am #43695Moderatorchristophe::
I thought I’d just mention this added parameter which can be added to the extlinux.conf file:
It hides the menu & boots the default entry at the end of the timeout, unless one presses any key.
My current top stanza looks something like this:
UI vesamenu.c32 TIMEOUT 50 MENU HIDDEN MENU TITLE antiX Linux - Dell D420 - frugals MENU BACKGROUND splash302.png MENU COLOR border 30;44 #40ffffff #a0000000 std
I find it nice to see the splash image without interruption, unless I want to choose a non-default boot entry…
Also, here’s my simple but fun splash screen (attached).
confirmed antiX frugaler, since 2019October 25, 2020 at 1:31 pm #43718Memberolsztyn::
Thanks Christophe for continued perfecting this Frugal-Only technology with Extlinux…
http://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_ParametersAugust 27, 2023 at 3:16 am #114974Anonymous::HelpfulUp1
christophe’s post still helps me today and I want to say thanks.
Now, I am sharing my findings after making a few mistakes and wasting a lot of time.
1) All the magic lies in the ISO VERSION of /antiX/initrd.gz file!!
I have been using extlinux in my /dev/sda1 to boot various distributions from different partitions on my /dev/sda for years. So yesterday I booted antix 22 (32bit) cdrom and used the GUI in the live environment to install antix to, say /dev/sda2. All I had to do was copying vmlinuz and initrd.img from the /boot directory of the fully installed environment to a /antix22 directory in /dev/sda1 and creating an appropriate entry in my extlinux.conf and then I was able to boot into the full installation of antix on /dev/sda2. That’s the reason I love extlinux way better than grub.
(In truth I used kvm to do all this on a usb flash drive as the VM’s /dev/sda, but that’s irrelevant.)
Then I wiped /dev/sda2 and booted the cdrom (actually the iso) again, this time choosing frugal_static at boot prompt. So after a few steps, including setting a password different from the default “demo”, antix created the antiX-Frugal-4.9.0-326-antix.1-486-smp/ directory on /dev/sda2, and created the two ext4 image files rootfs and homefs in that directory.
Then I tried to modify extlinux.conf to boot into /dev/sda2 again. I know that the boot option “root=UUID=…” makes no sense in the case of frugal installation. It should be “root=live” for most iso files I know of. Anyway I tried both along with various other options and none worked. Every time I had “root=UUID=…” I got complaints about not being able to find various directoies and files of a functional linux system, which was exactly what I expeced because those directoies and files only exist inside antiX-Frugal-4.9.0-326-antix.1-486-smp/linuxfs , not directly visible on /dev/sda2 .
At some point I thought of christophe’s initial comments, decided to start from the iso itself, and tried /antiX/initrd.gz from the iso file in place of /boot/initrd.img* from the full installation, and suddenly it worked!
2) You don’t need the “root=UUID=…” option. The entries in /boot/isolinux/isolinux.cfg do not have it at all.
3) You need the “frugal_static” option (or other frugal options) for persistence.
So I renamed antiX-Frugal-4.9.0-326-antix.1-486-smp/ as antix-frugal/ and here is my final entry in extlinux.conf:
menu label antix22
append initrd=/antix22/initrd.gz bdev=/dev/sda2 bdir=antix-frugal frugal_static fdir=antix-frugal
This makes antix successfully boot into /dev/sda2, find the antix-frugal directory, and create an overlay of homefs and rootfs on top of linuxfs. Most notably, I have to use the new password I chose yesterday whenever I want to do su.
If I press “tab” and delete the last two options (frugal_static fdir=antix-frugal) at the boot prompt, the booted system does not contain homefs and rootfs in the overlay. It is forgetful, and I have to use the default password “demo”.
Here are the main differences between the df outputs of the two situations:
tmpfs 2451456 2140 2449316 1% /live/aufs-ram | /dev/loop1 1992552 174560 1696752 10% /live/persist-root overlay 2451456 2140 2449316 1% / | overlay 1992552 174560 1696752 10% / ------------------------------------------------| /dev/loop2 485330 721 454913 1% /home
This table of boot parameters is very helpful.
Hope this post will save some time for careless people like me who incorrectly use /boot/initrd.img* from the installed system in place of the magic initrd.gz from the iso.August 27, 2023 at 2:18 pm #115000ModeratorBrian Masinick::
@ckhung nice write-up on your experiences.
I’ve said many times that it can be “helpful”, as long as you have images available to install and reinstall, along with a safe place where important information is available, to EXPERIMENT, make mistakes, look at log files and configurations; there is a LOT that can be learned for those willing to look at everything. As a retired software systems engineer, I’ve learned the specifications of systems and tested both hardware and software components to make sure they met physical specifications and software requirements.
Needless to say I’ve attempted to “break” things countless times over the years. While that is not necessarily my primary objective these days, when a project needs testing, this background comes in handy.
Your work is valuable, both to yourself and to this community so I thank you for sharing it with us!
- You must be logged in to reply to this topic.