Jump to content
XPEnology Community

Grub Boot Menu Default Value Changer for Tinycore Redpill


Recommended Posts

Posted (edited)

 

tc@box:~$

curl --location "https://github.com/PeterSuh-Q3/tinycore-redpill/raw/main/grubmenu.sh" --output grubmenu.sh; chmod +x grubmenu.sh;

 

I distribute a simple utility for Tinycore.
Some features are imported from pocopico's rploader.sh.

 

You can use this when you want to change the grub.cfg default boot menu order after rebooting if necessary.

USB <-> Tiny Core Image Build
SATA <-> Tiny Core Image Build

If you want to change in between, you don't have to wait hard in front of the keyboard.

 

Download and use the above command
You can select the latter option from 1, 2, 3 in the order of the menu.

 

tc@box:~$ ./grubmenu.sh 1
tc@box:~$ ./grubmenu.sh 2
tc@box:~$ ./grubmenu.sh 3

 

1. menuentry 'Yet Another Jun`s Mod x RedPill DS1621+ v7.0.1-42218 (USB, Verbose)' {
2. menuentry 'Yet Another Jun`s Mod x RedPill DS1621+ v7.0.1-42218 (SATA, Verbose)' {
3. menuentry 'Tiny Core Image Build' {


tc@box:~$ ./grubmenu.sh 1
Mounting /dev/sda1 to localdiskp1
grub boot partition mounted normally.
Entries in Localdisk bootloader:
==================================================== =======================
menuentry 'Yet Another Jun`s Mod x RedPill DS1621+ v7.0.1-42218 (USB, Verbose)' {
menuentry 'Yet Another Jun`s Mod x RedPill DS1621+ v7.0.1-42218 (SATA, Verbose)' {
menuentry 'Tiny Core Image Build' {

 

Setting default boot entry to USB

 

tc@box:~$ ./grubmenu.sh 2
Mounting /dev/sda1 to localdiskp1
grub boot partition mounted normally.
Entries in Localdisk bootloader:
==================================================== =======================
menuentry 'Yet Another Jun`s Mod x RedPill DS1621+ v7.0.1-42218 (USB, Verbose)' {
menuentry 'Yet Another Jun`s Mod x RedPill DS1621+ v7.0.1-42218 (SATA, Verbose)' {
menuentry 'Tiny Core Image Build' {

 

Setting default boot entry to SATA

 

tc@box:~$ ./grubmenu.sh 3
Mounting /dev/sda1 to localdiskp1
grub boot partition mounted normally.
Entries in Localdisk bootloader:
==================================================== =======================
menuentry 'Yet Another Jun`s Mod x RedPill DS1621+ v7.0.1-42218 (USB, Verbose)' {
menuentry 'Yet Another Jun`s Mod x RedPill DS1621+ v7.0.1-42218 (SATA, Verbose)' {
menuentry 'Tiny Core Image Build' {

 

Setting default boot entry to Tiny Core Image Build

 

------------------------------------------------------------ ----------------------------------

 

If you want to change to Tiny Core Image Build boot in Synology,
Connect with SSH

 

Download the above command to a suitable location in the Synology shared folder.

You can use it like this.

 

sudo ./grubmenu.sh 1
sudo ./grubmenu.sh 2
sudo ./grubmenu.sh 3

 

 

Edited by Peter Suh
  • Like 1
Link to comment
Share on other sites

  • Peter Suh changed the title to Grub Boot Menu Default Value Changer for Tinycore Redpill
Posted (edited)

It would be nice if such a script was created for synology. You could change the default grub after restarting synology. So to force TCRD to run after synology reboot to update DSM.

 

Now I see it has been done. Thanks!

 

Maybe change

1, 2, 3

to

usb, sata, tcrp

 

Edited by SanKen
  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Excellent, I was looking for something exactly like this. I would like to make a request @Peter Suh can you add a way to edit the mac address during a tinycore session? That way when a baremetal build boots to tc, it would have the same ip as it does when it boots usb/sata to DSM, and it will be simple to find.

 

 

Link to comment
Share on other sites

1 hour ago, phone guy said:

Excellent, I was looking for something exactly like this. I would like to make a request @Peter Suh can you add a way to edit the mac address during a tinycore session? That way when a baremetal build boots to tc, it would have the same ip as it does when it boots usb/sata to DSM, and it will be simple to find.

 

 

 

TCRP must be modified by pocopico.
Let me develop it as an add-on to the M shell.
./my.sh DS918+ editmac 112233445566
If you put the desired MAC address as an option in this way, it seems to be a function to change the value of mac1.

Link to comment
Share on other sites

5 hours ago, Peter Suh said:

 

TCRP must be modified by pocopico.
Let me develop it as an add-on to the M shell.
./my.sh DS918+ editmac 112233445566
If you put the desired MAC address as an option in this way, it seems to be a function to change the value of mac1.

What I need personally is, the DSM has a custom mac and I know which IP it is, or you can find it easy with find.synology.com.

But when the baremetal system boots with TC, it uses the real hardware mac, so the IP changes, and that box is headless, so I can not load terminal and use ifconfig to see ip.  If TC could use the same mac, it would boot with the same ip as dsm, so I would know where it is.  Otherwise I have to search the dhcp server for the genuine hardware mac address to find the ip tc gets.

 

But I understand pocopico has to edit anything with tc. I just need a better way to find the ip of tc when it boots headless. I dont know of any tricks to do that.

Link to comment
Share on other sites

15 minutes ago, phone guy said:

What I need personally is, the DSM has a custom mac and I know which IP it is, or you can find it easy with find.synology.com.

But when the baremetal system boots with TC, it uses the real hardware mac, so the IP changes, and that box is headless, so I can not load terminal and use ifconfig to see ip.  If TC could use the same mac, it would boot with the same ip as dsm, so I would know where it is.  Otherwise I have to search the dhcp server for the genuine hardware mac address to find the ip tc gets.

 

But I understand pocopico has to edit anything with tc. I just need a better way to find the ip of tc when it boots headless. I dont know of any tricks to do that.

 

Have you ever seen an IP address exposed on ARPL's loader boot screen?
This is the first feature I proposed to fabio and added.

 

So, TC has discussed with fabio how to expose the IP address to the console during the loader boot stage in the same way.

However, it was concluded that there was no way to expose the IP address to the console like this because TC's grub handling method was different from ARPL.
I was really sad too.

  • Like 1
Link to comment
Share on other sites

27 minutes ago, phone guy said:

What I need personally is, the DSM has a custom mac and I know which IP it is, or you can find it easy with find.synology.com.

But when the baremetal system boots with TC, it uses the real hardware mac, so the IP changes, and that box is headless, so I can not load terminal and use ifconfig to see ip.  If TC could use the same mac, it would boot with the same ip as dsm, so I would know where it is.  Otherwise I have to search the dhcp server for the genuine hardware mac address to find the ip tc gets.

 

But I understand pocopico has to edit anything with tc. I just need a better way to find the ip of tc when it boots headless. I dont know of any tricks to do that.

 

 

Personally, the easiest way for me to find an IP from REDPILL headless without find.synology.com is to assign a static MAC address and IP address to the router.
The mac address does not matter whether it is a real hardware mac address or a virtual mac address.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...