DaemonForums  

Go Back   DaemonForums > Miscellaneous > General Hardware

General Hardware General hardware related questions.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 27th January 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default The art of recovery -- grumble and moan

We back up our systems out of fear. We restore them in a panic.

This week, through a finger fumble, I destroyed the metadata of my NTFS partition on my netbook. For the past two years. this little thing has been my primary personal use workstation at home or when traveling.

I multiboot three OSes; OpenBSD is general purpose, Ubuntu is for mucking about with Android kernel/userland builds, and I keep Windows because I need it for a few specific applications.

I had to try to recover Windows, or reinstall it.

  • I have XP media in only two forms -- an older Microsoft XP SP2 installation CD, and a "Recovery" DVD from Asus, the netbook's manufacturer.
  • The netbook doesn't have an optical drive, and I don't own a USB one.
A qemu virtual machine came to the rescue. I copied the XP CD to an .iso file on my NFS server with dd(1) and then, from OpenBSD on the netbook, I booted the .iso file over the network mapping my physical hard drive into a virtual one:

# qemu-system-i386 -boot d -cdrom=/mnt/xp.iso -drive file=/dev/rsd0c,cache=none

The recovery application on the install CD ran, but it could not repair the partition; I'd destroyed enough that Windows needed to be re-installed.


Using the same virtual machine, I ran an install for the NTFS partition. But ... the install makes driver choices based on the hardware it sees at the time. A Qemu virtual machine with a Bochs virtual BIOS is not at all the same as the real hardware. SP2 was installed, but it would not boot natively, and went straight into a BSOD.

I needed to use the Recovery DVD from within qemu, in the same manner. That would lay down a prebuilt Windows image for the Asus netbook. But to do that, it would wipe the drive. So I I had to first install BSD into an external hard drive, boot that, install qemu, and try again.

The recovery DVD requires more RAM than the 128M default, so:

# qemu-system-i386 -boot d -cdrom /mnt/asus.iso -drive file=/dev/rsd0c,cache=none -m 300

Since this is a pre-configured Windows image, it booted natively. Success!

After that, I booted an Ubuntu installation stick, shrank the NTFS partition to a useful size, and then installed Ubuntu.

For Windows and Ubuntu, I have files to restore.

Next steps: restore OpenBSD and install its boot blocks, then install GAG, my preferred boot manager.
(GAG runs fine, but it has it has intermittent trouble saving its configuration changes to my SATA drive even when the drive is set to legacy IDE in the BIOS. Whatever the cause, the problem is easily circumvented: qemu to the rescue, again. The drive I/O is performed by the OS, not by GAG, and so GAG has no trouble writing to disk.)
Always have a plan for recovery of all your systems. In advance!! Hey, but this was just some personal use stuff; and I let it slide. I didn't have a plan for Windows. And that hurt, because having to to use the Recovery DVD meant I had to wipe the drive. This complicated and extended the time and effort to return to normal operation. Which is still not yet done.

Last edited by jggimi; 27th January 2012 at 02:22 PM.
Reply With Quote
  #2   (View Single Post)  
Old 27th January 2012
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

Are you asking a question or simply sharing an anecdote?

I must admit, I also don't have a backup plan for my Windows machine.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #3   (View Single Post)  
Old 27th January 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Sharing an anecdote. And I have spent much of my career consulting on business continuity, off-premises information stores, and designing robust infrastructures. This was personal infrastructure.

The old aphorism is true, at least in those for whom English is the native language: "The cobbler's children have no shoes." I'm sure there are ways of saying this in every culture.
Reply With Quote
  #4   (View Single Post)  
Old 27th January 2012
vermaden's Avatar
vermaden vermaden is offline
Administrator
 
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,056
Default

Nice story, thanks for sharing mate.

I keep Windows XP on 4 GB FAT partition on the laptop just for 3G connection, but after I made it working on FreeBSD I never boot that Windows again, but I have a Windows XP virtual machine at VirtualBox for several apps that are 'so last century' or just their creators does not know what standards mean.

