Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Install debian on EFI hw

33 views
Skip to first unread message

ha

unread,
Mar 4, 2014, 8:50:02 AM3/4/14
to
Last few weekends I've tried to install debian 7.2 from live DVD (but
booting from USB) on EFI hardware with GPT. I disabled EFI, crated a
small partition at the begging of the disk, and run the usual
installation process. However, at the end of installation I always
receive the message like: "Grub-pc package failed to install into
/target/".

Now, I solved this by booting to rescue mode, doing grub-install, chroot
into the instaled system and simply update grub. However, I found this
solution suboptimal when compared to classical debian installation
(utilizing MBR). So I wonder if anybody had experience on how to avoid
this recue-grub_install-chroot-grub_update procedure?

Did anybody manage to automatically install debian on GPT?
Did anybody do it without disabling EFI (grub-efi perhaps)?
Or the only way to have the automated install is stick with MBR?

Thanks to anybody who cares.


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/lf4lk1$umi$1...@ger.gmane.org

Andrew M.A. Cater

unread,
Mar 4, 2014, 2:00:02 PM3/4/14
to
Debian DVD1 / netinst .iso's both will allow you to boot from EFI and install
for Debian 7 Wheezy. I'm not sure whether the default install installs GPT on
smaller disks but it certainly worked when I tried it a while ago with no problems.

YOu may, however need to do an expert install rather than an automated install,
which I'd recommend anyway since it means that you have greater control over how
the install proceeds.

Hope this helps,

AndyC


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/2014030418...@galactic.demon.co.uk

Erwan David

unread,
Mar 4, 2014, 2:10:01 PM3/4/14
to
Le 04/03/2014 14:54, ha a écrit :
> Last few weekends I've tried to install debian 7.2 from live DVD (but
> booting from USB) on EFI hardware with GPT. I disabled EFI, crated a
> small partition at the begging of the disk, and run the usual
> installation process. However, at the end of installation I always
> receive the message like: "Grub-pc package failed to install into
> /target/".
>
> Now, I solved this by booting to rescue mode, doing grub-install, chroot
> into the instaled system and simply update grub. However, I found this
> solution suboptimal when compared to classical debian installation
> (utilizing MBR). So I wonder if anybody had experience on how to avoid
> this recue-grub_install-chroot-grub_update procedure?
>
> Did anybody manage to automatically install debian on GPT?
> Did anybody do it without disabling EFI (grub-efi perhaps)?
> Or the only way to have the automated install is stick with MBR?
>
> Thanks to anybody who cares.
>
>

I installed with GPT and EFI, but I do not remember if I used a testing
or a stable image. It worked without problem, except I had to create a
EFI partition /boot/efi


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/531624D0...@rail.eu.org

ha

unread,
Mar 5, 2014, 10:10:01 AM3/5/14
to
Excuse me, but what do you mean by "smaller disks"?

> YOu may, however need to do an expert install rather than an automated install,
> which I'd recommend anyway since it means that you have greater control over how
> the install proceeds.
>
I didn't do fully automated install, I started a graphical installation
from the live DVD. I will give the expert install a chance.

> Hope this helps,
>
> AndyC
>
>



--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/lf7el5$9qb$1...@ger.gmane.org

ha

unread,
Mar 5, 2014, 10:10:03 AM3/5/14
to
On 03/04/14 20:09, Erwan David wrote:
> Le 04/03/2014 14:54, ha a écrit :
>> Last few weekends I've tried to install debian 7.2 from live DVD (but
>> booting from USB) on EFI hardware with GPT. I disabled EFI, crated a
>> small partition at the begging of the disk, and run the usual
>> installation process. However, at the end of installation I always
>> receive the message like: "Grub-pc package failed to install into
>> /target/".
>>
>> Now, I solved this by booting to rescue mode, doing grub-install, chroot
>> into the instaled system and simply update grub. However, I found this
>> solution suboptimal when compared to classical debian installation
>> (utilizing MBR). So I wonder if anybody had experience on how to avoid
>> this recue-grub_install-chroot-grub_update procedure?
>>
>> Did anybody manage to automatically install debian on GPT?
>> Did anybody do it without disabling EFI (grub-efi perhaps)?
>> Or the only way to have the automated install is stick with MBR?
>>
>> Thanks to anybody who cares.
>>
>>
>
> I installed with GPT and EFI, but I do not remember if I used a testing
> or a stable image. It worked without problem, except I had to create a
> EFI partition /boot/efi
>
>
>
Did I understood this correctly: I have to have a small GPT partition at
the beginning, and right after it one additional that will be mounted as
/boot/efi? If so, I'm confused. How the debian installer will know it
should mount which partition as /boot/efi?


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/lf7ea7$5gq$1...@ger.gmane.org

ralf.m...@alice-dsl.net

unread,
Mar 5, 2014, 11:00:02 AM3/5/14
to
On Wed, 2014-03-05 at 16:13 +0100, ha wrote:
On 03/04/14 19:55, Andrew M.A. Cater wrote:
> > I'm not sure whether the default install installs GPT on smaller
> > disks but it certainly worked when I tried it a while ago with no
> > problems.
> Excuse me, but what do you mean by "smaller disks"?

"The organization of the partition table in the MBR limits the maximum
addressable storage space of a disk to 2 TB
[ https://en.wikipedia.org/wiki/Tebibyte ] (2^32 × 512 bytes)." -
https://en.wikipedia.org/wiki/Master_boot_record

Likely <= 2 TB are smaller disks, everything > 2 TB aren't smaller
disks.


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/201403051556....@mail50c50.megamailservers.eu

André Nunes Batista

unread,
Mar 24, 2014, 3:00:02 PM3/24/14
to
On Tue, 2014-03-04 at 18:55 +0000, Andrew M.A. Cater wrote:
> On Tue, Mar 04, 2014 at 02:54:05PM +0100, ha wrote:
> > Last few weekends I've tried to install debian 7.2 from live DVD
> > (but booting from USB) on EFI hardware with GPT. I disabled EFI,
> > crated a small partition at the begging of the disk, and run the
> > usual installation process. However, at the end of installation I
> > always receive the message like: "Grub-pc package failed to install
> > into /target/".
> >
> > Now, I solved this by booting to rescue mode, doing grub-install, chroot
> > into the instaled system and simply update grub. However, I found
> > this solution suboptimal when compared to classical debian
> > installation (utilizing MBR). So I wonder if anybody had experience
> > on how to avoid this recue-grub_install-chroot-grub_update
> > procedure?
> >
> > Did anybody manage to automatically install debian on GPT?
> > Did anybody do it without disabling EFI (grub-efi perhaps)?
> > Or the only way to have the automated install is stick with MBR?
> >
> > Thanks to anybody who cares.
> > Archive: https://lists.debian.org/lf4lk1$umi$1...@ger.gmane.org
>
>
> Debian DVD1 / netinst .iso's both will allow you to boot from EFI and install
> for Debian 7 Wheezy. I'm not sure whether the default install installs GPT on
> smaller disks but it certainly worked when I tried it a while ago with no problems.
>
> YOu may, however need to do an expert install rather than an automated install,
> which I'd recommend anyway since it means that you have greater control over how
> the install proceeds.
>
> Hope this helps,
>
> AndyC

Hello dears,

This thread on debian-devel might serve as future reference here on
debian users, since the procedure to install debian wheezy with UEFI
enabled requires expert install mode and it is by no means
straightforward:

https://lists.debian.org/debian-devel/2012/01/msg00168.html

Also: http://tanguy.ortolo.eu/blog/article51/debian-efi

Last week I finally got one of those new machines to try and install
debian wheezy and had no problems doing it, installation was a success,
uefi is enabled but secure boot has to be set on custom mode since
debian is not signed with vendor keys. Is there anyway to create my own
keys to sign the bootloader and make use of the secure boot feature in
user respecting way?

How to install (for tl;dr users):

You need to:
1. setup BIOS/UEFI on legacy mode;
2. start debian installer on expert mode in order to be able to
3. create a GUID Partition Table (gpt), using partman and moving away
from the default msdos partition scheme;
4. create TWO partitions right at the begging of the disk:
4.1. the first with 1Mib must be left unformatted and flagged as
Reserved space for boot (my understanding is that this area is used to
guaranteed that in the end, when grub is installed to MBR, it does not
overwrite our GPT scheme);
4.2. the other one must be formatted as FAT32 filesystem and needs to be
greater than 32MB (? I failed when I tried to create a fat32 with
smaller sizes - 1MB and 10MB, but this 32 is just a wild guess, my
successful attempt was with 64MB). This partition will be used to store
the bootloader and should be mounted as /boot/efi.
5. from here on you can proceed and install as would normally do. You
may safely install grub to MBR at the end of the procedure.
6. Boot the system still in Legacy mode then install the package
grub-efi-amd64 (apt-get install grub-efi-amd64);
7. run
# grub-install /dev/sda (this will fail, since you are not on efi
enabled mode)
8. run
# cp /boot/efi/efi/debian/grubx64.efi /boot/efi/efi/boot/bootx64.efi
9. run again
# grub-install /dev/sda
10. Reboot and see if your UEFI now sees your wheezy OS.

That should do it and you can safely set aside Legacy mode. Secure boot
won't work. My punkself deleted the vendor keys.

--
André N. Batista
GNUPG/PGP KEY: 6722CF80

signature.asc

Andrew M.A. Cater

unread,
Mar 24, 2014, 5:10:03 PM3/24/14
to
You _may_ find that, if you boot from UEFI only and select expert mode,
that it will work out of the box.

I did this the other day and on my hardware (Zotac Zbox AD06) I did not
need to hand create a GPT partition.

The auto-partitioning mode created a 1MB partition at the beginning and
end of the disk and a 512MB partition for the EFI boot.

If done this way booting from UEFI at the beginning, you should
get only grub-efi installed.

> 4. create TWO partitions right at the begging of the disk:
> 4.1. the first with 1Mib must be left unformatted and flagged as
> Reserved space for boot (my understanding is that this area is used to
> guaranteed that in the end, when grub is installed to MBR, it does not
> overwrite our GPT scheme);
> 4.2. the other one must be formatted as FAT32 filesystem and needs to be
> greater than 32MB (? I failed when I tried to create a fat32 with
> smaller sizes - 1MB and 10MB, but this 32 is just a wild guess, my
> successful attempt was with 64MB). This partition will be used to store
> the bootloader and should be mounted as /boot/efi.
> 5. from here on you can proceed and install as would normally do. You
> may safely install grub to MBR at the end of the procedure.
> 6. Boot the system still in Legacy mode then install the package
> grub-efi-amd64 (apt-get install grub-efi-amd64);
> 7. run
> # grub-install /dev/sda (this will fail, since you are not on efi
> enabled mode)
> 8. run
> # cp /boot/efi/efi/debian/grubx64.efi /boot/efi/efi/boot/bootx64.efi
> 9. run again
> # grub-install /dev/sda
> 10. Reboot and see if your UEFI now sees your wheezy OS.
>
> That should do it and you can safely set aside Legacy mode. Secure boot
> won't work. My punkself deleted the vendor keys.

Hope this helps somebody: thanks for writing this up,

All the very best,

Andy Cater

amac...@galactic.demon.co.uk

>
> --
> André N. Batista
> GNUPG/PGP KEY: 6722CF80
>



--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/2014032421...@galactic.demon.co.uk
0 new messages