Tiny Core Linux

General TC => Programming & Scripting - Unofficial => Topic started by: midas007 on July 30, 2019, 07:16:45 PM

Title: How to [localboot] in Kernel ?
Post by: midas007 on July 30, 2019, 07:16:45 PM
I had use a Tiny Core Linux into my USB as a key,
after boot to kernel
tc@box:~$ : RunSCSIAPI.exe  to key-in password and Sync my both SSD & USB encrypt data to unlock my SSD, after all data and password matched the SSD decrypt data to be normal.
and I need remove the USB and reboot to make token taken by BIOS then SSD can bootup.

if there any api or good method to boot SSD directly without remove USB or reboot to BIOS?
1.just bootup Harddisk in Kernel at tc@box:~$
2.exit kernel and send some flag then go back to isolinux boot: auto check flag &  [localboot -1]
3.any other suggestion ?
Title: Re: How to [localboot] in Kernel ?
Post by: curaga on July 31, 2019, 12:03:05 AM
Linux can boot Linux via kexec. There is no way to boot the disk's bootloader without going through the bios.
Title: Re: How to [localboot] in Kernel ?
Post by: midas007 on July 31, 2019, 07:14:47 PM
Linux can boot Linux via kexec. There is no way to boot the disk's bootloader without going through the bios.


1.just bootup Harddisk in Kernel at tc@box:~$  seems no way for now .
  >>Thanks for saving the researching time from deeply and wide world.  :) thanks again.
2.exit kernel and send some flag then go back to isolinux boot: auto check flag &  "localboot -1"
  Here is some idea regarding for item#2
 if it possible to add a function in isolinux boot . example as below in Quote:
  Force_Default_Remain_CountDown = 1 set in kernel . and when next BIOS boot to USB isolinux boot . it
  will Force boot from "localboot -1". then HHD bootup.
  It means Next USB boot will still back to USB's tinycore kernel  to perform the USB Key by password sync again. Force_Default_Remain_CountDown back to zero and take default is label "1".


Quote
display boot.msg
default 1
# Boot other devices
label 0
    localboot -1
    Force_Default_Remain_CountDown = 1
# USB BOOT
label 1
   kernel /boot/vmlinuz
   append initrd=/boot/core.gz loglevel=3
implicit 0
prompt 1
timeout 0
F1 boot.msg
F2 f2
F3 f3
F4 f4