Alpine install: choose --target for grub and cleanup the gap
To avoid this error: nb2:~nico/vcs/ungleich-tools# sudo chroot /tmp/tmp.U3RiZH2Nu9 /bin/sh -c 'grub-install --target=i386-pc /dev/sda' Installing for i386-pc platform. grub-install: warning: Attempting to install GRUB to a disk with multiple partition labels. This is not supported yet.. grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged.. grub-install: error: will not proceed with blocklists. See also: https://askubuntu.com/questions/666527/install-grub-claims-that-i-have-multiple-partiton-labels-and-that-embedding-is
This commit is contained in:
parent
8dc4d6bacb
commit
525194947b
1 changed files with 5 additions and 1 deletions
|
@ -32,6 +32,10 @@ run_root () {
|
|||
|
||||
wget -c "$rootfs_url" -O "$IMAGE"
|
||||
|
||||
# Clean the first 2M - getting rid of old things
|
||||
# in the gap and also the paritition table
|
||||
dd if=/dev/zero of=${DISK} bs=1M count=2
|
||||
|
||||
# Partition disk with 1 Linux partition
|
||||
sudo sfdisk "$DISK" <<EOF
|
||||
label: dos
|
||||
|
@ -86,7 +90,7 @@ for dir in dev proc sys; do
|
|||
done
|
||||
|
||||
run_root apk add grub-bios
|
||||
run_root grub-install ${DISK}
|
||||
run_root grub-install --target=i386-pc ${DISK}
|
||||
|
||||
# Cleanup
|
||||
run_root rm -f /etc/resolv.conf
|
||||
|
|
Loading…
Reference in a new issue