|
NetBSD Installation and Upgrading Have trouble getting NetBSD on your toaster? |
|
Thread Tools | Display Modes |
|
||||
Quote:
"Simply" put:
__________________
“Mi casa tendrá dos piernas y mis sueños no tendrán fronteras„ |
|
||||
To expand on my previous reply, and referring more specifically to your use case, first consider that a NVMe SSD will be presented as a disk array controller by the the ld(4) driver, and will show as ld* amid the attached wedges. Assuming that this SSD is actually the first available disk, it should be assigned a ld0 devnode.
Note that, unlike OpenBSD, NetBSD does not write a BSD label to the secondary GPT header, meaning there won't be any a-z slices for wd*, sd* and ld* disks (i.e., no ld0a, ld0b...), but just dk* logical disk wedges (dk1, dk2, dkn...), since the filesystem won't be structured as a single BSD label (partition) containing various slices, but as a set of standard independent partitions (similarly to Linux or Windows). I think this is meant to allow for better compatibility with other OSs. See dk(4). Practically speaking, if your NVMe disk is attached at ld0 and has a GPT layout containing 9 partitions, including the EFI system partition, you should see something like: Code:
# sysctl hw.disknames hw.disknames = ld0 dk0 dk1 dk2 dk3 dk4 dk5 dk6 dk7 dk8 Code:
# dkctl ld0 listwedges /dev/rld0: 9 wedges: dk0: EFI system, 262144 blocks at 2048, type: msdos ... dk8: 2dfc926e-42bd-43fb-9bb5-b227c2c3fc99, 2560000 blocks at 264192, type: ffs Code:
gpt show ld0 start size index contents 0 1 PMBR (active) 1 1 Pri GPT header 2 32 Pri GPT table 34 4062 Unused 4096 262144 GPT part - EFI system 266248 134215680 1 GPT part - NetBSD FFSv1/FFSv2 134219776 16539648 2 GPT part - NetBSD swap ... .... * ... Code:
# gpt add -a 2m -t ffs -l "netbsd” ld0 Code:
11 partitions: # size offset fstype [fsize bsize cpg/sgs] a: 62093312 458752 4.2BSD 0 0 0 # (Cyl. 224 - 30542) b: 262144 196608 swap # (Cyl. 96 - 223) c: 62552064 0 unused 0 0 # (Cyl. 0 - 30542) d: 62093312 458752 unused 0 0 # (Cyl. 224 - 30542) e-k: * * * * * # (Cyl. * - *)
Either way, you can format the newly created raw partition(s) (note the prepended 'r' below, before the device node indentifier) with newfs(8): Code:
# newfs -O 2 -V2 -f 2048 /dev/rld0* # on MBR # newfs -O 2 -V2 -f 2048 /dev/rdk* # on GPT `-O2' will tell newfs to format the partitions as FFsv2. Naturally you can use FFSv1 for compatibility reasons (e.g. mount across BSDs), or use ZFS or LFS. Quote:
If you still insist on creating an extended partition, use fdisk(8). As a side note, to display a human-readable summary of the nvme0 IDENTIFY_CONTROLLER data, you can use: Code:
# nvmectl identify nvme0
__________________
“Mi casa tendrá dos piernas y mis sueños no tendrán fronteras„ Last edited by Sehnsucht94; 5th October 2021 at 12:32 PM. |
|
||||
Quote:
The use of a GPT partition table is not limited to UEFI systems. You can use GPT on BIOS systems (as I do) and have up to 128 primary partitions. At least on NetBSD, this sort of setup is officially supported and the bootcode for that is provided at /usr/mdec/gptmbr.bin on the install media. The boot code is going to be automatically installed if you booted the installer in BIOS or Legacy Boot mode and picked out gpt as partition scheme during the installation. The topic is covered in the 'biosboot' subsection of the gpt(8) man page.
__________________
“Mi casa tendrá dos piernas y mis sueños no tendrán fronteras„ |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
pcmanfm-qt requires refresh to determine MIME type of new files | brudan | OpenBSD Packages and Ports | 6 | 16th April 2019 03:28 PM |
how to determine if kernel & userland are synchronized? | daemonfowl | OpenBSD General | 4 | 10th May 2012 03:02 PM |
Determine packet sizes | Frothingdog | OpenBSD General | 7 | 26th July 2010 03:29 PM |
partitions | italogf | FreeBSD Installation and Upgrading | 5 | 7th July 2008 12:14 PM |
URL evaluation tools to determine if serving malware | dk_netsvil | Off-Topic | 0 | 30th June 2008 04:55 PM |