LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   elilo/grub? (https://www.linuxquestions.org/questions/slackware-14/elilo-grub-4175628955/)

gregors 05-03-2018 11:49 AM

elilo/grub?
 
Hi there!

I want to install slackware to give it a closer look. I already have a Debian system (version 7.11) running that uses grub 0.97. And I don't want to overwrite grub with elilo unless I know I will be using Slackware as my new distribution for a couple of years.

And since I read tons of docu all day I don't feel like reading the grub docs right now just to know what I have to add to my installed grub. So it would be nice, if someone told me what to enter in my existing installation of grub. The new system will be installed in the first partition of the first drive (sda0, partition 0).

Thanks in advance!

Gregor

yancek 05-03-2018 12:09 PM

If you are using Debian with Legacy Grub, do you even have an EFI partition? If not, installing ellilo to a legacy system will just cause problems. Slackware installs with Lilo give you several option, install to Mbr, install to partition and don't install at all. The latter is what you should use then simply manually create an entry for Slackware in the menu.lst file of Debian. Lots of examples online.

colorpurple21859 05-03-2018 12:28 PM

If your using grub legacy:
edit your /boot/grub/menu.lst and add the following entry:


title 'Slackware'
root (hd0,0)
kernel /boot/vmlinuz root=/dev/sda1


Grub2
edit /etc/grub.d/40_custom with this then run update-grub:

menuentry 'Slackware' {
set root=(hd0,1)
Linux /boot/vmlinuz root=/dev/sda1
}




This should work unless one the "root=" is wrong.

Ne01eX 05-03-2018 12:50 PM

Quote:

Originally Posted by gregors (Post 5850240)
Hi there!

I want to install slackware to give it a closer look. I already have a Debian system (version 7.11) running that uses grub 0.97. And I don't want to overwrite grub with elilo unless I know I will be using Slackware as my new distribution for a couple of years.

And since I read tons of docu all day I don't feel like reading the grub docs right now just to know what I have to add to my installed grub. So it would be nice, if someone told me what to enter in my existing installation of grub. The new system will be installed in the first partition of the first drive (sda0, partition 0).

Thanks in advance!

Gregor

0. before run Slackware setup exec this:

Code:

blkid | grep "sda1"
1. Use huge kernel. This will save you additional questions. :)

1. Ignore the installation of the bootloader (in Slackware this is not mandatory) and paste (with nano, or with another text editor) this in your /boot/grub.cfg from Debian:

Code:

menuentry 'Slackware Linux (Current)' --class gnu-linux --class gnu --class os {
        insmod %YOU_SLACKWARE_TYPE_FILE_SYSTEM%
        set root=(hd0,1)
        search --no-floppy --fs-uuid --set=root %YOU_SLACKWARE_ROOT_UUID%
        echo        'Booting Slackware Linux ...'
        linux        /boot/vmlinuz root=UUID=%YOU_SLACKWARE_ROOT_UUID% ro  quiet
}

Or save this snippet as ~/add_to_grub.cfg and run from Debian after installation Slackware and run into you terminal emulator:

Code:

cat ~/add_to_grub.cfg >> /boot/grub.cfg

UUID=$(blkid /dev/sda1 | cut -f 2 -d"\"") ; TYPE=$(blkid /dev/sda1 | cut -f 4 -d"\"") && sed "s|%YOU_SLACKWARE_ROOT_UUID%|$UUID|" -i /boot/grub.cfg && sed "s|%YOU_SLACKWARE_TYPE_FILE_SYSTEM%|$TYPE|" -i /boot/grub.cfg

update-grub

Also, into Debian you may be use Grub Customizer:

Code:

sudo apt install grub-customizer
This is simple and with color pics. :)


colorpurple21859 05-03-2018 02:17 PM

If you make the changes to /boot/grub/grub.cfg instead of /etc/grub.d/40_custom, the next time Debian does a kernel update, you will loose your slackware entry.

273 05-03-2018 02:22 PM

When I install Slackware dual-boot I just install it as normal but don't install a bootloader. Then boot into Debian and run (as root) update-grub and, voila, on reboot there's an option to boot into Slackware.
The same should work for most distributions.

Ne01eX 05-03-2018 03:46 PM

Quote:

Originally Posted by colorpurple21859 (Post 5850339)
If you make the changes to /boot/grub/grub.cfg instead of /etc/grub.d/40_custom, the next time Debian does a kernel update, you will loose your slackware entry.

Oh, yes. This is a valuable observation. :)

yancek 05-03-2018 04:22 PM

Quote:

Then boot into Debian and run (as root) update-grub and, voila, on reboot there's an option to boot into Slackware.
One of the big advantages of Grub2. Unfortunately, the OP specifically states s/he is using Grub Legacy for which there is no 'update-grub' or 'grub-mkconfig'. Best option for him/her would be not to install Lilo/Elilo at all and create a manual entry in his Debian menu.lst file.

jostber 08-05-2018 12:02 PM

See a couple of the last posts here:

https://www.linuxquestions.org/quest...ub-4175472763/


All times are GMT -5. The time now is 04:09 AM.