mlel...@serpens.de (Michael van Elst) wrote: > bea...@sdf.org (beaker) writes: > > >mlel...@serpens.de (Michael van Elst) wrote: > >> In your case however, you provide your own MBR (with grub) > >> and 'gpt biosboot' would just overwrite grub with our boot > >> program. > > >Thanks for that explaination. It does seem like I could do > >a targeted storage with > > > # gpt biosboot -A -i 3 # gpt3 == FFS netbsd partition > > > This will overwrite grub and store our special GPT bootloader > for BIOS on disk block 0. It will also mark GPT partition 3 > as 'active'. > > > >which is how I managed to wipe out GRUB the first time. Also > >is the default bootcode (XXX) correct or should another boot > >code be used via '-c' for this non-UEFI + gpt scheme? > > The default bootcode for this is gptmbr.bin and we don't > provide an alternative that you could select. > > In any case, you still need to install a PBR (like bootxx_ffsv2) > to partition 3. >
Okay, after doing a full backup I tried the following: # determine which wedge to install primary bootstrap to: $ sudo dkctl wd0 listwedges /dev/rwd0: 6 wedges: dk5: e8b85d79-899f-4cd6-964e-af3db098e992, 2048 blocks at 2048, type: dk0: Boot, 1046528 blocks at 4096, type: msdos dk1: Debian, 268435456 blocks at 1050624, type: ext2fs dk2: NetBSD, 125829120 blocks at 269486080, type: msdos # <<< dk3: Commons, 83886080 blocks at 395315200, type: ext2fs dk4: Swap, 9195520 blocks at 479201280, type: swap # install FFSv2 primary bootstrap to /dev/rdk2: $ sudo installboot -fv /dev/rdk2 /usr/mdec/bootxx_ffsv2 File system: /dev/rdk2 Primary bootstrap: /usr/mdec/bootxx_ffsv2 Boot options: timeout 5, flags 0, speed 9600, ioaddr 0, console pc # reboot and attempt GRUB 'chainloader (hd0,gpt3)+1': => ERROR NO SLICE I then tried uninstall the primary bootstrap but it seems that isn't supported on i386: -- $ sudo installboot -c -fv /dev/rdk2 File system: /dev/rdk2 Primary bootstrap: (to be cleared) installboot: i386: bootstrap removal is not supported installboot: Clear bootstrap operation failed -- Fortunately the system still boots via GRUB's 'knetbsd netbsd -v' so maybe the inability to clear the bootstrap isn't a big deal? # disklabel output in case it's helpful: $ disklabel wd0 # /dev/rwd0: type: ESDI disk: wd0 label: fictitious ... 4 partitions: # size offset fstype [fsize bsize cpg/sgs] a: 488397168 0 4.2BSD 0 0 0 # (Cyl. 0 - 484520) d: 488397168 0 unused 0 0 # (Cyl. 0 - 484520) disklabel: boot block size 0 disklabel: super block size 0 Unless I'm not using the right filesystem reference I can't think of anything else to try other than putting NetBSD on a completely separate disk. -B