Yep, most likely the problem lies in the fact that the entire boot track
(MBR / partition table), and/or possibly the FAT from the original drive was
not replicated onto the brand new drive.

You don't need to reinstall anything, you don't need to manually copy
anything, and you don't need to fdisk /mbr.

There are other ways to get around this and you can use dd too but, simply,
the way easiest and by far quickest way out of this mess imho is to use ye
olde standby copy of Ghost (v.603 or above) to clone the disk. Specifically,
use ghost.exe with the '-ib' switch.

In my experience a 'standard' dump of the entire DISK (not just a partition)
to an .gho file or a straight disk-to-disk clone to the brand new drive will
copy the relevant boot sector data over (and if dumping to a file, will
still compress the empty space so the file is not ginormous). The nice part
is, before you're cloning the image over to the new drive, you can resize
the partitions if you wish (but not by less than the amount of used disk
space obviously!). I'm not sure how exactly, but the main reason to use
ghost is, it rewrites the partition table / adjusts CHS values to accomodate
that of the destination disk and generally seems to more intelligently clone
windoze partitions/disks, and I have resized multi ext2/fat/ntfs
partititions on the fly during this process many a time with no problems. As
long as the # and order of the partitions stays the same, the cloned boot
record has worked on the new drive.

Since you're using LILO (and already having problems with the boot track), I
reccomend you force ghost to also copy the entire boot track, not just the
boot sector (default), by adding the '-ib' ("Image Boot") switch from the
command line, or via the 'Options..' menu in gui mode.

FYI, you can also add switches to make it perform a sector-by-sector copy,
including empty/unpartitioned space, etc etc. For you, the only switches you
really need to pay attention to are the ones that begin with '-i_'. Most of
the -i_ switches cannot be used while copying partitions, just disks.

-ia: image all, a sector-by-sector copy of all partitions (but not boot
track, just boot sector)
-ial: a sector-by-sector copy of all linux partitions, others are copied
normally
-ib: image boot, copies entire boot track + disk
-id: image disk is -ia + -ib, plus copies ext. part. table and unpartitioned
space. Partitions cannot be resized in this mode though. This is the
hardcore (forensic) switch.

Note that if only copying a partition, ghost doesn't touch the boot sector,
and there's no way to use the -ib switch when cloning only a partition
(unfortunetly).

One other thing is that there no longer is a 'free' version of ghost, since
it got bought up by symantec way back whenever. For what you are doing, all
you need is the tiny standalone ghost.exe executable, only about 600K, not
any of the other enterprise snapins/broadcast clients or anything. The only
other generally useful 'windows' ghost tool is ghost explorer, which allows
you to browse/modify images from within windows.

Other useful ghost dos tools are gdisk.exe (270K), which is like fdisk but a
whole lot better, and ghstwalk.exe (420K), which you may need if you're
cloning nt/w2k os partitions and want to regenerate the SID/name.

Also to use the ghost/gdisk/ghstwalk standalone apps you must boot into DOS
first. You can easily make a bootable floppy to fit them but I made a
bootable dos622 CD with lots of dos utils including ghost, gdisk and
ghstwalk which I keep around for these types of situations.

Anyway let me know if you can't get ahold of a copy.

Also, regarding FDISK, fdisk /MBR only formats the first 400 bytes or so of
the MBR and not the remaining partition table info, or other drive signature
or fault-tolerant info that ntfs can sometimes put there. Since you're not
dealing with ntfs, you don't need to worry about ghstwalk.

Check out gdisk. If you want to display LBA info which might differ b/t your
original and destination drive for the w95 partition, use
C:\> gdisk [d#] /status /lba.

>From symantec I believe you can download a fairly good pdf on ghost which
documents the syntax a good deal more than I do here.

David

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
John Hunter
Sent: Wednesday, January 23, 2002 9:21 AM
To: [EMAIL PROTECTED]
Subject: Re: [bits] mirrored dual boot drive; problem with MS boot
sector


>>>>> "Erik" == Erik Curiel <[EMAIL PROTECTED]> writes:

    Erik> So if you can't make the two partitions exactly the same
    Erik> size, number of blocks, etc., I'd just rip all your personal
    Erik> files and reinstall from scratch on the new drive.

Goddammit.  The last thing I want to do is sit through a windows
install, getting my sound cards and video cards and what not
installed.  I wonder if I reinstalled windows, and then just replaced
'Program Files' with the old version if that would work.  Probably
not, cause of the registry right?

Hmm Win2k.  I'll look around the lab and see if we have a copy.

JDH

On Wed, 23 Jan 2002, John Hunter wrote:
----
>
>
> Ok, gurus, this got totally ignored at comp.os.linux.misc, so I hope
> somebody here has more information for me.
>
> I have a dual boot linux/win98 system and use lilo to manage the boot
> sector.  My hard drive was going bad on me, so I bought a new one.  I
> partitioned it with fdisk, set the win98 section to fdisk hex code
> 'c', which is FAT32, and formatted the win98 partition with
> 'mkfs.msdos -F32'.  I copied the windows partition from the old to the
> new drive with 'cp -a' (tried tar too, same result).  I also moved all
> the linux partitions over.  Once I go the new hard drive set up, I
> booted with a floppy and ran lilo on the new drive for my dual boot
> system.  Lilo comes up fine when I boot, and my linux side runs
> perfectly.  However, when I try to boot into windows, it prints a
> about a dozen whacky ASCII chars (many in the ASCII range 127-255) to
> the screen and freezes instantly.  To my untrained eye, this looks
> like a problem on the boot sector of the drive.
>
> Below I'll show the my lilo file and printout of the fdisk
> information.
>
> Any ideas what is wrong and how to fix it? Is the format command right
> for the fat32 partition.  It went really fast, this made me
> suspicious.  The MS formatter runs for much longer.  I can see the MS
> partition when I mount it from linux.
>
>
> Thanks,
> John Hunter
>
> RHL 7.1
>
> ---------------------- lilo.conf ----------------------------
> boot=/dev/hda
> map=/boot/map
> install=/boot/boot.b
> prompt
> timeout=300
> message=/boot/message
> linear
> default=linux249
>
>
> image=/boot/bzImage-2.4.9
>       label=linux249
>       initrd=/boot/initrd-2.4.2-2.img
>       read-only
>       root=/dev/hda6
>       append="hdd=ide-scsi"
>
> other=/dev/hda2
>       optional
>       label=dos
>
> ----------------------- partition info -------------------------
>
>    Device Boot    Start       End    Blocks   Id  System
> /dev/hda1             1         6     48163+  83  Linux
> /dev/hda2             7      1919  15366172+   c  Win95 FAT32 (LBA)
> /dev/hda4          1920      4866  23671777+   5  Extended
> /dev/hda5          1920      2047   1028128+  82  Linux swap
> /dev/hda6          2048      2111    514048+  83  Linux
> /dev/hda7          2112      2366   2048256   83  Linux
> /dev/hda8          2367      3004   5124703+  83  Linux
> /dev/hda9          3005      4866  14956483+  83  Linux
>
>
>


_______________________________________________
Bits mailing list
[EMAIL PROTECTED]
http://www.sugoi.org/mailman/listinfo/bits

Reply via email to