LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 12-28-2007, 10:51 AM   #1
noisebleed
Member
 
Registered: Feb 2007
Location: Porto, Portugal
Distribution: Gentoo
Posts: 41

Rep: Reputation: 15
Adjust partition table (end cylinder) after disk change.


Hi,

I have replaced my disk of 40 GB for a new one of 80 GB.

The copy was done using:
Code:
# dd if=/dev/sda of=/dev/sdb conv=notrunc,noerror
The partition table on the 40 GB disk is;
Code:
noisebleed ~ # fdisk -l

Disk /dev/sda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1           9       72261   83  Linux
/dev/sda2              10         134     1004062+  83  Linux
/dev/sda3             135        2002    15004710   83  Linux
/dev/sda4            2003        4864    22989015    5  Extended
/dev/sda5            2003        2625     5004216   83  Linux
/dev/sda6            2626        4864    17984736   83  Linux
In the 80 GB disk i have removed the sda6 partition and recreated it with less 64 cylinders. Then i created sda7 with the remaining space:
Code:
noisebleed ~ # fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1           9       72261   83  Linux
/dev/sda2              10         134     1004062+  83  Linux
/dev/sda3             135        2002    15004710   83  Linux
/dev/sda4            2003        4864    22989015    5  Extended
/dev/sda5            2003        2625     5004216   83  Linux
/dev/sda6            2626        4800    17470656   83  Linux
/dev/sda7            4801        4864    514048+   83  Linux
My problem is:

The end cylinder of partition sda7 is wrong. It should be 9729,

With this scheme i am loosing the new 40 GB of extra space.

How do I recover this?

Thanks.

Extra info:
  • Distro: Gentoo Linux
  • Filesystem: ext3
 
Old 12-29-2007, 04:26 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,110

Rep: Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985
Use cfdisk
 
Old 12-30-2007, 03:34 PM   #3
noisebleed
Member
 
Registered: Feb 2007
Location: Porto, Portugal
Distribution: Gentoo
Posts: 41

Original Poster
Rep: Reputation: 15
Adjust partition table (end cylinder) after disk change. Reply to Thread [SOLVED]

Thanks for the reply.

The issue was my first logical partition (sda4) in which sda5, sda6 and sda7 are contained.

I have deleted sda4 and created it again recovering all the extra space available.

Now all 80 GB are available
 
Old 12-30-2007, 04:39 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,110

Rep: Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985
That's actually an extended partition, and yes it is the container for all logicals.
cfdisk is handy in that it will "expand" the underlying extended partition if the layout is appropriate - in your case it is. You could have just deleted and resized sda7, and the extended would have been handled for you automagically.
Note: cfdisk, not fdisk.

Of course the gparted livecd does all this and more (with a nice gooey as well).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Partition 1 does not end on cylinder boundary wood_morris Linux - Newbie 6 08-28-2009 04:57 AM
need partition to end on cylinder boundary Master of Reality Linux - General 5 02-03-2006 09:51 PM
Partition Table (Cylinder boundaries) and lost space imitheos Linux - General 3 09-17-2005 02:59 PM
Partition does not end on cylinder boundary. snisheeth Linux - Hardware 0 01-24-2004 04:49 PM
Partition does not end on cylinder boundary snisheeth Linux - General 0 01-22-2004 07:38 PM


All times are GMT -5. The time now is 07:55 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration