Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Windows 7 "stage4"?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Off the Wall
View previous topic :: View next topic  
Author Message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 5282

PostPosted: Thu Apr 11, 2013 2:44 pm    Post subject: Windows 7 "stage4"? Reply with quote

After recently accidentally formatting my Windows partition with all my games on it, I started wondering if it's possible to create the equivalent of a stage4 tarball for Windows. It takes so much time to re-install everything on Windows. I know there is imaging software, but I was wondering if I could backup and restore Windows using a tarball instead.
_________________
Gentoo Studio: http://gentoostudio.org
Facebook: http://www.facebook.com/gentoostudio
G+: https://plus.google.com/113947758237122861689/posts
Pappy's Kernel Seeds: http://kernel-seeds.org
Back to top
View user's profile Send private message
Fran
Guru
Guru


Joined: 29 Feb 2004
Posts: 524
Location: Coruña (Spain)

PostPosted: Thu Apr 11, 2013 4:22 pm    Post subject: Reply with quote

Of course. This is the simple script I made for the task some eons ago:
Code:
#!/bin/bash

error()
{
  echo $1
  exit 1
}

exec="$(basename $0)"
if [[ "$exec" == "ghost" ]]; then
  [[ $# == 2 ]] || error "Usage: $exec /dev/sda1 image.img.lzo"
  ntfsclone --save-image --output - $1 | lzop -c > $2
else
  [[ $# == 2 ]] || error "Usage: $exec image.img.lzo /dev/sda1"
  lzop -d -c $1 | ntfsclone --restore-image --overwrite $2 -
fi

I save it as "ghost" and link as "unghost" (in honour of the old Norton Ghost :P). ntfsclone is part of ntfs3g. I use lzop because it's fast, but you can use gzip too. You should add some safety measures, just in case (confirmation before overwriting the partition when unghosting, for example).

I have a "stage3" of every windows installation I have, just after activation, before any upgrade or driver; and a "stage4" with updates and drivers.
Back to top
View user's profile Send private message
wildhorse
Tux's lil' helper
Tux's lil' helper


Joined: 16 Mar 2006
Posts: 148
Location: Estados Unidos De América

PostPosted: Thu Apr 11, 2013 10:58 pm    Post subject: Reply with quote

Windows 8 seems to develop into a stage4 tarball for Windows. :P
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1567
Location: U.S.A.

PostPosted: Sun Apr 14, 2013 1:48 am    Post subject: Reply with quote

Useful little script, Fran. :)

wildhorse wrote:
Windows 8 seems to develop into a stage4 tarball for Windows. :P

You're a funny guy. About as funny as a fart in a space suit. :P
_________________
pjp wrote:
I didn't misquote you, I just misunderstood you.
Back to top
View user's profile Send private message
wswartzendruber
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1224
Location: Jefferson, USA

PostPosted: Sun Apr 14, 2013 3:09 am    Post subject: Reply with quote

I had no idea ntfsclone even existed. Well, there goes any need for Norton Ghost.
Back to top
View user's profile Send private message
Fran
Guru
Guru


Joined: 29 Feb 2004
Posts: 524
Location: Coruña (Spain)

PostPosted: Sun Apr 14, 2013 6:40 am    Post subject: Reply with quote

BTW, you can remove pagefile.sys (and hiberfil.sys if you haven't disabled hibernation with powercfg -h off) in the windows root partition before ghosting to reduce time and space.
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 5282

PostPosted: Tue Apr 16, 2013 3:45 pm    Post subject: Reply with quote

Thanks for the tips, Fran! That looks very useful. :)
_________________
Gentoo Studio: http://gentoostudio.org
Facebook: http://www.facebook.com/gentoostudio
G+: https://plus.google.com/113947758237122861689/posts
Pappy's Kernel Seeds: http://kernel-seeds.org
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Off the Wall 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