Tiny Core Base > Micro Core
Simple script
TC_Noob:
Hi, Linux noob here. I want to modify the isolinux.cfg file:
--- Code: ---display boot.msg
default microcore
label microcore
kernel /boot/vmlinuz
append initrd=/boot/core.gz loglevel=3
label mc
kernel /boot/vmlinuz
append initrd=/boot/core.gz loglevel=3
implicit 0
prompt 1
timeout 300
F1 boot.msg
F2 f2
F3 f3
F4 f4
--- End code ---
...to bypass the prompt to press <Enter>, F2, F3 or F4 and instead boot to a message like "hello world, press any key", and when the user presses a key it displays the current IP address (by invoking IFCONFIG ETH0).
Sounds simple enough, just need help getting started...
gerald_clark:
There is no current IP address. Core is not running at this point.
TC_Noob:
Ok, but when booting, I hit enter and get to the prompt and IFCONFIG eth0 works. How would I remove the need to press Enter (I assume to remove a few lines from the isolinux.cfg file) and display the address?
TC_Noob:
--- Quote from: TC_Noob on May 16, 2014, 01:54:47 PM ---Ok, but when booting, I hit enter and get to the prompt and IFCONFIG eth0 works. How would I remove the need to press Enter (I assume to remove a few lines from the isolinux.cfg file) and display the address?
--- End quote ---
- Confirmed. It goes straight to the prompt when modified to:
--- Code: ---display boot.msg
default microcore
label microcore
kernel /boot/vmlinuz
append initrd=/boot/core.gz loglevel=3
label mc
kernel /boot/vmlinuz
append initrd=/boot/core.gz loglevel=3
--- End code ---
So at this point, I just want a prompt to press a key, then after pressing a key to display the result of IFCONFIG ETH0.
gerald_clark:
If you hit enter, you boot core.
When you get a prompt, you are in core, not the boot loader.
If you want to show your IP address, you need to have a persistent tce directory.
Then you can add a script to /opt/bootlocal that loops until an IP address has been assigned, and then displays the IP address.
Look at /etc/init.d/settime.sh as an example on how to wait until an IP address is assigned.
Navigation
[0] Message Index
[#] Next page
Go to full version