Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Restore clonezilla partition images to existing partitions?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
tld
Veteran
Veteran


Joined: 09 Dec 2003
Posts: 1816

PostPosted: Fri Nov 10, 2017 4:35 am    Post subject: Restore clonezilla partition images to existing partitions? Reply with quote

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
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 866

PostPosted: Fri Nov 10, 2017 11:34 am    Post subject: Reply with quote

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
View user's profile Send private message
tld
Veteran
Veteran


Joined: 09 Dec 2003
Posts: 1816

PostPosted: Fri Nov 10, 2017 3:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
tld
Veteran
Veteran


Joined: 09 Dec 2003
Posts: 1816

PostPosted: Fri Nov 10, 2017 11:27 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum