diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2020-07-18 15:29:30 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2020-07-18 15:29:30 +0000 |
commit | 92fa988154332a3bea8601d1460a2804ae7fee15 (patch) | |
tree | 22d875fa241b8169102ad452c06958b72e509b79 /distrib | |
parent | e9786d5a5253103c151d4e012279673eddc8472b (diff) |
We can now use installboot directly, rather than using mounting the msdos
filesystem manually.
ok kettenis
Diffstat (limited to 'distrib')
-rw-r--r-- | distrib/powerpc64/ramdisk/install.md | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/distrib/powerpc64/ramdisk/install.md b/distrib/powerpc64/ramdisk/install.md index 40149054bcc..bd40a92a5b3 100644 --- a/distrib/powerpc64/ramdisk/install.md +++ b/distrib/powerpc64/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.5 2020/07/18 14:25:32 deraadt Exp $ +# $OpenBSD: install.md,v 1.6 2020/07/18 15:29:29 deraadt Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -37,19 +37,11 @@ NEWFSARGS_msdos="-F 16 -L boot" MOUNT_ARGS_msdos="-o-l" md_installboot() { - local _disk=/dev/$1 _duid - - _duid=$(disklabel $1 | sed -ne 's/^duid: \(.*\)/\1/p') - # Mount MSDOS partition, copy boot kernel and create menu entry - mount ${MOUNT_ARGS_msdos} ${_disk}i /mnt/mnt - cp /mnt/bsd /mnt/mnt/boot - cat > /mnt/mnt/grub.cfg <<-__EOT - menuentry "OpenBSD" { - linux /boot bootduid=${_duid} - initrd /boot - } - __EOT - umount /mnt/mnt + if ! installboot -r /mnt ${1}; then + echo "\nFailed to install bootblocks." + echo "You will not be able to boot OpenBSD from ${1}." + exit + fi } md_prep_fdisk() { |