@related: Install etc uninstall

relocate / settings

(0) copy file system :

d=/local/var/backup/storage/WD6400BPVT-2/p6# ?
d=/mnt/md1//local/var/backup/storage/WD6400BPVT-2
root@nas:# 
# time rsync --progress -avx ./ 
# root@192.168.0.87:/mnt/sda6/

time rsync --progress -avx --delete root@192.168.0.90:/$d/ ./

(1) ChRoot

(2) uuid :

apt-get install uuid-runtime fai-setup-storage
file  /dev/disk/by-uuid/*
blkid
ln -fs ../../sda5 /dev/disk/by-uuid/1ef6cfc5-e556-456c-8a2e-a615486907cb

http://nixcraft.com/shell-scripting/948-change-uuid-ext3-partition.html

uuidgen | xargs tune2fs /dev/hdaX -U ; vol_id /dev/hdaX
for t in  sda5 ; do echo $t ; d=$(readlink $t) ;echo $t | xargs tune2fs $d  -U ; done

(3) grub v2:

update-grub2
# umount: error while loading shared libraries: libsepol.so.1: cannot open shared object file: No such file or directory
grub-install /dev/sda6 --force

(3) grub v1 :

sudo sed -e "s|UUID=.*|/dev/sda6|g" -i /boot/grub/menu.lst
sudo sed -e "s|hd1,5|hd0,5|g" -i /boot/grub/menu.lst
rm /boot/grub/menu.lst &&  update-grub 

SSH:

sudo rm -rfv /etc/ssh/ssh_host_*_key* ; sudo dpkg-reconfigure openssh-server
sudo aptitude reinstall --purge openssh-server

xorg :

grep EE  /var/log/Xorg.0.log
sudo aptitude install xserver-xorg
sudo dpkg-reconfigure -plow xserver-xorg
rm /etc/X11/xorg.conf* 
sudo tasksel # Desktop
aptitude reinstall discover xserver-xorg-video-intel xserver-xorg-input-all xserver-xorg-core xserver-xorg

install distro

apt-get install tasksel sudo aptitude rsync mercurial ssh screen localepurge
aptitude clean 

replicate / sync fs

rsync and ignore:

SD=hda6
DD=sda6
DEST=root@remote:/mnt/$DD
sudo rsync -avx \
 --exclude-from /etc/home/sync-excluded.txt --delete \
 /mnt/$SD/  $DEST/
cat << EOF > /etc/home/sync-excluded.txt
/mnt
/tmp
/var/tmp
/proc
/etc/hosts
/etc/hostname
/etc/udev/rules.d/70-persistent-net.rules
/etc/udev/rules.d/75-persistent-net-generator.rules

/home

/etc/ssh/ssh_host_dsa_key
/etc/ssh/ssh_host_dsa_key.pub

/etc/ssh/ssh_host_rsa_key
/etc/ssh/ssh_host_rsa_key.pub

/var/cache/pbuilder
/var/lib/mlocate/mlocate.db
EOF

replicate / to new hdd

new hardware ?

for t in $(grep -v “^#” /etc/home/lsmod.txt); do modprobe -v $t; done

boot

install grub in root's part

grub-install /dev/sda6

cascade grub:

root hd0,5
unhide ?
chainloader +1

Update:

/etc/hostsname
/etc/hosts
/boot/grub/menu.lst
# ssh keys 

Or remove :

/etc/X11/xorg.conf
/etc/udev/rules.d/z25_persistent-net.rules

misc

Remove servers

sudo aptitude remove ddclient boinc apache2 cvsd postfix exim
 diff -u /tmp/packages.txt /etc/home/packages.txt  | grep "+xserver-xorg" | sed -e "s|+\(.*\) .*|\1|g"
xserver-xorg
xserver-xorg-core
xserver-xorg-input-all
xserver-xorg-input-evdev
xserver-xorg-input-kbd
xserver-xorg-input-mouse
xserver-xorg-input-synaptics
xserver-xorg-input-wacom
xserver-xorg-video-apm
xserver-xorg-video-ark
xserver-xorg-video-ati
xserver-xorg-video-chips
xserver-xorg-video-cirrus
xserver-xorg-video-cyrix
xserver-xorg-video-dummy
xserver-xorg-video-fbdev
xserver-xorg-video-glint
xserver-xorg-video-i128
xserver-xorg-video-i740
xserver-xorg-video-imstt
xserver-xorg-video-intel
xserver-xorg-video-mga
xserver-xorg-video-neomagic
xserver-xorg-video-newport
xserver-xorg-video-nsc
xserver-xorg-video-nv
xserver-xorg-video-rendition
xserver-xorg-video-s3
xserver-xorg-video-s3virge
xserver-xorg-video-savage
xserver-xorg-video-siliconmotion
xserver-xorg-video-sis
xserver-xorg-video-sisusb
xserver-xorg-video-tdfx
xserver-xorg-video-tga
xserver-xorg-video-trident
xserver-xorg-video-tseng
xserver-xorg-video-v4l
xserver-xorg-video-vesa
xserver-xorg-video-via

@tag: migrate

uuid.txt · Last modified: 2013/09/04 22:14 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki