Re: muLinux base floppy image and DOS tools

From: Sven Conrad (Sven.Conrad@eed.ericsson.se)
Date: Tue May 02 2000 - 13:27:14 CEST


Hi all

dd for crash recovery? In my opinion, this is far too restrictive, slow
...

- you are copying all trash
- you are copying all disk organisation information and gaps
- you can not access single files
- you can not change disks, partitions, size or what ever
- dd access is without cashing and so very slow
....

My crash backup for windoze looks like this:

1. make under dos/windoze a "DOSLFNBK /all C:\"
   (or what drive you ever want)
2. mount this under linux as msdos! (not vfat)
   (e.g. mount -t msdos /dev/hda1 /mnt)
3. tar & zip this dir
   (e.g. gtar -czf /tmp/crashwin /mnt)

4. save bootsector with
   (dd if=/dev/hda1 of=/tmp/crashboot.bin count=1)

/* possibilities: */

- if you make a windoze boot disk, you can after syscrash make
  "format /s c:" on every new/old/other disk you want!

- you can access every file (over it's short name)

- you can recover windoze just from linux by reverse the bachup steps
 (caution: format the partition first to get a clean fs)
 (restoring the bootsector is rarly necessary, and beware that bootsec
  contains partition dependant info)

- easy cloning of windoze install

I'am using this "free" backup for long time and it's working well.
One thing I often did is copying a installation to a new (bigger) disk
without this 2 days reinstallation desaster.

may be this is a idea for others too

/sven
 

Gerhard Thimm wrote:
>
> Jef Knoors schrieb:
> >
> > ----- Original Message -----
> > From: Miguel Angel <maacruz@navegalia.com>
> > To: Mulinux <mulinux@sunsite.auc.dk>
> > Sent: Friday, April 28, 2000 4:41 PM
> > Subject: Re: muLinux base floppy image and DOS tools
> >
> > > El Fri, 28 Apr 2000, "Jef Knoors" <jknoors@zonnet.nl> kindly wrote:
> > > > I would like to make a raw image of my harddisk (the first 300Mb) is
> > that
> > > > possible with
> > > > "dd if=/dev/hda1 bs=1024k count=300000 of=/tmp/myfile"
> > > > or am I mistaken ? (I don't dear to try and lose all information)
> > > > Jef
> > >
> > > Really no problem at all. I used a sort of this to make backups of entire
> > > partitions many times and neved had a problem:
> > >
> > > dd if=/dev/hda1 bs=4096 |gzip >/tmp/myfile.gz
> > >
> > > Note that bs=4096, that is better targeted at maximun hard disk
> > transference
> > > speed. You do not need to use "count" since once reached the partition's
> > end it
> > > will stop the dump anyway.
> >
> > My partition is 1200 Mb, I only want to back up the first 300 Mb that is
> > used. (backup the free space would enlarge the backup file ? or not?) I did
> > run defrag on the partition.
> > See , the problem is that I work in an office where I do all the computer
> > stuff, but my boss is not able to look any further than an desktop icon.
> > That means we have to use windows95 no mather how often it will crash.
> > Reinstalling means : losing a productive day of work
> > Thats why I need the 'rescue file'
> >
> > >I also piped it to gzip to get a compressed image
> > > (less space, less time).
> > >
> > > Hint! You can increase the compresion ratio a lot cleaning the free space
> > > writing a dumb file.
> > > Suppose /dev/hda1 is mounted under /mnt
> > > If it is a FAT partition:
> > > dd if=/dev/zero of=/mnt/dumbfile
> > > rm /mnt/dumbfile
> > > umount /mnt
> > > will work fine
> >
> > Sorry, I don't understand what will happen, you create an empty file and
> > than erase it again ?
>
> No answer since yet, so will I try.
> This empty file is a very clever trick to zero all unused blocks on the
> partition. to-zero means to erase the old deleted data. WinDos does not
> physically erase the data just logically, that means only the
> FAT-entries and the directory-entry is handled but all file-content-data
> still remain on disk. Because dd makes a physical-dump, it stores all
> that "old trash" which is a hard work for gzip to compress. if on the
> other hand this zero-dd-trick is used, gzip is able to shrink the
> dd-dump really good (instead of 800MB it stores only the info "there are
> 800'000'000 Zero-Bytes (nearly that way:-))).
> I normally clean the whole volume with dd if=/dev/zero of=/dev/hdaX
> before I install WinDos and than I dd-dump the installation, which is a
> proper rescue image. With the recept above you can do that all the time.
> Really really nice.
>
> BTW: Be really careful if you just dump a part of a partition. I never
> would do that for a rescue image. There are so many tricks in
> WinDos-Software with mirror-files, defect-marked sectors, "lost-sectors"
> for copy-protections. I think this is really dangerous. dd the whole
> partition. dd works fine in my computers but it is hard to garantee.
> And try to rescue also!
>
> Bye, Gerhard
>
> >
> > > If it is ext2, since sectors full of 0 are not written to disk, you must
> > use
> > > any other fixed pattern (yes, for example)
> > > yes|dd of=/mnt/dumbfile
> > > ...
> > >
> > > Hope this help
> > > --
> > > Don't see the world trought a window, be open{source}minded, and be free
> > :-)
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.auc.dk
> > > For additional commands, e-mail: mulinux-help@sunsite.auc.dk
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.auc.dk
> > For additional commands, e-mail: mulinux-help@sunsite.auc.dk
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.auc.dk
> For additional commands, e-mail: mulinux-help@sunsite.auc.dk

---------------------------------------------------------------------
To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: mulinux-help@sunsite.auc.dk



This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:14 CET