lost and found ( for me ? )

ubuntu 12.04 : install kernel 3.5 via apt-get

Referred to http://www.upubuntu.com/2012/07/install-linux-kernel-35-from-ppa-on.html

root@ubuntu12-04-vm1:~# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.1 LTS"

root@ubuntu12-04-vm1:~# uname -rn
ubuntu12-04-vm1 3.2.0-29-virtual


This ubuntu is running on KVM as a VM which I built with vmbuilder tool.

[ install kernel 3.5 ]

install python-software-repositories to use add-apt-repository command if you have not installed it.
root@ubuntu12-04-vm1:~# apt-get install python-software-repositories

root@ubuntu12-04-vm1:~# add-apt-repository ppa:upubuntu-com/kernel-amd64
You are about to add the following PPA to your system:

More info: https://launchpad.net/~upubuntu-com/+archive/kernel-amd64
Press [ENTER] to continue or ctrl-c to cancel adding it

Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.YHmwwsc3kM --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://keyserver.ubuntu.com:80/ --recv DED04C8CBB517AE45B073F12A5D712AEE06E6293
gpg: requesting key E06E6293 from hkp server keyserver.ubuntu.com
gpg: key E06E6293: public key "Launchpad PPA for upubuntu.com" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

root@ubuntu12-04-vm1:~# apt-get update

root@ubuntu12-04-vm1:~# apt-get install linux -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
 linux-headers-3.5.0-030500 linux-headers-3.5.0-030500-generic
 linux-image-3.5.0-030500-generic
<snip>
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-3.5.0-030500-generic
Found kernel: /boot/vmlinuz-3.2.0-29-virtual
Updating /boot/grub/menu.lst ... done

root@ubuntu12-04-vm1:~#


update grub.cfg. I’m using grub not grub2
root@ubuntu12-04-vm1:~# dpkg -l grub
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  grub           0.97-29ubuntu6 GRand Unified Bootloader (Legacy version)


back up the original menu.lst and then issue the following command.
Please don’t issue the following command. this is mistake !! If you issue grub-mkconfig , you will not boot the OS..
root@ubuntu12-04-vm1:~# grub-mkconfig -o /boot/grub/menu.lst


reboot
root@ubuntu12-04-vm1:~# reboot

OMG !!! …. can’t login !!!

okay , stop the ubuntu VM forcefully
on the KVM host
virsh # destroy ubuntu12-04-vm1
Domain ubuntu12-04-vm1 destroyed


Luckily , I backed up the original menu.lst , so restore it with guestfish.
root@ubuntu-1:~# guestfish --rw -d ubuntu12-04-vm1 -i edit /boot/grub/menu.lst


The following menu.lst is the original menu.lst which I backed up.
root@ubuntu-1:~# guestfish --rw -d ubuntu12-04-vm1 -i cat /boot/grub/menu.lst
# cat /boot/grub/menu.lst
# menu.lst - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-legacy-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default         0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
#timeout                3
timeout         0

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the
# command 'lock'
# e.g. password topsecret
#      password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title         Windows 95/98/NT/2000
# root          (hd0,0)
# makeactive
# chainloader   +1
#
# title         Linux
# root          (hd0,1)
# kernel        /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=dd3e1234-f569-4a8e-9bff-5f2fd4bad248 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=dd3e1234-f569-4a8e-9bff-5f2fd4bad248

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
##      lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
##      indomU=true
##      indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title           Ubuntu 12.04.1 LTS, kernel 3.2.0-29-virtual
uuid            dd3e1234-f569-4a8e-9bff-5f2fd4bad248
kernel          /boot/vmlinuz-3.2.0-29-virtual root=UUID=dd3e1234-f569-4a8e-9bff-5f2fd4bad248 ro quiet splash
initrd          /boot/initrd.img-3.2.0-29-virtual console=tty0 console=ttyS0,115200n8

title           Ubuntu 12.04.1 LTS, kernel 3.2.0-29-virtual (recovery mode)
uuid            dd3e1234-f569-4a8e-9bff-5f2fd4bad248
kernel          /boot/vmlinuz-3.2.0-29-virtual root=UUID=dd3e1234-f569-4a8e-9bff-5f2fd4bad248 ro  single
initrd          /boot/initrd.img-3.2.0-29-virtual

### END DEBIAN AUTOMAGIC KERNELS LIST


start the ubuntu VM.
root@ubuntu-1:~# virsh start ubuntu12-04-vm1
Domain ubuntu12-04-vm1 started


Yhea , I could login..
root@ubuntu-1:~# virsh console ubuntu12-04-vm1
Connected to domain ubuntu12-04-vm1
Escape character is ^]

Ubuntu 12.04.1 LTS ubuntu12-04-vm1 ttyS0

ubuntu12-04-vm1 login: root
Password:
Last login: Thu Aug 26 04:38:36 UTC 2012 on ttyS0
Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-29-virtual x86_64)

* Documentation:  https://help.ubuntu.com/


Okay , let’s update menu.lst again.
issue update-grub command.
root@ubuntu12-04-vm1:~# update-grub
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-3.5.0-030500-generic
Found kernel: /boot/vmlinuz-3.2.0-29-virtual
Updating /boot/grub/menu.lst ... done


nnn , menu.lst does not seem to be updated. why ??
root@ubuntu12-04-vm1:~# diff /boot/grub/menu.lst /home/hattori/org.menu.lst

root@ubuntu12-04-vm1:~# egrep -v ^# /boot/grub/menu.lst | grep -v ^$
default         0
timeout         0
hiddenmenu
title           Ubuntu 12.04.1 LTS, kernel 3.2.0-29-virtual
uuid            dd3e1234-f569-4a8e-9bff-5f2fd4bad248
kernel          /boot/vmlinuz-3.2.0-29-virtual root=UUID=dd3e1234-f569-4a8e-9bff-5f2fd4bad248 ro quiet splash
initrd          /boot/initrd.img-3.2.0-29-virtual console=tty0 console=ttyS0,115200n8
title           Ubuntu 12.04.1 LTS, kernel 3.2.0-29-virtual (recovery mode)
uuid            dd3e1234-f569-4a8e-9bff-5f2fd4bad248
kernel          /boot/vmlinuz-3.2.0-29-virtual root=UUID=dd3e1234-f569-4a8e-9bff-5f2fd4bad248 ro  single
initrd          /boot/initrd.img-3.2.0-29-virtual

root@ubuntu12-04-vm1:~# apt-cache policy grub
grub:
 Installed: 0.97-29ubuntu66
 Candidate: 0.97-29ubuntu66
 Version table:
*** 0.97-29ubuntu66 0
       500 http://jp.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
       100 /var/lib/dpkg/status


kernel 3.5 is in /boot directory for sure.
oot@ubuntu12-04-vm1:~# ls /boot/
System.map-3.2.0-29-virtual      grub
System.map-3.5.0-030500-generic  initrd.img-3.2.0-29-virtual
abi-3.2.0-29-virtual             initrd.img-3.5.0-030500-generic
abi-3.5.0-030500-generic         vmlinuz-3.2.0-29-virtual
config-3.2.0-29-virtual          vmlinuz-3.5.0-030500-generic
config-3.5.0-030500-generic


okay , back up the original and then remove it and then issue update-grub to create a new one.
root@ubuntu12-04-vm1:~# mv /boot/grub/menu.lst /home/hattori/
root@ubuntu12-04-vm1:~# update-grub
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ...

Could not find /boot/grub/menu.lst file. Would you like /boot/grub/menu.lst generated for you? (y/N) y
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-3.5.0-030500-generic
Found kernel: /boot/vmlinuz-3.2.0-29-virtual
Updating /boot/grub/menu.lst ... done


Okay , kernel 3.5 definition is in menu.lst
root@ubuntu12-04-vm1:~# egrep "3.5" /boot/grub/menu.lst
title           Ubuntu 12.04.1 LTS, kernel 3.5.0-030500-generic
kernel          /boot/vmlinuz-3.5.0-030500-generic root=UUID=dd3e1234-f569-4a8e-9bff-5f2fd4bad248 ro quiet splash
initrd          /boot/initrd.img-3.5.0-030500-generic
title           Ubuntu 12.04.1 LTS, kernel 3.5.0-030500-generic (recovery mode)
kernel          /boot/vmlinuz-3.5.0-030500-generic root=UUID=dd3e1234-f569-4a8e-9bff-5f2fd4bad248 ro  single
initrd          /boot/initrd.img-3.5.0-030500-generic


reboot the OS.
I can boot the OS with kernel 3.5 :)
Broadcast message from root@ubuntu12-04-vm1
       (/dev/ttyS0) at 5:51 ...

The system is going down for reboot NOW!

Ubuntu 12.04.1 LTS ubuntu12-04-vm1 ttyS0

ubuntu12-04-vm1 login: root
Password:
Last login: Thu Aug 26 05:38:23 UTC 2012 on ttyS0
Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.5.0-030500-generic x86_64)

* Documentation:  https://help.ubuntu.com/
root@ubuntu12-04-vm1:~# uname -rn
ubuntu12-04-vm1 3.5.0-030500-generic

Linux Mint : upgrade Mint 12 to Mint 13

This is as-is based info.
I would recommend a fresh install of Mint 13.
I am ready for the fresh installation in the event of the upgrade failure, so I tried that.

Referred to http://www.code-authors.com/ftopict-4145.html and http://www.linuxhostingtalk.com/showthread.php/1200-Upgrade-Linux-Mint-12-to-Linux-mint-13

Here are trial and error logs.

Before the upgrading

mint-1 ~ # cat /etc/lsb-release
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=12
DISTRIB_CODENAME=lisa
DISTRIB_DESCRIPTION="Linux Mint 12 Lisa"

mint-1 ~ # uname -ri
3.0.0-24-generic x86_64


edit /etc/apt/sources.list

from
# cat /etc/apt/sources.list
deb http://packages.linuxmint.com/ lisa main upstream import
deb http://archive.ubuntu.com/ubuntu/ oneiric main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ oneiric-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ oneiric-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ oneiric partner
deb http://packages.medibuntu.org/ oneiric free non-free

# deb http://archive.getdeb.net/ubuntu oneiric-getdeb apps
# deb http://archive.getdeb.net/ubuntu oneiric-getdeb games

deb http://gb.archive.ubuntu.com/ubuntu/ natty main
deb http://gb.archive.ubuntu.com/ubuntu/ natty universe


to
mint-1 ~ # cat /etc/apt/sources.list
deb http://packages.linuxmint.com/ maya main upstream import
deb http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ precise partner
deb http://packages.medibuntu.org/ precise free non-free

#deb http://packages.linuxmint.com/ lisa main upstream import
#deb http://archive.ubuntu.com/ubuntu/ oneiric main restricted universe multiverse
#deb http://archive.ubuntu.com/ubuntu/ oneiric-updates main restricted universe multiverse
#deb http://security.ubuntu.com/ubuntu/ oneiric-security main restricted universe multiverse
#deb http://archive.canonical.com/ubuntu/ oneiric partner
#deb http://packages.medibuntu.org/ oneiric free non-free

# deb http://archive.getdeb.net/ubuntu oneiric-getdeb apps
# deb http://archive.getdeb.net/ubuntu oneiric-getdeb games

#deb http://gb.archive.ubuntu.com/ubuntu/ natty main
#deb http://gb.archive.ubuntu.com/ubuntu/ natty universe

mint-1 ~ # apt-get update

mint-1 ~ # apt-get upgrade -y


nnn , error
dpkg: error processing /var/cache/apt/archives/libc6_2.15-0ubuntu10_i386.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.15-0ubuntu10_amd64.deb
/var/cache/apt/archives/libc6_2.15-0ubuntu10_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
mint-1 ~ # echo $?
100


upgrade forcefully.
mint-1 ~ # apt-get -f install

subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.15-0ubuntu10_amd64.deb
/var/cache/apt/archives/libc6_2.15-0ubuntu10_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


nnn , error…

how about this ?
mint-1 ~ # cp /etc/apt/sources.list /etc/apt/sources.list.bak


restore the original sources.list
mint-1 ~ # cat /etc/apt/sources.list
deb http://packages.linuxmint.com/ lisa main upstream import
deb http://archive.ubuntu.com/ubuntu/ oneiric main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ oneiric-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ oneiric-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ oneiric partner
deb http://packages.medibuntu.org/ oneiric free non-free

# deb http://archive.getdeb.net/ubuntu oneiric-getdeb apps
# deb http://archive.getdeb.net/ubuntu oneiric-getdeb games

deb http://gb.archive.ubuntu.com/ubuntu/ natty main
deb http://gb.archive.ubuntu.com/ubuntu/ natty universe

mint-1 ~ # sed -i 's/lisa/maya/g' /etc/apt/sources.list
mint-1 ~ # sed -i 's/oneiric/precise/g' /etc/apt/sources.list

mint-1 ~ # cat /etc/apt/sources.list
deb http://packages.linuxmint.com/ maya main upstream import
deb http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ precise partner
deb http://packages.medibuntu.org/ precise free non-free

# deb http://archive.getdeb.net/ubuntu precise-getdeb apps
# deb http://archive.getdeb.net/ubuntu precise-getdeb games

deb http://gb.archive.ubuntu.com/ubuntu/ natty main
deb http://gb.archive.ubuntu.com/ubuntu/ natty universe

mint-1 ~ # apt-get update


nnn , error
mint-1 ~ # apt-get -y dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
insserv : Depends: libc6 (>= 2.14) but 2.13-20ubuntu5.1 is installed
libc-dev-bin : Depends: libc6 (> 2.15) but 2.13-20ubuntu5.1 is installed
libc6 : Depends: libc-bin (= 2.13-20ubuntu5.1)
libc6:i386 : Depends: libc-bin:i386 (= 2.13-20ubuntu5.1)
libc6-dev : Depends: libc6 (= 2.15-0ubuntu10) but 2.13-20ubuntu5.1 is installed
libnewt0.52 : Depends: libc6 (>= 2.15) but 2.13-20ubuntu5.1 is installed
libpng12-0 : Depends: libc6 (>= 2.14) but 2.13-20ubuntu5.1 is installed
whiptail : Depends: libc6 (>= 2.14) but 2.13-20ubuntu5.1 is installed
E: Unmet dependencies. Try using -f.


how about upgrading Mint forcefully ??
nnn , error..
mint-1 ~ # apt-get -y -f dist-upgrade

subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.15-0ubuntu10_amd64.deb
/var/cache/apt/archives/libc6_2.15-0ubuntu10_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
mint-1 ~ # echo $?
100


I’ve  found the solution.
http://markusperl.blogspot.jp/2012/07/upgrade-linux-mint-to-maya-fails.html
Thanks a lot!
#wget http://ftp.halifax.rwth-aachen.de/ubuntu//pool/main/n/newt/libnewt0.52_0.52.11-2ubuntu8_amd64.deb
# wget http://ftp.halifax.rwth-aachen.de/ubuntu//pool/main/n/newt/whiptail_0.52.11-2ubuntu8_amd64.deb
# wget http://ftp.halifax.rwth-aachen.de/ubuntu//pool/main/p/popt/libpopt0_1.16-1_amd64.deb
# dpkg -i libnewt0.52_0.52.11-2ubuntu8_amd64.deb whiptail_0.52.11-2ubuntu8_amd64.deb libpopt0_1.16-1_amd64.deb
# dpkg -i /var/cache/apt/archives/libc6*


Okay..
mint-1 tmp_dir # apt-get -f install

snip

Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-3.0.0-24-generic
Warning: No support for locale: ja_JP.utf8

mint-1 tmp_dir # echo $?
0


then
mint-1 tmp_dir # apt-get dist-upgrade -f


error
Processing triggers for shared-mime-info ...
Processing triggers for fontconfig ...
Processing triggers for libgtk2.0-0 ...
Errors were encountered while processing:
/var/cache/apt/archives/gir1.2-mate-menu_1.2.0-2+precise_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

mint-1 tmp_dir # sh -c 'echo "deb http://packages.linuxmint.com/ maya import" >> /etc/apt/sources.list.d/mint.list'

mint-1 apt # cp sources.list sources.list.bak2

mint-1 apt # cat sources.list
deb http://packages.linuxmint.com/ maya main upstream import
deb http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ precise partner
deb http://packages.medibuntu.org/ precise free non-free

# deb http://archive.getdeb.net/ubuntu precise-getdeb apps
# deb http://archive.getdeb.net/ubuntu precise-getdeb games

mint-1 apt # dpkg --clear-avail
mint-1 apt # dpkg --configure –a
<snip>
update-initramfs: Generating /boot/initrd.img-3.2.0-29-generic
Warning: No support for locale: ja_JP.utf8
Processing triggers for python-central ...

mint-1 apt # apt-get dist-upgrade -f


error..
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-3.2.0-29-generic
Warning: No support for locale: ja_JP.utf8
Processing triggers for install-info ...
Errors were encountered while processing:
/var/cache/apt/archives/mint-search-addon_2012.05.11_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
mint-1 apt # echo $?
100

mint-1 apt # apt-get remove --purge mint-search-addon
Setting up python-axiom (0.6.0-3) ...
Setting up python-coherence (0.6.6.2-6) ...
Processing triggers for dictionaries-common ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-3.2.0-29-generic
Warning: No support for locale: ja_JP.utf8
mint-1 apt # echo $?
0


then
apt-get dist-upgrade –f
W: Failed to fetch http://packages.linuxmint.com/dists/maya/Release.gpg  Could not resolve 'packages.linuxmint.com'

W: Some index files failed to download. They have been ignored, or old ones used instead.


oops ,, edit /etc/resolv.conf
mint-1 apt # cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
#nameserver ::1
#nameserver 127.0.0.1
nameserver 4.4.4.4
nameserver 8.8.8.8

mint-1 apt # apt-get update
Ign http://packages.medibuntu.org precise/non-free Translation-en
Fetched 184 kB in 25s (7162 B/s)
Reading package lists... Done
mint-1 apt #

mint-1 apt # apt-get dist-upgrade -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
 sessioninstaller
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

mint-1 apt # apt-get install -f sessioninstaller


update grub.conf
I’m using grub not grub2.
mint-1 apt # dpkg -l grub
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
un  grub           <none>         (no description available)
mint-1 apt # dpkg -l grub2
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
un  grub2          <none>         (no description available)


mint-1 apt # update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.0-29-generic
Found initrd image: /boot/initrd.img-3.2.0-29-generic
Found linux image: /boot/vmlinuz-3.0.0-24-generic
Found initrd image: /boot/initrd.img-3.0.0-24-generic
Found linux image: /boot/vmlinuz-3.0.0-23-generic
Found initrd image: /boot/initrd.img-3.0.0-23-generic
Found linux image: /boot/vmlinuz-3.0.0-22-generic
Found initrd image: /boot/initrd.img-3.0.0-22-generic
Found linux image: /boot/vmlinuz-3.0.0-21-generic
Found initrd image: /boot/initrd.img-3.0.0-21-generic
Found linux image: /boot/vmlinuz-3.0.0-20-generic
Found initrd image: /boot/initrd.img-3.0.0-20-generic
Found linux image: /boot/vmlinuz-3.0.0-19-generic
Found initrd image: /boot/initrd.img-3.0.0-19-generic
Found linux image: /boot/vmlinuz-3.0.0-17-generic
Found initrd image: /boot/initrd.img-3.0.0-17-generic
Found linux image: /boot/vmlinuz-3.0.0-16-generic
Found initrd image: /boot/initrd.img-3.0.0-16-generic
Found linux image: /boot/vmlinuz-3.0.0-15-generic
Found initrd image: /boot/initrd.img-3.0.0-15-generic
Found linux image: /boot/vmlinuz-3.0.0-14-generic
Found initrd image: /boot/initrd.img-3.0.0-14-generic
Found linux image: /boot/vmlinuz-3.0.0-13-generic
Found initrd image: /boot/initrd.img-3.0.0-13-generic
Found linux image: /boot/vmlinuz-3.0.0-12-generic
Found initrd image: /boot/initrd.img-3.0.0-12-generic
Found memtest86+ image: /boot/memtest86+.bin
 No volume groups found
grep: input file `/boot/grub/grub.cfg.new' is also the output
done
mint-1 apt #

mint-1 apt # egrep "3.2.0" /boot/grub/grub.cfg
menuentry 'Linux Mint 12 64-bit, 3.2.0-29-generic (/dev/sda1)' --class linuxmint --class gnu-linux --class gnu --class os {
       linux   /boot/vmlinuz-3.2.0-29-generic root=UUID=zzzza488-6ead-4559-96d3-204025040826 ro   quiet splash vt.handoff=7
       initrd  /boot/initrd.img-3.2.0-29-generic
menuentry 'Linux Mint 12 64-bit, 3.2.0-29-generic (/dev/sda1) -- recovery mode' --class linuxmint --class gnu-linux --class gnu --class os {
       echo    'Loading Linux 3.2.0-29-generic ...'
       linux   /boot/vmlinuz-3.2.0-29-generic root=UUID=zzzza488-6ead-4559-96d3-204025040826 ro recovery nomodeset
       initrd  /boot/initrd.img-3.2.0-29-generic
mint-1 apt #

mint-1 apt # reboot


I could upgrade to Mint 13 from 12 ?? , because kernel ver is 3.2.
mint-1 ~ # cat /etc/lsb-release
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=12
DISTRIB_CODENAME=lisa
DISTRIB_DESCRIPTION="Linux Mint 12 Lisa"

mint-1 ~ # uname -ri
3.2.0-29-generic x86_64

when booting the Mint , resolv.conf always is updated by resolvconf..
mint-1 ~ # cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
#nameserver ::1  <- comment
nameserver 127.0.0.1

disable resolvconf to update resolv.conf , disable NetworkManger and enable network script.
mint-1 ~ # resolvconf --disable-updates

mint-1 ~ # sysv-rc-conf network-manager off
mint-1 ~ # sysv-rc-conf network on

mint-1 ~ # sysv-rc-conf --list | grep -i network
network      2:on       3:on    4:on    5:on
network-inte
network-inte
network-inte
network-mana 2:off      3:off   4:off   5:off
network-mang 2:off      3:off   4:off   5:off
networking   0:on       6:on