swapping a distro-from one hdd to another

Status
Not open for further replies.

praka123

left this forum longback
My hdd seagate 80GB sata failed 2 week back.
I copied the whole Debian partition into my new 160GB hdd's ext3 partition made for this(not did a "dd").

later I chrooted into the Debian Sid install via Ubuntu.
I mounted debian partition on Ubuntu and:
Code:
mount /dev/sda10 /mnt

Code:
mount -t proc proc /mnt/proc

Code:
mount --bind /dev/ /mnt/dev

Code:
chroot /mnt /bin/bash

Then I removed the grub from Debian and apt-get install --reinstall grub
I reinstalled grub natively as:
Code:
grub>root (hd0,9)

Code:
setup (hd0)
then,
Code:
grub-install /dev/sda
that's it.
when rebooted,grub menu is shown.I can boot into Debian and login with my local username.
wait!but from here the menace starts :evil: :D
I CANNOT login via terminal or any virtual terminal as root!
wtf?
So,In panic,I tried resetting password via grub option to kernel(I use upstart in Debian in place of sysVinit) "rw init=/bin/bash"
changed password.
in that root terminal.I modprobed all needed modules manually(pppoe etc)
connected to my adsl pppoe connxn,
Code:
apt-get install --reinstall linux-image-`uname -r` grub dpkg bash

also,I did a :
Code:
source /etc/profile

as mkinitrd is complaining LANG etc env variables were missing

I, (my debconf settings is "medium") as root
Code:
dpkg-reconfigure --all

I did a:
Code:
apt-get install --reinstall login libpam-runtime
to solve the /bin/su not having suid bit set .
So,Happy times!
Hope this benefits others too :)
 
Status
Not open for further replies.
Top Bottom