Gnost - backup, restore, copy NTFS, ext, FAT partitions

Miscellaneous tools
Message
Author
User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

Gnost - backup, restore, copy NTFS, ext, FAT partitions

#1 Post by rcrsn51 »

Gnost is a partition backup/restore system. It creates image files of NTFS/ext/FAT partitions. Read here for a discussion about how Gnost works.

Install the PET below. It makes the folder /opt/gnost3 containing two items - the clickable script "gnost" and the folder "gnostcode". The 32bit binaries in gnostcode come from the partclone.org project.

Do NOT run Gnost from /opt/gnost3! You will need another partition to hold the backup image files. It should be formatted as ext and the safest place is on an external USB drive. However, your "backup drive" could be another ext partition on your main hard drive. It is also possible to use an NTFS partition as the backup location, if your USB drive is already formatted that way, but this method is UNSUPPORTED.

Go to the folder /opt/gnost3 and copy the two items onto your backup drive. Gnost will also work in subfolders. Right-click on the "gnost" file and make it executable.

Note: Gnost uses lzop compression instead of gzip and Puppy has Busybox lzop. But the "full" version of lzop has shown to be MUCH faster. A PET of lzop made from Debian packages is attached below.

NTFS Partitions

Gnost is a reliable solution for backing up a Windows partition. Assuming that you have Windows installed in an NTFS filesystem, here are the steps.

Boot the target Windows computer off a Puppy CD or flash drive. Connect your USB drive and open the backup partition.

Left-click on the "gnost" file and follow the steps. Use a descriptive name for the image file, like "dell-xp-sda1-ntfs". The image will be saved in the current folder.

Ordinarily, you will use Gnost to backup/restore an image to the same Windows partition. But you may eventually need to upgrade your hard drive or replace a failing unit. In this scenario, you will be transferring the image to a new drive whose geometry may be different than the original. So some extra steps are required.

Before running Gnost, you must prepare the new drive by making an NTFS partition and setting the boot flag. Make sure that the new partition is at least as big as the original.

Run Gnost. Check the "to different location" box. After Gnost restores the image, it will expand the NTFS filesystem to fill the new partition, update the boot sector and write a new WinXP MBR.

If you have Vista or Win7 and need the matching MBR, get the newer ms-sys program here. Run either

Code: Select all

ms-sys -i -w /dev/sda   # for Vista or
ms-sys -7 -w /dev/sda  # for Win7
Hint: After restoring a partition, run Gparted and look for problems. If necessary, run the Check operation.

Ext Partitions

If you have a basic Puppy frugal install, your backup procedure is easy. You already have the core Puppy files on its Live CD, so you just need to back up your pupsave file/folder. Read here. However, if you have a full install or have content stored outside of the pupsave, you can use Gnost instead.

The target partition must be unmounted. If necessary, boot the computer off a Puppy CD using "puppy pfix=ram". Connect your USB drive and open the backup partition. Click on the "gnost" file.

Gnost will run an initial filesystem check on the source partition. Because Puppy does not always shut down cleanly, you may be asked some Yes/No questions before continuing.

If you are transferring a Linux partition to a new location AND it is a bootable partition, you may need to reinstall your bootloader.

FAT Partitions

Use the same procedure. Check with Gparted after a restore.

Networking

Gnost can also work across a network using Samba. The server admin will define a writable share to hold the image files, and put the Gnost setup in the share directory. The client user mounts the share as usual and runs Gnost from inside the share window.

Updates

The Info button makes a report of the partition structure of the selected drive and saves it in the current directory. This can be a template for copying your system to a new disk.

Gnost v3.6 adds a feature for advanced users - the ability to backup/restore the target drive's MBR. This can help to recover a badly damaged system. Be aware that restoring an MBR may also require that you reinstall the bootloader.

-------------------------
Attachments
screenie.png
(17.98 KiB) Downloaded 1179 times
lzop_full_1.03-1.1.pet
32bit version
(83.54 KiB) Downloaded 474 times
gnost-3.8.pet
Updated 2017-07-09
(46.58 KiB) Downloaded 503 times
Last edited by rcrsn51 on Sun 23 Jul 2017, 13:46, edited 62 times in total.

User avatar
Flymo
Posts: 4
Joined: Sat 12 Jul 2008, 20:13
Location: Mandurang VIC or Bedford UK if not happily afloat

Reinstallation of Grub

#2 Post by Flymo »

Thanks very much for that - 'egnost' is new to me, and looks to be seriously useful now that EXT4 is with us.

For those confused by Grub, there is a fairly simple solution called 'SuperGrubDisk' available at: http://www.supergrubdisk.org

Yes, it is possible to boot a regular live CD, loop mount the partition, then chroot into it and run grub, but..... this CD is script-driven with menus, and the Grub 1 version (0.9799) is very fast and easy to use, even on a P3 with 256M RAM. Worked well for me.

Have not tried the Grub 2 SuperGrubDisk since it is still deprecated at the moment, worth checking that on their website. Not impressed by Grub 2, yet. I'll give it some more time. :wink:

All the best, Ben

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#3 Post by Sylvander »

1. Tried Gnost, and it was successful.

2. See:
Post #437...
And...
Post #438...
Showing the results.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#4 Post by rcrsn51 »

Thanks for testing.
Ave. Rate: 110.3MB/min
For some reason, backing up a FAT partition is slow. With NTFS or Ext partitions, I get more like 500MB/min to a USB drive.

User avatar
Hotdog
Posts: 134
Joined: Fri 30 Sep 2011, 03:15
Location: Georgia USA

Gnost - backup, restore, clone NTFS, ext, FAT partitions

#5 Post by Hotdog »

Puppy 5.2.8 full HD install is my main OS. It has a load of add-ons, too. It has been my interest for quite a while to find a utility such as Gnost which would backup this installation and then restore it to a different machine with Puppy and all the add-ons intact. It has suddenly occurred to me that everything on the new machine will be different. There will be a different disk drive, network adapter, video card or chip, audio, optical drives, CPU and just about everything else.

It is now my opinion that it is better/easier to install from scratch again on the new machine. Gnost and other such fine programs are best left to rescue us from disaster on the machine that originated the backup.

Have any of you found it easy to backup from one computer and restore to a quite different one using Gnost? Or, anything else?

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

Re: Gnost - backup, restore, clone NTFS, ext, FAT partitions

#6 Post by rcrsn51 »

Hotdog wrote:It is now my opinion that it is better/easier to install from scratch again on the new machine. Gnost and other such fine programs are best left to rescue us from disaster on the machine that originated the backup.
Did you actually try it? Or are you just speculating?

Linux is not like Windows. You might have to re-run the video/audio/network wizards. But that should be sufficient to get the image working on a different machine.

User avatar
Hotdog
Posts: 134
Joined: Fri 30 Sep 2011, 03:15
Location: Georgia USA

Gnost - backup, restore, clone NTFS, ext, FAT partitions

#7 Post by Hotdog »

I have tried using the utilities on Ultimate Boot CD, the multi-talented linux dd command, etc. So far the results have ranged from not being able to boot at all or applications that will not run or run and fail.

The problem is of my own making. When I was a gun-ho CentOS user I installed the OS on each machine (3) then when I added something to one I took the time to update the others also. Then I discovered Puppy 5.1.1 followed by Puppy 5.2.8. The CentOS boxes gathered dust while the Puppy box gained one favorite application after another. Now that Puppy 5.2.8 is all I want or need on all my computers, I regret not keeping the other two caught up as I did with CentOS.

Gnost is new to me. Will try it next.

BTW, my last Microsoft OS was Windows 98 so Linux being like or not like Windows doesn't mean much!

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

Re: Gnost - backup, restore, clone NTFS, ext, FAT partitions

#8 Post by rcrsn51 »

Hotdog wrote:I have tried using the utilities on Ultimate Boot CD, the multi-talented linux dd command, etc. So far the results have ranged from not being able to boot at all....
If you move a bootable Linux partition to a new location, you will also need to reinstall its bootloader.

eps
Posts: 34
Joined: Sun 04 Jul 2010, 02:40

gnost-backuo,restore

#9 Post by eps »

i have a copy of puppy to another partition an is ok
eps

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#10 Post by Sylvander »

@rcrsn51
1. I wonder if you could help me in my present difficulty?

2. My old PC failed on Thursday past = June 21st.
I bought a new PC, and have a couple of Puppies working on it OK, but I need to Get Windows [my previous Win2000Pro?] working on it to be able to access my Family Tree, and all the emails of the past years stored by Outlook Express, and, and...

3. Might it be possible [easy?] to restore the Gnost backups I made of sda1=C: [2000Pro partition] and sda5=D: [data files for Windows and various programs installed therein].
These backups were made on June 10th, and the old PC failed on June 21st, so they're fairly recent.
(a) Since the hardware is very different [much more up-to-date], would I need to "repair" the installation prior to attempting to boot it?
The "Recovery Console" was installed to C: within the 2000Pro installation.
A normal boot offers me the choice to load that.
Don't have the original 2000Pro CD that includes the Recovery Console.
(b) Or might I boot into "Safe Mode" and use the driver CD supplied with the ASRock H61M-S mobo to install all the drivers?
The guy who sold the new PC said: XP drivers are included on the disk, and those should be OK for Win2000Pro.

4. Here's my thread about the old-PC/new-PC situation.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#11 Post by rcrsn51 »

It sounds like your new PC did NOT come with Windows installed?
Don't have the original 2000Pro CD
Did it come with a new Windows disc?

A Windows image contains all the hardware information about the machine on which it was made. If you try to restore it to a significantly different machine (like yours) it is highly probably that it won't boot at all.

You might be able to boot it in Safe Mode and run the installers on the driver CD. All you can do is try.

However, you can still get the data out of the D: image by creating a data partition on the new drive and restoring the image to it.

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#12 Post by Sylvander »

1. "It sounds like your new PC did NOT come with Windows installed?"
Correct.

2. "Did it come with a new Windows disc?"
No.
No OS of any kind installed, and no OS disk supplied.
Just a blank 250GB SATA internal HDD.
I partitioned and formatted the partitions with FAT32 using the "Seagate Disk Wizard" bootable CD...
[Windows installations won't work unless its partitioning/formatting is done with Microsoft program]
...then used Puppy->GParted to re-arrange.
Only sda1 was unchanged.
sda1[boot, lba], sda2[lba], sda3[no lba!] all FAT32.
sda4 = extended partition.
sda5, sda6 ext3 partitions.

3. "If you try to restore it to a significantly different machine (like yours) it is highly probably that it won't boot at all. "
My understanding is:
When Windows is installed, the Setup program detects all of the connected hardware it can see, and...
If it has suitable drivers on the Windows CD, it installs them.
If it fails to initialize an item of hardware, the setup stalls.
Each time this happens...you are expected to shut down, restart, and at next run the Setup will continue where it left off, but auto-skip the item of problem hardware.
Once all detected hardware items have been initialized or skipped, provided Windows has enough initialized hardware to get to the desktop...
If you then go into the Device Manager, you willsee all the problem devices identified.
It's then that the drivers for those can be installed.
However, see the alternatives below...

4. "You might be able to boot it in Safe Mode and run the installers on the driver CD"
(a) True.
This is the safer alternative to 3 above [when there are problems].
This method [if it works] would provide a new/fresh install, but takes a lot of work/fiddling/frustration.
An easier, but less perfect alternative, is to restore an image of the Windows partition as it existed on the other hardware, and...
REPAIR the installation prior to any attempt to load/boot it.
BUT...
(b) Not sure how best to do that.
I wonder if "FalconFour's UBCD" includes a "Recovery Console" [or whatever] so as to repair the restored image of the old Windows installation.
Or else...

5. "However, you can still get the data out of the D: image by creating a data partition on the new drive and restoring the image to it."
(a) I have some slightly older [snap2 and/or Xfe] copies of the folder/file contents of the C: D: E: partitions.
In fact, I've already restored older copied of D: and E:
But I'd like to restore the newer [10-day-old] Gnost image backups.
Besides...
(b) I notice you said regardin NTFS partitions [mine are FAT32]...
"After Gnost restores the image, it will expand the NTFS filesystem to fill the new partition, update the boot sector and write a new WinXP MBR."
This sounds good! :D
Would it do the same for FAT32?
If it doesn't...
I think my "Emergency Boot CD" [EBCD] is capable of writing a FAT32 MBR.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#13 Post by rcrsn51 »

Sylvander wrote: My understanding is:
When Windows is installed, the Setup program detects all of the connected hardware it can see, and...
If it has suitable drivers on the Windows CD, it installs them.
If it fails to initialize an item of hardware, the setup stalls.
Each time this happens...you are expected to shut down, restart, and at next run the Setup will continue where it left off, but auto-skip the item of problem hardware.
Once all detected hardware items have been initialized or skipped, provided Windows has enough initialized hardware to get to the desktop...
If you then go into the Device Manager, you willsee all the problem devices identified.
It's then that the drivers for those can be installed.
That's true, but it's irrelevant to your situation. You don't have a Windows install CD so you aren't running a Setup procedure.

After you image the new computer off the old image, you will reboot it. It will boot up expecting to see the old motherboard which is completely different from the new one. So there's a good chance it won't even start.

But there is only one way to know.
I wonder if "FalconFour's UBCD" includes a "Recovery Console" [or whatever] so as to repair the restored image of the old Windows installation.
I don't know.

IIRC, the FAT32 procedure cannot expand the image to fill the partition.

There is nothing lost if you try to image the new drive and it fails. You haven't broken the new drive. So go ahead and try something.

Pelo

Gnost in use

#14 Post by Pelo »

Gnost in use.
It's a long time to back-up some files (My Pets collection) .
It's my first baxkupr for Linux Partition en my HD.
I'm wondering 'what is the difference with 'copy'. I don't know. I shall check if it was a good idea, when this damned transfer will have finished
Fini, sda3: 4811 M
Total: 4811 M (2815 files, 303 directories). My god, 5GB of pets !

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#15 Post by rcrsn51 »

Gnost v3.0 is posted above. It has a GUI front-end instead of the old text-mode interface.

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#16 Post by Sylvander »

Used the new Gnost v3.0...
To make a backup image...
Of WinXP installed on the internal HDD sda1 NTFS formatted 20GiB partition.
10.87GiB used.

Destination is /mnt/sdb2/gnost3.0 folder on 785GiB NTFS formatted partition on an external USB2 connected HDD in an external enclosure.
Completed image file size = 2997 M [MiB?]

Everything was routine, and the image successfully completed quite simply and quickly.
Again, I'm impressed by Gnost.
Especially the speed.
And the GUI makes it even nicer/easier/simpler to use.

No filename extension added, so no indication that it's an IMAGE file.
Cannot mistake it when there's an .img on the end.
The icon suggests it's a compressed archive file.
Is a compressed archive the same as an image?

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#17 Post by rcrsn51 »

Sylvander wrote:Destination ... NTFS formatted partition
Excellent. Thank you for testing this.
No filename extension added, so no indication that it's an IMAGE file.
You can name the files anything you want. I like to use extensions like .ntfs, .ext4 to remind me where the image originated.
The icon suggests it's a compressed archive file. Is a compressed archive the same as an image?
Gnost compresses the image data with gzip, so that's what the icon shows.

User avatar
nilsonmorales
Posts: 972
Joined: Fri 15 Apr 2011, 14:39
Location: El Salvador

#18 Post by nilsonmorales »

Spanish locales
Image
Attachments
MoManager-es.tar.gz
(1.27 KiB) Downloaded 233 times
[b][url=http://nilsonmorales.blogspot.com/]My blog |[/url][/b][b][url=https://github.com/woofshahenzup]| Github[/url][/b]
[img]https://i.postimg.cc/5tz5vrrX/imag018la6.gif[/img]
[img]http://s5.postimg.org/7h2fid8pz/botones_logos3.png[/img]

ebisu
Posts: 176
Joined: Wed 25 Sep 2013, 05:06

Re: Gnost - backup, restore, clone NTFS, ext, FAT partitions

#19 Post by ebisu »

Last edited by ebisu on Mon 01 Aug 2016, 08:06, edited 1 time in total.

gcmartin

#20 Post by gcmartin »

...Would it be possible that the GUI selects the suitable filesystem type for the user?...
Rather nice idea. There are several system utilities which already employ the showing the users partitions and their filesystems.

Post Reply