Updating the system - Manual
Warning
If the system is currently on 0.4 Velox, please follow the guide here to update the system. Updating manually will result in an unbootable system!
Preparation
Firstly, mount /roots
as read-write, and enter the directory:
mount -o rw,remount /roots
cd /roots
Backup the current root:
mv /roots/root.img /roots/root.img.bak
Download the new root
Note
Xenia can switch between OpenRC and systemd at will! Use whichever init system you want.
wget https://repo.xenialinux.com/releases/current/root-systemd.img
mv /roots/root-systemd.img /roots/root.img
Warning
OpenRC is deprecated (for now) in 0.5 Cana. These images may not work or be present.
wget https://repo.xenialinux.com/releases/current/root.img
Finalising
Reboot:
reboot
Delete the old root if it is no longer needed:
rm /roots/root.img.bak
Troubleshooting
error: file 'root.img' not found
, booting backup root
This error indicates grub cannot find the root.img
, indicating it no longer exists on /roots
(or is corrupted).
If a backup was made of the previous root, it can be booted by editing the GRUB menuentry:
Firstly, press enter to continue, then press e to enter the editor. From here, you’ll see a menuentry like so:
1menuentry 'Xenia Linux'
2
3 search.fs_label ROOTS roots
4 loopback loop0 ($roots)/root.img
5 load_video
6 if [ "x$grub_platform" = xefi ]; then
7 set gfxpayload=keep
8 fi
9 insmod gzio
10 insmod squash4
11 echo 'Loading Linux gentoo-dist ...'
12 linux (loop0)/boot/vmlinuz ro quiet splash rd.live.squashimg=root.img rd.live.dir=/ rd.live.overlay.overlayfs=1 root=live:/dev/disk/by-label/ROOTS recovery=false
13 echo 'Loading initial ramdisk ...'
14 initrd (loop0)/boot/initramfs.img
From here, change the occurences of root.img
to root.img.bak
:
1menuentry 'Xenia Linux'
2
3 search.fs_label ROOTS roots
4 loopback loop0 ($roots)/root.img.bak
5 load_video
6 if [ "x$grub_platform" = xefi ]; then
7 set gfxpayload=keep
8 fi
9 insmod gzio
10 insmod squash4
11 echo 'Loading Linux gentoo-dist ...'
12 linux (loop0)/boot/vmlinuz ro quiet splash rd.live.squashimg=root.img.bak rd.live.dir=/ rd.live.overlay.overlayfs=1 root=live:/dev/disk/by-label/ROOTS recovery=false
13 echo 'Loading initial ramdisk ...'
14 initrd (loop0)/boot/initramfs.img
Then, press ctrl+x to boot.
Entering emergency mode (0.4 to 0.5 update)
Dracut made a change where the old kernel cmdline we used no longer works in Xenia. If you updated manually to 0.5, the system will no longer boot.
First, enter the GRUB editor by pressing e
when hovering over Xenia Linux from the GRUB menu. A menuentry will be shown:
1menuentry 'Xenia Linux'
2
3 search.fs_label ROOTS roots
4 loopback loop0 ($roots)/root.img
5 load_video
6 if [ "x$grub_platform" = xefi ]; then
7 set gfxpayload=keep
8 fi
9 insmod gzio
10 insmod squash4
11 echo 'Loading Linux gentoo-dist ...'
12 linux (loop0)/boot/vmlinuz ro quiet splash rd.live.squashimg=root.img rd.live.dir=/ rd.live.overlay.overlayfs=0 root=live:/dev/disk/by-label/ROOTS recovery=false
13 echo 'Loading initial ramdisk ...'
14 initrd (loop0)/boot/initramfs.img
Change rd.live.overlay.overlayfs=0
to rd.live.overlay.overlayfs=1
:
1menuentry 'Xenia Linux'
2
3 search.fs_label ROOTS roots
4 loopback loop0 ($roots)/root.img
5 load_video
6 if [ "x$grub_platform" = xefi ]; then
7 set gfxpayload=keep
8 fi
9 insmod gzio
10 insmod squash4
11 echo 'Loading Linux gentoo-dist ...'
12 linux (loop0)/boot/vmlinuz ro quiet splash rd.live.squashimg=root.img rd.live.dir=/ rd.live.overlay.overlayfs=1 root=live:/dev/disk/by-label/ROOTS recovery=false
13 echo 'Loading initial ramdisk ...'
14 initrd (loop0)/boot/initramfs.img
Then, press ctrl+x to boot.
Fixing it the easy way
Follow the guide here to update with foxupdate
.
Fixing it the hard way
When booted, first mount /boot/efi
:
mount -L EFI /boot/efi
Open /boot/efi/grub/grub.cfg
in a text editor as root, and find the menuentry for Xenia Linux:
1menuentry 'Xenia Linux' --class xenia --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-/mnt/roots/root.img' {
2 search.fs_label ROOTS roots
3 loopback loop0 ($roots)/root.img
4 load_video
5 if [ "x$grub_platform" = xefi ]; then
6 set gfxpayload=keep
7 fi
8 insmod gzio
9 insmod squash4
10 echo 'Loading Linux gentoo-dist ...'
11 linux (loop0)/boot/vmlinuz ro quiet splash rd.live.squashimg=root.img rd.live.dir=/ rd.live.overlay.overlayfs=0 root=live:/dev/disk/by-label/ROOTS recovery=false
12 echo 'Loading initial ramdisk ...'
13 initrd (loop0)/boot/initramfs.img
14}
15
16menuentry 'Xenia Linux (Recovery)' --class xenia --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-/mnt/roots/root.img' {
17 search.fs_label ROOTS roots
18 loopback loop0 ($roots)/root.img
19 load_video
20 if [ "x$grub_platform" = xefi ]; then
21 set gfxpayload=keep
22 fi
23 insmod gzio
24 insmod squash4
25 echo 'Loading Linux gentoo-dist ...'
26 linux (loop0)/boot/vmlinuz ro quiet splash rd.live.squashimg=root.img rd.live.dir=/ rd.live.overlay.overlayfs=0 root=live:/dev/disk/by-label/ROOTS recovery=true
27 echo 'Loading initial ramdisk ...'
28 initrd (loop0)/boot/initramfs.img
29}
Change the rd.live.overlay.overlayfs=0
to rd.live.overlay.overlayfs=1
on both lines:
1menuentry 'Xenia Linux' --class xenia --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-/mnt/roots/root.img' {
2 search.fs_label ROOTS roots
3 loopback loop0 ($roots)/root.img
4 load_video
5 if [ "x$grub_platform" = xefi ]; then
6 set gfxpayload=keep
7 fi
8 insmod gzio
9 insmod squash4
10 echo 'Loading Linux gentoo-dist ...'
11 linux (loop0)/boot/vmlinuz ro quiet splash rd.live.squashimg=root.img rd.live.dir=/ rd.live.overlay.overlayfs=1 root=live:/dev/disk/by-label/ROOTS recovery=false
12 echo 'Loading initial ramdisk ...'
13 initrd (loop0)/boot/initramfs.img
14}
15
16menuentry 'Xenia Linux (Recovery)' --class xenia --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-/mnt/roots/root.img' {
17 search.fs_label ROOTS roots
18 loopback loop0 ($roots)/root.img
19 load_video
20 if [ "x$grub_platform" = xefi ]; then
21 set gfxpayload=keep
22 fi
23 insmod gzio
24 insmod squash4
25 echo 'Loading Linux gentoo-dist ...'
26 linux (loop0)/boot/vmlinuz ro quiet splash rd.live.squashimg=root.img rd.live.dir=/ rd.live.overlay.overlayfs=1 root=live:/dev/disk/by-label/ROOTS recovery=true
27 echo 'Loading initial ramdisk ...'
28 initrd (loop0)/boot/initramfs.img
29}
Save the file.