Disk repair...

I’m very much aware about how much of a mess my partition system is, see for yourself:

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: 0x1c501c4f

Device Boot Start End Blocks Id System
/dev/sda1 * 1 14 104816 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 1914 38912 297190401 f W95 Ext’d (LBA)
Partition 2 does not end on cylinder boundary.
/dev/sda3 14 1729 13780992 83 Linux
/dev/sda4 1729 1914 1481728 82 Linux swap / Solaris
/dev/sda5 1914 8543 53248000 7 HPFS/NTFS
/dev/sda6 8543 21035 100342784 7 HPFS/NTFS
/dev/sda7 21036 38912 143596971 7 HPFS/NTFS

So…

As someone suggested, and i’ve been planing to do this anyway, i need to format it completely, and i’ve been directed to this forum for help. When the new SUSE comes out (6 days i guess), i plan to delete everything including windows so i can fix the disk…

Now, my problem. That’s not my disk, and i’m not the one who partitioned it in the first place, and i don’t know the tool used or anything. I just know it gave me hell of a problems when trying to fix it.

The first primary partition is logical, 15 GB, it’s where i have SUSE now, but i can’t combine it with the rest of the disk that’s part of the “extended” partition, where windows is. I tried that when i was installing win7 (win7’s partitioner) and it didn’t work.

Now, when i format everything, i’d like to get rid of that “extended” part, so i can join everything in one large chunk of unpartitioned space, and then allocate partitions as i see fit. So i’m asking for help, cause i wanna do it properly, and if someone could direct me on how to proceed, or tell me eventual problems that might occur. It’s not my first time formatting disks and making partitions, but this one is kinda messed up, Partition Magic found some errors, and i couldn’t set it up properly.

When i tried, i nearly “lost” one partition because when i deleted it, windows and everything else read it as “free space” rather than unpartitioned space, but i managed to fix that, but as you see, not very well…

If you need some more info, or anything just ask. I’m not going to do that right away, i need my computer to function for another week, but after that, everything must go! :wink:

i need to format it completely
OK. But are you trying to preserve any data? I can’t figure it out from what you say.

But to do: i need to format it completely
Is easy with Parted Magic

The first primary partition is logical
What??
The FIRST partition is sda1 and it’s a Primary Partition - but it can’t be logical as well.
Logical Partitions are within the Extended space.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

If you backup all your data and you want to delete all the partition
and create new ones, I suggest you to use YaST during the system install


VampirD

Microsoft Windows is like air conditioning
Stops working when you open a window.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAkw3FJcACgkQJQ+0ABWtaVm+pgCfYrdUO6p4t4LhS6KyCcW1exdn
bhsAoIjwHDsFmIjSa5g5tM9cUgczXVnM
=Ip9k
-----END PGP SIGNATURE-----

Partition 1, 3 and 4 are Primary partitions.
Partition 2 is an Extended partition contaning the Logical partitions 5, 6 and 7.

Might not be very logical to make it like that, but there is no real problem here. But when you plan to start a complete new partitioning on your next openSUSE install, without preserving anything (or preserving what you need to some other media), the only thing you have to do during install to choose for expert partitioning and then somewhere there you can choose: Use the whole disk (or similar wording). When you choose that, the install partitioning software will forget about what is on the disk and propose you a complete new 3 partition solution (Swap, / and /home).

Another option is to use the ‘Erase disk’ tool in PartedMagic. It writes zeros all over the drive, erasing everything regardless of whatever partitions are on it. Or you could do what’s suggested above.

No, i’ll back up my important data to an external Hard Drive, so i can delete everything…

Then i must have mixed it up… Sorry…

But that will create Linux partitions, right? Cause i need Win7 too… But i aim to give Linux more space too (15 GB is too small), so that’s one of the reasons i’ll be formatting the drive. Can i use Parted Magic or something to create all the partitions i’ll need, then use Win7 install just to install it? I’ll probably install Win7 first cause Linux reckognizes it and it’s easyer for me.

Does this mean that, effectively, the whole disk becomes unpartitioned space? Cause if so, this could be good, if primary and extended thing start giving me a headache… :slight_smile:

Just boot Parted Magic and you can delete all partitions with the Partition editor
Using Parted Magic an Introduction

http://apum9q.bay.livefilestore.com/y1pdDPrYr-EAFASrtU3uQpgwD3ZwnVWRQ73tkBvOmB5QmIDPqPLfZfHttzL7TxU_cRcet9Wu_qcPCkUbZbrH3BnO3HEiI9O1FIA/term%20and%20parted.png

It’s totally a walk in the park!

But that will create Linux partitions, right? Cause i need Win7 too… But i aim to give Linux more space too (15 GB is too small), so that’s one of the reasons i’ll be formatting the drive. Can i use Parted Magic or something to create all the partitions i’ll need, then use Win7 install just to install it? I’ll probably install Win7 first cause Linux reckognizes it and it’s easyer for me.

Some misunderstandings here.

  1. it will propose those three partitions with an adequate Swap, a / of about 20GB (not 15GB) and the rest for /home. They will of course get the appropriate types.
  2. you can then alter the proposal, e.g. by changing the size (upper address) of /home and adding another partition after it. I never did this, but I bet you can tell there to make this partition of type NTFS. You will not be able to create an NTFS (or other Windows) file system om it. You can do that later with running a Windows OS.

In any case, if you do it pre-install using a tool like Parted Magic, or during install using the partitioner there, it comes all down to the same. Create a partitioning schema of your choice, give the partitions the correct type. Eventualy (May be PartedMagic can do this) create ext4 file systems on the partitions due to become / and /home and NTFS on the other one.

It is more about what you want. The doing is then easy enough.

Generally Window boot likes to be the first partition and a primary one at that. Note the newer MS os’s may be more flexible but I’d not count on that. If you plan dual boot then you should wipe the disk install Winders first leaving the room to install any Linux. Then simply Install the Linux OS. It will use the unpartitioned space. The key here s to wipe the disk with something like parted magic. Note also you will need a real windows disk a disk image/rescue disk typically provided by the computer maker may simply take all the disk. Windows is not very friendly unless you hand over more money.

Windows need primary partition. Just over write the disk. Writing 0’s will age it unneccessary and if in case your back up fails you can retirve the old partitions.

Yes that’s exactly what it does. But you should resort to this only if the primary and extended partitions start getting unmanageable. It practically nukes away everything on the disk.

As someone suggested, and i’ve been planing to do this anyway, i need to format it completely, and i’ve been directed to this forum for help. When the new SUSE comes out (6 days i guess), i plan to delete everything including windows so i can fix the disk…

I think that someone is me, I asked you about the partitioning tool used, That was because of the start and end parameters on the fdisk -l output,
I have seen situations where attempted partitioning changes came to grief starting from similar fdisk output.
While we have some very knowledgeable people here on this subject and thread like, gogalthorp, caf4926 and hcvv, Well are my concerns about using parted for example for altering partitions created by tools that give an fdisk -l with partitions starting and ending differently to what parted would produce .

Now, when i format everything, i’d like to get rid of that “extended” part, so i can join everything in one large chunk of unpartitioned space, and then allocate partitions as i see fit. So i’m asking for help, cause i wanna do it properly, and if someone could direct me on how to proceed, or tell me eventual problems that might occur. It’s not my first time formatting disks and making partitions, but this one is kinda messed up, Partition Magic found some errors, and i couldn’t set it up properly.

When i tried, i nearly “lost” one partition because when i deleted it, windows and everything else read it as “free space” rather than unpartitioned space, but i managed to fix that, but as you see, not very well…

About the first part of this quote, to allocate partitions as you see fit, I think that will mean deleting all partitions and creating new, this means a back up of everything,(including your windows OS, if you want it)

I actually would put Linux on an extended primary partition,which has three logical partitions, one for swap, one for /,and one for,/home.
Linux can easily read windows, but windows can’t handle Linux.
I would use windows7 install disk to partition for the windows partitions ONLY, once that is out of the way, I would use parted magic for all else.

Do you know the existence of: SDB:Basics of partitions, filesystems, mount points - openSUSE?

When, as in your case, you are not interested in keeping anything of the old partitioning (after you have saved the files you want to), do not pay any attention anymore about the old partitioning. I say this because you seem to be concerned about “to get rid of that “extended” part”. There is but one partition table on a special place on the disk. When you overwrite that with a new partition table, that is it. Using fdisk, you can e.g. use the o command to start with an empty table. Then you build up from there. That is all done in memory. And when everything is at you whish, you give the *w *command. From that point on you have a new partition table, the old one being a thing of the past. Other tools do basicaly the same.

df -h 
# or/and 
mount 

would be helpful. As I see it, you want to decrease the 143Gb for NTFS and add more space for Linux?

Regardless, I tend to agree with caf4926 to start the process early by backing up (Win and Linux personal data, hidden files, /etc, /home), then deleting, resizing (if desired) and installing your Win.

You can use YaST -> Partition, Gparted LiveCD, Partition Magic, Knoppix to delete and resize only the NTFS partition or the complete hard drive as others have suggested. It’s safer to assume NTFS is still required to be in the 1st Partition, so, re-installing it before OpenSuse 11.3 is fine. The only caveat is you would have re-install Grub to restore Dual boot Win and Linux.

I’m 99% certain that you can manually assign and size your partitions as you install OpenSuse 11.3. During the install, you can use partition based -> Edit the partitions -> check the box for use custom settings to allocate your partitions rather than use either LVM or the suggested partitioning.

I like / (root) and swap as partitions separate from /home partition generally / (root) > 5Gb and /home largest depending on free space, SWAP about 512Mb-1Gb.

Yep! :good:

Thx for the replys everyone… Still 2 days till i delete everything… :stuck_out_tongue:
I allready set up my backup, now i just need to wait till new SUSE comes and till i can spare a day of not needing my computer for anything…

How much space do i need for home partition and swap partition? I have 1.5 GB DDR, and i think i read somewhere on SUSE help that it should be same or double the amount of RAM… :sarcastic: And will 5 GB as tararpharazon suggested be enough for root? And this time i’m gonna set up /home to a different partition. Now it was on the sam e as / partition…

I’ll install Win7 first and let you know how it went after i set up everything! :smiley:

Good work. Actually, I had suggested larger “>” than 5Gb.

I don’t recall how much you free space you had for OpenSuse 11.3 but I consider a 5Gb / (root) mostly for a static Linux system, ie, you won’t be installing lots of software, running servers, developing applications, virtual machines and/or you don’t have much free space.

If you do plan on running servers, development, adding software and lots of space then 10Gb would be better. This is because the / (root) partition usually contains the folders /var /tmp /usr which are the default storage areas for server space, packages and temporary work space.

ls -hal /var/lib

How much space do i need for home partition and swap partition? I have 1.5 GB DDR, and i think i read somewhere on SUSE help that it should be same or double the amount of RAM… And will 5 GB as tararpharazon suggested be enough for root? And this time i’m gonna set up /home to a different partition. Now it was on the sam e as / partition…

Having a 320 GB disk, first look at what you want to reserve for windows, then tell us how many GB you will have left.

On 07/12/2010 11:26 AM, Vepar wrote:
>
> dvhenry Wrote:
>> I think that someone is me.
>
> Yep! :good:
>
> Thx for the replys everyone… Still 2 days till i delete everything…
> :stuck_out_tongue:
> I allready set up my backup, now i just need to wait till new SUSE
> comes and till i can spare a day of not needing my computer for
> anything…
>
> How much space do i need for home partition and swap partition? I have
> 1.5 GB DDR, and i think i read somewhere on SUSE help that it should be
> same or double the amount of RAM… :sarcastic: And will 5 GB as
> tararpharazon suggested be enough for root? And this time i’m gonna set
> up /home to a different partition. Now it was on the sam e as /
> partition…
>
> I’ll install Win7 first and let you know how it went after i set up
> everything! :smiley:

The sizes depend on what you do. My root partition of 8 GB is 59% full, thus 5
GB would not be enough. My /home of 100 GB is 89% full. I need to do some house
cleaning as there are a lot of 11.3 MX iso files there, but I still need a lot
in /home.

A swap partition of 2-3 GB should be enough. Actually, you are not likely to do
much swapping with 1.5 GB RAM. One of my systems only has 367 MB, and it rarely
swaps. Of course, I don’t push it as hard as I do the dual-core laptop with 3 GB
RAM.

You can use

swapon -s 

to see your current swap file usage. I don’t recall seeing swap file using more than 5% of a swap file in OS 11.1 or 11.2.

My Box #1 has a 1.5Gb swap file, Box #2 has a 512Mb swap file.

Gnome and KDE GUI system monitors also show swap file usage.