Talk:Immutable root with atomic upgrades: Difference between revisions

From Alpine Linux
(Created page with "User:Sb1, regarding diskless mode note: thanks for reminding about it, but it's a different setup with its own features, so I reduced the note, but left the links. Similar...")
 
m (Unsigned comment attribution.)
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[User:Sb1]], regarding diskless mode note: thanks for reminding about it, but it's a different setup with its own features, so I reduced the note, but left the links. Similar guide to diskless chroot setup would be really appreciated btw. [[User:Mvsn|Mvsn]] ([[User talk:Mvsn|talk]]) 23:04, 31 May 2021 (UTC)
[[User:Sb1]], regarding diskless mode note: thanks for reminding about it, but it's a different setup with its own features, so I reduced the note, but left the links. Similar guide to diskless chroot setup would be really appreciated btw. [[User:Mvsn|Mvsn]] ([[User talk:Mvsn|talk]]) 23:04, 31 May 2021 (UTC)
== rEFInd ==
The rEFInd configuration provided in this does not appear to work universally, as rEFInd assumes that the <code>loader</code> and <code>initrd</code> parameters in the MenuEntry are located within the ESP partition. To produce a bootable version of this setup, I had to move my kernel and my initramfs to the ESP partition.<!-- Template:Unsigned --><span class="autosigned" style="font-size:85%;">—&nbsp;Preceding unsigned comments added by [[User:Machinestops|Machinestops ]] ([[User talk:Machinestops #top|talk]] • [[Special:Contributions/Machinestops |contribs]]) 12:01, 31 May 2023‎</span>
[[User:Machinestops|Machinestops]], not sure I follow. The config field <code>volume</code> defines which partition contains the path defined in the fields <code>loader</code> and <code>initrd</code>. If you have btrfs volume with the label other than <code>ROOT</code>, you have to also change <code>volume</code> field in the config. Kernel and initramfs should reside in the btrfs volume, they are the part of the snapshot. [[User:Mvsn|Mvsn]] ([[User talk:Mvsn|talk]])
== System mutation scripts ==
It might be helpful to note that <code>execline</code> should be included in the list of packages installed while setting up the initial root snapshot, and also that the scripts provided should be downloaded (perhaps provide them as raw files somehow?). Without them, there is no way to modify the system other than manually mounting, creating an RW snapshot, and performing the link migration manually, which might prove bothersome for some (or unclear).
Documenting the functionality of the scripts with comments might also be useful. The level of piping and nesting in these scripts makes it difficult to follow along for anyone unfamiliar with <code>execline</code>.<!-- Template:Unsigned --><span class="autosigned" style="font-size:85%;">—&nbsp;Preceding unsigned comments added by [[User:Machinestops|Machinestops ]] ([[User talk:Machinestops #top|talk]] • [[Special:Contributions/Machinestops |contribs]]) 12:10, 31 May 2023‎</span>
== rEFInd config does not work (or i'm dumb) ==
The provided rEFInd config seems to not work anymore.
rEFInd say me: Error: Not Found while loading vmlinuz-lts.
rEFInd config:
menuentry "Alpine Linux 2" {
    icon /EFI/refind/icons/os_linux.png
    volume "ROOT"
    loader /current/0/@/boot/vmlinuz-lts
    initrd /current/0/@/boot/initramfs-lts
    options "root=UUID=716209ed-16f5-421a-8580-0c65764b58eb rootfstype=btrfs rootflags=subvol=/current/0/@,ro,noatime quiet splash"
}
FS structure:
/mnt
├── commons
│   ...
├── current -> ./links/20231220142434tzbKGDKF
├── fstab
├── links
│   └── 20231220142434tzbKGDKF
│      ├── 0 -> ../../snapshots/20231220142341XRxLvnIW
│      ...
├── next
└── snapshots
    └── 20231220142341XRxLvnIW
        └── @
            └── <system>
The files exists:
$ ls /mnt/snapshots/20231220142341XRxLvnIW/@/boot/
boot  config-lts  initramfs-lts  System.map-lts  vmlinuz-lts
The label/UUID is good:
/dev/nvme0n1p3: LABEL="ROOT" UUID="716209ed-16f5-421a-8580-0c65764b58eb" ...
For me, it looks like what you did..
<small><span class="autosigned">—&nbsp;Preceding [[Help:Signature|unsigned]] comment added by [[User:Papilinux|Papilinux]] ([[User talk:Papilinux|{{int:talkpagelinktext}}]] • [[Special:Contributions/Papilinux|{{int:contribslink}}]]) 00:59, 21 December 2023‎</span></small>

Latest revision as of 11:05, 21 December 2023

User:Sb1, regarding diskless mode note: thanks for reminding about it, but it's a different setup with its own features, so I reduced the note, but left the links. Similar guide to diskless chroot setup would be really appreciated btw. Mvsn (talk) 23:04, 31 May 2021 (UTC)

rEFInd

The rEFInd configuration provided in this does not appear to work universally, as rEFInd assumes that the loader and initrd parameters in the MenuEntry are located within the ESP partition. To produce a bootable version of this setup, I had to move my kernel and my initramfs to the ESP partition.— Preceding unsigned comments added by Machinestops (talkcontribs) 12:01, 31 May 2023‎


Machinestops, not sure I follow. The config field volume defines which partition contains the path defined in the fields loader and initrd. If you have btrfs volume with the label other than ROOT, you have to also change volume field in the config. Kernel and initramfs should reside in the btrfs volume, they are the part of the snapshot. Mvsn (talk)

System mutation scripts

It might be helpful to note that execline should be included in the list of packages installed while setting up the initial root snapshot, and also that the scripts provided should be downloaded (perhaps provide them as raw files somehow?). Without them, there is no way to modify the system other than manually mounting, creating an RW snapshot, and performing the link migration manually, which might prove bothersome for some (or unclear).

Documenting the functionality of the scripts with comments might also be useful. The level of piping and nesting in these scripts makes it difficult to follow along for anyone unfamiliar with execline.— Preceding unsigned comments added by Machinestops (talkcontribs) 12:10, 31 May 2023‎

rEFInd config does not work (or i'm dumb)

The provided rEFInd config seems to not work anymore. rEFInd say me: Error: Not Found while loading vmlinuz-lts.

rEFInd config:

menuentry "Alpine Linux 2" {
    icon /EFI/refind/icons/os_linux.png
    volume "ROOT"
    loader /current/0/@/boot/vmlinuz-lts
    initrd /current/0/@/boot/initramfs-lts
    options "root=UUID=716209ed-16f5-421a-8580-0c65764b58eb rootfstype=btrfs rootflags=subvol=/current/0/@,ro,noatime quiet splash"
}

FS structure:

/mnt
├── commons
│   ...
├── current -> ./links/20231220142434tzbKGDKF
├── fstab
├── links
│   └── 20231220142434tzbKGDKF
│       ├── 0 -> ../../snapshots/20231220142341XRxLvnIW
│       ...
├── next
└── snapshots
    └── 20231220142341XRxLvnIW
        └── @
            └── <system>

The files exists:

$ ls /mnt/snapshots/20231220142341XRxLvnIW/@/boot/
boot  config-lts  initramfs-lts  System.map-lts  vmlinuz-lts

The label/UUID is good:

/dev/nvme0n1p3: LABEL="ROOT" UUID="716209ed-16f5-421a-8580-0c65764b58eb" ...

For me, it looks like what you did..

— Preceding unsigned comment added by Papilinux (talkcontribs) 00:59, 21 December 2023‎