6

Well. I'd like to upgrade my parent's box from 8.10 (intrepid) to 10.04 LTS (lucid).

Doing this from the package manager should work, but I want to get a backup of the system if things go haywire or something stops working on this laptop. (After all, I did have serious gfx-driver problems after my last upgrade.)

The ubuntu thread on this is rather vague and googling gets me lost in the details, which I currently do net much care for.

This box has 2 other partitions (apart from swap), one with Windows (came pre-installed, I'll not remove it) and one a FAT32 partition to swap data btw. Ubuntu and Windows (IO prefer to mount the NTFS boot part. r/o)

My specific question(s) now are:

  • Will backing up 8.10 with tar and restoring this tar file on the upgraded 10.04 work in principle?
  • Will I have to do anything about grub when restoring?
  • Which toplevel directories do I need to exclude from tar? (ls / below)

    bin dev initrd.img lost+found opt sbin tmp vmlinuz boot etc initrd.img.old media proc srv usr vmlinuz.old cdrom home lib mnt root sys var

  • What about the symlinks? (initrd.img, vmlinuz)

  • When restoring with tar, will it delete any files 10.04 has added to the harddisk?

Note that I'd also be fine using dd to make a full disc image -- but I assume I would then need to boot from the live CD to restore?

3 Answers 3

6

The safest solution would be to use dd from live cd. You will need to backup MBR and Ubuntu partition.

To backup MBR (first 512 bytes of the disk where GRUB is installed) run:

dd if=/dev/sda of=/backup_dir/mbr_backup bs=512 count=1

To backup your Ubuntu partition (assuming it is /dev/sda3):

dd if=/dev/sda3 of=/backup_dir/ubuntu_backup

Don't write the backup to FAT32 partition because it would truncate the backup to around 4GB. External drive with ext3 or ntfs partition would be preferred.

To restore grub run:

dd if=/backup_dir/mbr_backup of=/dev/sda

To restore ubuntu:

dd if=/backup_dir/mubuntu_backup of=/dev/sda3
2
  • Thanks! Do I need to restore grub when restoring the partition via dd? Is it possible to validate the dd image somehow?
    – Martin
    Commented Oct 15, 2010 at 14:23
  • If by restoring grub you mean restoring MBR then it would be only needed if the installation made some changes to MBR and you can't boot into windows or linux after reboot. To validate dd image comparing length of the image and the partition should be sufficient, but to be really sure you would need to compare md5sum of the image with md5sum for the partition (assuming the partition wasn't changed). Commented Oct 16, 2010 at 10:41
3

If you aren't going to change the partition layout on that PC, what I'd do is use Clonezilla to make a backup of the Ubuntu partitions. Sounds like less work and less worries to me.

1

Mondo Rescue is a good way to make backups of currently functioning Linux systems before a complicated upgrade.

Per the website:

Mondo Rescue is a GPL disaster recovery solution. It supports Linux (i386, x86_64, ia64) and FreeBSD (i386). It's packaged for multiple distributions (RedHat, RHEL, SuSE, SLES, Mandriva, Debian, Gentoo).

It supports tapes, disks, network and CD/DVD as backup media, multiple filesystems, LVM, software and hardware Raid.

It should be flexible enough to complete the backup operation for your parents. Also, if the installation goes south when you aren't around, they should be able to toss the installation DVDs back into the computer to restore a working Linux OS back onto their PC.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .