need to remove lilo and install grub

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
ejames82
Posts: 16
Joined: 21. Jun 2011, 17:45

need to remove lilo and install grub

Post by ejames82 »

i had a 'quad boot', which means i had four OSs to choose from. sda was xp home (sda1) and tinycore (sda2). sdb was xp pro (sdb1) and ubuntu (sdb2). i chose to overwrite the ubuntu (sdb2) OS with salix.
salix uses lilo, which i am inexperienced with. when i was done with the installation (which went fine), all i could boot to was xp home (sda1) or salix (sdb2). this is rather odd since they are on two separate hard drives. i put in an ubuntu disk to see if my tinycore (sda2) is still intact and it appears to be.

i tried to use the command
lilo -U
the terminal said 'lilo is not installed'
i then tried to install grub, and i received this error:

ubuntu@ubuntu:~$ sudo grub-install /dev/sda
/usr/sbin/grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?).
No path or device is specified.
Try `/usr/sbin/grub-probe --help' for more information.
Auto-detection of a filesystem module failed.
Please specify the module with the option `--modules' explicitly.


i then tried to mount according to a tutorial i read:
sudo mount /dev/sda2 /mnt
then:
nautilus /mnt
to verify that sda2 was mounted, and i saw the tinycore folders

i tried the grub-install again:
ubuntu@ubuntu:~$ sudo grub-install /dev/sda
/usr/sbin/grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?).
No path or device is specified.
Try `/usr/sbin/grub-probe --help' for more information.
Auto-detection of a filesystem module failed.
Please specify the module with the option `--modules' explicitly.

i would like to remove the lilo and reinstall grub so that i can use all four OSs.
can anybody help me with this?
thanks
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: need to remove lilo and install grub

Post by Shador »

Just install the grub2 package on salix together with os-prober and optionally sg2conf. If you installed sg2conf you'll have a menuentry for it under System, which allows you to install grub2. Otherwise install grub2 with grub-install and grub-mkconfig as you would on any other distro.

Edit: This should give you menuentries for all your installed systems if os-prober is installed and not disabled in /etc/default/grub, by default that's not the case.

Edit 2: This only might work properly if your other linux systems (tinycore) have a valid grub.cfg, menu.lst or lilo.conf.
Image
ejames82
Posts: 16
Joined: 21. Jun 2011, 17:45

Re: need to remove lilo and install grub

Post by ejames82 »

Shador,

i looked under 'system' and saw no 'sg2conf', but i did see the 'lilo setup'. i don't know how to use lilo setup, but if someone with that knowledge could guide me through the configuration so that i could boot to all four OSs, i would keep lilo. this isn't so much directed at you, but directed at anybody else viewing this thread.

your solution is something:
1. i have never heard of
2. i don't know how to do

if you could guide me through i would cooperate to the best of my ability. i'm not half bad at the command line.
thanks for the reply.
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: need to remove lilo and install grub

Post by Shador »

It's not there because you didn't install grub2, os-prober and sg2conf as I told you.
Image
User avatar
gapan
Salix Wizard
Posts: 6244
Joined: 6. Jun 2009, 17:40

Re: need to remove lilo and install grub

Post by gapan »

I think the easiest way to go would be to keep lilo. Just run LiloSetup from the system menu and add all other distributions to the lilo menu.
Image
Image
User avatar
Akuna
Salix Wizard
Posts: 1038
Joined: 14. Jun 2009, 12:25

Re: need to remove lilo and install grub

Post by Akuna »

ejames82 wrote: i did see the 'lilo setup'. i don't know how to use lilo setup, but if someone with that knowledge could guide me through the configuration so that i could boot to all four OSs, i would keep lilo.
There is contextual help in LiloSetup which is a GUI tool.

The only thing you have to know is which partition holds which system. All partitions that can be booted are self detected, alll you have to do is give them a label & eventually reorder them the way you want them to show up in the boot menu. All the rest will be done for you automatically.

Sould be pretty easy even if you have no experience with LILO.
Image
What really matters is where you are going, not where you come from.
User avatar
luddite
Posts: 29
Joined: 22. May 2011, 14:44
Location: Ghana west africa , and U.K
Contact:

Re: need to remove lilo and install grub

Post by luddite »

Ejames82

I installed salixos and slackware 13.37 on the same hard drive, and I have a choice at boot up time of either operating system through Lilo. Both salixos and slackware only require you to have a minimum of a swap and one other partition so , keeping it to a minimum I have three primary partitions: I have swap on sda1, and then sda2 ans sda3 formatted as Linux ext file system.



Salixos was installed first onto sda2 using the swap as sda1; near the end of installation you get a choice where to install lilo, I chose MBR (master boot record)

if you look at /etc/lilo.conf the nitty gritty bit is :

image = /boot/vmlinuz

root = /dev/sda2

label = Linux

read-only

Then I installed slackware- you need designate a swap and its ok to use the swap at sda1 which was set up in the process of installing salixos. So all I had to do was install slackware onto sda3. Now near the end it asks if you want to istall lilo; I clicked quit, since I already installed Lilo while installing salixos – so I then shut down my box .

I then booted up and of course it booted into salixos since it has lilo configured. Then at a terminal
atfer logging into salixos

$ su
password > #
# mousepad /etc/lilo.conf

I simply entered a few additional lines :

image = /boot/vmlinuz

root = /dev/sda3

label = slackware

read-only

then # lilo -v

this will update lilo. After that at boot up I now get a choice of “linux” which is salixos or “slackware”.

Its working fine; your process will be something very similar except with four os , you need logical extensions since you can only have three primary partitions .

A have a question though for those at a higher level. If I installed onto a virgin hard drive windows, and then salixos, what would be the entry to reference “windows” so that I could have a choice of windows or salix at boot time.

I.e for windows what would be the entry in liloconf if windows was on sda1, swap on sda2 and saloxos on sda3

Would it be

image = /boot/vmlinuz

root = /dev/sda1

label = windows

read-only

( somehow I don't think so ,but dont know the answer!
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: need to remove lilo and install grub

Post by mimosa »

As Akuna says, it's almost certainly easier to use Lilosetup (from the System menu) which is designed to deal with multiboot scenarios intuitively without the need to edit the configuration file directly. Setting up the partitions and so on obviously comes first - lilo just makes sure you can boot into whichever working OSs you have installed.

You can try it out without committing to the changes, which is the final step.
User avatar
luddite
Posts: 29
Joined: 22. May 2011, 14:44
Location: Ghana west africa , and U.K
Contact:

Re: need to remove lilo and install grub

Post by luddite »

cheers mimosa

running lilosetup caused a crash leading to the system out putting :

"try running e2sck -u-y /dev/sda2 I have no idea why. just read an active post entitled "what file systems do you use" and also memntioned it there.

editing /etc/lilo.conf worked fine by the way
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: need to remove lilo and install grub

Post by mimosa »

It's asking you to tidy up the filesystem on that partition by running that command, perhaps because of an earlier unclean shutdown. (The partition should not be mounted at the time.)

That will probably have been done automatically next time you booted anyway.

No reason not to configure the bootloader manually if you know how, but even if you do, an app that automates the process is more straightforward and less prone to human error - *if* it works! :lol: I personally feel reasonably comfortable fiddling with Grub legacy, but not lilo or the new grub. Never really needed to.
Post Reply