Professional Web Applications Themes

backing up partition tables - Linux / Unix Administration

Fussing around with setting up a Linux/Win2k dual boot system, I have taken to making backups of the MBR, and even seperate backups of the partition table. Making myself more familiar with the latter, I realised that bytes 447-510 in the MBR contain only the information of the *primary* four partitions, which isn't so surprising after all, given it holds exactly four entries. If you have an extended partition, thus, it follows there must be an extra partition table for this partition. I seem to have read somewhere that the extended partition contains a similar ("master" or not) boot record ...

  1. #1

    Default backing up partition tables


    Fussing around with setting up a Linux/Win2k dual boot system, I have
    taken to making backups of the MBR, and even seperate backups of the
    partition table.

    Making myself more familiar with the latter, I realised that bytes
    447-510 in the MBR contain only the information of the *primary* four
    partitions, which isn't so surprising after all, given it holds
    exactly four entries.

    If you have an extended partition, thus, it follows there must be an
    extra partition table for this partition. I seem to have read
    somewhere that the extended partition contains a similar ("master" or
    not) boot record which is also equivalent to the first 512 bytes. But,
    since an extended partition may hold more than 4 logical partitions,
    its partition table cannot be at the same offset as the partition
    table is in the MBR of the whole disk.

    Can someone tell me where it is exactly located? The reason I want to
    backup it ("back it up"?) is I don't trust W2k at all, and there is
    already a full Linux installation on a logical partition which I'd
    like to keep.

    Many thanks for enlightenment


    Florian v. Savigny

    If you are going to reply in private, please be patient, as I only
    check for mail something like once a week. - Si vous allez répondre
    personellement, patientez s.v.p., car je ne lis les courriels
    qu'environ une fois par semaine.
    Florian von Savigny Guest

  2. #2

    Default Re: backing up partition tables

    "Florian von Savigny" <florian265uboot.com> wrote in message
    news:m3brir53bj.fsfuboot.com...
    >
    > Fussing around with setting up a Linux/Win2k dual boot system, I have
    > taken to making backups of the MBR, and even seperate backups of the
    > partition table.
    >
    > Making myself more familiar with the latter, I realised that bytes
    > 447-510 in the MBR contain only the information of the *primary* four
    > partitions, which isn't so surprising after all, given it holds
    > exactly four entries.
    >
    > If you have an extended partition, thus, it follows there must be an
    > extra partition table for this partition. I seem to have read
    > somewhere that the extended partition contains a similar ("master" or
    > not) boot record which is also equivalent to the first 512 bytes. But,
    > since an extended partition may hold more than 4 logical partitions,
    > its partition table cannot be at the same offset as the partition
    > table is in the MBR of the whole disk.
    >
    > Can someone tell me where it is exactly located? The reason I want to
    > backup it ("back it up"?) is I don't trust W2k at all, and there is
    > already a full Linux installation on a logical partition which I'd
    > like to keep.
    >
    > Many thanks for enlightenment
    >
    >
    > Florian v. Savigny
    >
    > If you are going to reply in private, please be patient, as I only
    > check for mail something like once a week. - Si vous allez répondre
    > personellement, patientez s.v.p., car je ne lis les courriels
    > qu'environ une fois par semaine.
    Maybe try using `sfdisk` under linux. It has an option to dump the partition
    table to a file that is useful
    as input to sfdisk.

    - To save
    # sfdisk -d /dev/hda > /tmp/hda.save

    - To restore:
    # sfdisk < /tmp/hda.save

    This is all in the man page for sfdisk
    # man sfdisk

    Nick


    SFD Guest

  3. #3

    Default Re: backing up partition tables

    Florian von Savigny <florian265uboot.com> wrote:
    >
    > Fussing around with setting up a Linux/Win2k dual boot system, I have
    > taken to making backups of the MBR, and even seperate backups of the
    > partition table.
    >
    > Making myself more familiar with the latter, I realised that bytes
    > 447-510 in the MBR contain only the information of the *primary* four
    > partitions, which isn't so surprising after all, given it holds
    > exactly four entries.
    >
    > If you have an extended partition, thus, it follows there must be an
    > extra partition table for this partition. I seem to have read
    > somewhere that the extended partition contains a similar ("master" or
    > not) boot record which is also equivalent to the first 512 bytes. But,
    > since an extended partition may hold more than 4 logical partitions,
    > its partition table cannot be at the same offset as the partition
    > table is in the MBR of the whole disk.
    >
    > Can someone tell me where it is exactly located? The reason I want to
    > backup it ("back it up"?) is I don't trust W2k at all, and there is
    > already a full Linux installation on a logical partition which I'd
    > like to keep.
    >
    > Many thanks for enlightenment
    >
    >
    > Florian v. Savigny
    >
    > If you are going to reply in private, please be patient, as I only
    > check for mail something like once a week. - Si vous allez r?pondre
    > personellement, patientez s.v.p., car je ne lis les courriels
    > qu'environ une fois par semaine.
    Get the doc files for lilo, they go into exhaustive detail on extended
    partitions.

    Jerry
    Jerry Peters Guest

  4. #4

    Default Re: backing up partition tables


    Thanks to both of you for hinting at information sources. Maybe I'll
    take to reading the lilo doentation later

    I have tried out sfdisk, which does indeed even make binary copies of
    the whole partition table. However, these binary copies seem to be
    useful only if you have sfdisk available to restore them to the right
    places, which might not be the case in the case of an
    emergency. Moreover, sfdisk makes these backups only immediately
    before it *changes* the partition table. Thus, to make a backup, you
    have to specify an action that writes to the partition table, but
    without actually changing anything (such as making the first partition
    bootable when it is bootable anyway). I don't feel exactly safe with
    such an approach.

    Hence, I have resorted to making a human-readable backup, such as
    sfdisk makes with the option -d (which sfdisk can also use to
    automatically restore the partition table, so it's as good as the
    binary backup in that respect).

    I begin to understand now why people simply make printouts of the
    partition table ... BTW, there's one treacherous detail that has
    turned up: partition boundaries seem to be exact only if they are
    specified in sectors, so that's how one should make human-readable
    forms of backup (and it renders my recent recovery of my Linux
    partition unsafe: I'll reinstall the whole thing).


    --


    Florian v. Savigny

    If you are going to reply in private, please be patient, as I only
    check for mail something like once a week. - Si vous allez répondre
    personellement, patientez s.v.p., car je ne lis les courriels
    qu'environ une fois par semaine.
    Florian von Savigny Guest

  5. #5

    Default Re: backing up partition tables

    "Florian von Savigny" <florian265uboot.com> wrote in message
    news:m3brir53bj.fsfuboot.com...
    >
    > Fussing around with setting up a Linux/Win2k dual boot system, I have
    > taken to making backups of the MBR, and even seperate backups of the
    > partition table.
    >
    > Making myself more familiar with the latter, I realised that bytes
    > 447-510 in the MBR contain only the information of the *primary* four
    > partitions, which isn't so surprising after all, given it holds
    > exactly four entries.
    >
    > If you have an extended partition, thus, it follows there must be an
    > extra partition table for this partition. I seem to have read
    > somewhere that the extended partition contains a similar ("master" or
    > not) boot record which is also equivalent to the first 512 bytes. But,
    > since an extended partition may hold more than 4 logical partitions,
    > its partition table cannot be at the same offset as the partition
    > table is in the MBR of the whole disk.
    >
    > Can someone tell me where it is exactly located? The reason I want to
    > backup it ("back it up"?) is I don't trust W2k at all, and there is
    > already a full Linux installation on a logical partition which I'd
    > like to keep.
    >
    > Many thanks for enlightenment
    >
    >
    > Florian v. Savigny
    >
    > If you are going to reply in private, please be patient, as I only
    > check for mail something like once a week. - Si vous allez répondre
    > personellement, patientez s.v.p., car je ne lis les courriels
    > qu'environ une fois par semaine.

    Maybe try using `sfdisk` under linux. It has an option to dump the partition
    table to a file that is useful
    as input to sfdisk.

    - To save
    # sfdisk -d /dev/hda > /tmp/hda.save

    - To restore:
    # sfdisk < /tmp/hda.save

    This is all in the man page for sfdisk
    # man sfdisk

    Nick



    SFD Guest

  6. #6

    Default Re: backing up partition tables

    Not so much for the purposes of backing it up, but if you
    also want to understand the structure a bit more, try also adding
    the -x option to sfdisk. That'll help one see much more of how the
    extended partition stuff works.

    "SFD" <sfdadelphia.net> wrote in message news:<I62dnW7IDpfT43DdRVn-sAadelphia.com>...
    > "Florian von Savigny" <florian265uboot.com> wrote in message
    > news:m3brir53bj.fsfuboot.com...
    > >
    > > Fussing around with setting up a Linux/Win2k dual boot system, I have
    > > taken to making backups of the MBR, and even seperate backups of the
    > > partition table.
    > >
    > > Making myself more familiar with the latter, I realised that bytes
    > > 447-510 in the MBR contain only the information of the *primary* four
    > > partitions, which isn't so surprising after all, given it holds
    > > exactly four entries.
    > >
    > > If you have an extended partition, thus, it follows there must be an
    > > extra partition table for this partition. I seem to have read
    > > somewhere that the extended partition contains a similar ("master" or
    > > not) boot record which is also equivalent to the first 512 bytes. But,
    > > since an extended partition may hold more than 4 logical partitions,
    > > its partition table cannot be at the same offset as the partition
    > > table is in the MBR of the whole disk.
    > >
    > > Can someone tell me where it is exactly located? The reason I want to
    > > backup it ("back it up"?) is I don't trust W2k at all, and there is
    > > already a full Linux installation on a logical partition which I'd
    > > like to keep.
    > >
    > > Many thanks for enlightenment
    > >
    > >
    > > Florian v. Savigny
    > >
    > > If you are going to reply in private, please be patient, as I only
    > > check for mail something like once a week. - Si vous allez répondre
    > > personellement, patientez s.v.p., car je ne lis les courriels
    > > qu'environ une fois par semaine.
    >
    >
    > Maybe try using `sfdisk` under linux. It has an option to dump the partition
    > table to a file that is useful
    > as input to sfdisk.
    >
    > - To save
    > # sfdisk -d /dev/hda > /tmp/hda.save
    >
    > - To restore:
    > # sfdisk < /tmp/hda.save
    >
    > This is all in the man page for sfdisk
    > # man sfdisk
    >
    > Nick
    Michael Paoli Guest

Similar Threads

  1. Backing up site
    By fire orchid in forum Macromedia Contribute General Discussion
    Replies: 3
    Last Post: October 17th, 08:27 AM
  2. Replies: 4
    Last Post: May 20th, 10:07 AM
  3. Fun with Partition Tables and Zero's!!!
    By jayjwa in forum Linux Setup, Configuration & Administration
    Replies: 12
    Last Post: July 20th, 08:18 PM
  4. backing up to CD rom
    By pam in forum Windows XP/2000/ME
    Replies: 4
    Last Post: July 9th, 12:40 AM
  5. Backing up your laptop
    By Wojciech Orlinski in forum Mac Portable
    Replies: 0
    Last Post: June 29th, 08:38 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139