LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 07-04-2010, 01:26 PM   #1
nusch
LQ Newbie
 
Registered: Feb 2009
Posts: 11

Rep: Reputation: 0
Gparted broken partition table


While installing Ubuntu I have created 50MB boot partition and was sure is enogugh, but now with growing initrd and kernel size, an autoupdates which were always killed by no sufficient disk space I decided to increase its size.
I had following partitions - in disk order:
sda1,primary bootable NTFS, 57GB
sda4, primary ext2, /boot, 47MB
extended sda2{
sda6, ext3, /(root), 43GB
8MB gap
4GB swap
sda7, ext3 /data, 62GB
sda8, ext3 /multimedia 87GB
sda5,ntfs, 30GB Lenovo recovery
}
1,16MB unallocated
sda3, primary NTFS, 15GB data

I tried to decrease size of sda6 with moving to the right to make more space for sda4 - boot. While doing this I unticked option Round to cylinders, and filled also the gap(about 8mb) between sda6 and swap. That was probably the source of all problems.

Gparted have done all steps, and while rereadig partition table gave error it's broken and displayed 300GB unallocated space. Although fdisk -l /dev/sda still showed the partitions.
I've made backup of first 2kB in disk with dd, run fdisk /dev/sda, and w. After that partitions appeared again in gparted, but sda6 came with warning sign.

I scanned disk with testdisk, it detects partitions and has option to show filenames for guessed partition position - although for boot it seems to be ok:
Code:
   P Linux                 7470   0  1  7475 254 63      96390                                                         
Directory /                                                                                                            
                                                                                                                       
drwxr-xr-x     0     0      2048  1-Jul-2010 19:18 .                                                                   
drwxr-xr-x     0     0      2048  1-Jul-2010 19:18 ..                                                                  
drwxr-xr-x     0     0     12288  9-Feb-2009 00:08 lost+found                                                          
lrwxrwxrwx     0     0        37  1-Jul-2010 19:18 initrd.img                                                          
lrwxrwxrwx     0     0        28  1-Jul-2010 19:11 initrd.img.old                                                      
lrwxrwxrwx     0     0        34  1-Jul-2010 19:18 vmlinuz                                                             
-rw-r--r--     0     0    160280 23-Mar-2010 09:40 memtest86+.bin                                                      
lrwxrwxrwx     0     0        25  1-Jul-2010 19:11 vmlinuz.old                                                         
-rw-r--r--     0     0    110458 11-Jun-2010 11:28 config-2.6.32-23-generic                                            
drwxr-xr-x     0     0      4096  1-Jul-2010 19:18 grub                                                                
-rw-r--r--     0     0    645752 11-Jun-2010 11:28 abi-2.6.32-23-generic                                               
-rw-r--r--     0     0   10634214  1-Jul-2010 19:18 initrd.img-2.6.32-23-generic-tuxonice                              
-rw-r--r--     0     0   10634598  1-Jul-2010 19:17 initrd.img-2.6.32-23-generic                                       
-rw-r--r--     0     0   2154167 11-Jun-2010 11:28 System.map-2.6.32-23-generic                                        
-rw-r--r--     0     0      1336 11-Jun-2010 11:31 vmcoreinfo-2.6.32-23-generic                                        
-rw-r--r--     0     0      1345 22-Jun-2010 16:22 vmcoreinfo-2.6.32-23-generic-tuxonice                               
-rw-r--r--     0     0    653981 22-Jun-2010 16:20 abi-2.6.32-23-generic-tuxonice                                      
-rw-r--r--     0     0   4045536 11-Jun-2010 11:28 vmlinuz-2.6.32-23-generic                                           
-rw-r--r--     0     0    110995 22-Jun-2010 16:20 config-2.6.32-23-generic-tuxonice                                   
-rw-r--r--     0     0   2198120 22-Jun-2010 16:20 System.map-2.6.32-23-generic-tuxonice                               
-rw-r--r--     0     0   4119680 22-Jun-2010 16:20 vmlinuz-2.6.32-23-generic-tuxonice
for root it looks like:
Code:
                                        
drwxr-xr-x     0     0      4096  3-Jul-2010 15:27 .                                                                   
drwxr-xr-x     0     0      4096  3-Jul-2010 15:27 ..                                                                  
drwx------     0     0     16384  9-Feb-2009 00:08 lost+found                                                          
br--r---wx 24128  9231   3479872051948653857 30-Mar-1973 05:51 var                                                     
-r-s-wS---  9356 65156   5793109986867415932 13-Aug-1970 15:06 boot                                                    
br-Sr---wx 28262 22597   8245921730907235684 25-Nov-2007 10:50 home                                                    
?--xr-S--t 18482 63020   12674467475119130604  7-Mar-1998 07:52 mnt                                                    
cr--r---wx 25135  8283   8247064189301911145  4-May-1975 10:09 etc                                                     
p-wx-wxrwT 38148  7196   94489280512  1-Jan-1970 01:00 media                                                           
lrwxrwxrwx     0     0        11  9-Feb-2009 00:10 cdrom                                                               
?-wsr-Sr-T 45548 28268   7011433880671991730 25-Apr-1951 20:03 bin                                                     
?r-xr----x 26929 17209   7814997939452212083  3-Apr-1970 20:00 dev                                                     
?r--r-srwt 24434  2573   7022344802703537010  1-Jan-1977 19:40 lib                                                     
lrwxrwxrwx     0     0         3  1-May-2010 13:53 lib64                                                               
-r-s--x--T  9340 35148   896772532280  7-Jul-1989 10:51 opt                                                            
dr-sr--r-T 24610 63840   1075023756 20-Aug-1909 03:05 proc                                                             
?rwx--xr-- 26948 56872   3605867005859817303 18-Mar-2008 14:16 root                                                    
?---------     0     0         0                   sbin                                                                
b--xr-xr-t 26229 29300   4991472055216269663 26-Sep-2022 04:58 srv                                                     
?--Sr-S-wT 25148 27757   4495221615598058558 29-Nov-2023 16:18 sys                                                     
?---------     0     0         0                   tmp                                                                 
?rwsrw-rwx 20418 41967   14184206604667801451 11-Nov-1926 15:30 usr                                                    
lrwxrwxrwx     0     0        30  5-Feb-2010 19:43 vmlinuz                                                             
lrwxrwxrwx     0     0        33  5-Feb-2010 19:43 initrd.img                                                          
?--S--sr-t 26913 65198   10815046462289835908  9-Feb-1951 08:46 .kde                                                   
lrwxrwxrwx     0     0        33  7-Jan-2010 23:58 initrd.img.old                                                      
lrwxrwxrwx     0     0        30  7-Jan-2010 23:58 vmlinuz.old                                                         
dr-s-w--wx 20557  8224   538985804 30-Jan-1987 03:38 lib32                                                             
cr--r---wx 25135 29793   7017857769096048233 16-Aug-2004 02:59 selinux                                                 
?---------     0     0         0                   pentest                                                             
b--xrwSr-x 65223 29508   5676148299231912416 19-Dec-1978 22:59 .config                                                 
pr-Sr-S-wx 11673 13679   5127095181561235688 17-Jun-2023 23:18 Xilinx                                                  
-rw-r--r--     0     0         0 21-Jun-2010 17:36 sqlbX5mOE                                                           
-rw-r--r--     0     0         0 21-Jun-2010 17:36 .ismount-test-file
So all metadata broken although filenames are ok.
Is the problem still in bad begining of the partition saved or data are already broken ? If the first is there any mount option to really not touch filesystem ? Because I've read even if we mount readonly there are some options saved to disk (as last mount time etc) and I'm aware it could destroy entrie filesystem.

Has the ext3 some partition header as NTFS do? Or is there a way to locate real start of partition? because testdisk and gdisk shows only this one starting sector for sda6. When I moved the sda6 partition there was space between begin of extended partition and begin of sda6, now there is no space, so that's the main reason of suspecting partition begining is in fact over 100MB further.

Current partition schema in attached PNG. Also the swap partition was deleted, I don't know when, now there is 4GB hole.
Attached Images
File Type: png screen.png (71.4 KB, 16 views)
 
Old 07-04-2010, 02:38 PM   #2
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,305

Rep: Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552
I think I ran into this. I hit trouble doing a resize, and found once I screwed things up that there was a bug somewhere in the way gparted calls ntfsresize, and that the maintainer of each was looking at the other.
ntfsresize resizes the ntfs filesystem, not the drive partition. Get out of gparted, and think. Back up. What I would like to do is resize sda5 back to what it was, run a check on it, and then resize it down by calling ntfsresize from a console. If you delete sda5, all the partition numbers above drop by 1 and your new sda5 will be sda8 or sda9. The space on the smaller ntfs partitions is very tight; I wouldn't fill any drive over 90%
 
Old 07-04-2010, 02:51 PM   #3
nusch
LQ Newbie
 
Registered: Feb 2009
Posts: 11

Original Poster
Rep: Reputation: 0
The problem is I don't know excatly to what size, from which sector and to which sector I resized. I need somehow locate old partition, tried testdisk and gpart, both detecting partition at old position - partition was moved to right to both are seeing begining of old already copied but still correct partition treating it as right one. And problem is with ext3 partition not ntfs

Last edited by nusch; 07-04-2010 at 02:53 PM.
 
Old 07-04-2010, 03:34 PM   #4
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
To be honest I don't know what the fuss is all about.

If you resize a partition the programs that pick up the partition files by the hard disk address must be accordingly readjusted. That is not broken if the changes are repairable.

The primary partition of sda1 to sda4 can never mixed with the logical partitions and if you don't know about it then it time to appreciate what partitioning is all about.

Your partition table tells us you have created sda1 first and then elected to create some logical partitions afterward, resulting the original primary sda2 become an extended partition holding sda5 to sda8. Think you are trying to create two more primaries sda3 and sda4 at the end of sda2 or more precisely at the end of sda8. If you read the output of fdisk -l you will find sda3 is physically behind sda8. The small 4Mb sda4 could have been created probably by you last by seizing whatever little space between sda1 and sda2.

Logical partition must work as a continuous chain with no space in between. If there are spaces they are dead and can only be absorbed by the adjoining partitions at either side.

MS systems do not format a partition at exactly the boundary of each cylinder as Linux does so you will have to accept some wastes which can be overcome if you use Linux to format the NTFS partition instead using a MS Windows. However MS Windows are gunning for the 4kB sector hard disks so they "align" the partition boundaries for this new technology. It is recommended that you leave it alone.

If you need the logical partitions realigned as ascending order like sda5 to sda8 use fdisk. It might call the same sda6, sda7 sda8 and sda5 as sda5, sda6,sda7 and sda8.

If you want the 4GB block absorbed into sda6 then continue the use of gParted.

If you want the 4GB block to become a new logical partition try cfdisk but the new partitions will sda7 with sda8 being pushed to become sda9.

The general rule is if cfdisk and gparted can read the partition table then it is healthy and can be understood by any Linux or MS system. Your real problem starts when both of these two programs can't understand the partition table and refuse to mount it. Then your last resort lies with fdisk.

Your problem is likely due to the inexperience of working with partitions. Using a GUI tool like gparted can be a disadvantage simply because the partition creation and file formatting are done together. A lot can be learned if you use the terminal tool like cfdisk where it shows the history of how each partition happens. More importantly the terminal partitioning tools never format a partition and so everything is reversible.

Last edited by saikee; 07-04-2010 at 03:35 PM.
 
Old 07-04-2010, 04:28 PM   #5
nusch
LQ Newbie
 
Registered: Feb 2009
Posts: 11

Original Poster
Rep: Reputation: 0
You probably don't see the problem, AFAIK there could be 4 primary partitions and any of them could be substituted with block with multi logical partitions and this coresponds to my setup
1. Primary sda1
2. Primary sda4
3. Logical(sda6-8)
4. Primary sda3

I setup it like this about 2 years ago and it worked like a charm, today I only resized one of partitions sda6 - with move to the right
About continuing and trying anythink with gparted, I don't want to use it, becase it run fsck automatically
My disk looks like that:
[x][yyyyyyyyyyyyyyyyyyy]
where x contains data from sda6 about what i moved partition to the right, and yyy contains the whole partition. If now in partition table the begining of sda6 is writen to point to x then if fsck of any tool read from it could e.g treat as journal data which aren't what it wants journal and basing on those data destroy rest of trying repair it.

About cfdisk I tried it also but it shows:
Code:
FATAL ERROR: Bad primary partition 2: Partition ends in the final partial cylinder                                        
                                                                  Press any key to exit cfdisk
I've just explored gdisk sources and this reminded me disk have its UUID, so I mounted /boot partition and saved UUID from grub menu.lst, after that done hexedit /dev/sda and searched fro begining of this string, and found one occurence near the begining and another one offseted exactly by 0x5000000h , so begining of real partition is probably by that position.
Here is testdisk backup file of current partition table:
Code:
ubuntu@ubuntu:/mnt$ cat backup.log 
#1278278297 Disk /dev/sda - 320 GB / 298 GiB - CHS 38913 255 63
 1 : start=       63, size=120005487, Id=07, *
 4 : start=120005550, size=    96390, Id=83, P
 2 : start=120101940, size=474094215, Id=0F, E
 6 : start=120102066, size= 91361281, Id=83, L
 7 : start=220010238, size=129997917, Id=83, L
 8 : start=350008218, size=182980287, Id=83, L
 5 : start=532988568, size= 61207587, Id=07, L
 3 : start=594198528, size= 30943920, Id=12, P
How should I recalculate those values to offset begining of 6 by 5000000h - 80MB. Do I need to multiple it by sector size ? If so from where should I obtain it?

Last edited by nusch; 07-04-2010 at 05:03 PM.
 
Old 07-04-2010, 04:33 PM   #6
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Can you show us the output of
Code:
fdisk -l
According to gparted your sda6 is 43.56Gb large and is empty? There should be nothing to fsck for.

I myself will treat the error warning from cfdisk as the first sign of problem in the partition table. Fdisk is usually the last one willing to work on a hard disk with a doggy partition table so keep a record of it if you need to rebuild the partition table.

I would not bother too much of the UUID references as I drop them as soon as they me any trouble. Linux boots and runs perfectly without them, even with the gpt partitions. People who do not know the disk order and the device names may think UUID is the best thing since slice bread.

Last edited by saikee; 07-04-2010 at 04:45 PM.
 
Old 07-04-2010, 04:38 PM   #7
nusch
LQ Newbie
 
Registered: Feb 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Here you are:
Code:
root@ubuntu:~# LANG="en" fdisk -l /dev/sda

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc3ffc3ff

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        7470    60002743+   7  HPFS/NTFS
/dev/sda2            7477       36987   237047107+   f  W95 Ext'd (LBA)
/dev/sda3           36988       38914    15471960   12  Compaq diagnostics
/dev/sda4            7471        7476       48195   83  Linux
/dev/sda5           33178       36987    30603793+   7  HPFS/NTFS
/dev/sda6            7477       13163    45680640+  83  Linux
/dev/sda7           13696       21787    64998958+  83  Linux
/dev/sda8           21788       33177    91490143+  83  Linux

Partition table entries are not in disk order
root@ubuntu:~# LANG="en" fdisk -l -u /dev/sda

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc3ffc3ff

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63   120005549    60002743+   7  HPFS/NTFS
/dev/sda2       120101940   594196154   237047107+   f  W95 Ext'd (LBA)
/dev/sda3       594198528   625142447    15471960   12  Compaq diagnostics
/dev/sda4       120005550   120101939       48195   83  Linux
/dev/sda5       532988568   594196154    30603793+   7  HPFS/NTFS
/dev/sda6       120102066   211463346    45680640+  83  Linux
/dev/sda7       220010238   350008154    64998958+  83  Linux
/dev/sda8       350008218   532988504    91490143+  83  Linux

Partition table entries are not in disk order
root@ubuntu:~#
I've backed up 2MB of sda6 to pendrive and wiped those 2MB on disk, than give testdisk another chance, it detected 6 partitions but neither the current sda6 nor that which boot block I found by UUID..

Last edited by nusch; 07-04-2010 at 04:56 PM.
 
Old 07-04-2010, 04:56 PM   #8
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
I don't think Linux would have an issue with your partition table looking like
Code:
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        7470    60002743+   7  HPFS/NTFS
/dev/sda2            7477       36987   237047107+   f  W95 Ext'd (LBA)
/dev/sda3           36988       38914    15471960   12  Compaq diagnostics
/dev/sda4            7471        7476       48195   83  Linux
/dev/sda5           33178       36987    30603793+   7  HPFS/NTFS
/dev/sda6            7477       13163    45680640+  83  Linux
/dev/sda7           13696       21787    64998958+  83  Linux
/dev/sda8           21788       33177    91490143+  83  Linux
Like I predicted the sda3 is at the back of the extended partition sda2 according to the starting and ending cylinder. Your sda4 is pretty useless for its size and you do get sda5 following sda8. This is likely due to using several partitioning tools. It pays to stick with one partitioning tool. In the past I use cfdisk a lot but fdisk (use Mb is unit) is good as it default unit is per cylinder which is a lot easier to follow and record.

Thus I still do not know your real concern if sda6 is empty and you are worrying about moving it to the right will do something to your data which is nil?

You can resize the sda6 to take up the small space. There is no law requiring a logical partition must be moved bodily as one unit every time! If you move a filing system everything then has to be re-constructed because your filing index will have to change completely for the new hard disk location.

Last edited by saikee; 07-04-2010 at 04:59 PM.
 
Old 07-04-2010, 05:14 PM   #9
nusch
LQ Newbie
 
Registered: Feb 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by saikee View Post
Like I predicted the sda3 is at the back of the extended partition sda2 according to the starting and ending cylinder. Your sda4 is pretty useless for its size and you do get sda5 following sda8. This is likely due to using several partitioning tools.
You could see all those informations in first post.

Quote:
Thus I still do not know your real concern if sda6 is empty and you are worrying about moving it to the right will do something to your data which is nil?

You can resize the sda6 to take up the small space. There is no law requiring a logical partition must be moved bodily as one unit every time! If you move a filing system everything then has to be re-constructed because your filing index will have to change completely for the new hard disk location.
That's exactly my problem - gparted moved data from sda6 - moved those data exactly by 5000000h bytes to the right, now I need to know ho to calculate starting and ending sector, CHS form or any form that could be entered to any partitioning tool. And take in mind that partition was moved without "round to cylinders" option selected.
 
Old 07-04-2010, 05:58 PM   #10
nusch
LQ Newbie
 
Registered: Feb 2009
Posts: 11

Original Poster
Rep: Reputation: 0
OK. Finally I divided 5000000h=(80*1024*1024)d over 512(sector size) what gave me offset 163840 and position 7486C 52H 41S ,after I entered those values to test disk it has shown my data uncorrupted, so I've done:
Code:
fdisk -c /dev/sda
u   change display/entry units
x   extra functionality (experts only)
b   move beginning of data in a partition
than enteret calculated new size old+163840 and gparted started to see the partition and % of disk space usage. But now I must correct end of partition, both parted and gparted complains about filesystem greater than partition size but any of them can't fix the error in fdisk there is only option to move beginning of partition, not the end. And I'm not sure if I should offset also by 80MB because I setup it in gparted in way new partition should fill also the gap after - about 8MB, and don't know where the filesystem ends at the moment..
 
Old 07-04-2010, 06:23 PM   #11
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
The reason I entered this thread with a critical tone was in the first post you quoted
Quote:
I tried to decrease size of sda6 with moving to the right to make more space for sda4
my reply was deliberately brunt (with the intention of making you think hard. It is designed for your own good)
Quote:
The primary partition of sda1 to sda4 can never mixed with the logical partitions and if you don't know about it then it time to appreciate what partitioning is all about.
I am also puzzled by the LBA mode being used in fdisk and yet you are insisting in knowing the exact boundary of sda6. When you format a partition Linux uses up the full boundary and there is no need to specify a different start and end positions, unless you want troubles.

From your partition table
Code:
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        7470    60002743+   7  HPFS/NTFS
/dev/sda2            7477       36987   237047107+   f  W95 Ext'd (LBA)
/dev/sda3           36988       38914    15471960   12  Compaq diagnostics
/dev/sda4            7471        7476       48195   83  Linux
/dev/sda5           33178       36987    30603793+   7  HPFS/NTFS
/dev/sda6            7477       13163    45680640+  83  Linux
/dev/sda7           13696       21787    64998958+  83  Linux
/dev/sda8           21788       33177    91490143+  83  Linux
Your sda6 commences at 7477th cylinder which is perfectly matching the starting cylinder of the extended partition. sda6 ends at the 13163th cylinder while your sda7 kicks off at the 13696th cylinder. Thus there is a gap of 13696-13163=533 cylinders of dead space. As one cylinder in your hard disk has 255 head and 63 sectors and each sector has 512 bytes therefore the dead space is 533x255x63x512=4,384,074,240 bytes or 4.384 GB or 4.083 GiB (divided 3 times by 1024)matching exactly what has been reported in gparted.

If you resize sda6 you simply drag its boundary to the right tight against sda7 and you should find the end cylinder changed to 13698th cylinder. There is no need to fiddle with ending sector because the smallest unit in fdisk is one cylinder as I mentioned earlier.

Last edited by saikee; 07-04-2010 at 06:28 PM.
 
Old 07-04-2010, 07:05 PM   #12
nusch
LQ Newbie
 
Registered: Feb 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by saikee View Post
If you resize sda6 you simply drag its boundary to the right tight against sda7 and you should find the end cylinder changed to 13698th cylinder. There is no need to fiddle with ending sector because the smallest unit in fdisk is one cylinder as I mentioned earlier.
Maybe it's all about versions of software in fdisk you may use c and u options and smallest unit is sector. I tried to resize partition with parted but it again bugged about unsupported partition flags set what means it read boot block from where it should't, I bet from begining of cylinder not exact CHS position.

Gparted can't work because it run fsck before any operation and in current partition setup it shows:
Code:
root@ubuntu:/media# LANG="en" /dev/sda6
-su: /dev/sda6: Permission denied
root@ubuntu:/media# LANG="en" fsck /dev/sda6
fsck from util-linux-ng 2.17.2
e2fsck 1.41.11 (14-Mar-2010)
The filesystem size (according to the superblock) is 11420160 blocks
The physical size of the device is 11399680 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? yes

root@ubuntu:/media# expr 11420160 - 11399680
20480
So I have current end of sda6 - 211463346, have the offset 20480 so all I need is to substitute 211463346 by 211627186 but couldn't found a tool which do this without any additional actions..
 
Old 07-04-2010, 07:42 PM   #13
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
I agree that in fdisk one can go into CHS details but I am not sure if it is wise to start and end a partition smaller than a cylinder.

If you have a problem of resizing sda6 it is possible that you are mounting it for use. If you download gparted or Parted Magic and run it as a Live CD you should find the behaviour a bit different.
 
Old 07-04-2010, 08:55 PM   #14
nusch
LQ Newbie
 
Registered: Feb 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by saikee View Post
I agree that in fdisk one can go into CHS details but I am not sure if it is wise to start and end a partition smaller than a cylinder.
Where I said that ? I have partition which starts and ends in the middle of cylinder but not the same cylinder. My data already are in such setup. I need to make partition table match ALREADY moved data. If my data will be again accessible I could do anything with aligning to cylinders etc with any tool.

Quote:
If you have a problem of resizing sda6 it is possible that you are mounting it for use. If you download gparted or Parted Magic and run it as a Live CD you should find the behaviour a bit different.
I'm on live cd all the time and the only mounted physical device is my pendrive.
 
Old 07-05-2010, 02:31 AM   #15
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
According to the info provided your hard disk has two empty areas; one after sda6 and the other after sda5.

The sda6 is empty so there is no data inside.

The sda5 is at the end of the extended partition sda2 which currently being complained by cfdisk which refuses to mount it citing sda2 has the end straddling a partial cylinder.

gparted and fdisk both report the disk is healthy.

I have mentioned MS Windows can format a NTFS partition leaving space either at the beginning or the end unless the formatting is pre-executed in Linux, say using "mkfs.ntfs".

I have run disks with empty spaces for years and never had an issue but cfdisk did refuse to mount it saying something similar. I had also Solaris and BSD systems that like to start their partition at a partial cylinder too.

Unless the operating system is having difficulty in assessing the partition the untidiness in the partition table isn't a broken hard disk to me. If you want to get rid of this untidiness in future use one Linux tool for partitioning and do all the formatting in Linux too.
 
  


Reply

Tags
mbr, parted


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel unable re-read partition table on disks when i start gparted penduleum Fedora 6 04-20-2010 06:56 AM
Partition Table Help, SATA HD, TestDisk, and Gparted ap0091 Linux - Newbie 2 03-08-2010 08:47 AM
Invalid partition table for swap partition that I moved with Gparted keith9e Linux - Hardware 16 02-10-2010 12:21 PM
partition table broken ? dmedhora Linux - Hardware 3 11-26-2007 05:28 PM
gparted destroyed partition table orionp31 Linux - Newbie 5 02-04-2007 10:33 PM


All times are GMT -5. The time now is 11:24 PM.

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