Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRUB install on GPT device failed on BIOS machine #248

Open
speshuric opened this issue Aug 1, 2018 · 1 comment
Open

GRUB install on GPT device failed on BIOS machine #248

speshuric opened this issue Aug 1, 2018 · 1 comment

Comments

@speshuric
Copy link

speshuric commented Aug 1, 2018

Steps to reproduce

  • Use following partition script
#!/usr/bin/env bash
# use blkid or lsblck to check what disk you destroy

if [ "$(whoami)" != "root" ]; then
	echo "Root privileges required"
	exit 1
fi

HDD=sda

partprobe /dev/${HDD}
parted --script /dev/${HDD} print

parted --script /dev/${HDD} -- \
    unit MiB \
    mklabel gpt \
    mkpart primary            1MiB   4MiB \
        set 1 bios_grub on \
        name 1 bios_grub \
    mkpart primary fat32      4MiB   512MiB \
        set 2 esp on \
        set 2 boot on \
        name 2 esp \
    mkpart primary linux-swap 512MiB 8GiB \
        name 3 swap \
    mkpart primary ext4       8GiB   100% \
        name 4 root \
    print \

partprobe /dev/${HDD}

mkswap /dev/${HDD}3     -L swap
mkfs.ext4 /dev/${HDD}4  -F -L boot
  • Mount sda4 as root, mount sda3 as swap
  • Install base packages
  • Try to install GRUB from menu.

Expected

GRUB installation success

Actual

GRUB installation failed

Reasons is the following line

dd if=/dev/zero of=$DEVICE seek=1 count=2047

GPT partition table placed in 2-32 LBAs (sectors). Thus manjaro-architect blindly erase it.

Another point is useless error message on installation (the same as in #216 )

@Chrysostomus
Copy link
Owner

Thank you for the excellent and concise bug report! This next on my to do list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants