WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Configure LILO to boot Tiny Core Plus  (Read 5121 times)

Offline luiznetto

  • Newbie
  • *
  • Posts: 8
Configure LILO to boot Tiny Core Plus
« on: January 27, 2020, 03:53:08 PM »
Hello everybody.

I just installed Tiny Core Plus on a partition on my hard drive - sda1 to be more precise. I have Debian installed on another partition - sda3. I need to edit my /etc/lilo.conf file (viewed from Debian) to be able to boot Tiny Core. Here is how it looks now:
Code: [Select]
# /etc/lilo.conf
# Generated by me (Luiz Netto)
# Global options
lba32
#boot = /dev/sda
boot = /dev/disk/by-id/ata-WDC_WD800BEVS-22RST0_WD-WXE108X13461
verbose = 5
map = /boot/map
install = menu
menu-scheme = Wb:Yr:Wb:Wb
prompt
timeout = 18000
vga = normal

# Kernels to boot, available on the menu:

# Debian
root = /dev/sda3
image = /boot/vmlinuz-4.19.0-5-686
initrd = /boot/initrd.img-4.19.0-5-686
label = "Debian"
read-only

I thought all I had to do is this:
Code: [Select]
# /etc/lilo.conf
# Generated by me (Luiz Netto)
# Global options
lba32
#boot = /dev/sda
boot = /dev/disk/by-id/ata-WDC_WD800BEVS-22RST0_WD-WXE108X13461
verbose = 5
map = /boot/map
install = menu
menu-scheme = Wb:Yr:Wb:Wb
prompt
timeout = 18000
vga = normal

# Kernels to boot, available on the menu:

# Debian
root = /dev/sda3
image = /boot/vmlinuz-4.19.0-5-686
initrd = /boot/initrd.img-4.19.0-5-686
label = "Debian"
read-only

# Tiny Core
root = /dev/sda1
image = /tce/boot/vmlinuz
initrd = /tce/boot/core.gz
label = "Tiny Core Plus"
read-only
But it doesn't work, when I try to update the MBR by typing /sbin/lilo as root, I get a message 'vmlinuz : file not found'. What is the right way to do it?

Your help is deeply appreciated.

Offline Len E.

  • Newbie
  • *
  • Posts: 22
Configure LILO to boot Tiny Core Plus
« Reply #1 on: February 10, 2020, 01:26:40 PM »
Hi Luiz:

I'm hoping to follow in your footsteps on this, so I have some ideas that
might help.
***************************************************************************************
I'm assuming that you had Debian installed first, before Tiny Core Plus, with its
grub bootloader installed to the mbr.

When you boot up the machine, I believe what appears immediately is a boot
list with something like the following:
Debian GNU/Linux, with Linux 4.9.0-11-686 (systemd) on /dev/sda3
Debian GNU/Linux, with Linux 4.9.0-11-686 (recovery mode) on /dev/sda3
(1 or 2 memory test options)


Debian uses grub2, which allegedly is capable of chaining to any other distro
installed in other partitions on the hard drive.

Therefore, if all of the above is true, in Debian, from a terminal session,
enter              sudo update-grub

The screen output will show the Debian configuration file being regenerated, and
hopefully CorePlus added to the boot list.   If CorePlus does appear, reboot,
and CorePlus should be selectable.
*****************************************************************************************
If none of the above works,   an external boot loader may help diagnose what is wrong.
Super Grub version 2.02 or Plop can be installed to a CD or a flash drive, booted up,
and allow selection of a hard drive partition.   ( Super Grub can access any partition,
Plop only the 1st 3 partitions on the hard drive.)    In particular, if your lilo, conf  file is
constructed properly,  CorePlus should boot up o.k. in this way.

*********************************************************************************************
Some of my past experience:      I've installed CorePlus 10.1 and earlier versions in
a partition with the Grub legacy 0.997 boot loader installed.    With either Debian
or a Ubuntu derivative installed with grub2 to the mbr,  the boot list generated with
the sudo update-grub command would never pick up CorePlus.    CorePlus would
come up just fine from both Super Grub version 2.02 or Plop.

In the same manner, I've installed various Puppy Linux versions to other partitions.
Puppy Linux uses Grub legacy 0.997 also.   The sudo update-command  always
picked them up, adding them to the boot list.   I'm still puzzled as to why Puppy
Linux is picked up and CorePlus is not.

*****************************************************************************************
Hope something works for you !!

Len E.
 

Offline Len E.

  • Newbie
  • *
  • Posts: 22
Configure LILO to boot Tiny Core Plus
« Reply #2 on: February 11, 2020, 08:13:40 PM »
Hi Luiz:    I did some subject work on my test machine which wasn't successful,
                 but a few things I encountered might be useful information for you.

(I've attached my lilo.conf  file).
My test machine has Bodhi-4.4.0, a Ubuntu derivative, controlling
the mbr, residing in sda1.   My CorePlus installations were in sda3,
sda8 is the swap space.    I retrieved lilo-static.tcz from the version 4
Tiny Core archive and used it for lilo.

My initial attempt was with CorePlus-11.0, but when executing lilo,
the error message came up, "setup length exceeds 31 maximum",
which apparently means that the linux image is too large, more than 31
sectors.

I then used CorePlus-10.1 to test, and it revealed an apparent error
in my linux.conf.   The error message was  "create /boot/boot.0803
no such file or directory".    It needed a directory /boot,  which
CorePlus doesn't have, so I created one,
         cd /
         sudo mkdir boot

lilo then executed successfully.
*************************************************************************
I then immediately rebooted to Bodhi-4.4.0 and ran "sudo update-grub",
but CorePlus did not appear on the boot list.

I booted up the SuperGrub v2.02 cd, selected sda3, and the LILO v 22.8
initial screen prompted for the password, which I had set simply as    linux.

The bootup started,  but a kernel panic occurred,  with messages about
not being able to  init   properly.
*********************************************************************************
With my very-limited knowledge of  LILO,  I've gone about as far as I can go.

Hope this is of some help  !
Len E.
 



Offline Len E.

  • Newbie
  • *
  • Posts: 22
Configure LILO to boot Tiny Core Plus
« Reply #3 on: February 12, 2020, 12:00:16 AM »
Hi Luiz:        some   progress:

(My revised lilo.conf file is attached).

I eliminated the kernel panic problem by adding an
initrd statement to lilo.conf.

CorePlus now boots up fine, but only from an external bootloader.
Both super grub v.2.02 and plop worked in that regard.

The "sudo update-grub" command on Bodhi won't pick up the
CorePlus partition.

Len E.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14756
Re: Configure LILO to boot Tiny Core Plus
« Reply #4 on: February 12, 2020, 12:20:47 AM »
Can't you manually edit the grub config?

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1458
Re: Configure LILO to boot Tiny Core Plus
« Reply #5 on: February 12, 2020, 10:11:57 AM »
The "sudo update-grub" command on Bodhi won't pick up the
CorePlus partition.

Len E, try putting this in Bodhi's /boot/grub/custom.cfg (create the file if it doesn't exist):
Code: [Select]
menuentry 'TinyCore' {
set root=(hd0,msdos3)
linux /boot/vmlinuz
initrd /boot/core.gz
}
grub is hardwired to parse custom.cfg at boot time--no need for sudo update-grub

Note that you may need to change hd0 to ahci0 depending on your hardware. Also, the number may be different than zero (e.g., hd1) if you have more than one hard drive.

Offline Len E.

  • Newbie
  • *
  • Posts: 22
Configure LILO to boot Tiny Core Plus
« Reply #6 on: February 12, 2020, 01:26:03 PM »
Hi GNUser:
 In following through on your suggestion,   I checked the contents of grub.cfg in
Bodhi, and found that the drive designations were consistent with your example,
so I entered it as is.

On rebooting, TinyCore appeared on the boot list, but on selecting it, the following
messages came up.                   error:   file "/boot/vmlinuz" not found.
                                                       error:    you need to load the kernel first.

