New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos manual: Adds some examples of how to use fdisk. #31068
Conversation
I'm looking at mentioning the /boot partition as well, which might help address #9096. |
I've updated this to mention the /boot partition, and I merged the BIOS and UEFI instructions on the way through. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, this documentation makes me happy! Thanks for submitting it!
<variablelist> | ||
<varlistentry><term>UEFI systems</term> | ||
<listitem><para>You should boot the live CD in UEFI mode | ||
(consult your specific hardware's documentation for instructions). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we be recommending the refind tool? What benefit does that give the user?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point I'm just copying the existing information from installing-uefi.xml into this document :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iirc, refind is the only way to do it on mac?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is the kind of thing that motivated me to try to change as little as possible while putting this together :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On my old laptop (2011 macbook pro) I just used systemd-boot, no refind involved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this PR I'm trying to merge existing documentation and add some information about fdisk - I don't want to involve more than that or the review will go on forever and/or I'd be writing about things I have no first hand experience with.
Maybe we can file a docs issue about refind?
<replaceable>label</replaceable></option>. For example: | ||
|
||
<screen> | ||
# mkfs.fat -F 32 -L boot /dev/sda3</screen> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if it's required, but most people have the EFI boot loader on sda1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The plan behind numbering the partitions the way that I have partly to match the partition numbers in the rest of the installation documentation (sda1 for / and sda2 for /swap), and partly to simplify the merging of the BIOS and UEFI documentation.
I can try something different there, but it could be a bit dicey.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a small amount of digging, and I don't think the EFI boot loader needs to be on any particular partition. For some reason I'm seeing sda3 popping up a few times when I google for information on this, although it's only sda3 in my proposed change to limit the scope of the change and try to merge the BIOS and UEFI instructions without it all turning into a mess.
> x # <lineannotation>(enter expert mode)</lineannotation> | ||
> f # <lineannotation>(fix up the partition ordering)</lineannotation> | ||
> r # <lineannotation>(exit expert mode)</lineannotation> | ||
> w # <lineannotation>(write the partition table to disk and exit)</lineannotation> | ||
# mkfs.ext4 -L nixos /dev/sda1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd put this on 2, although there's no official standard of where your root partition goes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd put swap on sda3, near the end of the disk.
@@ -13,7 +13,7 @@ the following highlights: | |||
<itemizedlist> | |||
|
|||
<listitem><para>Installation on UEFI systems is now supported. See | |||
<xref linkend="sec-uefi-installation"/> for | |||
<xref linkend="sec-installation"/> for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a match in these changes for where the the docbook section for sec-uefi-installation is renamed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docbook section for sec-uefi-installation is removed, as the instructions were folded into installing.xml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, missed that in my commit, just pushed ammended to do the actual removal :)
Also unifies the BIOS and UEFI installation instructions. It's a fairly basic usage, but it makes explicity the fact that you should at least have a main partition and a swap partition, and will save some users a bit of internet searching while they are getting set up.
Does anyone have any more thoughts on this? I know the partition order is a bit out of the ordinary, but it seems to work and I think it leads to a good "flow" through the document, particularly with regard to the other parts of the installation instructions that refer to the various partitions. If this had the normal partition order, I think the flow on effects would mean that we couldn't merge the BIOS and UEFI sections, and that adding different |
@GrahamcOfBorg eval |
I think it's better than what's existing. Merging! |
It's a fairly basic usage, but it makes explicity the fact that
you should at least have a main partition and a swap partition,
and will save some users a bit of internet searching while they
are getting set up.
Motivation for this change
I know a few people who were curious about NixOS but stopped at the point of the manual that said "Use fdisk" with no further information. I started writing this PR to address that, but as I started writing I remembered that there were quite a few points of confusion around the BIOS vs UEFI instructions when my team were all installing NixOS, so I decided to have a go at streamlining that as well - the plan being to at least partly address #9096.
Other than that, I don't want to modify much else in this PR - mostly to try to keep the scope of the change as small as possible.
It took a bit of effort to dig the requirements for partitions and formatting under the BIOS and UEFI schemes out of the various threads on the internet where people are mostly answering questions about what specs and standards require with examples of what works for them, which is often quite different or fragile.
I'm not particularly keen on trying to go through that process for everything else that is already in the guide, like whether the
refind
instructions are still valid for example.Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)