I had a dream about dd last night [was: Recovery Partitions]
Gary Jarrel
garyjarrel at gmail.com
Fri Nov 24 02:19:23 UTC 2006
Well thats what I thought as well, but then based on:
http://www.experts-exchange.com/Operating_Systems/Linux/Q_21601291.html
I figured I'd try the first 446 bytes for the boot loader, assuming
that if I was to take the first 512 I would take the partition table
information as well, hence I've created the partition first, then
wrote just the bootloader (first 446) not the partition table (i.e.
not 512) and then the partition image, but that still failed!
:)
It's been a fun filled week :)
On 11/23/06, rpowersau at gmail.com <rpowersau at gmail.com> wrote:
> On 11/23/06, Gary Jarrel <garyjarrel at gmail.com> wrote:
> > I'm getting there slowly with this recovery partition business, but
> > need some advise on the workings of dd.
> >
> > If I use dd if=/dev/hda of=/dev/hdb bs=512 then I'm able to bring the
> > data across from one hard drive to another and get the system to boot.
> > The problem is the master boot record is overwritten hence the
> > partitions which are on hda are transfered over onto hdb if you are
> > trying to use a larger hard drive as hdb you have a whole heap of
> > unused space.
>
> If you are trying to create a rescue image that's not really a problem is it?
>
> Have you tried this? Does it work for you?
>
> If it does work, in a real recovery situation you won't want to make
> it bigger because then you can't copy it back to the first drive.
>
> But if you do want to make it bigger, then you can just resize from windoze.
>
> >
> > So after some research I did the following to create my images:
> >
> > dd if=/dev/hda of=bootloader.iso bs=446 count=1
>
> I'd guess the problem is when you write the image to the second drive
> you either overwrite the existing partition table, which is what you
> described in the beginning of this message when losing disk space.
>
> If you don't overwrite the partition table then your partition
> information won't agree with you file system from the original drive.
>
>
> > dd if=/dev/hda of=mbr.iso bs=512 count=1
> > dd if=/dev/hda1 of=partitionimage.iso
> > dd if=/dev/hda of=driveimage.iso bs=512 skip=1
> >
> > Installed a new hard drive into the system, used a disk manager to
> > create an ntfs partition on it and tried various ways to transfer the
> > data accros. Calling the second drive hdb I tried the following:
> >
> > dd if=partitionimage.iso of=/dev/hdb1 bs=512
> >
> > This did not work reporting that there is no bootable device in the system.
> >
> > dd if=driveimage.iso of=/dev/hdb bs=512 skip=1
> >
> > The problem as the previous command.
> >
> > dd if=bootloader.iso of=/dev/hdb bs=446 count=1
> > dd if=driveimage.iso of=/dev/hdb bs=512 skip=1
> >
> > hoping that this would rewrite the bootloader, leave the existing
> > partition table intact, and then write the drive image, but the
> > problem was still the same.
> >
> > dd if=bootloader.iso of=/dev/hdb bs=446 count=1
> > dd if=partitionimage.iso of=/dev/hdb1
> >
> > same problem as above
> >
> > Lastly I tried
> > dd if=mbr.iso of=/dev/hdb bs=512 count=1
> > dd if=driveimage.iso of=/dev/hdb bs=512 skip=1
> >
> > And this time it overwrote the partition table (i.e. the NTFS one that
> > I created on the second drive) with the details of that on hda and the
> > new error was "Error loading operating system"
> >
> > And I believe the following two commands did the same (missing page of notes)
> > dd if=mbr.iso of=/dev/hdb bs=512 count=1
> > dd if=partitionimage.iso of=/dev/hdb1
> >
> > So if there are any experts on dd or structures of hard drives who can
> > give me some pointers that would be much appreciated.
> >
> > Thank you for all your help
> >
> > - garyj
> >
> > On 11/17/06, Gary Jarrel <garyjarrel at gmail.com> wrote:
> > > Working on a few concepts at the moment, will advise as soon as
> > > something feasible eventuates!
> > >
> > > Gary
> > >
> > > On 11/16/06, Brian Fahrlander <brian at fahrlander.net> wrote:
> > > > -----BEGIN PGP SIGNED MESSAGE-----
> > > > Hash: SHA1
> > > >
> > > > rpowersau at gmail.com wrote:
> > > > > On 11/16/06, Gary Jarrel <garyjarrel at gmail.com> wrote:
> > > > >> I figured that something like dd might to the trick, I was thinking of
> > > > >> creating an ISO image of the primary partition, placing that onto the
> > > > >> hidden partition. Then I need an option to make the hidden partition
> > > > >> bootable, to avoid using any floppies. It could boot into a linux
> > > > >> based distribution such as ubuntu I guess, and present the user with a
> > > > >> menu allowing them to override the contents on the first partition
> > > >
> > > > Before we get too far afield...
> > > >
> > > > This is something that I've seen, and wanted to do. Personally, I
> > > > get a great deal of joy from re-using a 'hidden' partition from a
> > > > Windows disk, not only for doubling the size of the drives, but to make
> > > > a 'fallback' partition (but this time for Linux).
> > > >
> > > > If you get any part of this worked out, and email me the details,
> > > > I'll do the Wiki page for this- that's how much I want to know about it.
> > > > And I keep a spare system around for such research. I just can deal with
> > > > it now, 'cause I'm fighting this pam-stuff...
> > > >
> > > > - --
> > > > ------------------------------------------------------------------------
> > > > Brian Fahrländer Christian, Conservative, and Technomad
> > > > Evansville, IN http://Fahrlander.net/brian
> > > > ICQ: 5119262 AOL/Yahoo/GoogleTalk: WheelDweller
> > > > ------------------------------------------------------------------------
> > > >
> > > > -----BEGIN PGP SIGNATURE-----
> > > > Version: GnuPG v1.4.2.2 (GNU/Linux)
> > > > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> > > >
> > > > iD8DBQFFW74Y6PLtRzZbdhYRAgjkAJ9NScrQUQdT4oBbsW2QCSjV/ltZZACfXMMn
> > > > J2ZIbw9MFxkzxWUc5uAd84w=
> > > > =ttkn
> > > > -----END PGP SIGNATURE-----
> > > >
> > > > --
> > > > ubuntu-users mailing list
> > > > ubuntu-users at lists.ubuntu.com
> > > > Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
> > > >
> > >
> >
> > --
> > ubuntu-users mailing list
> > ubuntu-users at lists.ubuntu.com
> > Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
> >
>
>
> --
> Regards,
> Russ
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
More information about the ubuntu-users
mailing list