I am running ubuntu 14.04 on my machine with following partition structure:

/boot 512MB
/     50G
swap  4G
/home 100G~

and I have another drive which has slackware 14.1 on it with following structure:

/boot 512M (with working initrd)
(encrypted lvm containing /, swap and home )

I want to know if there is a way i can add my slackware system to ubuntu's grub, so that i will be able to boot both operating systems (multi-bootish way).

I tried adding something like following to /boot/grub/grub.cfg:

menuentry "Slackware" { 
      linux /dev/sdb2/vmlinux 
      initrd /dev/sdb2/initrd.gz

and to /etc/default/grub:


but when i run grub-update it gets cleared.

I have some knowledge of LILO but grub is quite new for me so any kind of help is greatly appreciated.


-Update: Thanks oldfred, got it working by doing following:

sudo apt-get update && sudo apt-get install lvm2 cryptsetup
sudo modprobe dm-crypt
sudo cryptsetup luksOpen /dev/sdb2 my-crypt
sudo os-prober
sudo update-grub

going to try the menuentry thing also though.

  • I think os-prober should be enabled in /etc/default/grub. And changes made to /boot/grub/boot.cfg are vanished with update-grub, so if you want to add menu entries you'll have to do it in /etc/grub.d/40_custom. And I don't know if the /dev/sdb1/vmlinux syntax will work with GRUB, it's better to use GRUB's syntax (hdX,Y). – Eduardo Cola Feb 1 '16 at 16:11

Lilo is a Windows type boot loader. So may be easier to chain load to the MBR or PBR of your other drive.

This is a partition boot entry. But note that drive you boot from is always hd0 in grub, but drive order can otherwise vary.

How to add a GRUB2 menu entry for booting installed Ubuntu on a USB drive?

menuentry "Install on sda (When from sdc) Chainboot" {
set root=(hd1)
chainloader +1

menuentry "Install on sdb (from sdc) Chainboot" {
set root=(hd2)
chainloader +1

menuentry "Chainload Other Systems Grub Menu on sdc1" {
set root=(hd2,1)
chainloader +1

menuentry " " {
set root= 

menuentry "System restart" {
echo "System rebooting..."
    insmod reboot

menuentry "System shutdown" {
echo "System shutting down..."
    insmod halt

Correct entry to turn off os-prober

Turn off prober

gksudo gedit /etc/default/grub

Add this line


update grub menu after any change

sudo update-grub

If using LVM you make be able to get os-prober to work if you add the lvm drivers in Ubuntu and manually mount the encrypted partition (so it is unencrypted) when os-prober runs.

sudo apt-get update && sudo apt-get install lvm2 cryptsetup

If other steps to mount & unencrypt needed they are here, just you do not need all the resize instructions: https://help.ubuntu.com/community/ResizeEncryptedPartitions

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.