s:/etc/fdisk:/etc/fstab: # ;^]
On Sun, Dec 03, 2017 at 02:21:31AM +0200, Iliyan Stoyanov wrote:
>
> I decided to abandon the use of the installer and just drop to a shell and
> proceed by hand. I use gpt to create a 512MB efi partition, and then proceed to
> create a swap one, and 3 more FFS partitions. When I try to use those in the
> installer, I always reach some errors and can not move forward with the
> installation of the sets. If I try to use the partitioning tool from the menu I
> always end up loosing the EFI partition, which I wan't there, no matter if I'm
> gonna use it or not. After creating the partitions in the console, dkctl shows
> the wedges properly, I create FS on them with newfs, but in the end, even if I
> chose to use current partition table, the installer doesn't like it and I can't
> install NetBSD successfully.
If you already did all the partitioning manually, you could also just
`tar xpzf' the sets and adjust /etc/rc.conf & /etc/fdisk.
Last two steps would then be `installboot' and `gpt biosboot'.
I was migrating the rootfs of a netbsd-6 box yesterday; here are the
gpt, dkctl, newfs, installboot steps I did:
$ sudo gpt show wd0
start size index contents
0 976773168
$ sudo gpt create wd0
$ sudo gpt show wd0
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 976773101
976773135 32 Sec GPT table
976773167 1 Sec GPT header
$ sudo gpt add -b 2048 -t ffs wd0
Partition added, use:
dkctl wd0 addwedge <wedgename> 2048 976771087 <type>
to create a wedge for it
$ sudo gpt label -i 1 -l netbsd-root wd0
partition 1 on rwd0d labeled netbsd-root
$ sudo gpt show wd0
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 2014
2048 976771087 1 GPT part - NetBSD FFSv1/FFSv2
976773135 32 Sec GPT table
976773167 1 Sec GPT header
$ sudo dkctl wd0 addwedge netbsd-root 2048 976771087 ffs
dk4 created successfully.
$ sudo newfs -O2 /dev/rdk4
/dev/rdk4: 476939.0MB (976771080 sectors) block size 32768, fragment size 4096
using 643 cylinder groups of 741.75MB, 23736 blks, 46848 inodes.
super-block backups (for fsck_ffs -b #) at:
192, 1519296, 3038400, 4557504, 6076608, 7595712, 9114816, 10633920, (...)
.....................................................................(...)
$ sudo installboot -v -o console=com0,speed=115200,timeout=5 /dev/dk4 /usr/mdec/bootxx_ffsv2
File system: /dev/dk4
Primary bootstrap: /usr/mdec/bootxx_ffsv2
Ignoring PBR with invalid magic in sector 0 of `/dev/dk4'
Boot options: timeout 5, flags 0, speed 115200, ioaddr 0, console com0
$ sudo gpt biosboot -c /usr/mdec/gptmbr.bin -i 1 wd0
/etc/fdisk would then contain something like:
NAME=netbsd-root / ffs rw 0 1
Hope that helps,
Petar