[plug] Restoring an entire linux filesystem from backup and making it bootable
Haydon Knight
nodyah at gmail.com
Thu Jul 31 17:10:37 WST 2008
Hello,
I am having quite a lot of difficulty with backups and would greatly
appreciate it if some kind plugger could offer some help or
suggestions. I offer my apologies if this sort of thing has been
covered before or my email is inappropriate for this forum in any way.
I am trying to set up a system to backup a linux filesystem to an
external hard drive and then am somehow able to restore it back into
something that boots and works. My system is about 15GB so can't fit
on a DVD. I do not want to just backup my home directory as I do not
want to go through installing all the add-ons I have in places like
/usr. I am trialling this on my desktop but hope to reuse the system
on a laptop and loungeroom media machine. Unfortunately I cannot seem
to restore the filesystem and get it to boot. Perhaps I am doing
something wrong.....
The desktop originally was partitioned into 4 partitions - swap,
ubuntu 8.04, winxp, and unused. I could boot off winxp & ubuntu via a
menu that came up on boot which I assume was/is grub. I don't know
where the binary information for bringing up this menu came from. I
used rsnapshot to backup to the external HDD the following things that
were in /:
bin/
boot/
etc/
home/
initrd/
initrd.img (a symlink)
initrd.img.old (a symlink)
lib/
lib64/
opt/
root/
sbin/
srv/
usr/
var/
vmlinuz (a symlink)
vmlinuz.old (a symlink)
I then used my ubuntu hardy 8.04 live CD to format /dev/sda2 (ubuntu
partition) as reiserfs and install a fresh distribution back onto the
same partition. On rebooting the bootloader comes up; when you select
windows XP it complains about boot.ini and that hal.dll is either
missing or corrupt. I don't care about windows XP. Ubuntu boots;
running grub as root and going
grub>find /boot/grub/stage1
root (hd0,1)
i.e. the grub bootloader is on my /dev/sda2 ubuntu partition. Reading
this webpage:
http://vorian.org/?p=136
indicates that I should just be able to rsync all the files back and
everything will magically work. So I boot off the live CD, mount
/dev/sda2, and rsync -a all the backup files/folders over and boot off
the hard drive. My original bootmenu is restored. Windows XP still
won't boot. On selecting ubuntu, the kubuntu screen comes up, but the
little blue rectangle just keeps moving back and forth across the
large rectangle forever and the menu where you log in and select your
window manager never comes up. Selecting the "recovery mode" option
just brings up lots of text but then stops printing stuff out for a
long time. Eventually it says:
Check root= bootarg cat /proc/cmdline
or missing modules, devices: cat /proc/modules ls /dev
ALERT! /dev/disk/by-uuid/9a28fdc9-06f2-45e9-8d7b-5601061361e6 does not
exist. Dropping to a shell!
Busybox bla bla
(initramfs) _
Then I have a prompt for some sort of busybox (ash?) shell.
Booting off the live CD and rerunning grub indicates that
/boot/grub/stage1 is on /dev/sda2. The following things remain from
the live CD installation:
/cdrom
/dev
/media
/mnt
/proc
/sys
/tmp
So many questions come up.... why is the windows manager not launching
correctly? The kubuntu screen comes up so, to me, grub seems to be
working. Have I messed up the lists of which directories to restore
and which are virtual like /proc? Is the windows manager hanging on
trying to mount some device that doesn't have the right stuff in the
filesystem? What is launching the busybox shell? Is it grub or
ubuntu? What is /dev/disk/by-uuid/?
So has anyone successfully restored from backup either through this
method or some other method?
Thanks a lot!!!!!
Haydon Knight
More information about the plug
mailing list