Quantcast
Channel: Linux Device Hacking
Viewing all articles
Browse latest Browse all 3247

Upgrading to Debian stretch (1 reply)

$
0
0
Ugrading to Debian stretch

This is a brief instruction about how to upgrade to Debian stretch from jessie. It also applicable to all other Debian version upgrade, i.e wheezy to jessie, stretch to the future Debian stable version.

I assume you are currently running one of my customed kernel release linux-image-xx.xx.xx-kirkwood-tld-xx from this thread. This is the reason for this post, since upgrading to the next Debian release while running a customed kernel could potentially cause some out-of-sync in the boot files. The following are 2 sections, one of them might be applicable to your system. And also see section 3 at the end for how to solve possible error during upgrade. If needed in the furture, I will add more sections to this post to cover some special cases.

1. Have installed only my released kernel images

Your system is running only my released kernel linux-image-xx.xx.xx-kirkwood-tld-xx. It has never been upgraded to mainline kernel or previously running mainline kernel. Usually because you started with my released rootfs from this thread.

Back up your rootfs before starting the following steps.

a. Update the apt source list to stretch. Your source should look like the following. Note that it is a good idea to adjust the repo to near your locale, and use ftp where available.

cat /etc/apt/sources.list

deb http://ftp.us.debian.org/debian stretch main
deb-src http://ftp.us.debian.org/debian stretch main

deb http://security.debian.org/ stretch/updates main contrib non-free
deb-src  http://security.debian.org/ stretch/updates main contrib non-free

deb     http://http.debian.net/debian stretch-updates main contrib
deb-src http://http.debian.net/debian stretch-updates main contrib


b. Run full upgrade (or you can choose to do minimal upgrade with step c).

apt-get update
apt-get dist-upgrade


c. Skip this if you've chosen step b. Run minimal upgrade if you want to do it slow, and then update to stretch for certain packages in the future when necessary. This is OK to do if you don't care much about having your system running every latest Debian package versions (there are a lot of packages that you might never use).

apt-get update
apt-get upgrade

d. Usually a distribution upgrade like this would result in a new initramfs. So regenerate the uInitrd boot file. See section 4 in my kernel/rootfs installation for how to recreate uInitrd. It should look like this example:

cd /boot
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.11.3-kirkwood-tld-2 -d initrd.img-4.11.3-kirkwood-tld-2 uInitrd

2. Have installed a mix of my released kernel images and mainline kernel images

Your system is running my released kernel linux-image-xx.xx.xx-kirkwood-tld-xx, and also you had previously installed and run some mainline kernel in this system. Usually because you started with a Debian installation (e.g. Debian netboot, Debian CD,…).

Back up your rootfs before starting the following steps.

a. Update the apt source list to stretch. Your source should look like the following. Note that it is a good idea to adjust the repo to near your locale, and use ftp where available.

cat /etc/apt/sources.list

deb http://ftp.us.debian.org/debian stretch main
deb-src http://ftp.us.debian.org/debian stretch main

deb http://security.debian.org/ stretch/updates main contrib non-free
deb-src  http://security.debian.org/ stretch/updates main contrib non-free

deb     http://http.debian.net/debian stretch-updates main contrib
deb-src http://http.debian.net/debian stretch-updates main contrib

b. Remove all mainline kernels that have been installed. Check for previous versions:

dpkg -l | grep -i linux-image

and purge each of these linux-image when you found them. The image name would indicate a mainline kernel when there is no -kirkwood-tld-xx postfix.

dpkg —purge linux-image-xx.xx.xx

c. Run full upgrade (or you can choose to do minimal upgrade with step c).

apt-get update
apt-get dist-upgrade

d. Skip this if you've chosen step b. Run minimal upgrade if you want to do it slow, and then update to stretch for certain packages in the future when necessary. This is OK to do if you don't care much about having your system running every latest Debian package version (there are a lot of packages that you might never use).

apt-get update
apt-get upgrade

e. Usually a distribution upgrade like this would result in a new initramfs. So regenerate the uInitrd boot file. See section 4 in my kernel/rootfs installation for how to recreate uInitrd. It should look like this example:

cd /boot
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.11.3-kirkwood-tld-2 -d initrd.img-4.11.3-kirkwood-tld-2 uInitrd


3. Note:

If you encountered key error while running apt-get update:

Quote

W: There is no public key available for the following key IDs:

So install new keyring for stretch:

apt-get install debian-keyring debian-archive-keyring

And then resume the upgrade with apt-get update again.

Viewing all articles
Browse latest Browse all 3247

Trending Articles