Discussion:
How to keep /home going from RH6.1 to RH9.0?
(too old to reply)
sstrait1 at san.rr.com ()
2005-01-19 17:06:03 UTC
Permalink
I tried to upgrade from RH6.1 to RH9.0, but got an error message
about RPM database format having changed and asking
me to install errata RPMs in my old system.

If I choose to install instead of upgrading, will I be able
to preserve /home or will it be lost?

If I insist on upgrading will the process be especially tedious?

[I have /home backed up but would rather not trust the backups to be
usable unless I really need to.]

BTW, all the CDs for RH9.0 came from Richard Ernst and passed
the built-in media tests.

Thank you very much.

Stewart Strait
David M. Cook
2005-01-19 17:06:04 UTC
Permalink
Post by sstrait1 at san.rr.com ()
I tried to upgrade from RH6.1 to RH9.0, but got an error message
about RPM database format having changed and asking
me to install errata RPMs in my old system.
If I choose to install instead of upgrading, will I be able
to preserve /home or will it be lost?
It will be lost unless you have it on a separate partition.
Post by sstrait1 at san.rr.com ()
If I insist on upgrading will the process be especially tedious?
I would not recommend an upgrade from 6.1 to 9. There are just too many
major differences.

Dave Cook
sstrait1 at san.rr.com ()
2005-01-19 17:06:04 UTC
Permalink
Fortunately, home has a separate partition:
==================== output from cfdisk -P s =======================
Partition Table for /dev/hda

First Last
# Type Sector Sector Offset Length Filesystem Type (ID) Flags
-- ------- -------- --------- ------ --------- ---------------------- ---------
1 Primary 0 16064 63 16065 Linux (83) Boot (80)
2 Primary 16065 8418059 0 8401995 Extended (05) None (00)
5 Logical 16065 3084479 63 3068415 Linux (83) None (00)
6 Logical 3084480 3582494 63 498015 Linux swap (82) None (00)
7 Logical 3582495 8418059 63 4835565 Linux (83) None (00)
==================== /etc/fstab ====================================
/dev/hda5 / ext2 defaults 1 1
/dev/hda1 /boot ext2 defaults 1 2
/dev/hda7 /home ext2 defaults 1 2
/dev/cdrom /mnt/cdrom iso9660 noauto,user,ro 0 0
/dev/hda6 swap swap defaults 0 0
/dev/fd0 /mnt/floppy msdos user,noauto,rw 0 0
/dev/fd0 /mnt/vf vfat user,noauto,rw 0 0
none /proc proc defaults 0 0
none /dev/pts devpts gid=5,mode=620 0 0
====================================================================
Post by David M. Cook
Post by sstrait1 at san.rr.com ()
I tried to upgrade from RH6.1 to RH9.0, but got an error message
about RPM database format having changed and asking
me to install errata RPMs in my old system.
If I choose to install instead of upgrading, will I be able
to preserve /home or will it be lost?
It will be lost unless you have it on a separate partition.
Post by sstrait1 at san.rr.com ()
If I insist on upgrading will the process be especially tedious?
I would not recommend an upgrade from 6.1 to 9. There are just too many
major differences.
sstrait1 at san.rr.com ()
2005-01-19 18:31:38 UTC
Permalink
Fortunately, home has a separate partition:
==================== output from cfdisk -P s =======================
Partition Table for /dev/hda

First Last
# Type Sector Sector Offset Length Filesystem Type (ID) Flags
-- ------- -------- --------- ------ --------- ---------------------- ---------
1 Primary 0 16064 63 16065 Linux (83) Boot (80)
2 Primary 16065 8418059 0 8401995 Extended (05) None (00)
5 Logical 16065 3084479 63 3068415 Linux (83) None (00)
6 Logical 3084480 3582494 63 498015 Linux swap (82) None (00)
7 Logical 3582495 8418059 63 4835565 Linux (83) None (00)
==================== /etc/fstab ====================================
/dev/hda5 / ext2 defaults 1 1
/dev/hda1 /boot ext2 defaults 1 2
/dev/hda7 /home ext2 defaults 1 2
/dev/cdrom /mnt/cdrom iso9660 noauto,user,ro 0 0
/dev/hda6 swap swap defaults 0 0
/dev/fd0 /mnt/floppy msdos user,noauto,rw 0 0
/dev/fd0 /mnt/vf vfat user,noauto,rw 0 0
none /proc proc defaults 0 0
none /dev/pts devpts gid=5,mode=620 0 0
====================================================================
Post by David M. Cook
Post by sstrait1 at san.rr.com ()
I tried to upgrade from RH6.1 to RH9.0, but got an error message
about RPM database format having changed and asking
me to install errata RPMs in my old system.
If I choose to install instead of upgrading, will I be able
to preserve /home or will it be lost?
It will be lost unless you have it on a separate partition.
Post by sstrait1 at san.rr.com ()
If I insist on upgrading will the process be especially tedious?
I would not recommend an upgrade from 6.1 to 9. There are just too many
major differences.
Lan Barnes
2005-01-19 17:06:04 UTC
Permalink
Post by sstrait1 at san.rr.com ()
I tried to upgrade from RH6.1 to RH9.0, but got an error message
about RPM database format having changed and asking
me to install errata RPMs in my old system.
If I choose to install instead of upgrading, will I be able
to preserve /home or will it be lost?
If I insist on upgrading will the process be especially tedious?
[I have /home backed up but would rather not trust the backups to be
usable unless I really need to.]
BTW, all the CDs for RH9.0 came from Richard Ernst and passed
the built-in media tests.
Thank you very much.
Although Dave Cook is right to a certain extent, I would not say that
the reinstall is out of the question. Since /home is on a different
partition, you have a good start, provided that the machine has enough
memory and CPU power to make the jump (I would WAG it at minimum 128 M
RAM and 450 mHz CPU).

A major issue is the file system of the /home. Probably in ext2 now,
which is good, since ext3 is ext2 plus journal. No incompatibility
there. I believe there is a command to convert ext2 to ext3 after the
install, but you'll have to rely on others to dig it up for you.

A minor issue is user/group numbers stored in /etc/passwd and /etc/group
files (don't forget the shadow files that were not, IIRC, available in
6.1). At the very least print these out before the install to provide
you with a guide for creating users on the new install. Of course, this
is less of an issue if your home net uses NIS.

If it were me, I'd print that passwd/group info, get a full back up, and
then install away, being sure not to reformat /home.

DISCLAIMER: Bad things happen to good people. I am in no way responsible
for the misfortunes of people foolish enough to listen to me.
--
Lan Barnes ***@falleagle.net
Linux Guy, SCM Specialist 858-354-0616

Religion disperses like a fog, kingdoms perish, but the
works of scholars remain for an eternity
- Ulughbek, Afghani astronomer-prince
DJA
2005-01-19 17:06:04 UTC
Permalink
Post by Lan Barnes
Post by sstrait1 at san.rr.com ()
I tried to upgrade from RH6.1 to RH9.0, but got an error message
about RPM database format having changed and asking
me to install errata RPMs in my old system.
If I choose to install instead of upgrading, will I be able
to preserve /home or will it be lost?
If I insist on upgrading will the process be especially tedious?
[I have /home backed up but would rather not trust the backups to be
usable unless I really need to.]
BTW, all the CDs for RH9.0 came from Richard Ernst and passed
the built-in media tests.
Thank you very much.
Although Dave Cook is right to a certain extent, I would not say that
the reinstall is out of the question. Since /home is on a different
partition, you have a good start, provided that the machine has enough
memory and CPU power to make the jump (I would WAG it at minimum 128 M
RAM and 450 mHz CPU).
I have RH7.2 installed on two systems with these specs with no problems
whatsoever. I don't think RH9 is going to be much different from 7.2.
IOW, you should have few if any problems with RH9 that you wouldn't have
going to RH7.2. Remember, the version number is deceptive. The leap for
me would really be either 7.2-->7.4 or 7.2-->8.0.
Post by Lan Barnes
A major issue is the file system of the /home. Probably in ext2 now,
which is good, since ext3 is ext2 plus journal. No incompatibility
there. I believe there is a command to convert ext2 to ext3 after the
install, but you'll have to rely on others to dig it up for you.
I just did a reinstall last weekend, taking my RH6.2 server to RH7.2.
Hardware is AMD K62-350, 256 MB RAM. The processs was uneventful.

I preserved both my existing /usr (so as to save /usr/local) and /home
directories. The result was that the intall program did /not/ convert my
file system from ext2 to ext3; nor did it replace (or give me the option
to replace) Lilo with Grub.

I plan on doing a subsequent reinstall after I add some new drives. At
that point I will be able to move to both ext3 and Grub.
Post by Lan Barnes
A minor issue is user/group numbers stored in /etc/passwd and /etc/group
files (don't forget the shadow files that were not, IIRC, available in
6.1). At the very least print these out before the install to provide
you with a guide for creating users on the new install. Of course, this
is less of an issue if your home net uses NIS.
I did not migrate those files. In fact, I did not migrate any files from
/etc. My only regret here was not saving my existing Samba configuration
file, but I need a knowledge refresh anyway, and Samba is not that
tricky for a home LAN (or probably for Lan's home).

I manually added as new all my old users after the reinstall. I don't
recommend adding any non-root users at install time in Redhat if you
want to preserve the UIDs and GIDs of those users. I feel this is an
acceptable tradeoff for a home system with few users. Probably a PITA
for a large network with lots of users.
Post by Lan Barnes
If it were me, I'd print that passwd/group info, get a full back up, and
then install away, being sure not to reformat /home.
DISCLAIMER: Bad things happen to good people. I am in no way responsible
for the misfortunes of people foolish enough to listen to me.
Guard Bess with Less,
~DJA.
DJA
2005-01-19 18:31:39 UTC
Permalink
Post by Lan Barnes
Post by sstrait1 at san.rr.com ()
I tried to upgrade from RH6.1 to RH9.0, but got an error message
about RPM database format having changed and asking
me to install errata RPMs in my old system.
If I choose to install instead of upgrading, will I be able
to preserve /home or will it be lost?
If I insist on upgrading will the process be especially tedious?
[I have /home backed up but would rather not trust the backups to be
usable unless I really need to.]
BTW, all the CDs for RH9.0 came from Richard Ernst and passed
the built-in media tests.
Thank you very much.
Although Dave Cook is right to a certain extent, I would not say that
the reinstall is out of the question. Since /home is on a different
partition, you have a good start, provided that the machine has enough
memory and CPU power to make the jump (I would WAG it at minimum 128 M
RAM and 450 mHz CPU).
I have RH7.2 installed on two systems with these specs with no problems
whatsoever. I don't think RH9 is going to be much different from 7.2.
IOW, you should have few if any problems with RH9 that you wouldn't have
going to RH7.2. Remember, the version number is deceptive. The leap for
me would really be either 7.2-->7.4 or 7.2-->8.0.
Post by Lan Barnes
A major issue is the file system of the /home. Probably in ext2 now,
which is good, since ext3 is ext2 plus journal. No incompatibility
there. I believe there is a command to convert ext2 to ext3 after the
install, but you'll have to rely on others to dig it up for you.
I just did a reinstall last weekend, taking my RH6.2 server to RH7.2.
Hardware is AMD K62-350, 256 MB RAM. The processs was uneventful.

I preserved both my existing /usr (so as to save /usr/local) and /home
directories. The result was that the intall program did /not/ convert my
file system from ext2 to ext3; nor did it replace (or give me the option
to replace) Lilo with Grub.

I plan on doing a subsequent reinstall after I add some new drives. At
that point I will be able to move to both ext3 and Grub.
Post by Lan Barnes
A minor issue is user/group numbers stored in /etc/passwd and /etc/group
files (don't forget the shadow files that were not, IIRC, available in
6.1). At the very least print these out before the install to provide
you with a guide for creating users on the new install. Of course, this
is less of an issue if your home net uses NIS.
I did not migrate those files. In fact, I did not migrate any files from
/etc. My only regret here was not saving my existing Samba configuration
file, but I need a knowledge refresh anyway, and Samba is not that
tricky for a home LAN (or probably for Lan's home).

I manually added as new all my old users after the reinstall. I don't
recommend adding any non-root users at install time in Redhat if you
want to preserve the UIDs and GIDs of those users. I feel this is an
acceptable tradeoff for a home system with few users. Probably a PITA
for a large network with lots of users.
Post by Lan Barnes
If it were me, I'd print that passwd/group info, get a full back up, and
then install away, being sure not to reformat /home.
DISCLAIMER: Bad things happen to good people. I am in no way responsible
for the misfortunes of people foolish enough to listen to me.
Guard Bess with Less,
~DJA.
Tom O'Toole
2005-01-19 17:06:04 UTC
Permalink
Post by Lan Barnes
A major issue is the file system of the /home. Probably in ext2 now,
which is good, since ext3 is ext2 plus journal. No incompatibility
there. I believe there is a command to convert ext2 to ext3 after the
install, but you'll have to rely on others to dig it up for you.
It's /sbin/tune2fs -j device

(device is the partition, e.g. /dev/hda2)

-Tom O'Toole
Lan Barnes
2005-01-19 17:06:05 UTC
Permalink
Post by Tom O'Toole
Post by Lan Barnes
A major issue is the file system of the /home. Probably in ext2 now,
which is good, since ext3 is ext2 plus journal. No incompatibility
there. I believe there is a command to convert ext2 to ext3 after the
install, but you'll have to rely on others to dig it up for you.
It's /sbin/tune2fs -j device
(device is the partition, e.g. /dev/hda2)
I _knew_ someone would have that command. Thanks, Tom.
--
Lan Barnes ***@falleagle.net
Linux Guy, SCM Specialist 858-354-0616

The greatest dangers to liberty lurk in insidious encroachment
by men of zeal and wellmeaning but without understanding.
- Justice Louis D. Brandeis
sstrait1 at san.rr.com ()
2005-01-19 17:06:06 UTC
Permalink
I successfully installed RH9, preserving /home, by asking
for a fresh install rather than an upgrade and choosing partition
options that did not alter /home. The advice given
here was vital. Richard Ernst's CDs worked flawlessly.

Thank you very much.

Stewart Strait
sstrait1 at san.rr.com ()
2005-01-19 18:31:40 UTC
Permalink
I successfully installed RH9, preserving /home, by asking
for a fresh install rather than an upgrade and choosing partition
options that did not alter /home. The advice given
here was vital. Richard Ernst's CDs worked flawlessly.

Thank you very much.

Stewart Strait
Lan Barnes
2005-01-19 18:31:39 UTC
Permalink
Post by Tom O'Toole
Post by Lan Barnes
A major issue is the file system of the /home. Probably in ext2 now,
which is good, since ext3 is ext2 plus journal. No incompatibility
there. I believe there is a command to convert ext2 to ext3 after the
install, but you'll have to rely on others to dig it up for you.
It's /sbin/tune2fs -j device
(device is the partition, e.g. /dev/hda2)
I _knew_ someone would have that command. Thanks, Tom.
--
Lan Barnes ***@falleagle.net
Linux Guy, SCM Specialist 858-354-0616

The greatest dangers to liberty lurk in insidious encroachment
by men of zeal and wellmeaning but without understanding.
- Justice Louis D. Brandeis
Carl Lowenstein
2005-01-19 17:06:08 UTC
Permalink
Date: Fri, 1 Aug 2003 07:59:32 -0700
Subject: Re: How to keep /home going from RH6.1 to RH9.0?
Do not let RH9 set you up as an ordinary user, which it will want to
do during the first boot-up after installation. It will set up a home
directory /home/sstrait or equivalent, which will wipe out your old
/home/sstrait. (at least if /home is in the list of directories
that RH9 will set up in fstab).

This happened to me a several days ago. fortunately it was on the
machine that I had used while demonstrating how to make backup tapes.

A quick run through command-line useradd tool doesn't show how
to add a new user to /etc/passwd without at the same time creating
a home directory. So save your old /etc/passwd before doing the upgrade.

carl
Jonathan Byrne
2005-01-19 17:06:08 UTC
Permalink
Post by Carl Lowenstein
/home/sstrait. (at least if /home is in the list of directories
that RH9 will set up in fstab).
Are you saying that if you tell it not to build a filesystem on
the partition you will mount on /home but you do designate that
partition's mount point as being /home, it will blow away
your existing home directory?
Post by Carl Lowenstein
A quick run through command-line useradd tool doesn't show how
to add a new user to /etc/passwd without at the same time creating
a home directory.
I can't speak for how adduser behaves on RH 9, but the normal behavior
of useradd ist o respect existing home directories. A similar
utility, useradd, will create a home directory only if explicitly
told to do so on the command line.

Unless RH 9 goes against the normal behavior in some really broken ways,
I wonder if you didn't accidentally tell it to format your /home?

Jonathan
--
gpg --keyserver pgp.mit.edu --recv-keys ACC46EF9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.kernel-panic.org/pipermail/kplug-list/attachments/20030807/3b117685/attachment.pgp
sstrait1 at san.rr.com ()
2005-01-19 17:06:09 UTC
Permalink
Post by Carl Lowenstein
Do not let RH9 set you up as an ordinary user, which it will want to
do during the first boot-up after installation. It will set up a home
directory /home/sstrait or equivalent, which will wipe out your old
/home/sstrait. (at least if /home is in the list of directories
that RH9 will set up in fstab).
This happened to me a several days ago. fortunately it was on the
machine that I had used while demonstrating how to make backup tapes.
A quick run through command-line useradd tool doesn't show how
to add a new user to /etc/passwd without at the same time creating
a home directory. So save your old /etc/passwd before doing the upgrade.
This seems to have worked for me to add a new user without creating
a home directory:

useradd -M -u 501 -g 501 -s /bin/tcsh sstrait

Fearing destructive behavior like you later encountered,
I hunted through the useradd man page and found:

-M The user home directory will not be created, even if the system
wide settings from /etc/login.defs is to create home dirs.

[501 was the existing owner and existing group of /home/sstrait .
You should leave out the " -s /bin/tcsh" unless you have a good
reason for using tcsh.]

I ended up, IIRC, with my home directory set to /home/sstrait, which
seems unharmed. A test user created the normal way [but earlier,
when I had /etc/fstab set up to mount the pre-install /home on
/oldhome so RedHat couldn't mess with it] had exactly 5 files in its
home directory. I copied them into /home/sstrait , except for .emacs,
for which I had a customized existing version.

On Thu, Aug 07, 2003 at 11:18:24PM -0700, Jonathan Byrne wrote:
...
Post by Carl Lowenstein
Post by Jonathan Byrne
I can't speak for how adduser behaves on RH 9, but the normal behavior
of useradd is to respect existing home directories. A similar
utility, useradd, will create a home directory only if explicitly
told to do so on the command line.
Unless RH 9 goes against the normal behavior in some really broken ways,
I wonder if you didn't accidentally tell it to format your /home?
On RH 9, adduser is a symbolic link to useradd. I don't know if
useradd behaves differently depending on how it is invoked. If
you type "man adduser" you get the useradd man page although I
can't be certain that it isn't shown in a modified form.

My best guess is that RH 9 doesn't ever test for an existing
home directory and defaults to destructive behavior. More
information would be welcome. Thanks very much.

Stewart Strait
sstrait1 at san.rr.com ()
2005-01-19 18:31:43 UTC
Permalink
Post by Carl Lowenstein
Do not let RH9 set you up as an ordinary user, which it will want to
do during the first boot-up after installation. It will set up a home
directory /home/sstrait or equivalent, which will wipe out your old
/home/sstrait. (at least if /home is in the list of directories
that RH9 will set up in fstab).
This happened to me a several days ago. fortunately it was on the
machine that I had used while demonstrating how to make backup tapes.
A quick run through command-line useradd tool doesn't show how
to add a new user to /etc/passwd without at the same time creating
a home directory. So save your old /etc/passwd before doing the upgrade.
This seems to have worked for me to add a new user without creating
a home directory:

useradd -M -u 501 -g 501 -s /bin/tcsh sstrait

Fearing destructive behavior like you later encountered,
I hunted through the useradd man page and found:

-M The user home directory will not be created, even if the system
wide settings from /etc/login.defs is to create home dirs.

[501 was the existing owner and existing group of /home/sstrait .
You should leave out the " -s /bin/tcsh" unless you have a good
reason for using tcsh.]

I ended up, IIRC, with my home directory set to /home/sstrait, which
seems unharmed. A test user created the normal way [but earlier,
when I had /etc/fstab set up to mount the pre-install /home on
/oldhome so RedHat couldn't mess with it] had exactly 5 files in its
home directory. I copied them into /home/sstrait , except for .emacs,
for which I had a customized existing version.

On Thu, Aug 07, 2003 at 11:18:24PM -0700, Jonathan Byrne wrote:
...
Post by Carl Lowenstein
Post by Jonathan Byrne
I can't speak for how adduser behaves on RH 9, but the normal behavior
of useradd is to respect existing home directories. A similar
utility, useradd, will create a home directory only if explicitly
told to do so on the command line.
Unless RH 9 goes against the normal behavior in some really broken ways,
I wonder if you didn't accidentally tell it to format your /home?
On RH 9, adduser is a symbolic link to useradd. I don't know if
useradd behaves differently depending on how it is invoked. If
you type "man adduser" you get the useradd man page although I
can't be certain that it isn't shown in a modified form.

My best guess is that RH 9 doesn't ever test for an existing
home directory and defaults to destructive behavior. More
information would be welcome. Thanks very much.

Stewart Strait
Mailing List Account for Jason Runyan
2005-01-19 17:06:09 UTC
Permalink
Post by Carl Lowenstein
This happened to me a several days ago. fortunately it was on the
machine that I had used while demonstrating how to make backup tapes.
A quick run through command-line useradd tool doesn't show how
to add a new user to /etc/passwd without at the same time creating
a home directory. So save your old /etc/passwd before doing the upgrade.
carl
If everyone used "vipw" then you wouldn't have that problem.
Jonathan Byrne
2005-01-19 18:31:43 UTC
Permalink
Post by Carl Lowenstein
/home/sstrait. (at least if /home is in the list of directories
that RH9 will set up in fstab).
Are you saying that if you tell it not to build a filesystem on
the partition you will mount on /home but you do designate that
partition's mount point as being /home, it will blow away
your existing home directory?
Post by Carl Lowenstein
A quick run through command-line useradd tool doesn't show how
to add a new user to /etc/passwd without at the same time creating
a home directory.
I can't speak for how adduser behaves on RH 9, but the normal behavior
of useradd ist o respect existing home directories. A similar
utility, useradd, will create a home directory only if explicitly
told to do so on the command line.

Unless RH 9 goes against the normal behavior in some really broken ways,
I wonder if you didn't accidentally tell it to format your /home?

Jonathan
--
gpg --keyserver pgp.mit.edu --recv-keys ACC46EF9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.kernel-panic.org/pipermail/kplug-list/attachments/20030807/3b117685/attachment-0001.pgp
Mailing List Account for Jason Runyan
2005-01-19 18:31:43 UTC
Permalink
Post by Carl Lowenstein
This happened to me a several days ago. fortunately it was on the
machine that I had used while demonstrating how to make backup tapes.
A quick run through command-line useradd tool doesn't show how
to add a new user to /etc/passwd without at the same time creating
a home directory. So save your old /etc/passwd before doing the upgrade.
carl
If everyone used "vipw" then you wouldn't have that problem.
Carl Lowenstein
2005-01-19 17:06:09 UTC
Permalink
Date: Thu, 7 Aug 2003 23:18:24 -0700
Subject: Re: How to keep /home going from RH6.1 to RH9.0?
Post by Carl Lowenstein
/home/sstrait. (at least if /home is in the list of directories
that RH9 will set up in fstab).
Are you saying that if you tell it not to build a filesystem on
the partition you will mount on /home but you do designate that
partition's mount point as being /home, it will blow away
your existing home directory?
Post by Carl Lowenstein
A quick run through command-line useradd tool doesn't show how
to add a new user to /etc/passwd without at the same time creating
a home directory.
I can't speak for how adduser behaves on RH 9, but the normal behavior
of useradd ist o respect existing home directories. A similar
utility, useradd, will create a home directory only if explicitly
told to do so on the command line.
No I did not tell the RH9 installer to reformat /home.
I have a little bit of experience doing things like this.
All other directories in /home were still present, such as /home/local
which is where I point /usr/local.

I was suckered into "set up a normal user account".

So the installer set up an account /home/cdl owner cdl group cdl
with all the usual initial dotfiles copied from /etc/skel,
In the process, the previously existing /home/cdl was wiped out.

I would have been happy to have it set up the entries in /etc/passwd
and /etc/shadow, and then tell me that the user's home directory
already existed. This has been my experience on Solaris systems and
probably others.

By the way, adduser and useradd seem to point to the same man page.
There is, in fact an option:

-m The user's home directory will be created if it does not exist.
The files contained in skeleton_dir will be copied to the home
directory if the -k option is used, otherwise the files con-
tained in /etc/skel will be used instead. Any directories con-
tained in skeleton_dir or /etc/skel will be created in the
user's home directory as well. The -k option is only valid in
conjunction with the -m option. The default is to not create
the directory and to not copy any files.

So the command-line default is what I expected, but not what the
Anaconda installer script gave me.

carl
--
carl lowenstein marine physical lab u.c. san diego
***@ucsd.edu
Carl Lowenstein
2005-01-19 17:06:09 UTC
Permalink
Date: Fri, 8 Aug 2003 02:37:03 -0700
Subject: Re: How to keep /home going from RH6.1 to RH9.0?
On RH 9, adduser is a symbolic link to useradd. I don't know if
useradd behaves differently depending on how it is invoked. If
you type "man adduser" you get the useradd man page although I
can't be certain that it isn't shown in a modified form.
Out of curiosity I poked around in the manual pages. I got the
following:

[***@iota cdl]$ zmore /usr/share/man/man8/adduser.8.gz
------> /usr/share/man/man8/adduser.8.gz <------
.so man8/useradd.8

Interpretation: if someone asks for "man adduser"
give them "man useradd".
My best guess is that RH 9 doesn't ever test for an existing
home directory and defaults to destructive behavior. More
information would be welcome. Thanks very much.
It isn't RH9 all by itself. It is the Python script known as Anaconda
which runs the installation process.

carl
Carl Lowenstein
2005-01-19 17:06:09 UTC
Permalink
Date: Fri, 08 Aug 2003 10:26:47 -0500
Subject: Re: How to keep /home going from RH6.1 to RH9.0?
Post by Carl Lowenstein
This happened to me a several days ago. fortunately it was on the
machine that I had used while demonstrating how to make backup tapes.
A quick run through command-line useradd tool doesn't show how
to add a new user to /etc/passwd without at the same time creating
a home directory. So save your old /etc/passwd before doing the upgrade.
carl
If everyone used "vipw" then you wouldn't have that problem.
Geez. How dumb do you think I am. Maybe overly trusting of the
RH installer, expecting it to do the "right thing".

I hope that "vipw" has been fixed so it actually works with systems
that use a shadow password file. My previous experience was that
"vipw" totally screwed up /etc/passwd if the second field was :x:
Well, actually it didn't. It just refused to do anything at all
to /etc/passed.

So this was another learning experience. Save your /etc/passwd
and /etc/shadow as well as your /home, and just wipe out whatever
the Anaconda installer did to them after it is finished doing its thing.

carl
sstrait1 at san.rr.com ()
2005-01-19 18:31:37 UTC
Permalink
I tried to upgrade from RH6.1 to RH9.0, but got an error message
about RPM database format having changed and asking
me to install errata RPMs in my old system.

If I choose to install instead of upgrading, will I be able
to preserve /home or will it be lost?

If I insist on upgrading will the process be especially tedious?

[I have /home backed up but would rather not trust the backups to be
usable unless I really need to.]

BTW, all the CDs for RH9.0 came from Richard Ernst and passed
the built-in media tests.

Thank you very much.

Stewart Strait
David M. Cook
2005-01-19 18:31:38 UTC
Permalink
Post by sstrait1 at san.rr.com ()
I tried to upgrade from RH6.1 to RH9.0, but got an error message
about RPM database format having changed and asking
me to install errata RPMs in my old system.
If I choose to install instead of upgrading, will I be able
to preserve /home or will it be lost?
It will be lost unless you have it on a separate partition.
Post by sstrait1 at san.rr.com ()
If I insist on upgrading will the process be especially tedious?
I would not recommend an upgrade from 6.1 to 9. There are just too many
major differences.

Dave Cook
Lan Barnes
2005-01-19 18:31:38 UTC
Permalink
Post by sstrait1 at san.rr.com ()
I tried to upgrade from RH6.1 to RH9.0, but got an error message
about RPM database format having changed and asking
me to install errata RPMs in my old system.
If I choose to install instead of upgrading, will I be able
to preserve /home or will it be lost?
If I insist on upgrading will the process be especially tedious?
[I have /home backed up but would rather not trust the backups to be
usable unless I really need to.]
BTW, all the CDs for RH9.0 came from Richard Ernst and passed
the built-in media tests.
Thank you very much.
Although Dave Cook is right to a certain extent, I would not say that
the reinstall is out of the question. Since /home is on a different
partition, you have a good start, provided that the machine has enough
memory and CPU power to make the jump (I would WAG it at minimum 128 M
RAM and 450 mHz CPU).

A major issue is the file system of the /home. Probably in ext2 now,
which is good, since ext3 is ext2 plus journal. No incompatibility
there. I believe there is a command to convert ext2 to ext3 after the
install, but you'll have to rely on others to dig it up for you.

A minor issue is user/group numbers stored in /etc/passwd and /etc/group
files (don't forget the shadow files that were not, IIRC, available in
6.1). At the very least print these out before the install to provide
you with a guide for creating users on the new install. Of course, this
is less of an issue if your home net uses NIS.

If it were me, I'd print that passwd/group info, get a full back up, and
then install away, being sure not to reformat /home.

DISCLAIMER: Bad things happen to good people. I am in no way responsible
for the misfortunes of people foolish enough to listen to me.
--
Lan Barnes ***@falleagle.net
Linux Guy, SCM Specialist 858-354-0616

Religion disperses like a fog, kingdoms perish, but the
works of scholars remain for an eternity
- Ulughbek, Afghani astronomer-prince
Tom O'Toole
2005-01-19 18:31:39 UTC
Permalink
Post by Lan Barnes
A major issue is the file system of the /home. Probably in ext2 now,
which is good, since ext3 is ext2 plus journal. No incompatibility
there. I believe there is a command to convert ext2 to ext3 after the
install, but you'll have to rely on others to dig it up for you.
It's /sbin/tune2fs -j device

(device is the partition, e.g. /dev/hda2)

-Tom O'Toole
Carl Lowenstein
2005-01-19 18:31:43 UTC
Permalink
Date: Fri, 1 Aug 2003 07:59:32 -0700
Subject: Re: How to keep /home going from RH6.1 to RH9.0?
Do not let RH9 set you up as an ordinary user, which it will want to
do during the first boot-up after installation. It will set up a home
directory /home/sstrait or equivalent, which will wipe out your old
/home/sstrait. (at least if /home is in the list of directories
that RH9 will set up in fstab).

This happened to me a several days ago. fortunately it was on the
machine that I had used while demonstrating how to make backup tapes.

A quick run through command-line useradd tool doesn't show how
to add a new user to /etc/passwd without at the same time creating
a home directory. So save your old /etc/passwd before doing the upgrade.

carl
Carl Lowenstein
2005-01-19 18:31:44 UTC
Permalink
Date: Thu, 7 Aug 2003 23:18:24 -0700
Subject: Re: How to keep /home going from RH6.1 to RH9.0?
Post by Carl Lowenstein
/home/sstrait. (at least if /home is in the list of directories
that RH9 will set up in fstab).
Are you saying that if you tell it not to build a filesystem on
the partition you will mount on /home but you do designate that
partition's mount point as being /home, it will blow away
your existing home directory?
Post by Carl Lowenstein
A quick run through command-line useradd tool doesn't show how
to add a new user to /etc/passwd without at the same time creating
a home directory.
I can't speak for how adduser behaves on RH 9, but the normal behavior
of useradd ist o respect existing home directories. A similar
utility, useradd, will create a home directory only if explicitly
told to do so on the command line.
No I did not tell the RH9 installer to reformat /home.
I have a little bit of experience doing things like this.
All other directories in /home were still present, such as /home/local
which is where I point /usr/local.

I was suckered into "set up a normal user account".

So the installer set up an account /home/cdl owner cdl group cdl
with all the usual initial dotfiles copied from /etc/skel,
In the process, the previously existing /home/cdl was wiped out.

I would have been happy to have it set up the entries in /etc/passwd
and /etc/shadow, and then tell me that the user's home directory
already existed. This has been my experience on Solaris systems and
probably others.

By the way, adduser and useradd seem to point to the same man page.
There is, in fact an option:

-m The user's home directory will be created if it does not exist.
The files contained in skeleton_dir will be copied to the home
directory if the -k option is used, otherwise the files con-
tained in /etc/skel will be used instead. Any directories con-
tained in skeleton_dir or /etc/skel will be created in the
user's home directory as well. The -k option is only valid in
conjunction with the -m option. The default is to not create
the directory and to not copy any files.

So the command-line default is what I expected, but not what the
Anaconda installer script gave me.

carl
--
carl lowenstein marine physical lab u.c. san diego
***@ucsd.edu
Carl Lowenstein
2005-01-19 18:31:44 UTC
Permalink
Date: Fri, 8 Aug 2003 02:37:03 -0700
Subject: Re: How to keep /home going from RH6.1 to RH9.0?
On RH 9, adduser is a symbolic link to useradd. I don't know if
useradd behaves differently depending on how it is invoked. If
you type "man adduser" you get the useradd man page although I
can't be certain that it isn't shown in a modified form.
Out of curiosity I poked around in the manual pages. I got the
following:

[***@iota cdl]$ zmore /usr/share/man/man8/adduser.8.gz
------> /usr/share/man/man8/adduser.8.gz <------
.so man8/useradd.8

Interpretation: if someone asks for "man adduser"
give them "man useradd".
My best guess is that RH 9 doesn't ever test for an existing
home directory and defaults to destructive behavior. More
information would be welcome. Thanks very much.
It isn't RH9 all by itself. It is the Python script known as Anaconda
which runs the installation process.

carl
Carl Lowenstein
2005-01-19 18:31:44 UTC
Permalink
Date: Fri, 08 Aug 2003 10:26:47 -0500
Subject: Re: How to keep /home going from RH6.1 to RH9.0?
Post by Carl Lowenstein
This happened to me a several days ago. fortunately it was on the
machine that I had used while demonstrating how to make backup tapes.
A quick run through command-line useradd tool doesn't show how
to add a new user to /etc/passwd without at the same time creating
a home directory. So save your old /etc/passwd before doing the upgrade.
carl
If everyone used "vipw" then you wouldn't have that problem.
Geez. How dumb do you think I am. Maybe overly trusting of the
RH installer, expecting it to do the "right thing".

I hope that "vipw" has been fixed so it actually works with systems
that use a shadow password file. My previous experience was that
"vipw" totally screwed up /etc/passwd if the second field was :x:
Well, actually it didn't. It just refused to do anything at all
to /etc/passed.

So this was another learning experience. Save your /etc/passwd
and /etc/shadow as well as your /home, and just wipe out whatever
the Anaconda installer did to them after it is finished doing its thing.

carl

Continue reading on narkive:
Loading...