Based on info from these links...
http://ubuntuforums.org/showthread.php?t=35087
http://ubuntuforums.org/showthread.php?t=24113&highlight=grub+restore
Info from a question posted on Spiceworks...
http://community.spiceworks.com/topic/37004 (Special thanks to Scott Alan Miller.)
Backup:
sudo tar cvpzf backup.tgz --exclude=/proc --exclude=/dev --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys /
2.
Restore Notes:
If restoring to a different computer:
Install a fresh copy of the same version of Ubuntu to a different Pc.
Durring setup, configure networking to connect to your local subnet so FTP may be used to copy the backup file on to the system.
Reboot the computer
Durring boot press ESC to log into recovery mode in the GRUB menu
FTP the backup file onto the system into the root directory.
ftp xxx.xxx.xxx.xxx
login...
bin
hash
lcd /
get foo
Optionally: to restore from CDROM, make a mount point for the CDROM and copy the restore file from there to the root directory.
mkdir -p /mnt/cdrom && mount -t iso9660 -o ro /dev/cdrom /mnt/cdrom
cd /mnt/cdrom to access and copy the file to the root of the current HDD.
To eject the CD, first unmount the drive (ensure you are not in the /mnt/cdrom directory)
umount /mnt/cdrom
3.
Before you restore:
If restoring to a different computer (or a HDD replacement):
Prior to the restore copy the /boot/grub/menu.lst to menu.lst.bak.
Do the restore. (next step)
After the restore, replaced the menu.lst that was restored with the saved copy.
4.
Restore:
From the root directory:
tar xvpfz backup.tgz -C /
Make sure the excluded directories exist. If not recreate them...
mkdir proc
mkdir lost+found
mkdir mnt
mkdir sys
etc...
5.
Before you reboot:
If restoring to a different computer:
/etc/udev/rules.d/70-persistent-net.rules needs to be modified after the restore and before the reboot.
The mac address will be different if this is a differnt pc.
Run ifconfig to get the correct mac address and modify the file.
6.
Potential failures:
7.10 bug:
New install 1st user is not a member of sudoers. File sudoers must be modified in recovery mode:
Hit space when restarting to get to the grub boot menu and select recovery mode.
Modify /etc/sudoers with visudo as below...
Add to the bottom of the file:
scott ALL=(ALL) ALL
Fix:
Do the restore from recovery mode. His ESC durring boot and select the recovery mode option.
After Restore the system won't boot:
Starting up ...
Loading, please wait...
Check root= bootarg cat /proc/cmdline
or missing modules, devices: cat /proc.modules ls /dev
ALERT! /dev/disk/by-uuid/0a74bd51-5fea-4aa2-88f9-1a9309c791aa does not exist. Dropping to a shell!
BusyBox v1.1.3 (Debian 1:1.1.3-5ubuntu7) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs)
Fix:
Prior to the restore copy the /boot/grub/menu.lst to menu.lst.bak. Then did my restore. Then replaced the menu.lst that was restored.
Networking does not come back up:
/etc/udev/rules.d/70-persistent-net.rules needs to be modified after the restore and before the reboot to avoid this problem.
The mac address will be different if this is a differnt pc. Run ifconfig to get the correct mac address and modify the file.
If you have already rebooted the system will have appended the new mac address to the file and set it as eth1 (or the next availible eth).
You can simply comment out this new entry and change the mac on the original and restart.
The other option is to configure /etc/network/interfaces as the eth configured in /etc/udev/rules.d/70-persistent-net.rules.
The following Appache2 errors may occur untill the system is connected to the correct subnet.
apache2: apr_sockaddr_info_get() failed for dmz.1.midweststerilization.com
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Fix:
This is caused because the name can't be resolved in DNS. The errors will not occur after the computer is connected to the correct subnet.
0 ความคิดเห็น:
แสดงความคิดเห็น