NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: NetBSD 9.0 & MBR, X, etc



clays.shell%SDF.ORG@localhost (Clay Daniels) writes:

>To answer my own question, it makes sense to run NetBSD on MBR as NetBSD's 
>default partiton manager is apparently  fdisk, and I don't see gpart 
>offered.

There is nothing like a generic "partition manager", there are several
tools to handle partitioning schemes used by the various platforms.

NetBSD itself either uses the native BSD disklabel or it uses
"wedges" that correspond to some foreign partitioning scheme (usually
GPT).

A PC BIOS uses an MBR for booting an OS. So MBR and disklabel need
to coexist. In particular, you use (at least) a MBR partiton type
169, which is aligned with partition 'c' of the disklabel while
partition 'd' represents the whole disk. Traditionally you also
align all other partitions to be inside the MBR partition for NetBSD.
This is to ensure that other operating systems, like DOS or Windows,
don't conflict.

UEFI systems don't use MBR but a GPT with a reserved boot partition
in FAT format. There is a fake "protective" MBR on the disk, but
that's to shun off systems that don't know GPT and has no further
meaning. NetBSD can just use a GPT with "wedges". No magic to support
some coexistence required.

There are some fringe cases to use GPT with BIOS or to mix GPT with MBR
in a "hybrid" configuration for some compatibility. Most people can
just ignore these.

For data disks, none of the BIOS/UEFI constraints apply. There you
could use either BSD disklabel (which is historically limited to <2TB
disks) or use GPT with wedges.

To manage MBR you use the tool 'fdisk'.
To manage disklabel you use the tool 'disklabel'.
To manage GPT you use the tool 'gpt'.



>I have experimented with setting up X, but have not been successful yet. 
>Simply running startx did not bring up the TWM window manager. 

startx is a wrapper around xinit which starts the X server and a few
clients, whatever is in /etc/X11/xinit/xinitrc. And with the system
defaults that includes twm.


>The instructions in the NETBSD Guide, Chap. 9. X, give a different xinitrc 
>than the one I find pre-installed in /etc/X11/xinit/xinitrc. I backed up, 
>re-installed NetBSD  and I'm going to do more research. The nice thing for 
>me is I have an extra old computer right next to this newer one that lets 
>me look up info.

The guide gives a tiny example that is different from the default. Few
people stay with the default, they either adapt it or have a private
.xinitrc (or .xessionrc if you use xdm instead of startx).


>All in all, I'm having fun with this new NetBSD 9.0.

Good to hear :)

-- 
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index