[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[solved] Re: Change partition numbering



Rodolfo Medina <rodolfo.medina@gmail.com> writes:

> Hi all.
>
> After resizing a partition on my hard disk, partition numbering changed and
> now number 7 comes before and number 6 comes after:
>
> Model: ATA SAMSUNG MP0402H (scsi)
> Disk /dev/sda: 40.1GB
> Sector size (logical/physical): 512B/512B
> Partition Table: msdos
> Disk Flags: 
>
> Number  Start   End     Size    Type      File system     Flags
>  1      32.3kB  8390MB  8390MB  primary   fat32           boot
>  2      8390MB  40.1GB  31.7GB  extended                  lba
>  5      8390MB  9434MB  1045MB  logical   linux-swap(v1)
>  7      9434MB  26.2GB  16.8GB  logical   ext3
>  6      26.2GB  40.1GB  13.8GB  logical   ext3
>
> Is it possible, and how?, to correct that and change back 7 with 6?  Googling
> around found no solution.

I found this article:

 http://unix.stackexchange.com/questions/18752/change-the-number-of-the-partition-from-sda1-to-sda2/18759#18759

According to it, I did:

 # sfdisk -d /dev/sda > myfile

and edited sda.bkp my way.  Then,

 # sfdisk --no-reread -f /dev/sda < myfile

.  Then I edited /etc/fstab properly and rebooted.  But then I had to rescue
the system: from a Debian installation disk, in rescue mode, from the boot
partition, I did:

 # grub-install /dev/sda

, then rebooted and now it seems ok.  Maybe I had to give the last command
before rebooting the first time.

Rodolfo


Reply to: