You are not logged in.

#1 2014-01-19 19:24:03

kenny96
Member
Registered: 2012-08-18
Posts: 21

Grub2 problem with BIOS-GPT

I have just installed arch linux following this part of wiki https://wiki.archlinux.org/index.php/Dm … VM_on_LUKS (also for partitioning made with cgdisk). I havn't find any problem untill i have rebooted the machine. My pc can't find the bootloader and i need to use the live-cd to start the OS.
With live-cd grub all is ok, i can unlock cryptdevice and OS starts normally.

For the grub installation i had followed wiki and in particular these steps:

from arch-chroot I have installed grub, after that:

grub-install --target=i386-pc --recheck --debug /dev/sda

no error

edited /etc/default/grub adding

GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:MyStorage"

(from wiki)

grub-mkconfig -o boot/grub/grub.cfg

all ok

So where is the problem? What's the mistake?

P.S. according to wiki, my "fdisk -l" is:

Device        Start         Fine   Size Tipo
/dev/sda1           2048         6143     2M BIOS boot partition
/dev/sda2           6144       518143   250M Linux filesystem
/dev/sda3         518144    234441614 111,6G Linux LVM

Last edited by kenny96 (2014-01-19 19:25:17)

Offline

#2 2014-01-19 20:31:29

frostschutz
Member
Registered: 2013-11-15
Posts: 1,498

Re: Grub2 problem with BIOS-GPT

Assuming Arch doesn't patch its fdisk with GPT support, you've mixed things. You should either use GPT with bios_grub partition, or MSDOS without BIOS boot partition. For creating GPT partitions you can use parted (mklabel gpt) or gdisk.

As for the bios grub partition, that guide says 2M, but it's really not necessary to make it that large; it only needs a few kb. You could have the /boot partition start at 1M, and make the bios_grub partition the partial MB before that 1M.

Offline

#3 2014-01-19 21:35:58

kenny96
Member
Registered: 2012-08-18
Posts: 21

Re: Grub2 problem with BIOS-GPT

I don't know if i have mixed things. With "gdisk /dev/sda" i have:

GPT fdisk (gdisk) version 0.8.8

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

printing partition table with gdisk:

Command (? for help): p
Disk /dev/sda: 234441648 sectors, 111.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 0BC9867A-7319-4B82-9D13-252055543132
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 234441614
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048            6143   2.0 MiB     EF02  GRUB
   2            6144          518143   250.0 MiB   8300  BOOT
   3          518144       234441614   111.5 GiB   8E00  LVM

About bios grub partition: If possible i'll prefer to not resize partitions so i would like to know if is anyway possible to use my current situation and, more important, how can i correctly install this bootloader, because i don't understand what kind of mistake i have done.
Why

grub-install --target=i386-pc --recheck --debug /dev/sda

hasn't work?

Last edited by kenny96 (2014-01-19 21:37:23)

Offline

#4 2014-01-19 21:57:49

frostschutz
Member
Registered: 2013-11-15
Posts: 1,498

Re: Grub2 problem with BIOS-GPT

No, that should be fine then. Sorry for the noise, if your fdisk -l prints these partitions, then it does have GPT support after all.

Offline

#5 2014-01-20 18:41:57

kenny96
Member
Registered: 2012-08-18
Posts: 21

Re: Grub2 problem with BIOS-GPT

Anyone can help me to install grub?

Offline

#6 2014-01-21 15:16:38

kenny96
Member
Registered: 2012-08-18
Posts: 21

Re: Grub2 problem with BIOS-GPT

Sectors where is present my boot partition (EF02) are ok? Boot partition start from the right sector?

Offline

Board footer

Powered by FluxBB