How to have a spare disk with a working copy of your system dualboot opensuse windows

How to have a spare disk with a working copy of your system, so in case of disaster you have only to swap the non working disk, copy eventually data from the dati partition or from your backup and restart in 5 minutes.

-start your system on the main disk
–goto YAST2>PARTITIONER click on hard disks
-1a)rightclick on the first partition and click on EDIT
a window opens
-1b)on MOUNTING OPTIONS
-2b)select MOUNT PARTITION
-3b)click on FSTAB OPTIONS
a window opens
-1c)check the VOLUME LABEL radio button
-2c)click on the VOLUME LABEL field and insert a identifying name for that partition or leave the one if it exist
-3c)click OK and click FINISH

MAKE THE SAME THING FOR EACH PARTITION
–the partition names must be different for each partition–

-1d)click NEXT click FINISH

-1e)reboot, I don’t know it needs but …

-start your system on the main disks
–goto YAST2>BOOTLOADER
-1f)check if grub2 is selected
-2f)check boot from root partition
-3f)check boot from extended partition
-4f)click on bootloader options
-5f)in option kernel command line parameter modify resume=/dev/disk/by-id/ata-SAMSUNG… in resume=/dev/disk/by-label/THE_LABEL_OF_SWAP_PARTITION_YOU_GAVE_BEFORE
-6F)write generic boot code to BMR
-7f)click OK
-8f)click OK

=============================

now use clonezilla live 2.0.1-15 or redo systembackup to make an image of your main disk, I tried with clonezilla and works, clonezilla has more correction options but redo is moooore simple to use
start clonezilla o redo systembackup
clone your disk making an image on a usb disk or on network
wait a couple of hours and have beer and a coffee

===========================

shtdown everything, take off the battery and the plug
leave your main disk off
put your spare disk on
put the battery on and the plug too

===============================

now use clonezilla live 2.0.1-15 or redo systembackup to restore your image on spare disk
start clonezilla o redo systembackup
restore your image on the spare disk from a usb disk or on network
wait a couple of hours and have beer and a coffee

=================================

use systemrescuecd to have gparted
-1g)start systemrescuecd
-2g)rightclick on desktop and >system>gparted
-3g)remember or write on paper what is the root partition, for example /dev/sda5, it is where you installed the opensuse, and you should have given a label to recognize it…
-4g)quit systemrescuecd

=====================================

now follow the instructions re-install grub2 dvd rescue here
https://forums.opensuse.org/content/128-re-install-grub2-dvd-rescue.html
-1e)insert opensuse dvd
-2e)boot with it
-3e)choose recovery system or rescue
-4e)Once the DVD rescue gets to ‘login’, type: root
-5e)run fdisk -l to confirm my HD partitition order.
-6e)We need to mount root, remember the root partition in step -3g) as /dev/sda5 for example
-8e)give this command: mount /dev/sda5 /mnt
-9e)give this command: mount --bind /dev /mnt/dev
-10e)give this command: chroot /mnt (Your prompt changes to: Rescue:/>)
-11e)give this command: grub2-install /dev/sda
-12e)give this command: exit
-13e)give this command: shutdown -h now

====================================

now press the button to switch on the computer and everything should go sweetly… :-)))

So do you start off with two hard drives, install openSUSE on one and then clone it to the other disk? Can’t you just install it again to a second hard disk and just change which disk you boot from in your BIOS should the first copy stop working? I think even more simple is to keep a known working LiveCD boot disk on hand just in case. It really looks like you spent a lot of effort on this write up, but I am not sure what the advantage of this setup would be and its not clear how many hard disks I need in order to follow this procedure. Could you expand on these two issues for me?

Thank You,

no, :slight_smile: I have a laptop, with one hard disk, with an opensuse system working with all the software and data I need and windows7 original from the laptop vendor also with all the software I need, now.
if I want to experiment something, perhaps to upgrade to opensuse 12.3 or to upgrade to kde 4.10 or windows take a virus or install new nvidia drivers or disk stop to work; and I need a working system in a hurry.
I have my image on everywhere I like, take the spare disk and restore the image on it.
in the case I want to experiment I do it on this spare disk, if the main disk don’t works I will have in a couple of hours a working system and I will think at the non working system later.
Installing it again take to me much stress and much time to install and setup all the data and software I need, typically in the past two days close to the laptop, in this case five minutes to swap disks, two hours to restore but I can do many other things in the meantime, and the system is working.
If I setup the main system as I described one time forever then everithing is easy and working, so if I will install a new system opensuse on a new laptop I will do setting it up in the way I described.
I need only one spare disk for more laptops and i can update the image backin it up.

thanks for everything, ciao:) Pier :slight_smile:

Sorry to say so, but I wouldn’t do it this way.
First: there are loads of laptops where one cannot replace the HDD easily
Second: the 5 minites will be more, if you have one of these 750GB HDDs filled up nicely.

These days a LiveCD gives you all you need to fix an installed system. Why go through cloning entire disks?

don’t worry, feel free ti criticize everything:), I’m not an expert so every suggestion is welcome, I found this way to backup useful for many reasons, as I’m not so skillful in linux and windows but I like to experiment sometimes upgrades, new kernels, new drivers and so on, sometimes, better to say often, I found my laptops with non-working system, so I have to remember how to recover the system, in the past I had to reinstall everything and it was very annoying, in some cases I need the laptop working, so, if I have an updated image, a spare disk, in a couple of hours and ten minutes of work, with this method I get a working laptop.
in this case the trick has been to mount all the partition by label, as opensuse mount them by id and it doesn’t works…

really…,I didn’t know this, I only remember some mac…, I have two laptops, a del and a samsung, my son has a sony vaio, my sister an HP, my nephews a toshiba, an acer , an asus, and an acer netbook, my brother a lenovo, the other brother aa acer,… so in my family all the laptops are easy-disk-replaceable, so I’m very lucky:), with one spare disk I will be able to safely upgrade to opensuse 12.3 … next month, :slight_smile:

5minutes is only to replace disk, in my samsung 5 minutes, im my dell 2minutes, a couple of hours is to restore image, I made it with my 500GB disk, but restoring is fully automatic, I have to do nothing and I can have my beer

yes, I trust you, but, I’m not so skillful, and, if I learn it now, may be I will need in an year so I forgot everything…

thanks for everything, ciao,:slight_smile: Pier :slight_smile:

On 2013-02-15 10:16, Knurpht wrote:
>
> Sorry to say so, but I wouldn’t do it this way.
> First: there are loads of laptops where one cannot replace the HDD
> easily
> Second: the 5 minites will be more, if you have one of these 750GB HDDs
> filled up nicely.

I also keep a full dd image of my 500GB laptop. I already had to use it
once, recently. My intention is to keep a full dd, then rsync data files
periodically.

> These days a LiveCD gives you all you need to fix an installed system.
> Why go through cloning entire disks?

Bad sectors in the original disk, I had to replace it entirely.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

do you intend a full dd backup using the dd if=… of=… command?? …do you know if clonezilla or redo systembackup does use this dd command for backup??

do you intend that bad sectors with full dd arerepaired or are reported as bad??

thnx for everything :slight_smile: ciao :slight_smile: Pier

On 2013-02-16 11:06, pier andreit wrote:

>> I also keep a full dd image of my 500GB laptop. I already had to use it
>> once, recently. My intention is to keep a full dd, then rsync data
>> files periodically.
> do you intend a full dd backup using the dd if=… of=… command??

Yep.

> …do you know if clonezilla or redo systembackup does use this dd
> command for backup??

Partially.

I do not trust those programs for cloning, because they don’t clone
grub, they redo it instead (so says the web page).

They try to do clever things to save time and space, like skipping empty
space. They may skip spaces nominally empty, like where grub is stored.
As they can do things like resizing partitions, they need methods to
recreate grub, what they do, instead of exactly cloning it byte by byte.

An alternative is a dd partition by partition (plus the first track),
but I then need a reliable method of recreating the partition table
(specially the extended partitions).


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

On Sat, 16 Feb 2013 13:58:06 +0000, Carlos E. R. wrote:

> They try to do clever things to save time and space, like skipping empty
> space. They may skip spaces nominally empty, like where grub is stored.
> As they can do things like resizing partitions, they need methods to
> recreate grub, what they do, instead of exactly cloning it byte by byte.

They are file-based imaging solutions, which is why they don’t grab
unallocated space. Unallocated space by definition isn’t linked to an
inode.

Personally, I find file-based imaging to be more reliable and flexible.
For example, if you have to restore the image to a smaller drive, a
sector-by-sector disk image is pretty useless because it can’t be shrunk
effectively (because the directory entry data structures are “locked”
into the image layout).

I was thinking (in another thread) that clonezilla is what I’d used, but
I was mistaken - GNU partimage is what I’ve used in the past - it’s very
good and is the best of both worlds IMHO.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

On 2013-02-16 22:58, Jim Henderson wrote:
> On Sat, 16 Feb 2013 13:58:06 +0000, Carlos E. R. wrote:
>
>> They try to do clever things to save time and space, like skipping empty
>> space. They may skip spaces nominally empty, like where grub is stored.
>> As they can do things like resizing partitions, they need methods to
>> recreate grub, what they do, instead of exactly cloning it byte by byte.
>
> They are file-based imaging solutions, which is why they don’t grab
> unallocated space. Unallocated space by definition isn’t linked to an
> inode.

They claim to image partitions.

The first few sectors on a boot partition are used to store grub itself,
outside of the official filesystem structures. Other people here can
explain that in more detail. That space is not cloned and the copy will
not boot.

What they do is run grub on the replicating live CD system. Not the grub
of the target system, but the grub in the live system. Thus they create
a bootable system, different from the original, that works most of the
times.

Saving space by skipping free space on the region dedicated to files is
fine for me. What I object is to the skipping of the first few “empty”
sectors.

This is what I read on their documentation, but I’m going by memory. The
details could be wrong.

Interestingly, the same cloning software works perfectly with NTFS
because, they say, they do not understand enough how NTFS works, so they
copy more things.

> Personally, I find file-based imaging to be more reliable and flexible.
> For example, if you have to restore the image to a smaller drive, a
> sector-by-sector disk image is pretty useless because it can’t be shrunk
> effectively (because the directory entry data structures are “locked”
> into the image layout).

True.

> I was thinking (in another thread) that clonezilla is what I’d used, but
> I was mistaken - GNU partimage is what I’ve used in the past - it’s very
> good and is the best of both worlds IMHO.

I use systemrescuecd.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

On Sun, 17 Feb 2013 01:13:06 +0000, Carlos E. R. wrote:

> They claim to image partitions.

Generally, yes. And a partition doesn’t consist of the MBR. That’s a
separate part of the disk.

> The first few sectors on a boot partition are used to store grub itself,
> outside of the official filesystem structures. Other people here can
> explain that in more detail. That space is not cloned and the copy will
> not boot.

Because it’s about backing up file data and the file structure.

> Saving space by skipping free space on the region dedicated to files is
> fine for me. What I object is to the skipping of the first few “empty”
> sectors.

Which aren’t part of the partition.

> This is what I read on their documentation, but I’m going by memory. The
> details could be wrong.

I’ve been doing disk imaging for many, many years. Very few solutions
will back up non-file data unless you tell them to. Ghost is like that,
partimage is like that - and in fact, partimage has an option (as I
recall) specifically to deal with this.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

On Sun, 17 Feb 2013 01:24:48 +0000, Jim Henderson wrote:

>> This is what I read on their documentation, but I’m going by memory.
>> The details could be wrong.
>
> I’ve been doing disk imaging for many, many years. Very few solutions
> will back up non-file data unless you tell them to. Ghost is like that,
> partimage is like that - and in fact, partimage has an option (as I
> recall) specifically to deal with this.

http://www.partimage.org/Partimage-manual as a reference.

http://sourceforge.net/p/g4l/screenshot/318989.jpg (Ghost for Linux -
another tool) screenshot showing MBR backup/restore options.

Clonezilla has options to do individual partitions or entire disks. I
find their doc to be pretty difficult to follow, so that certainly might
be a valid criticism/issue with that particular tool.

But I’ll take partimage over a dd image any day I can get it. I have
found it to be far more reliable, and the only time it’s been an actual
problem was when the fstab/device.map files were by ID rather than by
device and I was restoring to another system.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

On 2013-02-17 02:24, Jim Henderson wrote:
> On Sun, 17 Feb 2013 01:13:06 +0000, Carlos E. R. wrote:
>
>> They claim to image partitions.
>
> Generally, yes. And a partition doesn’t consist of the MBR. That’s a
> separate part of the disk.

Right, I used the wrong words. I meant the boot sectors and those
sectors used by grub inside a partition. They are part of the partition
and I expect them to be imaged, not only files.

> I’ve been doing disk imaging for many, many years. Very few solutions
> will back up non-file data unless you tell them to. Ghost is like that,
> partimage is like that - and in fact, partimage has an option (as I
> recall) specifically to deal with this.

partimage is the tool that rescuecd uses, so that’s the tool I use too.
ext4 is not supported, though (nor btrfs). But I don’t trust it fully.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

so, for me using dd should avoid to reinstall grub2, but as somebody said before is always a good idea to reinstall grub2 after disks operations…:), and it isn’t so difficult…
I tried partimage now, but it hasn’t the option to clone the entire disk…, it is very annoyng to do the same works for ten partitions…
yes, for me too problem was when the fstab/device.map files were by ID, for this I start this thread to remember myself to setup the partitions by-label to have a good backup…:)…
I will try ghostforlinux in the next days…:slight_smile:

thnx for everything :slight_smile: ciao :slight_smile: P.