SEARCH

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

You are not logged in.

#1 2012-08-17 19:01:58

Joe_2000
New Member
Registered: 2012-07-21
Posts: 5

How to install #! Waldorf on a UEFI machine with preinstalled W7

# enter chroot environment

TARGET=/media/sda8                 # replace sda8 with the location of your installation
sudo mkdir -p $TARGET
sudo mount /dev/sda8 $TARGET
sudo mount --bind /dev     $TARGET/dev
sudo mount --bind /dev/pts $TARGET/dev/pts
sudo mount --bind /proc    $TARGET/proc
sudo mount --bind /sys     $TARGET/sys
sudo cp /etc/resolv.conf $TARGET/etc/resolv.conf   # needed to have network in chroot
sudo chroot $TARGET /bin/bash

apt-get update
apt-get install grub-efi-amd64
grub-install
update-grub

# now copy the grub.efi file that grub created to your efi partition 

mkdir -p /media/efi_part
mount /dev/sda1 /media/efi_part       # replace sda1 with your EFI partition name
mkdir /media/efi_part/EFI/crunchbang/
cp /boot/grub/grub.efi /media/efi_part/EFI/crunchbang/

Last edited by Joe_2000 (2013-02-06 19:45:47)

Offline

Help fund CrunchBang, donate to the project!

#2 2012-08-17 22:52:05

swftech
#! CrunchBanger
From: SW Florida
Registered: 2012-06-08
Posts: 106
Website

Re: How to install #! Waldorf on a UEFI machine with preinstalled W7

I don't currently have a machine with EFI, but I have been asked by numerous people how to do this. I've passed it on and I am sure it will make a lot of people very happy. Awesome post!!

Offline

#3 2012-08-18 04:43:08

mynis01
#! Die Hard
From: 127.0.0.1
Registered: 2010-07-02
Posts: 2,005

Re: How to install #! Waldorf on a UEFI machine with preinstalled W7

This is mynis, and I approve of this thread. My little contribution:
Not all UEFI implementations were created equal. My MSI motherboard has a built in UEFI shell (which I believe follows the intel standards) and I never had to boot from a USB stick or CD in UEFI mode like I always hear other people talking about. I actually had a working system booting in legacy mode from a GPT setup for a month or so and then later set it up to boot in UEFI mode. All I had to do was install grub-efi-x86_64 and then boot into the motherboards built in shell and type

fs0:
shellx64.efi

and it added the ARCH_GRUB entry to the boot menu automatically for me. In theory it should be the same for a debian install, you might have to copy some files to /boot/efi (which is where your FAT32 partition should be mounted). Like I said though not all EFI setups work the same, some start counting at one and some at zero. And it seems like OEM desktops and laptops are far less likely to have a built in UEFI shell which results in having to boot from a CD or USB stick in UEFI mode to add the entry to the boot menu like you described. Long story short though, there's a good chance you're going to have to fiddle around with things a bit to get your machine booting in UEFI mode with a given chipset. I hear the newest anaconda (fedora/redhat's installer) actually adds a boot entry to your motherboard's menu, hopefully debian figures something like that out before wheezy goes stable.

Offline

#4 2012-08-18 09:27:47

Joe_2000
New Member
Registered: 2012-07-21
Posts: 5

Re: How to install #! Waldorf on a UEFI machine with preinstalled W7

Offline

#5 2012-08-18 10:20:02

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,749

Re: How to install #! Waldorf on a UEFI machine with preinstalled W7

It's a bit of a disgrace that Debian hasn't prepared Wheezy to do a pure UEFI install.

Offline

#6 2012-08-18 10:48:58

Joe_2000
New Member
Registered: 2012-07-21
Posts: 5

Re: How to install #! Waldorf on a UEFI machine with preinstalled W7

Offline

#7 2012-08-19 11:13:54

KrunchTime
#! Die Hard
From: not where I belong
Registered: 2012-03-02
Posts: 3,264

Re: How to install #! Waldorf on a UEFI machine with preinstalled W7

Last edited by KrunchTime (2012-08-19 11:15:30)

Offline

#8 2012-08-19 18:58:18

mynis01
#! Die Hard
From: 127.0.0.1
Registered: 2010-07-02
Posts: 2,005

Re: How to install #! Waldorf on a UEFI machine with preinstalled W7

Last edited by mynis01 (2012-08-19 18:59:02)

Offline

#9 2013-02-17 09:11:28

z0id
Member
Registered: 2012-09-22
Posts: 10

Re: How to install #! Waldorf on a UEFI machine with preinstalled W7

Hello all.

First of all: Thank you for this contribution. This helped me getting Waldorf to boot very quickly on a machine with W8 preinstalled.

There is only one thing bothering me a little bit:

When the grub boot screen appears and I choose either win 8 (loader) or win 8 recovery mode I get the following message:

"error: unknown command 'drivemap'.
error: invalid EFI file path.

Press any key to continue..."

Has anybody experienced this as well? Any ideas for a fix?

Thanks in advance for any help.

z0id.

Offline

#10 2013-03-08 05:18:07

nsp
Member
Registered: 2012-10-21
Posts: 14

Re: How to install #! Waldorf on a UEFI machine with preinstalled W7

Just want to dig this thread up to point out to others (and myself in the future) that there is a more compact way to perform the chrooting. Like so:

sudo -i                           # Makes all future commands, until Ctrl-D, execute with sudo
DEV=sdb4                                  # Only type device name once
MTPT=/media/$DEV
mkdir -p $MTPT
mount /dev/$DEV $MTPT
mount --bind {,$MTPT}/dev         # "{x,y}zed" gets intercepted by the shell and turned into
mount --bind {,$MTPT}/dev/pts   # "xzed yzed" and is useful in lots of situations
mount --bind {,$MTPT}/proc
mount --bind {,$MTPT}/sys
cp {,$MTPT}/etc/resolv.conf
chroot $MTPT /bin/bash

Last edited by nsp (2013-03-08 13:51:12)

Offline

#11 2013-08-10 06:30:37

jcharly2
Member
Registered: 2011-01-14
Posts: 26

Re: How to install #! Waldorf on a UEFI machine with preinstalled W7

jejejeje, i followed the steps, it generated me the grub.efi and i copied it to my EFI partition, but... when i added it, and tried to boot it... nothing happened...

could this steps have changed by now?

Offline

#12 2013-09-04 19:52:38

tomk11
New Member
Registered: 2013-09-04
Posts: 6

Re: How to install #! Waldorf on a UEFI machine with preinstalled W7

Shell> bcfg boot add 0 fs1:\EFI\crunchbang\grub.efi "Crunchbang (GRUB2)"

Last edited by tomk11 (2013-09-04 19:53:06)

Offline

#13 2013-11-07 18:37:56

obmon
New Member
From: Bahrain
Registered: 2013-11-07
Posts: 9

Re: How to install #! Waldorf on a UEFI machine with preinstalled W7

Last edited by obmon (2013-11-20 10:31:56)

Offline

#14 2013-11-21 19:45:32

jmenace13
New Member
Registered: 2013-11-20
Posts: 2

Re: How to install #! Waldorf on a UEFI machine with preinstalled W7

Hey all,

so I'm trying to work through the coding here, and i'm getting to the line

sudo chroot $TARGET /bin/bash

and getting the error chroot: failed to run command `/bin/bash': No such file or directory

I looked through the directories and in my /media/sd9 directory there is a bin directory with a bash whateverthatis inside it.

what am i missing?

Thanks for your time guys.

Offline

#15 2013-11-25 19:30:18

crunchyinterrobang!?
New Member
Registered: 2013-11-25
Posts: 1

Re: How to install #! Waldorf on a UEFI machine with preinstalled W7

Hi everyone!

I am new to Crunchbang, but I like the live CD a lot.  My issue is that I got through the install just fine, and it says it installed GRUB in the MBR, but I have Win 8, so EFI does not load from MBR, right?  I tried the method listed here, and got to the part where you make the USB with  bootx64.efi and shellx64.efi in it.  shellx64_v2.efi, actually.  It was recommended by the Arch Linux forum. 


I booted using the USB in UEFI mode, like instructed, and I got a command line that started with Grub> instead of Shell>

I put in

Shell> bcfg boot add 0 fs1:\EFI\crunchbang\grub.efi "Crunchbang (GRUB2)"

but it came back with an invalid command.

Can anyone help me out? I'll provide more info if needed.  Thanks a bunch!

Offline

#16 2013-12-30 14:25:42

latgarf
New Member
Registered: 2013-12-30
Posts: 1

Re: How to install #! Waldorf on a UEFI machine with preinstalled W7

I like booting without a boot manager - no grub, no rEFInd. 
Here's how I achieved this with CrunchBang.
My EFI partition is /dev/sda1
I ran standard CB install, root file system on partition /dev/sda8.  I even wanted to decline grub installation, but missed how I could do that.
After CB install, I rebooted into another linux distro, which I had on the same machine. This was just for convenience - I believe the same process can be reproduced with chrooting from LiveCD as described in the above posts.
I mounted my EFI and CB partitions:

# mount /dev/sda1 /boot
# mount /dev/sda8 /mnt

My EFI partition's directory structure is:
/boot/EFI/windows
/boot/EFI/ubuntu
...
I created a new subfolder for crunchbang:
/boot/EFI/cb
Then I copied into /boot/EFI/cb  all 4 files from /mnt/boot :
vmlinuz-3.2.0-4-amd64
initrd.img-3.2.0-4-amd64
config-3.2.0-4-amd64
System.map-3.2.0-4-amd64
I suspect that only the first two files where necessary (would love to get someone's confirmation on this wink )
I renamed vmlinuz-3.2.0-4-amd64 into vmlinuz.efi  and  initrd.img-3.2.0-4-amd64  into initrd.img.

Efibootmgr utility was installed on my other linux, in which I was doing all this.  So, I first reviewed my current EFI boot menu options by running

# efibootmgr -v

and then I created a new menu entry for CB:

# efibootmgr -c -p 1 -g -L "cb" -l /EFI/cb/vmlinuz.efi -u "root=/dev/sda8 rootfstype=ext4 initrd=\EFI\cb\initrd.img"

Here's explanation of the parameters:
-c = Create a new EFI boot manager entry.
-p = specifies the ESP. In my case it is /dev/sda2 because that's how it came with Windows 8 preinstalled.
-g = Force disk with invalid PMBR to be treated as GPT.
-L = The name of the boot entry.
-l = Specify the kernel image.
-u = Arguments to pass to the kernel image such as the initrd, root device etc.

I checked current boot order by

# efibootmgr

BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0001,0002,0000
Boot0000* cb
Boot0001  Windows Boot Manager
Boot0002  ubuntu

Boot order could be manipulated like this:

# efibootmgr -o 0000,0002,0001
$ man efibootmgr

lists all useful available options for this utility.

Rebooting took me immediately into CrunchBang, without any boot managers! smile

On those rare occasions that I need to boot into one of my secondary OS, I simply hit 'Esc' when powering up my Asus Zenbook laptop, and it shows me the menu of all possible boot options to choose from. This is necessary because I like timeout=0 as you saw above (no delay in booting whatsoever), but efibootmgr's option -t allows you to specify your desired timeout - I believe this would give you some seconds to select the desired menu item to boot into, just like grub or other boot loaders.

Warning: When kernel gets updated in the future, I will probably need to manually repeat the copy and rename procedure, which I described here.  To avoid this, using a boot manager is probably the only option (I'd love to know if/how I could avoid this update-copy-rename in my setup!)  Someone recommended to use gummiboot boot manager, which supposedly adds only 14 milliseconds to boot time.

Offline

#17 2014-03-14 21:06:58

rafael
New Member
Registered: 2014-03-14
Posts: 1

Re: How to install #! Waldorf on a UEFI machine with preinstalled W7

Hello!

I followed the instructions in the first post but got stuck trying to access the UEFI shell (there was no way to do it, from USB, copying it to the UEFI partition, nothing worked), so i ended downloading a ISO image of ALT Linux (which has a UEFI Shell option :-) and finished the job.

I am extremely thankful for the information posted in this thread because after installing crunchbang in my Asus q200e Vivobook (i wanted to install a lightweight distribution to make the most of it) and finding out that there was no way of booting it i got really frustrated and worried.

Now UEFI can start both Windows 8 or GRUB 2, the only problem is that GRUB 2 can not start Windows 8 (it offerst the option since the crunchbang installer deteted the windows partition and offered to keep it), this is extremely low priority but i still wanted to ask you if you think this could be fixed and how.

Anyway, thanks very much!

Offline

#18 2014-04-17 13:05:24

Ak_0
#! Member
Registered: 2011-05-14
Posts: 83

Re: How to install #! Waldorf on a UEFI machine with preinstalled W7

Last edited by Ak_0 (2014-06-03 09:47:07)


Вкру́те и вяз перело́мишь - In affect you can break even an elm.
Всё гениальное просто. - Genius is simplicity.

Offline

#19 2014-04-21 20:41:13

scwinn
New Member
Registered: 2009-05-11
Posts: 2

Re: How to install #! Waldorf on a UEFI machine with preinstalled W7

Why doesn't someone create an automated script that is tested and bulletproof.

I would love to rub\n Crunch Bang but my stupid UEFI computers won't let me do it.

I am NOT a command line kind of guy. I just want to use Crunch Bang alongside Windows 8.1 and enjoy both.

Offline

#20 2014-05-04 04:25:49

coffee_guy
Member
Registered: 2013-10-30
Posts: 36

Re: How to install #! Waldorf on a UEFI machine with preinstalled W7

Offline

#21 2014-06-03 05:32:31

Choven
Member
Registered: 2013-01-13
Posts: 41

Re: How to install #! Waldorf on a UEFI machine with preinstalled W7

Last edited by Choven (2014-06-03 06:11:02)

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.
Server: bleh

Debian Logo