Jump to content

Mdv 2005 to 2007 Any script to ease transition


emmanuel_uk
 Share

Recommended Posts

Background

I tried to upgrade 2005LE to 2007 free. Installer said it would take 3h.

<alt><ctrl><F3> showed enough dependencies error to suggest this

was not going to go very well. Experience on another PC showed that

2006 to 2007 upgrade was so-so. So no surprise here, different Xorg and the rest.

So I installed 2007 fully on a separate partition

 

Goal

I want to automate my transition and reuse settings from my old /etc.

Want to know if other people have some kind of bahs script for that,

sharing below my to do list

 

So 2007 fully on a separate partition, means I still

have my old /etc available (and in fact still a bootable customised 2005 LE).

And this will be the case for 3PCs, and I imagine many other mandriva users.

(I plan to learn how to do distro upgrade via urpmi, but lets admit for now

that this not possible or wishable for whatever reasons).

It is assumed that /opt was not on a separate partition (and well it was quite empty)

It is assumed the security level chosen is high.

The list is KDE centric, and desktop user centric (it is not a server).

(it is all from memory so some path or filename could be wrong)

 

So the question is:

- does somebody know of an automated script extracting the list of packages installed

in the old distro so this can be fed into a script which would mostly use urpmi

to download the mdv 2007 corresponding *missing* rpms

 

Alternatively, I kept a copy of most of the additional rpms I downloaded in 2005LE

in /var/cache/urpmi/rpms so maybe I could use these one way or another

to obtain a list of package names (ls + awk ?)

Many plf rpms to install but also some tasks like downloading and install java 1.5, azureus...

(I quoted automatix in another thread because I suppose something like ubuntu automatix

could make part of this job simpler)

 

The rest is easing the admin and automate what can be or at least display some diff -ru

(I do not know how to do that exactly, but maybe sed could be used with a piped diff -ru

to automate adding (only adding for safety) to the new files in /etc, with a Y/N question at each line)

 

- e2label the partition if not done during install

- backup /etc from the stock install

- setup repositories for urpmi

- set some file immutable like /etc/services, disable some tty loging, check that remote login to Xorg is disabled

change /etc/issue.net (security tweaks) and all sorts like that

- export/compare /etc/fstab (maybe some people taylor initab as well?)

- export the shorewall and snort settings and conf files (ok version are going to be different so this can be a problem)

- export the cron settings (boink in my case for snort)

- export settings for smartd, syslog, i2c / sensors

- compare settings of /etc/sysconfig, rc.local, xinetd, ssh, /etc/modules.conf, /etc/modules.preload

- export extra bits (like aliases from /etc/bahsrc. Cannot remember where path is located

- copy /etc/host* and /etc/resolv (cannot see why these would have changed from 2005 to 2007)

- export domainame (needed to deal with openoffice 2.0.3 "bug" with dns reolution when no internet connection)

- reinstalling driver for ndiswrapper (steps -i, -l, -m) if needed

- export wlan0 settings /etc/networking/ifup-wlan0 (whatever the name)

(WEP key and ESSID; my experience this went wrong during 2006 to 2007 so maybe format a bit different)

no idea where special initialisation parameters are stored for fancy NIC card eth0, eth1,

probably something like /etc/networking/ifcfg-eth0 (yes I do have 1 fancy parameter somewhere in there for eth0

- any fancy DHCP settings or fixed IP for some people (do not know where stored, no experience)

- update rule in kmail so it filters email via clamav

- check distribution lists and email address book (Kontact) is available via /home/user

- export aumixrc (at least show a diff)

- any tweaked usb identification parameters in /etc somewhere to do with automount (cameras?)

- export sudo settings

- compare hdparm settings

- set /dev/nvram to world writeable (to do with kmilo or whatever for acpi messages, some laptop OCD messages)

- export personalised fancy rules of draksec changing write and read permissions on some directories

- any fancy printer settings are I presume in user space although /etc/cups have info in there,

with gutemprint upgrade now in 2007 there might be little to export /etc/cups/printers.conf and /etc/printcap

- export that setting in postfix somewhere that says that a human being address must be set for root

(in 2005 this was needed so that automated security emails can be delivered locally without

a full blown postfix, smtp and god knows what installation)

- Is there a clever way to export the list of users and groups? (Shadowpassword?)

(possibly? just cut and past content of /etc/passwd and shadow into new distro /etc)

 

Misc other admin tasks

- tweak perl source for urpmi and drakrpm so that rpms stay always in the cache

- reinstalling root-tail (or anything that can display syslog onto the background picture)

- create user groups as required and check k3b is setup properly

- only allow users in wheel to su

- change settings so faces appear in kdm

- enable / disable services. Maybe easier to rely on doing it by hand with drakxservices

- maybe sort output from lsmod and compare between two mandriva version

- what if anything needs copying to reuse the gpg keyring (it might have stayed in /home/user)

- any firefox settings like ipv6=no and bookmarks (presumably in userspace, so nothing to do)

- any firefox proxies settings? Where are they stored in text file?

- get an automated list of the extensions used by "old firefox" and download them (automatically?)

- copy for those with modem any setup script if needed?

- export any extra service script that one may have created

- reminders: like grub password setting

- reminder samba, ntfs settings (maybe not obvious to export?)

- redo symbolic links for user supplied script living in home but symlinked to /usr/sbin

- update any backup scripts that is partition name dependent

- desktop export no idea what can be automated and what is already in /home (background picture, screensaver, icons on desktop...)

- start submenus no idea what can be automated and what is already in /home (especially if you have taylored submenus)

- extra icones on taskbar to be added manually, kdm themes by hand

- special shortcuts in openoffice, (in kde as well maybe) disable java in openoffice...

- special settings in konqueror (used to have to add %u to firefox command in konqueror)

- bluetooth, no idea

- backup new /etc

 

I can do a bit of bash programming but I am not fast...

So if I get something going I will post it here. Maybe some users are interested

in collaborating to develop that script? Coding, testing, suggesting what typical admin modifications

one does and need to be reminded of when "migrating" from one version to another.

Ok some of these actions are not generic because I quoted the application I most

use. But they can be generalised to software type (like email client rather than say kmail).

 

At least you can think of the post as a draft shopping / to do list ;)

if you went from <=2005 to 2007

 

cheers

Link to comment
Share on other sites

What were your dependency errors? MDE stuff? This isn't uncommon, since it's not official stuff, saw it with another post before.

 

If you do upgrades from one version to another, make sure you install etc-update. You can then use this to migrate the config files that have been saved as .rpmnew files. Should fix problems.

 

I used to do the manual way than etcupdate:

 

updatedb
slocate rpmnew

 

and then copy the rpmnew over the existing file. I did an upgrade of 2006 from CD/DVD media and it worked no problem. But I didn't use any third party rpms. Only what was available from official Mandriva mirrrors.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...