Changes between Version 5 and Version 6 of full-filesystem-rsync


Ignore:
Timestamp:
Feb 20, 2012, 1:49:18 AM (12 years ago)
Author:
Jamie McClelland
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • full-filesystem-rsync

    v5 v6  
    1010# make sure all the remote filesystems are properly mounted under /mnt
    1111target=root@leslie.new:/mnt
     12target_host=root@leslie.new
    1213
    1314# all user/system non-temporary filesystems on the origin server:
     
    2526done
    2627}}}
     28
     29Assuming your target is an MFPL kvm guest, you will want grub to output to a serial console and you will want a login prompt on the serial console. Therefore, you may want to add these lines to your script:
     30
     31{{{
     32ssh "$target_host" "sed -i 's|^#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100|T0:23:respawn:/sbin/getty -L ttyS0 115200 vt102|' /mnt/etc/inittab"
     33ssh "$target_host" "sed -i 's|^1:2345:respawn:/sbin/getty|#1:2345:respawn:/sbin/getty|' /mnt/etc/inittab"
     34ssh "$target_host" "sed -i 's|^2:23:respawn:/sbin/getty|#2:23:respawn:/sbin/getty|' /mnt/etc/inittab"
     35ssh "$target_host" "sed -i 's|^3:23:respawn:/sbin/getty|#3:23:respawn:/sbin/getty|' /mnt/etc/inittab"
     36ssh "$target_host" "sed -i 's|^4:23:respawn:/sbin/getty|#4:23:respawn:/sbin/getty|' /mnt/etc/inittab"
     37ssh "$target_host" "sed -i 's|^5:23:respawn:/sbin/getty|#5:23:respawn:/sbin/getty|' /mnt/etc/inittab"
     38ssh "$target_host" "sed -i 's|^6:23:respawn:/sbin/getty|#6:23:respawn:/sbin/getty|' /mnt/etc/inittab"
     39
     40ssh "$target_host" 'echo nameserver 209.234.253.239 > /mnt/etc/resolv.conf'
     41ssh "$target_host" 'echo GRUB_CMDLINE_LINUX=\"console=ttyS0,115200n8\" >> /mnt/etc/default/grub'
     42ssh "$target_host" 'echo GRUB_TERMINAL=serial >> /mnt/etc/default/grub'
     43ssh "$target_host" 'echo GRUB_SERIAL_COMMAND=\"serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1\" >> /mnt/etc/default/grub'
     44
     45ssh "$target_host" "chroot /mnt update-grub"
     46}}}