Skip to content
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

Add upgrading info to the readme #199

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,42 @@ Fedora Remix for WSL is provided on a community-support basis. There is no suppo

Whitewater Foundry devs monitor the Fedora Remix for WSL GitHub issues page; however, users who require dedicated end-user support for WSL should consider [Pengwin](https://github.com/WhitewaterFoundry/Pengwin) instead. Businesses and other organizations that would like to receive ongoing professional support should [e-mail us](mailto:[email protected]) or visit [our website](https://www.whitewaterfoundry.com/wlinux-enterprise-edition/) to learn more about Pengwin Enterprise.

### In-place Upgrading
You can upgrade your existing installation of Fedora Remix with the following steps.

First, backup your installation:

`wsl --export fedoraremix fedoraremix_backup.tar.gz`

Then proceed:

> NOTE: DO NOT PERFORM THE UPGRADE STARTING FEDORA REMIX WITH SYSTEMD; IT WILL RUIN YOUR INSTALLATION

#Be sure that systemd is disabled
`[ "$(grep -c "^systemd.*=.*true$" /etc/wsl.conf)" -ne 0 ] && sudo sed -i "s/^systemd.*=.*true$/systemd=false/" /etc/wsl.conf && wsl.exe --terminate ${WSL_DISTRO_NAME}`
Comment on lines +55 to +56

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment suggests that validation takes place, while in reality the command below will perform a very intrusive reconfiguration of the running system, and terminate it.

Given that systemd is disabled by default in WSL, I'd suggest leaving this as a pre-upgrade validation step and holding those users who actively enabled systemd to also disable it. Detection could be as simple as ps h --ppid 1 | grep systemd

Finally, on my relatively clean Fedora 37 the upgrade in fact worked fine with systemd enabled (and running).


```bash
next_version=$(echo "${VERSION_ID}+1" | bc)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the source of VERSION_ID? This is not set for me (but I am on Fedora 38 already)

I also understand the intent on doing the +1, as this matches the Fedora recommendation to always upgrade through versions, but I am also torn between this here and making the user responsible for explicitly entering the correct version. Personally, I'd prefer making the user responsible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to add this line

source /etc/os-release

This defines VERSION_ID
But you are right I'll change it to

next_version=38 #Put the version you want to upgrade to here


update.sh
sudo dnf -y upgrade --refresh
sudo dnf -y install dnf-plugin-system-upgrade
sudo rpm --import https://src.fedoraproject.org/rpms/fedora-repos/raw/rawhide/f/RPM-GPG-KEY-fedora-${next_version}-primary

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step depends on how much a user ... tuned ... their nice and shiny and clean Fedora baseline installation.

A baseline Fedora 37 installation will not require this step; anyone who fancied things from rawhide (or other third-party repositories) should be held accountable for their own actions.

I would leave this out from generic instructions.

sudo dnf -y install distribution-gpg-keys
sudo dnf -y system-upgrade --allowerasing --skip-broken download --releasever=${next_version}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate why --allowerasing and --skip-broken are present, but this is the "blind application of sledgehammer" approach to "making it work, whatever"

From my point of view, there are two scenarios which can lead to these flags being required

  • the Fedora distro upgrade process is broken - this most likely will be fixed by Fedora, eventually
  • the user did funny things

I'd hold accountable the user for figuring this situation out, and I'd not add these two flags by default.

sudo dnf -y system-upgrade reboot

# At this point, it will raise an error, ignore it, and execute the following commands:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do remember getting an error, too, don't remember the content - but it'd be really helpful, IMHO, if the error message could be replicated here.


sudo dnf -y system-upgrade upgrade
sudo dnf -y autoremove

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

autoremove is not part of any official instructions that I have seen - and it's something that I don't really like myself (so for me it's always dnf remove --noautoremove).

With that command, you rely on perfect packaging (of all dependencies) - if that is not perfect, a working system might get damaged.

I'd leave this out.

sudo dnf -y clean all

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not required IMHO, it "just" saves disk space.

sudo mandb

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this required? Doesn't this happen automatically / in the background?

update.sh
cat /etc/fedora-release
exit

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why exit? To trigger a "reboot"?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, there is no reboot in the WSL version from I just saw going through the steps.

```

## About

### Fedora Project
Expand Down