[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Upgrading Debian GNU/Hurd
Upgrading Debian GNU/Hurd
Fri, 16 Aug 2002 03:58:05 +0200
this e-mail contains very important information if you run a recent
Debian GNU/Hurd system and want to update it to the latest versions of the
Hurd and GLibC. Please follow the instructions below to do this upgrade
manually. Automatic update will fail, and might render your system
unbootable, so don't do that.
Note that you won't be able to follow these instructions until the packages
have been installed in the Debian ftp archive and reached your mirror. This
will take a day or two.
If you run a pre-libio system (eg, libc0.2 based), these instructions will
not help you. You should reinstall your system from scratch, preferably to
the new GNU/Hurd rather than the early libio-based versions. A new tar file
(20020816) is available on alpha.gnu.org/gnu/hurd/contrib/marcus to do this.
If you upgrade to an earlier libio-based system than that, you have to
follow the instructions in this e-mail.
Here is a table of versions and what to do:
GNU Lib C The Hurd Action
libc0.2 0.2 Reinstall
libc0.3 0.2 Follow these instructions
libc0.3 0.3 You are fine!
You find the version of the Hurd entering the command "uname -a".
You find the version of glibc using "dpkg -s libc0.2" and "dpkg -s libc0.3"
and comparing the output.
Upgrading Debian GNU/Hurd from a libio-based system before 2002-08-12
(including J1 CD series).
This document describes how to update a Debian GNU/Hurd system in
August 2002. This update procedure is necessary because the Hurd
interfaces went through an incompatible change to prepare support of
long files. At the current stage of development, it was decided that
it is easier to force all users once through this update procedure
than to maintain backward compatibility for the relevant filesystem
interfaces for a long time to come.
There are two approaches to the update, an easy one, and a harder one.
The easy one requires that you can run an alternative Debian system
(can be Debian GNU/Linux or Debian GNU/Hurd) on the same machine. It
doesn't matter if this system is on disk or booted from a rescue CD.
If this is not the case, you will have to update the system in-place,
which is harder, but should also work.
Another option is to reinstall the whole system from scratch with the
next tar ball series or CD image set. Usually this should not be
* A libio-based Debian GNU/Hurd system (ie CD series H4 or J1).
* The new packages of the Hurd, glibc and dpkg:
Later versions of these packages should also work.
* Enough disk space in / to install the packages.
* For the EASY way:
A second Debian system that you can boot and run on this machine.
This can be a Debian GNU/Hurd or Debian GNU/Linux system, and can be
booted from disk or rescue CD.
The dpkg-hurd script. You probably already have it in /.
If not, get it from ftp://ftp.alpha.gnu/gnu/hurd/contrib/marcus/dpkg-hurd.
Make sure it is executable (chmod +x /dpkg-hurd).
* For the HARD way:
About 20MB disk space somewhere as a scratch space.
This is called /scratch in the following, but can be anywhere.
These notes apply to the easy and the hard way equally.
* Updating dpkg is necessary because the start-stop-daemon program
links to libshouldbeinlibc and libps, and we changed the soname of
all Hurd libraries.
* For the same reason, updating the following packages is necessary
after the update procedure described here:
Other packages might need an update, too. If you see an error
message about missing libraries, check if the library comes with the
Hurd package. If it does, the package needs to be updated. If the
Debian binary package in the repository shows the error, we have to
recompile it. Please mail to email@example.com in this
* The new version of the system seems to introduce or expose a new
bug, which we have not located yet. If you get the message at boot
time that fsck "Cannot make readonly: Device or resource busy", then
you have hit the bug. The work-around is to add the --readonly
option to the ext2fs module line in your GRUB boot configuration.
(eg, use "module /hurd/ext2fs.static --readonly ...).
The EASY Way
Boot into the rescue system, mount the Debian GNU/Hurd system to
be updated on /gnu.
rescue# cd /gnu
Then uninstall the old libc0.3, hurd and dpkg packages:
rescue# ./dpkg-hurd --remove libc0.3 --force-depends
rescue# ./dpkg-hurd --remove hurd --force-depends --force-remove-essential
rescue# ./dpkg-hurd --remove dpkg --force-depends --force-remove-essential
It will complain loudly, but the --force-depends option should make it
Then unpack the new packages:
rescue# ./dpkg-hurd --unpack libc0.3_2.2.5-13_hurd-i386.deb --force-depends
rescue# ./dpkg-hurd --unpack hurd_20020804-1_hurd-i386.deb --force-depends
rescue# ./dpkg-hurd --unpack dpkg_1.10.4_hurd-i386.deb --force-depends
Then reboot into the updated Debian GNU/Hurd system, and configure the
# dpkg --configure hurd libc0.3 dpkg
That should be all.
The HARD Way
The steps have to be followed carefully. An error in most parts of
the update will render your system unbootable. You can always try to
recover if you have a second system installed, by following the
instructions in the easy way above.
Make a directory in the scratch space for the rescue tools:
# mkdir /scratch/lib
Copy a bunch of files to the directory:
# cp /sbin/reboot /scratch/lib/
# cd /lib
# cp ld-2.2.5.so libc.so libc.so.0.3 libcrt_nonshared.a /scratch/lib
# cp libgcc_s.so.1 libhurduser.so.0.0 libmachuser.so.1 /scratch/lib
# cp libshouldbeinlibc.so.0.2 libhurdbugaddr.so.0.2 /scratch/lib
Make a few symlinks:
# ln -s ld-2.2.5.so /scratch/lib/ld.so
# ln -s ld-2.2.5.so /scratch/lib/ld.so.1
Edit the file /scratch/lib/libc.so, so that it contains the following
line (replacing the similar line that has been there before):
GROUP ( /scratch/lib/libc.so.0.3 /scratch/lib/libcrt_nonshared.a )
Then unpack the Hurd package. This step will render all Hurd specific
programs, including all translators, unusable! From here on, the
system will not boot anymore until you completed the next steps.
# dpkg --unpack hurd_20020804-1_hurd-i386.deb
Then extract the dpkg package into a scratch place.
# cd /scratch
# dpkg-deb -x dpkg_1.10.4_hurd-i386.deb deb
Install manually the start-stop-daemon program:
# cp deb/sbin/start-stop-daemon /sbin
And clean up the scratch space a bit:
# rm -fR deb
Then extract the libc into the scratch place:
# cd /scratch
# dpkg-deb -x libc0.3_2.2.5-13_hurd-i386.deb deb
Install the important files from the C library manually:
# cp -a /scratch/deb/usr/bin/* /bin
# cp -a /scratch/deb/sbin/* /scratch/deb/usr/sbin/* /sbin
# cp -a /scratch/deb/usr/libexec/* /libexec
If the next command fails, you are probably screwed:
# cp -a /scratch/deb/lib/* /lib
The running system is now thoroughly broken :) For example:
# echo *
However, the installed system should now be bootable again. The
problem is that the reboot program won't work for the same reason that
causes ls not to work. Reboot the system using the copied file from
the beginnging. First sync all valuable data (just to be sure):
Now reboot the system:
# LD_LIBRARY_PATH=/scratch/lib /scratch/lib/ld.so /scratch/lib/reboot
If that fails, you have to power-cycle the machine. Hopefully the
filesystem check will pass ok anyway.
Afterwards, boot the machine into the Debian GNU/Hurd system and
install libc0.3 for real, breaking up the cyclic dependency:
# dpkg --unpack libc0.3_*deb
# dpkg --configure hurd libc0.3
I recommend rebooting one more time, otherwise you will waste a bit of
memory on the identical copy of the C library that was just
Thanks to ajmitch, wolfgang and moritz for testing this.
- Upgrading Debian GNU/Hurd,
Marcus Brinkmann <=