NAME
installation —
install MOUSE from its live
ISO
DESCRIPTION
This page installs MOUSE on an empty disk from the live ISO. It creates one EFI system partition and one ZFS partition. The bootstrap operation creates the ZFS pool and datasets and formats the EFI system partition; do not format either partition beforehand.
WARNING
The partitioning and bootstrap steps destroy the selected disk's existing partition table and contents. Back up any needed data and verify the target device before continuing.
LIVE SYSTEM
Boot the ISO and log in as mouse with password cheddar. Select the tty session at LiDM, or open a terminal from MERDE. The live World is read directly from the ISO as a read-only filesystem. Mutable live state is held in memory filesystems and is lost at shutdown. The live account is a member of wheel and may use doas(1). It exists only in the live system. The ISO also carries mouse-rootfs.tar.zst for installation compatibility.
SELECTING A DISK
Use dmesg(8) and
sysctl -n hw.disknames
to identify the target whole-disk device. For example,
ld0 uses the raw
device /dev/rld0. Other common names are
/dev/rsd0 and /dev/rwd0. Do
not run cgdisk on a dkN wedge.
PARTITIONING
Run
doas cgdisk /dev/rld0
replacing /dev/rld0 with the selected raw whole-disk device. Create these GPT partitions, accepting cgdisk's aligned defaults:
- MOUSE_EFI
- At least 512 MiB; type code EF00 ( EFI System Partition ) .
- MOUSE_ROOT
- All remaining space; type code A504 ( ZFS ) .
Use cgdisk's naMe action to set the exact GPT partition names above, then use Write to commit the table. The names are GPT partition names, not filesystem labels. Use Quit instead of Write to discard changes.
Set disk to the selected whole-disk name, then refresh the NetBSD wedge table before looking for the new partitions:
disk=ld0 doas dkctl "$disk" makewedges
Verify the GPT names:
gpt show -l "/dev/$disk"
GPT wedges appear as /dev/dkN. For each
dkN shown by sysctl -n
hw.disknames, use
dkctl dk0 getwedgeinfo
to find the wedges named MOUSE_ROOT and MOUSE_EFI.
BOOTSTRAP
Pass the ZFS wedge first and the EFI wedge second:
doas mousectl bootstrap /dev/dk1 /dev/dk0
In this example, /dev/dk1 is named MOUSE_ROOT and /dev/dk0 is named MOUSE_EFI. Use the paths discovered on the target system instead. Both wedges must be distinct and unmounted. Bootstrap refuses an existing zroot pool.
It creates zroot with the standard ROOT/mouse, ETC, HOME, VAR, and LOCAL datasets, extracts World, and formats and writes the EFI system partition.
CONFIGURE THE NEW ROOT
Bootstrap returns to the live system after it writes the installed root. Before rebooting, enter the installed system manually:
doas chroot /altroot /usr/bin/login -f root
This login supplies the identity required by passwd(1). Set the administrative password, create an ordinary account, and configure networking before leaving the session:
passwd toor useradd -mG wheel alice passwd alice man 7 wifi exit doas reboot
Replace alice with the desired account name. Membership in wheel allows administrative commands through doas(1). Add operator only for direct access to operator-owned devices.
Remove the ISO when the firmware does not automatically select the installed disk.
SEE ALSO
doas(1), build(7), mouse(7), wifi(7), cgdisk(8), dkctl(8), gpt(8), mousectl(8), useradd(8), zfs(8), zpool(8)