The backup plan for the 'real' Windows was quite simple, before install do dd < /dev/zero > /dev/ada0s2 bs=8M, then install, then after all drivers installed, do dd < /dev/ada0s2 bs=8M | xz > /backup/xp.xz, as for the virtual one, just xz -c vbox_xp.vdi > vbox_xp.vdi.xz ...
__________________
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd
Reply With Quote
  #5   (View Single Post)  
Old 28th January 2012
drhowarddrfine drhowarddrfine is offline
VPN Cryptographer
 
Join Date: May 2008
Posts: 377
Default

My Windows recovery plan is don't have a Windows machine.
Reply With Quote
  #6   (View Single Post)  
Old 30th January 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

I am leaning more towards ntfsclone, vermaden, since my NTFS partition is 10x the size of yours. Yeah, ntfsclone requires Linux, but I have that now.
Reply With Quote
  #7   (View Single Post)  
Old 30th January 2012
vermaden's Avatar
vermaden vermaden is offline
Administrator
 
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,056
Default

That is why I zeroed the whole partition with dd, so mostly the used part will be compressed.

As for ntfsclone, You can also use qemu at least
__________________
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd
Reply With Quote
  #8   (View Single Post)  
Old 30th January 2012
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

ntfsclone should also run on FreeBSD ... I'm not sure about the OpenBSD status though.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #9   (View Single Post)  
Old 30th January 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

OpenBSD doesn't have the ntfsprogs shared library and has limited, read-only support for NTFS.
Reply With Quote
Old 25th February 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default

Thank you Jgimmi !

Again , I don't know if this is off-topic too .. it seems I'm developping an off-topic acquired syndrom phobia ..
I've read this how-to
http://www.cromwell-intl.com/unix/op...ows-howto.html
then strictly followed the steps .. and I'm on OpenBSD.5.0 generic kernel ..
the problem is that when I start qemu with either cd inserted or samecd.iso in ~/windows .. the screen got dark and nothing happens ..
Reply With Quote
Old 25th February 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Yes, you have gone off topic once again. Should you want help running qemu you should start a new thread.

Before you do that, please consider:

When you have a problem following a long-out-of-date "how to" you found somewhere in the wilds of the Internet, you have two choices: 1) contact the "how to" author, or 2) stop using the third-party "how to" and use official documentation. If you're not sure what official documentation might have been installed, try using the pkg_info(1) command with the -L option. That will list every file that was installed. You should find some OpenBSD specific documentation, as well as a man page. Use them.

When you want help with a problem and you come to us for assistance -- please try posting a useful problem report. What do you think might be missing, that someone would need in order to recreate your exact problem, or provide specific assistance?

---

Before posting, please, ask yourself: a) Am I posting in the right place? b) Am I posting enough information, and is that information simply and clearly worded?
Reply With Quote
Old 25th February 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default

Thanks again .. I'll consider all that ..
Reply With Quote
Old 25th February 2012
Alphalutra1 Alphalutra1 is offline
Port Guard
 
Join Date: Sep 2008
Posts: 29
Default

Quote:
Originally Posted by jggimi View Post
I am leaning more towards ntfsclone, vermaden, since my NTFS partition is 10x the size of yours. Yeah, ntfsclone requires Linux, but I have that now.
I just use System Rescue CD which I put on a flash drive and run it whenever I back up a windows/linux system. It has worked out pretty well so far.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Disaster recovery best practices RandomSF FreeBSD General 8 7th December 2010 06:41 AM
Corrupted msdos filesystem on a compactflash card - recovery algkalv FreeBSD General 4 6th January 2010 12:30 AM
Recovery CVsup files vigol FreeBSD Ports and Packages 1 5th December 2009 10:38 PM
data recovery. LateNiteTV FreeBSD General 8 29th August 2008 08:11 PM


All times are GMT. The time now is 10:49 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick