Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: picassotkatt on April 04, 2018, 09:40:24 AM
-
While this sounds weird, this is what I need to do -
From a working Lubuntu system, boot Tiny Core into RAM to do some hardware/OS maintenance.
I have a remastered TC .iso file and that works just fine.
I have this as a stanza in the Lubuntu grub.cfg file -
menuentry "Rebuild" {
loopback loop /Rebuild.iso
linux (loop)/boot/vmlinuz autologin rebuilder
initrd (loop)/boot/core.gz
}
This will indeed load and start TC. But, I also need to pass the command "rebuilder" to TC to automatically run at startup.
The startup command never runs. Just get the default shell prompt.
When done with an installed version TC, (not booting as loop .iso) such things work.
Is there a limitation where you cannot do this when booting the .iso as a loop device?
Also tried modifying the isolinux.cfg file with an "append" line. But when TC launches from grub, syslinux seems to get bypassed. At least the boot menu is never displayed.
Suspecting something obvious is being missed.
Any suggestions greatly appreciated.
Thanks in advance.
-
Hi picassotkatt
If you want the command to always run, try adding it to /opt/bootlocal.sh.
-
Maybe try adding the iso= boot code
iso=/mnt/sda1/isos/Rebuild.iso
and maybe the cde boot code so it doesn't use any tce directory that may be on attached hard drives.
-
Rich
Thank you, you were 100% right.
For anyone else, maybe save some time and aggravation, as Rich suggested, adding to /opt/bootlocal.sh -
if (grep rebuilder /proc/cmdline) ; then /usr/local/bin/rebuilder ; fi
Works perfectly.
With the if command you can then pass a different command and execute it as needed just by parsing /proc/cmdline .
Thanks everyone!!
-
Hi picassotkatt
You are welcome.
With the if command you can then pass a different command and execute it as needed just by parsing /proc/cmdline .
If you look at the startup script /etc/init.d/tc-config you'll see a case command in a loop parsing /proc/cmdline
and setting flags for use later in the script. This is not to suggest you modify that script, /opt/bootlocal.sh is the correct place to
do this.