View previous topic :: View next topic |
Author |
Message |
tld Veteran
Joined: 09 Dec 2003 Posts: 1816
|
Posted: Fri Nov 10, 2017 4:35 am Post subject: Restore clonezilla partition images to existing partitions? |
|
|
Help! Looks like the hard drive died on my Gentoo MythTV frontend...I have a new one on the way. I have clonezilla partition image backups of my /boot and / partitions, which are sda1 and sda3 respectively. That is, it's not a disk image but individual clonezilla images of those two partitions. They were made with the default options. I have /home (sda4) backed up separately with a tar backup.
My partitions specifically are:
sda1 /boot
sda2 swap
sda3 /
sda4 /home
Two questions I have:
1. I'm having a hard time finding a clear answer to this: Can I make all those partitions ahead of time only a bit larger than the original partitions, and restore the images to those...and if so will the restored file systems be larger? I can't seem to find a clear answer on that. I could in fact just make sda1, 2, and 3 the exact size I had if I have to. I'd like to make them a little larger if I could. I have in fact restored / once from one of those backups and it worked fine. That was with the existing partition, but again, it was obviously the same size as the backup.
2. I'm using syslinux (BIOS and extlinux with an MBR specifically) with sda1 set as the boot partition. As long as I have sda1 set as the active boot partition, will that partition restore restore the boot sector, where it will just work...or will I have to reinstall that MBR.
The latter isn't a big deal really. As I recall all I need to do that is dd:
https://wiki.gentoo.org/wiki/Syslinux#Setup_on_BIOS_systems
Thanks!
Tom |
|
Back to top |
|
|
DawgG l33t
Joined: 17 Sep 2003 Posts: 866
|
Posted: Fri Nov 10, 2017 11:34 am Post subject: |
|
|
i think this should (will) work. i've done it a couple of times with other imaging-utilities.
(0. boot from removeable media)
1. create your partitions with the desired size
2. write the images to them
3. do an fsck on the partitions
4. execute resize2fs (consult its manpage first)
5. do an fsck on the partitions again just as resize2fs told you to.
done.
to make sda1 "active" you can use cfdisk - "active" just "tells" the bios to look for executable code (loader) there.i do not recommend restoring an mbr from one (smaller) disk to another (bigger one).
as long as you have images and backups not much can go wrong with this.
GOOD LUCK! _________________ DUMM KLICKT GUT. |
|
Back to top |
|
|
tld Veteran
Joined: 09 Dec 2003 Posts: 1816
|
Posted: Fri Nov 10, 2017 3:59 pm Post subject: |
|
|
Thanks! Yes I think you're correct. The initial clonezilla restore will probably create a smaller file system on the partition, which means that a "resize2fs <device>" should grow the file system to the size of the partition. Excellent.
On the MBR I'll simply have a copy of the MPB binary file from /usr/share/syslinux/mbr.bin to write to the partition with dd.
Thanks!
Tom |
|
Back to top |
|
|
tld Veteran
Joined: 09 Dec 2003 Posts: 1816
|
Posted: Fri Nov 10, 2017 11:27 pm Post subject: |
|
|
Just to update: Clonezilla actually automatically did the resize2fs after the restore. Cool. All worked flawlessly.
On a totally unrelated note I think my old RS232 serial port receiver may have died. It's getting anything to ir-keytable or even the raw device and everything I look at seems correct. I think it may have been acting up before all this. The restore when great however, and now I have more disk than I know what to do with.
Thanks again!
Tom |
|
Back to top |
|
|
|