partitiions not in disk order, fixing

partitiions not in disk order, fixing

Post by anon » Sun, 25 May 2003 11:28:59



What I have:
------------
    Device Boot    Start       End    Blocks   Id  System
  /dev/hde1          3591      4865  10241437+   7  HPFS/NTFS
  /dev/hde2           262      2823  20579265    f  Win95 Ext'd (LBA)
  /dev/hde3          2824      3590   6160927+   7  HPFS/NTFS
  /dev/hde4   *         1       261   2096451    b  Win95 FAT32
  /dev/hde5           262       516   2048256    b  Win95 FAT32
  /dev/hde6           517       771   2048256    b  Win95 FAT32
  /dev/hde7           772      1026   2048256    b  Win95 FAT32
  /dev/hde8          1027      1536   4096543+   b  Win95 FAT32
  /dev/hde9          1537      2046   4096543+  83  Linux

What I want:
------------
    Device Boot    Start       End    Blocks   Id  System
  /dev/hde1   *         1       261   2096451    b  Win95 FAT32
  /dev/hde2           262      2823  20579265    f  Win95 Ext'd (LBA)
  /dev/hde5           262       516   2048256    b  Win95 FAT32
  /dev/hde6           517       771   2048256    b  Win95 FAT32
  /dev/hde7           772      1026   2048256    b  Win95 FAT32
  /dev/hde8          1027      1536   4096543+   b  Win95 FAT32
  /dev/hde9          1537      2046   4096543+  83  Linux
  /dev/hde3          2824      3590   6160927+   7  HPFS/NTFS
  /dev/hde4          3591      4865  10241437+   7  HPFS/NTFS

Can I do this?

Is it simply a matter of going into fdisk, deleting /dev/hde1 and
/dev/hde4 and then immediately recreating

/dev/hde1   *         1       261   2096451    b  Win95 FAT32
/dev/hde4          3591      4865  10241437+   7  HPFS/NTFS

Thank you!

  R

 
 
 

partitiions not in disk order, fixing

Post by David Efflan » Tue, 27 May 2003 00:49:29



> What I have:
> ------------
>     Device Boot    Start       End    Blocks   Id  System
>   /dev/hde1          3591      4865  10241437+   7  HPFS/NTFS
>   /dev/hde2           262      2823  20579265    f  Win95 Ext'd (LBA)
>   /dev/hde3          2824      3590   6160927+   7  HPFS/NTFS
>   /dev/hde4   *         1       261   2096451    b  Win95 FAT32
>   /dev/hde5           262       516   2048256    b  Win95 FAT32
>   /dev/hde6           517       771   2048256    b  Win95 FAT32
>   /dev/hde7           772      1026   2048256    b  Win95 FAT32
>   /dev/hde8          1027      1536   4096543+   b  Win95 FAT32
>   /dev/hde9          1537      2046   4096543+  83  Linux

> What I want:
> ------------
>     Device Boot    Start       End    Blocks   Id  System
>   /dev/hde1   *         1       261   2096451    b  Win95 FAT32
>   /dev/hde2           262      2823  20579265    f  Win95 Ext'd (LBA)
>   /dev/hde5           262       516   2048256    b  Win95 FAT32
>   /dev/hde6           517       771   2048256    b  Win95 FAT32
>   /dev/hde7           772      1026   2048256    b  Win95 FAT32
>   /dev/hde8          1027      1536   4096543+   b  Win95 FAT32
>   /dev/hde9          1537      2046   4096543+  83  Linux
>   /dev/hde3          2824      3590   6160927+   7  HPFS/NTFS
>   /dev/hde4          3591      4865  10241437+   7  HPFS/NTFS

> Can I do this?

> Is it simply a matter of going into fdisk, deleting /dev/hde1 and
> /dev/hde4 and then immediately recreating

> /dev/hde1   *         1       261   2096451    b  Win95 FAT32
> /dev/hde4          3591      4865  10241437+   7  HPFS/NTFS

