LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-21-2009, 10:17 AM   #1
Raynus
Member
 
Registered: Apr 2007
Location: BKK, Thailand
Distribution: Gentoo 10.1
Posts: 112
Blog Entries: 2

Rep: Reputation: 15
Unpartition hdd in gparted?


I's trying to repartition yesteday
(there're windows XP and Slackware 12.1 on my system)

after the gparted-livecd load up

it showned that my hdd was "unpartition"

its odd that i'm able to access my linux & xp normally


(The MBR was occupide by xp ) by entering command in
gpart's grub command promp



PHP Code:
omitting empty partition (5)

Disk /dev/hda80.0 GB80026361856 bytes
255 heads
63 sectors/track9729 cylinders
Units 
cylinders of 16065 512 8225280 bytes
Disk identifier
0xd924d924

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1        2124    17060998+  83  Linux
/dev/hda2            2125        9729    61087162+   f  W95 Ext'd (LBA)
/dev/hda3   *        3212        7399    33640110    b  W95 FAT32
/dev/hda5            2125        3211     8731264+  83  Linux
/dev/hda6            7400        7610     1694826   82  Linux swap
/dev/hda7            7611        9728    17012803+   7  HPFS/NTFS 


cfdisk /dev/hda
shown exactly same to fdisk -l output as above


any ideas :P ?

Thx in advance

Last edited by Raynus; 02-21-2009 at 11:04 AM.
 
Old 02-21-2009, 10:26 AM   #2
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
did you select the correct device?

or use the parted magic cd
 
Old 02-21-2009, 10:30 AM   #3
Raynus
Member
 
Registered: Apr 2007
Location: BKK, Thailand
Distribution: Gentoo 10.1
Posts: 112

Original Poster
Blog Entries: 2

Rep: Reputation: 15
i already try gpart 0.3 and 0.4
and there's only one device in the list :P
 
Old 02-21-2009, 10:33 AM   #4
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
Try the boot time option

all-generic-ide

(possibly the hdd drivers are not loaded)

the parted magic cd is much better
 
Old 02-21-2009, 11:22 AM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
I had a similar problem with gparted, that I wanted to use to erase some (windows) partitions and make a more simple layout for Linux: gparted didn't see any partition either. I founded a little recovery tool in the CD (can't remember its name) with which I could half recover and hopefully I could save every useful content but I ended up erasing everything and re-partitioning with cfdisk.

My guess --- only a guess -- is that when you have many partitions, among them some secondary ones, that can cause problems -- which ones exactly, I don't know unfortunately.

So my only advice is: first save everything you could miss
 
Old 02-21-2009, 07:59 PM   #6
Raynus
Member
 
Registered: Apr 2007
Location: BKK, Thailand
Distribution: Gentoo 10.1
Posts: 112

Original Poster
Blog Entries: 2

Rep: Reputation: 15
Quote:
Originally Posted by amani View Post
Try the boot time option

all-generic-ide

(possibly the hdd drivers are not loaded)
still no used :P
 
Old 02-21-2009, 09:07 PM   #7
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
Quote:
Originally Posted by Raynus View Post
Code:
omitting empty partition (5)

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

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1        2124    17060998+  83  Linux
/dev/hda2            2125        9729    61087162+   f  W95 Ext'd (LBA)
/dev/hda3   *        3212        7399    33640110    b  W95 FAT32
/dev/hda5            2125        3211     8731264+  83  Linux
/dev/hda6            7400        7610     1694826   82  Linux swap
/dev/hda7            7611        9728    17012803+   7  HPFS/NTFS
The problem is that your partition table is corrupt right now; your primary hda3 partition is inside of your hda2 extended partition, thus hda3 should be a logical partition instead. Did you at some point use a Windows partition program on the drive? If so, that would probably explain how it happened, because I've seen exactly this type of problem occur with some Windows partition programs that can't seem to deal with drives that have been partitioned using linux CHS geometry (255 heads, 63 sectors/track). If you would like help fixing your partition table, how about posting:
Code:
sudo fdisk -lu
sudo sfdisk -d
And we can work from there.

Last edited by CJS; 02-21-2009 at 09:19 PM.
 
Old 02-21-2009, 10:54 PM   #8
Raynus
Member
 
Registered: Apr 2007
Location: BKK, Thailand
Distribution: Gentoo 10.1
Posts: 112

Original Poster
Blog Entries: 2

Rep: Reputation: 15
Thanks you CJS

its true that after installing xp
its scan disk trying to scan my linux ext3 partition
and return a nasty error out there


fdisk -lu

omitting empty partition (5)

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xd924d924

Device Boot Start End Blocks Id System
/dev/hda1 63 34122059 17060998+ 83 Linux
/dev/hda2 34122060 156296384 61087162+ f W95 Ext'd (LBA)
/dev/hda3 * 51584715 118864934 33640110 b W95 FAT32
/dev/hda5 34122186 51584714 8731264+ 83 Linux
/dev/hda6 118864998 122254649 1694826 82 Linux swap
/dev/hda7 122254713 156280319 17012803+ 7 HPFS/NTFS

Last edited by Raynus; 02-21-2009 at 10:57 PM.
 
Old 02-21-2009, 10:54 PM   #9
Raynus
Member
 
Registered: Apr 2007
Location: BKK, Thailand
Distribution: Gentoo 10.1
Posts: 112

Original Poster
Blog Entries: 2

Rep: Reputation: 15
sfdisk -d

# partition table of /dev/hda
unit: sectors

/dev/hda1 : start= 63, size= 34121997, Id=83
/dev/hda2 : start= 34122060, size=122174325, Id= f
/dev/hda3 : start= 51584715, size= 67280220, Id= b, bootable
/dev/hda4 : start= 0, size= 0, Id= 0
/dev/hda5 : start= 34122186, size= 17462529, Id=83
/dev/hda6 : start=118864998, size= 3389652, Id=82
/dev/hda7 : start=122254713, size= 34025607, Id= 7
 
Old 02-22-2009, 07:53 AM   #10
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
Quote:
Originally Posted by Raynus View Post
Code:
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xd924d924

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1              63    34122059    17060998+  83  Linux
/dev/hda2        34122060   156296384    61087162+   f  W95 Ext'd (LBA)
/dev/hda3   *    51584715   118864934    33640110    b  W95 FAT32
/dev/hda5        34122186    51584714     8731264+  83  Linux
/dev/hda6       118864998   122254649     1694826   82  Linux swap
/dev/hda7       122254713   156280319    17012803+   7  HPFS/NTFS
As highlighted in blue above, your hda3 FAT partition starts at the sector immediately following your hda5 Linux partition; that means we can't make hda3 a logical partition, because there needs to be free sectors (usually at least 63 sectors, or one track) before the partition where the EBR (Extended Boot Record) can reside. Also, since the hda3 partition physically lies between hda5 and hda6, if we let hda3 stay as a primary partition, we will also have to make hda5 a primary partition since we can't break up an extended partition with a primary partition in the middle. The disadvantage of doing that is you will have used up all your primary partitions. The other alternative is if you want to resize your hda5 partition by just 63 sectors at the end, then we could make both hda3 and hda5 logical partitions; then you would still have two primary partitions available. So I guess the main question is, what partition changes were you originally planning on making? What partition scheme do you ultimately want to end up with? Please be as specific as possible.

Last edited by CJS; 02-22-2009 at 07:54 AM.
 
Old 02-22-2009, 08:10 AM   #11
Raynus
Member
 
Registered: Apr 2007
Location: BKK, Thailand
Distribution: Gentoo 10.1
Posts: 112

Original Poster
Blog Entries: 2

Rep: Reputation: 15
This is the comeout expected

(The planning was only to resize hda5 from 8gb to 12 gb :P)

- Linux Partition (Ext 3) ~16-17 Gb ---- this is hda1
- Linux Swap ~ 2 Gb ---- this is hda6
- Windows XP (NTFS) ~ 16-17Gb ---- this is hda7
- Data Backup (vfat/fat32) ~ 29 Gb ---- this is hda3
- Another (Ext3) (for building purpose) ~12 Gb ----this is hda5

Last edited by Raynus; 02-22-2009 at 08:12 AM.
 
Old 02-22-2009, 08:28 AM   #12
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
OK, we'll go ahead and let hda3 stay as a primary partition, and also convert hda5 into a primary partition. How about downloading the attached "partition_table.txt" file to your desktop (can be a Live CD or your Linux install), and then do:
Code:
su -
sfdisk --no-reread -f /dev/hda < /home/<username>/Desktop/partition_table.txt
Replace <username> with your user name, and please post the output of that command. Next reboot to your Live CD, and post the output of:
Code:
su -
fdisk -lu
parted /dev/hda print
If the parted command does not return any errors, you should be able to use gparted to resize your partitions as you wish now. After that you will have to reinstall Grub (assuming you are using Grub as your boot loader), which you can do with:
Code:
su -
grub
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
Please post the output, and let me know how it goes or if you run into problems.
Attached Files
File Type: txt partition_table.txt (361 Bytes, 19 views)

Last edited by CJS; 02-22-2009 at 08:30 AM.
 
Old 02-22-2009, 08:45 AM   #13
Raynus
Member
 
Registered: Apr 2007
Location: BKK, Thailand
Distribution: Gentoo 10.1
Posts: 112

Original Poster
Blog Entries: 2

Rep: Reputation: 15
Out put from sfdisk

PHP Code:
ition_table.txt 

Disk 
/dev/hda9729 cylinders255 heads63 sectors/track
Old situation
:                                            
Units cylinders of 8225280 bytesblocks of 1024 bytescounting from 0

   Device Boot Start     End   
#cyls    #blocks   Id  System
/dev/hda1          0+   2123    2124-  17060998+  83  Linux 
/dev/hda2       2124    9728    7605   61087162+   f  W95 Ext'd (LBA)
/dev/hda3   *   3211    7398    4188   33640110    b  W95 FAT32      
/dev/hda4          0       -       0          0    0  Empty          
/dev/hda5       2124+   3210    1087-   8731264+  83  Linux          
/dev/hda6       7399+   7609     211-   1694826   82  Linux swap     
/dev/hda7       7610+   9727    2118-  17012803+   7  HPFS/NTFS      
New situation:                                                       
Units = sectors of 512 bytes, counting from 0                        

   Device Boot    Start       End   #sectors  Id  System
/dev/hda1            63  34122059   34121997  83  Linux 
/dev/hda2      34122186  51584714   17462529  83  Linux 
/dev/hda3   *  51584715 118864934   67280220   b  W95 FAT32
/dev/hda4     118864935 156280319   37415385   5  Extended 
/dev/hda5     118864998 122254649    3389652  82  Linux swap
/dev/hda6     122254713 156280319   34025607   7  HPFS/NTFS 
Warning: partition 2 does not start at a cylinder boundary  
Successfully wrote the new partition table                  

Re-reading the partition table ...
BLKRRPART: Device or resource busy
The command to re-read the partition table failed
Reboot your system now, before using mkfs        

If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).) 
 
Old 02-22-2009, 08:53 AM   #14
Raynus
Member
 
Registered: Apr 2007
Location: BKK, Thailand
Distribution: Gentoo 10.1
Posts: 112

Original Poster
Blog Entries: 2

Rep: Reputation: 15
Now the Gparted can detect my Partition table
and display correctly

PHP Code:
Disk /dev/hda80.0 GB80026361856 bytes
255 heads
63 sectors/track9729 cylinderstotal 156301488 sectors
Units 
sectors of 1 512 512 bytes
Disk identifier
0xd924d924

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1              63    34122059    17060998+  83  Linux
/dev/hda2        34122186    51584714     8731264+  83  Linux
/dev/hda3   *    51584715   118864934    33640110    b  W95 FAT32
/dev/hda4       118864935   156280319    18707692+   5  Extended
/dev/hda5       118864998   122254649     1694826   82  Linux swap
/dev/hda6       122254713   156280319    17012803+   7  HPFS/NTFS 

Last edited by Raynus; 02-22-2009 at 08:54 AM.
 
Old 02-22-2009, 10:37 AM   #15
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
Glad to hear that worked OK; hope your repartitioning goes smoothly now without any problems.
 
  


Reply

Tags
partition



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
Cancelled formatting to ext3 in GParted while it was going, think have hosed the HDD chromei386 Linux - Hardware 14 08-05-2012 03:16 PM
320gb HDD showing up as 80gb after using GParted jlebar Linux - Hardware 10 05-12-2009 09:42 AM
how to use unpartition space lalji Linux - Newbie 2 01-14-2009 06:01 AM
Gparted jus71n742 Linux - Hardware 6 11-19-2008 12:39 AM
Gparted ?? mickeyboa Fedora 5 07-13-2007 11:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:55 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration