Ed_P wrote:rara wrote:Oh btw, I had tried various order of cheatcodes including what you have suggested. Made no difference. And my current cheatcode that is working also has from cheatcode from ahead of initrd, so this is a non-issue.
It's not a question of cheatcode sequence its a question of INITRD being on the APPEND line rather than on a line by itself as was shown previously..
Thanks, Ed_P, for coming out to help.
What you say makes sense. Is that how it is 'supposed' to work? Is there any documentation regarding this that I can read to enhance my knowledge?
As I mentioned before, I had already tried playing with the order of the cheatcodes and it had made no difference during my testing. But encouraged by this new idea of having INITRD on a separate line of its own, I created some test cases and executed them. Here are my test cases and the test results.
Code: Select all
LABEL p12a
MENU LABEL Porteus 1.2 XFCE
KERNEL /Porteus1.2/vmlinuz
INITRD /Porteus1.2/initrd.xz
APPEND from_dir=/Porteus1.2/ changes=/Porteus1.2/ copy2ram nocd noswap nomagic norootcopy volume=100%
LABEL p12b
MENU LABEL Porteus 1.2 XFCE
KERNEL /Porteus1.2/vmlinuz
APPEND initrd=/Porteus1.2/initrd.xz from_dir=/Porteus1.2/ changes=/Porteus1.2/ copy2ram nocd noswap nomagic norootcopy volume=100%
LABEL p12c
MENU LABEL Porteus 1.2 XFCE
KERNEL /Porteus1.2/vmlinuz
APPEND from_dir=/Porteus1.2/ initrd=/Porteus1.2/initrd.xz changes=/Porteus1.2/ copy2ram nocd noswap nomagic norootcopy volume=100%
LABEL p21a
MENU LABEL Porteus 2.1 XFCE
KERNEL /Porteus2.1/boot/vmlinuz
APPEND initrd=/Porteus2.1/boot/initrd.xz from=/Porteus2.1/ changes=/Porteus2.1/ copy2ram nocd noswap nomagic norootcopy volume=100%
LABEL p21b
MENU LABEL Porteus 2.1 XFCE
KERNEL /Porteus2.1/boot/vmlinuz
APPEND from=/Porteus2.1/ initrd=/Porteus2.1/boot/initrd.xz changes=/Porteus2.1/ copy2ram nocd noswap nomagic norootcopy volume=100%
LABEL p31
MENU LABEL Porteus 3.1 KDE
KERNEL /Porteus3.1/boot/vmlinuz
APPEND from=/Porteus3.1/ initrd=/Porteus3.1/boot/initrd.xz changes=/Porteus3.1/ copy2ram nocd noswap nomagic norootcopy volume=100%
LABEL p31b
MENU LABEL Porteus 3.1 KDE
KERNEL /Porteus3.1/vmlinuz
APPEND initrd=/Porteus3.1/initrd.xz from=/Porteus3.1/
LABEL p31c
MENU LABEL Porteus 3.1 KDE
KERNEL /Porteus3.1/vmlinuz
INITRD /Porteus3.1/initrd.xz
APPEND from=/Porteus3.1/
In the above test cases, I have tried booting Porteus 1.2, 2.1 and 3.1 with various order of cheatcodes. Version 1.2 and 2.1 booted successfully with all 5 test cases. Version 3.1 didn't boot with any of three test case (for the testing purpose I have undone my fix on 3.1 installation temporarily).
So, I tried booting all the above one by one, examining the actual boot parameter that bootloader will pass to the OS before booting (by hitting <TAB>), and actual parameter received by the OS (by examining the contents of /proc/cmdline).
Here are my test results:
(1) Order of the cheatcodes matters.
(2) Bootloader passes them in the same order they exist in the menu configuration line. (It may be worth noting here that I used Syslinus for all my testing. If it works differently for another bootloader it could be a different story).
(3) If INITRD is passed on a line of its own, it is passed as the last cheatcode item.
(4) Post boot, the OS reports BOOT_IMAGE as the last boot parameter, and INITRD as the second last; regardless of the order they were passed by the bootloader.
(5) Order of the cheatcodes *actually* doesn't matter beyond cosmetics. The OS doesn't seem to use them in the same sequence they are passed.
Can someone please replicate this on their machine and validate my findings running the test cases?