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:
GRUB_DISALBE_OS_PROBE=true
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.
Thanks.
-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.
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
reboot
}
menuentry "System shutdown" {
echo "System shutting down..."
insmod halt
halt
}
Correct entry to turn off os-prober
Turn off prober
gksudo gedit /etc/default/grub
Add this line
GRUB_DISABLE_OS_PROBER=true
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
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다