Because  vmlinuz and core.gz  normally reside in /mnt/sda3/tce/boot,  I've never been
clear on whether  the menuentry  /boot/vmlinuz would be resolved correctly or not.
As a hedge, on CorePlus,    I've created the directory /boot, made it persistent in
.filetool.lst,  and copied the entire contents of /mnt/sda3/tce/boot into it.

Given this approach, I'm not sure why the error just encountered did occur.

Len. E.
« Last Edit: February 12, 2020, 01:33:40 PM by Len E. »

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1458
Re: Configure LILO to boot Tiny Core Plus
« Reply #7 on: February 12, 2020, 01:41:51 PM »
Because  vmlinuz and core.gz  normally reside in /mnt/sda3/tce/boot...

I put boot, opt, and tce directories at the root of my TCL partition. If your boot directory is inside your tce directory, then this is what you need in custom.cfg:

Code: [Select]
menuentry 'TinyCore' {
set root=(hd0,msdos3)
linux /tce/boot/vmlinuz
initrd /tce/boot/core.gz
}
« Last Edit: February 12, 2020, 02:04:20 PM by GNUser »

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1458
Re: Configure LILO to boot Tiny Core Plus
« Reply #8 on: February 12, 2020, 01:45:43 PM »
In general, a good way to troubleshoot grub issues is to go to the grub command line. For example:

1. At the grub menu, press c to get a grub command prompt
2. Type ls to check how grub sees your disks and partitions
3. To temporarily set a particular partition as grub's root, type this for example: set root=(hd0,msdos3)
4. At this point, you can type ls / or ls /boot/ or (in your case) ls /tce/boot/ to check what grub sees inside those directories
5. When you're done exploring and want to return to the grub menu, just press Escape

Now you have the information you need to create a working custom.cfg
« Last Edit: February 12, 2020, 02:01:12 PM by GNUser »

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1458
Re: Configure LILO to boot Tiny Core Plus
« Reply #9 on: February 12, 2020, 02:16:06 PM »
I've created the directory /boot, made it persistent in
.filetool.lst,  and copied the entire contents of /mnt/sda3/tce/boot into it.
Given this approach, I'm not sure why the error just encountered did occur.
The error occurs because when you create /boot this way (inside a running TCL), you are creating it in RAM--and it's only restored (from tce/mydata.tgz) after TCL has booted.

vmlinuz and core.gz need to exist somewhere on your harddrive where grub can find them. If they are hiding inside mydata.tgz then grub will be a sad panda.
« Last Edit: February 12, 2020, 02:21:47 PM by GNUser »

Offline Len E.

  • Newbie
  • *
  • Posts: 22
Configure LILO to boot Tiny Core Plus
« Reply #10 on: February 12, 2020, 05:51:15 PM »
Hi GNUser:     Your latest instructions were superb !!

From the Grub command line,  after entering set root=(hd0,msdos3),
the   ls /    command   showed:          lost&found/         tce/         opt/

Accordingly,  I modified the custom.cfg  to be a copy of your latest version.

After reboot,     I  selected TinyCore   from the grub menu and it came up just fine.
(There was no prompt  from  lilo   as was evident when booting from either external
  boot loader).

Thank you very much for straightening this whole thing out !
Len E.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1458
Re: Configure LILO to boot Tiny Core Plus
« Reply #11 on: February 12, 2020, 07:16:28 PM »
Len E,
I'm happy to hear you sorted it out. Glad I could help :)

Offline nikovuksan

  • Newbie
  • *
  • Posts: 1
Re: Configure LILO to boot Tiny Core Plus
« Reply #12 on: June 03, 2024, 11:15:39 PM »
This answer is years late, but maybe serve someone. (My native language is Spanish so I hope it is understood)
I have tinycore installed in /dev/sda1, Windows in /dev/sda2 and it occurred to me to install Slackware 15.0 in /dev/sda6 with Lilo in MBR.
When installing Slackware and reinciating, Lilo did not include Tinycore, only Windows and Slackware. To solve this I added this lines at the end of Lilo.conf:
other = /dev/sda1
label = tinycore
table = /dev/sda
Then execute Lilo as Root, the new Tinycore to Lilo entry was added without errors and I could start tinycore without problems.