To get partitions in the proper order, you should print the existing
partition table (record of start/end), remove partitions back to the first
one in partition order you want to change (back to and including hde1 in
this case), then recreate them in the proper order.  If you do it properly
(at your own risk) you should not lose any data, but I have not used NTFS
and you never know if everything is going to boot properly, so you should
back up anything that you definitely do not want to lose.

I do NOT think that you can do this from a running system on the same
drive (hde9), so you may need to do it from a rescue system (possibly on
Linux install CD).  It should actually end up looking like this:

    Device Boot    Start       End    Blocks   Id  System
  /dev/hde1   *         1       261   2096451    b  Win95 FAT32
  /dev/hde2           262      2823  20579265    f  Win95 Ext'd (LBA)
  /dev/hde3          2824      3590   6160927+   7  HPFS/NTFS
  /dev/hde4          3591      4865  10241437+   7  HPFS/NTFS
  /dev/hde5           262       516   2048256    b  Win95 FAT32
  /dev/hde6           517       771   2048256    b  Win95 FAT32
  /dev/hde7           772      1026   2048256    b  Win95 FAT32
  /dev/hde8          1027      1536   4096543+   b  Win95 FAT32
  /dev/hde9          1537      2046   4096543+  83  Linux

--
David Efflandt - All spam ignored  http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://cgi-help.virtualave.net/  http://hammer.prohosting.com/~cgi-wiz/

 
 
 

partitiions not in disk order, fixing

Post by Eric Moor » Tue, 27 May 2003 15:19:55


<reordering partitions>

Quote:> Can I do this?

Take a look at sfdisk. It's very good at this kind of thing.

Quote:> Is it simply a matter of going into fdisk, deleting /dev/hde1 and
> /dev/hde4 and then immediately recreating

Basically yes, but doing it manually, you're more likely to make an
error. Use sfdisk to do it automatically for you.

Eric

 
 
 

partitiions not in disk order, fixing

Post by R » Wed, 28 May 2003 05:23:24



> <reordering partitions>

>>Can I do this?

> Take a look at sfdisk. It's very good at this kind of thing.

>>Is it simply a matter of going into fdisk, deleting /dev/hde1 and
>>/dev/hde4 and then immediately recreating

> Basically yes, but doing it manually, you're more likely to make an
> error. Use sfdisk to do it automatically for you.

> Eric

  Thank you both, gentlemen, for these encouraging replies.

  I apologize for the delay in responding. I had my machine tied up
since last Friday doing a stage1 Gentoo build over a 56K phone line
before it finally dawned on me that I could do the build (as I am doing
now) from an existing Linux system (duh!).

  sfdisk looks promising.

   Here is what 'sfdisk -d' says about the drive in question:

  # partition table of /dev/hde
  unit: sectors

  /dev/hde1 : start= 57673350, size=20482875, Id= 7
  /dev/hde2 : start=  4192965, size=41158530, Id= f
  /dev/hde3 : start= 45351495, size=12321855, Id= 7
  /dev/hde4 : start=       63, size= 4192902, Id= b, bootable
  /dev/hde5 : start=  4193028, size= 4096512, Id= b
  /dev/hde6 : start=  8289603, size= 4096512, Id= b
  /dev/hde7 : start= 12386178, size= 4096512, Id= b
  /dev/hde8 : start= 16482753, size= 8193087, Id= b
  /dev/hde9 : start= 24675903, size= 8193087, Id=83
  /dev/hde10: start= 32869053, size=  112392, Id=83
  /dev/hde11: start= 32981508, size= 2104452, Id=82
  /dev/hde12: start= 35086023, size=10265472, Id=83

  Would anyone care to hazard an opinion as to what sfdisk would do if I
fed it the following modified form of the preceding data?

  /dev/hde1 : start=       63, size= 4192902, Id= b, bootable
  /dev/hde2 : start=  4192965, size=41158530, Id= f
  /dev/hde3 : start= 57673350, size=20482875, Id= 7
  /dev/hde4 : start= 45351495, size=12321855, Id= 7
  /dev/hde5 : start=  4193028, size= 4096512, Id= b
  /dev/hde6 : start=  8289603, size= 4096512, Id= b
  /dev/hde7 : start= 12386178, size= 4096512, Id= b
  /dev/hde8 : start= 16482753, size= 8193087, Id= b
  /dev/hde9 : start= 24675903, size= 8193087, Id=83
  /dev/hde10: start= 32869053, size=  112392, Id=83
  /dev/hde11: start= 32981508, size= 2104452, Id=82
  /dev/hde12: start= 35086023, size=10265472, Id=83

  I won't be doing anything until I get a CD burner
and have satisfied myself that I have the entire drive
completely and reliably backed up in any case.

   R

--

 
 
 

partitiions not in disk order, fixing

Post by Eric Moor » Wed, 28 May 2003 15:56:37


Quote:

>   sfdisk looks promising.

>    Here is what 'sfdisk -d' says about the drive in question:

>   Would anyone care to hazard an opinion as to what sfdisk would do if I
> fed it the following modified form of the preceding data?

<I've reformatted it so pan doesn't mess up the table again>

Quote:

>   /dev/hde1 : start=       63, size= 4192902, Id= b, bootable

>   /dev/hde2 : start=  4192965, size=41158530, Id= f

>   /dev/hde3 : start= 57673350, size=20482875, Id= 7

>   /dev/hde4 : start= 45351495, size=12321855, Id= 7

>   /dev/hde5 : start=  4193028, size= 4096512, Id= b

>   /dev/hde6 : start=  8289603, size= 4096512, Id= b

>   /dev/hde7 : start= 12386178, size= 4096512, Id= b

>   /dev/hde8 : start= 16482753, size= 8193087, Id= b

>   /dev/hde9 : start= 24675903, size= 8193087, Id=83

>   /dev/hde10: start= 32869053, size=  112392, Id=83

>   /dev/hde11: start= 32981508, size= 2104452, Id=82

>   /dev/hde12: start= 35086023, size=10265472, Id=83

>   I won't be doing anything until I get a CD burner
> and have satisfied myself that I have the entire drive completely and
> reliably backed up in any case.

Make sure to do this first indeed.

Note that hde3 and 4 are also not in the right order yet. You might want
to switch them too. Otherwise, this will fix the table and reshuffle the
partitions back into order. I'd use the -O flag (to a floppy)to ensure
that if something goes wrong, it's still restoreable. It shouldn't be
necessary here, as the table will remain using the same sectors, but
there's no harm in taking extra precautions.

Eric

 
 
 

1. The Best Disk Partitiion

I have a 130Mb HD and want to use it fully for Linux. I tried many times
to install with everything (Base, Tex and X) and it failed every single
time.
I created 3 partitions, all different size: 1 for /, 2 for /usr and 3 for
/usr/386X

Can some one advice me on how to set this up, which format (LInux or
extended) and the size of each partitions?

Mike
________________________________________________________________________
Michael Yue

CIS:    100016.162

2. /usr/include/asm/segment.h confuzes me ?

3. Plug-ins not not seen by Gimp

4. PUT with NCSA 1.5.2a?

5. How to make a bootimage disk, like the bootdsks.144 ins slackware.

6. Problem with IDE disk

7. ide disk, not detected (2.2.6 and 2.2.13) is there a fix ?

8. print job corrupted after printer power-on

9. 10 GB fixed disk: not all accessible?

10. NTFS/HPFS install bug not fixed yet...updated install disks still don't work:-(

11. getty_ps2.0.7 Still my modem does not accepts dial-ins.

12. Fix: Init page count for all pages during higher order allocs

13. 2.4: Fix flushtime ordering on BUF_DIRTY list