template: Reverted systemd-boot in installer. EF02 partition on wrong second place
This commit is contained in:
parent
83346eeff5
commit
4faba7c8e1
|
@ -26,23 +26,39 @@ nix build git+https://git.clan.lol/clan/clan-core.git#install-iso
|
||||||
|
|
||||||
### Prepare the USB Flash Drive
|
### Prepare the USB Flash Drive
|
||||||
|
|
||||||
- Insert your USB flash drive into your computer.
|
1. Insert your USB flash drive into your computer.
|
||||||
- Identify your flash drive with `lsblk`. Look for the device with a matching size.
|
|
||||||
- Ensure all partitions on the drive are unmounted. Replace `sdX` in the command below with your device identifier (like `sdb`, etc.):
|
|
||||||
|
|
||||||
```bash
|
2. Identify your flash drive with `lsblk`.
|
||||||
sudo umount /dev/sdX*
|
```shellSession
|
||||||
```
|
$ lsblk
|
||||||
|
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
|
||||||
|
sdb 8:0 1 117,2G 0 disk
|
||||||
|
└─sdb1 8:1 1 117,2G 0 part /run/media/qubasa/INTENSO
|
||||||
|
nvme0n1 259:0 0 1,8T 0 disk
|
||||||
|
├─nvme0n1p1 259:1 0 512M 0 part /boot
|
||||||
|
└─nvme0n1p2 259:2 0 1,8T 0 part
|
||||||
|
└─luks-f7600028-9d83-4967-84bc-dd2f498bc486 254:0 0 1,8T 0 crypt /nix/store /
|
||||||
|
```
|
||||||
|
|
||||||
|
In this case it's `sdb`
|
||||||
|
|
||||||
|
3. Ensure all partitions on the drive are unmounted. Replace `sdX` in the command below with your device identifier (like `sdb`, etc.):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo umount /dev/sdb1
|
||||||
|
```
|
||||||
|
|
||||||
### Write the Image to the USB Drive
|
### Write the Image to the USB Drive
|
||||||
|
|
||||||
Use the `dd` utility to write the NixOS installer image to your USB drive:
|
Use the `dd` utility to write the NixOS installer image to your USB drive:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo dd bs=4M conv=fsync oflag=direct status=progress if=./result/stick.raw of=/dev/sdX
|
sudo dd bs=4M conv=fsync oflag=direct status=progress if=./result/stick.raw of=/dev/sd<X>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
In case your USB device is `sdb` use `of=/dev/sdb`
|
||||||
|
|
||||||
|
|
||||||
In case your USB device is `sdb` use `of=/dev/sdb`
|
|
||||||
|
|
||||||
### Boot and Connect
|
### Boot and Connect
|
||||||
|
|
||||||
|
|
|
@ -59,12 +59,12 @@
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
|
|
||||||
# Grub doesn't find devices for both BIOS and UEFI?
|
# Grub doesn't find devices for both BIOS and UEFI?
|
||||||
|
# NOTE: We need grub here. Otherwise, the system won't boot in some machines.
|
||||||
#boot.loader.grub.efiInstallAsRemovable = true;
|
# example: Lenovo E495 didn't boot without grub.
|
||||||
#boot.loader.grub.efiSupport = true;
|
boot.loader.grub.efiInstallAsRemovable = true;
|
||||||
|
boot.loader.grub.efiSupport = true;
|
||||||
disko.devices = {
|
disko.devices = {
|
||||||
disk = {
|
disk = {
|
||||||
stick = {
|
stick = {
|
||||||
|
@ -74,10 +74,10 @@
|
||||||
content = {
|
content = {
|
||||||
type = "gpt";
|
type = "gpt";
|
||||||
partitions = {
|
partitions = {
|
||||||
#boot = {
|
boot = {
|
||||||
# size = "1M";
|
size = "1M";
|
||||||
# type = "EF02"; # for grub MBR
|
type = "EF02"; # for grub MBR
|
||||||
#};
|
};
|
||||||
ESP = {
|
ESP = {
|
||||||
size = "100M";
|
size = "100M";
|
||||||
type = "EF00";
|
type = "EF00";
|
||||||
|
|
|
@ -7,11 +7,22 @@ let
|
||||||
self.nixosModules.installer
|
self.nixosModules.installer
|
||||||
self.inputs.nixos-generators.nixosModules.all-formats
|
self.inputs.nixos-generators.nixosModules.all-formats
|
||||||
];
|
];
|
||||||
# Provide convenience for connecting to wifi
|
# Provide convenience for connecting to wifi
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
networking.wireless.enable = false;
|
networking.wireless.enable = false;
|
||||||
users.users.root.extraGroups = [ "networkmanager" ];
|
|
||||||
|
|
||||||
|
# Use iwd instead of wpa_supplicant. It has a user friendly CLI
|
||||||
|
networking.wireless.iwd = {
|
||||||
|
settings = {
|
||||||
|
Network = {
|
||||||
|
EnableIPv6 = true;
|
||||||
|
RoutePriorityOffset = 300;
|
||||||
|
};
|
||||||
|
Settings = {
|
||||||
|
AutoConnect = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
system.stateVersion = config.system.nixos.version;
|
system.stateVersion = config.system.nixos.version;
|
||||||
nixpkgs.pkgs = self.inputs.nixpkgs.legacyPackages.x86_64-linux;
|
nixpkgs.pkgs = self.inputs.nixpkgs.legacyPackages.x86_64-linux;
|
||||||
};
|
};
|
||||||
|
@ -34,7 +45,6 @@ in
|
||||||
machines.installer = {
|
machines.installer = {
|
||||||
imports = [ installerModule ];
|
imports = [ installerModule ];
|
||||||
fileSystems."/".device = lib.mkDefault "/dev/null";
|
fileSystems."/".device = lib.mkDefault "/dev/null";
|
||||||
boot.loader.grub.device = lib.mkDefault "/dev/null";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
flake.apps.x86_64-linux.install-vm.program = installer.config.formats.vm.outPath;
|
flake.apps.x86_64-linux.install-vm.program = installer.config.formats.vm.outPath;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user