SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2013-01-17 13:11:19

ew
#! Die Hard
Registered: 2012-09-27
Posts: 1,975

[EDIT- "SOLVED"]How to add CB to existing ubuntu uefi system?

I have a working Ubuntu uefi-install(12.10). My hdd is partioned with gpt and the efi-partition is on "sda1", and I have a bios-grub partition at "sda2". Ubuntu is installed and is booting perfectly in uefi-mode, and obviously has everything in place, like uefi-firmware and bootloader.

I then installed Crunchbang the usual way, in legacy-mode, and grub is written to mbr/sda. My bios lets me enable legacy boot support, but still look for uefi first. This way I`m able to boot my system the usual way, by choosing to boot from hdd/mbr in the boot-menu, and then I get the old grub menu. So if I`m happy with booting the old fashioned way, then everything is just fine.

My question is how to convert CB to uefi-boot, utilizing the existing Ubuntu EFI-bootloader. Preferably in a way that still leaves me with the mbr-boot available, as it is now. It can`t hurt having both option.... Then MBR-boot is handled by CB, and efi-boot is handled by Ubuntu, and that is what I want to achieve...

PS! The efi and bios-grub partitions are not mounted/used by Crunchbang as it is, because I`m booting CB in legacy mode, and didn`t choose to mount them during install. CB is installed in two partitions, root and swap.

EDIT: Uefi is no longer a issue. I have bigger issues. I tried to solve the Waldorf-freeze issue by upgrading kernel, and I have tried it twice with Liquorix, and once with Siducton, but I`m not able to tell if that helps or not, because even though the kernels are present in grub, they refuse to boot. It does a few steps, and then goes blank in a black screen... So what to do now I don`t know. Perhaps try the i686-image instead of AMD64... Well, this turned out to be a lot more trouble than i hoped for, when I bought a Lenovo that I thought was linuxfriendly, but I guess Ivy-Bridge is to new or something...  Now I`ll try Vsido which has a newer kernel, and if that fails, then I guess I have to throw this pc out of the window, even though Ubuntu works like a charm. It Isn`t Ubuntu I want to use. That`s just there to have a base that I don``t fiddle with, but leave as it is..

FINAL EDIT: Tried Waldorf i686 image, same issues. Tried VSIDO, wouldn`t boot the live-cd, stops at the same point as the installed versions of waldorf with kernel 3.7 does. No point installing it. On the other hand, tried LM14XFCE, works like a charm, like ubuntu does, so it boils down to a debian issue. It works with everything else, so I guess I`ll have to avoid debian.:(

Sad, and me who got my CB-mug and t-shirt today:D Well, I guess I`ll sleep on it. Tomorrow is a new day, and maybe I get som bright ideas, but right now I`m rather discouraged:D

Last edited by ew (2013-01-18 02:50:06)


- apt-mark hold account

Offline

Help fund CrunchBang, donate to the project!

#2 2013-01-17 15:37:22

mynis01
#! Die Hard
From: 127.0.0.1
Registered: 2010-07-02
Posts: 1,965

Re: [EDIT- "SOLVED"]How to add CB to existing ubuntu uefi system?

Is the Ubuntu install using gruxx64.efi to boot? If it is, it shouldn't be too hard to just add #! to the boot menu. You could try using update-grub with os-prober enabled and see what happens, or just read through grub.cfg that your bootloader uses for Ubuntu and set up the entry for #! in that fashion. I know you need to pass "add_efi_memmap" to the kernel and insmod part_gpt. Here's the grub entry for my efi boot if you wanna check it out:

menuentry 'GNU/Linux, with Linux ck kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-ck kernel-true-fa1eefc8-9ac3-4b4a-8a6f-681914ca5cf6' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod ext2
	set root='hd0,gpt2'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  4e0361cb-0cfb-459a-89db-a28b8b85090a
	else
	  search --no-floppy --fs-uuid --set=root 4e0361cb-0cfb-459a-89db-a28b8b85090a
	fi
	echo	'Loading Linux ck kernel ...'
	linux	/vmlinuz-linux-ck root=UUID=fa1eefc8-9ac3-4b4a-8a6f-681914ca5cf6 ro  quiet add_efi_memmap
	echo	'Loading initial ramdisk ...'
	initrd	/initramfs-linux-ck.img

Offline

#3 2013-01-17 16:07:25

mynis01
#! Die Hard
From: 127.0.0.1
Registered: 2010-07-02
Posts: 1,965

Re: [EDIT- "SOLVED"]How to add CB to existing ubuntu uefi system?

Here's a cool guide for the UEFI conversion process in debian: http://tanguy.ortolo.eu/blog/article51/debian-efi
Keep in mind, you could just let #! "take over" your existing UEFI partition. I'm not sure if debian lets you have grub-mgr and grub-efi installed simultaneously but I don't really see why it wouldn't.

Offline

#4 2013-01-17 17:31:31

ManofJELLO
Member
Registered: 2013-01-05
Posts: 47

Re: [EDIT- "SOLVED"]How to add CB to existing ubuntu uefi system?

would a newer kernel with efi stub loader enabled work?  I efi boot #! with efi stub loader in the kernel, but I'm on a macbook using refind which finds my kernel for me and I skip grub altogether

Offline

#5 2013-01-17 20:28:16

ew
#! Die Hard
Registered: 2012-09-27
Posts: 1,975

Re: [EDIT- "SOLVED"]How to add CB to existing ubuntu uefi system?

ManofJELLO wrote:

would a newer kernel with efi stub loader enabled work?  I efi boot #! with efi stub loader in the kernel, but I'm on a macbook using refind which finds my kernel for me and I skip grub altogether

That would probably work. I suppose it will be my next step, if the one above doesn``t work for me. I`m trying to avoid a siduction or liquorix kernel, because then it Isn``t really CB Waldorf any more. But I probably have to do it any way, because it seems that the 3.2 kernel isn``t supporting my Ivy Bridge properly. I know that kernel  3.5 and above works with my hardware, so I probably need to use a newer kernel for CB too... Too bad that Waldorf is a testing release, but is already outdated.


- apt-mark hold account

Offline

#6 2013-01-17 20:46:56

ew
#! Die Hard
Registered: 2012-09-27
Posts: 1,975

Re: [EDIT- "SOLVED"]How to add CB to existing ubuntu uefi system?

mynis01 wrote:

Is the Ubuntu install using gruxx64.efi to boot? If it is, it shouldn't be too hard to just add #! to the boot menu. You could try using update-grub with os-prober enabled and see what happens, or just read through grub.cfg that your bootloader uses for Ubuntu and set up the entry for #! in that fashion. I know you need to pass "add_efi_memmap" to the kernel and insmod part_gpt. Here's the grub entry for my efi boot if you wanna check it out:

menuentry 'GNU/Linux, with Linux ck kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-ck kernel-true-fa1eefc8-9ac3-4b4a-8a6f-681914ca5cf6' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod ext2
	set root='hd0,gpt2'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  4e0361cb-0cfb-459a-89db-a28b8b85090a
	else
	  search --no-floppy --fs-uuid --set=root 4e0361cb-0cfb-459a-89db-a28b8b85090a
	fi
	echo	'Loading Linux ck kernel ...'
	linux	/vmlinuz-linux-ck root=UUID=fa1eefc8-9ac3-4b4a-8a6f-681914ca5cf6 ro  quiet add_efi_memmap
	echo	'Loading initial ramdisk ...'
	initrd	/initramfs-linux-ck.img

Thanks. I will try it your way, just modify it to fit my system. But first I need to get a new kernel to solve my waldorf freeze issues. Best to do that first, because if the new kernel breaks my #!, then it`s best not to have wasted a lot of work on a system that is going to be unstable anyway.....

Maybe I should be happy with uefi-booting Ubuntu, and mbr-booting all the debian distros. I change them rather frequently. I have the distrohopper syndrom, and then it`s easier to do it the oldfashioned way. In any month there is at least 10 distros on visitation, and now and then one of them gets to stay. With a 1TB hdd I can  have a lot of distros installed at the same time, so I guess it`s ok to control them with the #!-grub on mbr...

Ubuntu as the only distro on EFI and then multi-booting Debian-distros on MBR as I do it now, that actually sounds really nice. Only problem with that is that it makes me feel like a chicken... big_smile Perhaps I should wait with #! on EFI, until Waldorf goes stable, and there comes a new #! testing release with a newer kernel, hopefully 3.6 or 3.7. We could name it "Kermit" or maybe "Gonzo" big_smile


- apt-mark hold account

Offline

#7 2013-01-18 04:59:07

ManofJELLO
Member
Registered: 2013-01-05
Posts: 47

Re: [EDIT- "SOLVED"]How to add CB to existing ubuntu uefi system?

grub-efi is really buggy or at least it was for me on the macbook.  I used to get that partial boot that would just freeze while trying to use it. Sometimes it would boot all the way, but it was based on the weather or something because it was completely random. 

I had to use super grub 2 cd to boot in to #! just so I could compile a new kernel. Used 3.7.2 kernel with efi stub loader to just get rid of grub-efi.  There are other efi boot loaders besides grub that you could try if you want.  Grub-efi from what I read is one of the worst ones.

Offline

#8 2013-01-18 12:47:05

ew
#! Die Hard
Registered: 2012-09-27
Posts: 1,975

Re: [EDIT- "SOLVED"]How to add CB to existing ubuntu uefi system?

ManofJELLO wrote:

grub-efi is really buggy or at least it was for me on the macbook.  I used to get that partial boot that would just freeze while trying to use it. Sometimes it would boot all the way, but it was based on the weather or something because it was completely random. 

I had to use super grub 2 cd to boot in to #! just so I could compile a new kernel. Used 3.7.2 kernel with efi stub loader to just get rid of grub-efi.  There are other efi boot loaders besides grub that you could try if you want.  Grub-efi from what I read is one of the worst ones.

Yes, but even with the old-fashioned mbr boot, I struggle with these issues:
http://crunchbang.org/forums/viewtopic.php?id=23385

I thought that my issues was related to Ivy Bridge and hd graphics 4000, but in the above link I see the same trouble with AMD triple core and Nvidia graphics.... Now I`m starting to think that it`s mostly related to the issue that it`s looking for ide drives during boot, and that the dvd/rw didn`t boot with the correct parameters when I installed, thereby causing grub and initrd not to be built with preload=achi.... I`m not sure how to fix it though.... I`ve seen suggested to use ide0=noprobe ide1=nobrobe, but not sure where to put it.


- apt-mark hold account

Offline

#9 2013-01-18 17:58:44

ManofJELLO
Member
Registered: 2013-01-05
Posts: 47

Re: [EDIT- "SOLVED"]How to add CB to existing ubuntu uefi system?

sound like command line options, very easy to add. 

In /etc/default/grub add that to the line:
GRUB_CMDLINE_LINUX_DEFAULT
then run "sudo update-grub".

worth a shot

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo