| 28 May 2024 |
K900 | Generally, reinstall is your best option | 17:54:49 |
K900 | If you really want to avoid that, boot a live CD, btrfs convert, mount as btrfs, adjust config, nixos-install | 17:55:20 |
netpleb | the git repo / flake which declares the system is currently on the root partition itself, so my thinking is something like the following should work:
- clone git repo to thumbdrive
- boot into some sort of recovery mode (or do I need a full live distro on another thumbdrive and boot into it?)
- do the conversion to btrfs (
btrfs convert ...), mount it, and so on
nixos-generate-config and grab the relevant parts of the new hardware config, put them in flake
nixos-rebuild switch
| 17:55:53 |
netpleb | In reply to @k900:0upti.me If you really want to avoid that, boot a live CD, btrfs convert, mount as btrfs, adjust config, nixos-install Ok, thanks. I probably should just reinstall it seems, and properly backup beforehand. | 17:57:13 |
Ramses 🇵🇸 | You don't need to wipe the disks, you can do an installation as usual, but instead of creating new partitions, you do the conversion, and then continue with the installation as usual | 17:58:05 |
Ramses 🇵🇸 | I'd still take a backup beforehand just in case though | 17:58:20 |
netpleb | In reply to @rvdp:infosec.exchange You don't need to wipe the disks, you can do an installation as usual, but instead of creating new partitions, you do the conversion, and then continue with the installation as usual what about doing the whole thing over ssh? too risky? | 18:01:23 |
Ramses 🇵🇸 | If you're comfortable with kexec'ing into an image in memory, then it's doable. If you've never done that before, then I'd make sure that you're able to get to the machine in case you mess up | 18:03:13 |
K900 | I would generally not do anything but routine updates over SSH with no backup plan | 18:04:40 |
netpleb | In reply to @rvdp:infosec.exchange If you're comfortable with kexec'ing into an image in memory, then it's doable. If you've never done that before, then I'd make sure that you're able to get to the machine in case you mess up I have never done that before, but it sounds like that is what I would like to do. I can get to the machine physically if I mess up. Is kexec'ing better than, say, this: https://lord.re/en/posts/58-pivot_root-unmount-son-root/ ? | 18:05:02 |
K900 | Honestly | 18:05:25 |
K900 | If you can get physical access to the machine | 18:05:29 |
K900 | And it doesn't require, like, driving to a data center | 18:05:35 |
K900 | Just reinstall | 18:05:36 |
K900 | It's not worth the trouble | 18:05:39 |
Ramses 🇵🇸 | Unless you do it for educational purposes, I agree | 18:06:14 |
netpleb | In reply to @k900:0upti.me If you can get physical access to the machine Yeah, but this is practice for when such physical access is too much of a pain. | 18:06:32 |
K900 | Uhh | 18:06:41 |
K900 | If you actually have a production system you have to attempt this on | 18:06:53 |
K900 | You have a MUCH bigger problem | 18:06:57 |
K900 | btrfs convert is something you do as a joke | 18:07:15 |
K900 | Not something you do to systems you care about | 18:07:24 |
netpleb | In reply to @k900:0upti.me If you actually have a production system you have to attempt this on Sorry, I should have clarified. It is "in production" but even the production instance is just mostly for education purposes. If I mess it up I will only be mad at myself (and nobody else will be mad at me). | 18:08:46 |
K900 | What I'm saying is, this is not a thing you should be practicing | 18:09:01 |
K900 | If anything, the thing you should be practicing is never getting into a situation where you need to do this | 18:09:18 |
netpleb | In reply to @k900:0upti.me What I'm saying is, this is not a thing you should be practicing Yeah, you are probably right. Maybe better for me to figure out how to more automate a reinstall which uses btrfs and disko instead. | 18:10:05 |
K900 | What you're saying right now is "I'm going to practice building a campfire while being attacked by 30-50 feral hogs" | 18:10:20 |
K900 | Like | 18:10:24 |
K900 | Your problem isn't the campfire | 18:10:27 |
K900 | If you're in that situation | 18:10:32 |