Is my partitioning ok?

Hi

Ive dualboot Win Vista and Opensuse on a 320GB hard drive. I had some partitioning problems in the past so Ive deleted a couple of partitions as per someones recommendation and reinistalled suse.

Could anyone please tell me if this set up ok?

fdisk -l

    Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1275    10240000    f  W95 Ext'd (LBA)
/dev/sda2            1275       20096   151173120    7  HPFS/NTFS
/dev/sda3           20096       20358     2111488   82  Linux swap / Solaris
/dev/sda4           20358       38914   149045248   83  Linux
/dev/sda5               1        1275    10238976   83  Linux
 

Many thanks

It looks really weird to me. There are two entries for the region of cylinders 1-1275. The first is sda1 and the second is sda5, both with the same cylinder numbering.

I suspect that sda1 is a spurious (fake) entry, an error, but it’s hard to say. If you can boot into openSUSE, please install the app “gparted” and run it and take a screenshot of the GUI display of the hard drive sda and post it here, so we can see what it looks like.

It’s far from ideal
Who on earth suggested you do it like you have? No don’t tell me.
I moved round, so you can see what I mean better

You realize sda5 is a logical partition inside sda1. The * is the boot flag, which is correct, as sda5 looks to be your / partition which is where grub info is.

Don’t worry, it will work. But if there was a choice the /, should have been Primary and /home the Logical.

Typically it would go like this:

windows - ntfs Primary
Linux / ext4 - Primary

after that it’s not critical, but Eg:

Linux - swap Primary
Extended
Linux /home ext4

I second that
+1

Carl: It sounds like there were problems when partitions were deleted, and during the deletion process the partitioning software tried valiantly to make sense of it all and finally came up with the 4-primaries arrangement where sda5 sits inside sda1, leaving sda2, 3 and 4 as the other three primaries. A really unfortunate mess but happily still working.

Sussudio: The problem will be when and if you want to make any future alteration to the partition structure that exists now.

But a screenshot of the Gparted GUI representation should clarify the true layout.

John - my friend
It’s good to see you didn’t get blown away :smiley:

I concur with your comments above

Well, fdisk shows it all, no need to use other tools to get the same. Your conclusion is to the point.
. sda1 is an extended partition, which does not take “the rest of the disk” is one normaly finds (but then somewhere from sda3 or sda4 upwards to the end);
. sda2, sda3 and sda4 are the other primary partitions (remind that an extended partition is allways one of the possible primary partitions);
. sda5 is then the only logical partition that takes all of the extended partition (sda1).

It functions of course. But as one of you said, not a good starting point for future changes.

John - my friend
It's good to see you didn't get blown away 

Hanging in there… literally LOL

This is bad. You should have / in a primary partition and not swap. I do not understand why people insist of having swap in a primary partition and end up with root in a logical partition. Do you park your car on the lowest level of the underground parking if you can park right in front of your house?

Hello again, I tried taking pictures in Gparted as suggested but Im having trouble doing so.

How do I fix this mess please? any ideas?

Thanks

Delete all the partitions EXCEPT the second one (your Windows partition). You will have free space before and after. In the free space before create a primary partition for openSUSE / . In the free space after, do what you want, either 2 primary partitions, one for /home and one for swap (2 GB), or one primary and one extended where you can create several logical (although you don’t need them).

Hmmm … it would be a 9 GB /. It’s not very big. You can do it that way:

  • in the space before:

    • create one 9 GB pimary -> / (sda1)
  • your Windows partition untouched ~ 144 GB (sda2)

  • in the space after
    create an extended partititon to include these 3 logical :

    • 2 GB swap (sda5)
    • 40 GB /usr (sda6)
    • the rest for /home (sda7)

The others won’t agree … but two Linux sysadmins never agree about partitioning anyway.

Lol, this thread made me doubt about my own partitions :slight_smile: How does this look to you all?


Disk /dev/sda: 80.0 GB, 80026361856 bayt
255 heads, 63 sectors/track, 9729 cylinders
Units = silindir of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00005db6

   Device   Boot    Start     End        Blocks        Id  System
/dev/sda1   *           1       9126    73303040    f  W95 Ext'd (LBA)
/dev/sda2            9126      9730     4846592   83  Linux
/dev/sda5               1         262     2102272   82  Linux  Swap / Solaris
/dev/sda6             263        2873    20971520   83  Linux
/dev/sda7            2874        9126    50226176   83  Linux

Equally interesting…
What is on sda2?

There was an openSuse DVD there :slight_smile: I tried to extract installation DVD there, and boot the DVD using grub (I was going to use to re-install suse whenever I want). This really didn’t worked out though. Couldn’t manage to boot from there. Now I am trying to build a LFS system (Welcome to Linux From Scratch!) in that partition, just to learn how these things are done.

Sussudio, as please_try_again foretold, I would do it a different way, with focus on putting windows first on the hard drive and then Linux after that:

  1. First I’d boot to windows and defrag the C: drive and copy all my important data to a USB backup drive
  2. I’d copy all my Linux /home directories and files to a USB drive using the “cp” software/app.
  3. Then I’d boot to a Linux live CD that has Gparted on it e.g. Partition Magic and I’d use Gparted to delete all partitions other than the NTFS partition.
  4. While in the Live CD mode, I’d then use Gparted to move the NTFS partition to the front of the hard drive and I’d make sure the boot flag was active on the NTFS drive (currently it’s “off” on the NTFS partition).
  5. If I wanted to change the space allocated to NTFS, I would do it at this point while still in Live CD mode, probably I’d shrink it so Linux had more space.
  6. Then I’d get out of Partition Magic and make sure I could boot to windows (repair if necessary using “fixboot” or “fdisk /mbr”)
  7. Then I’d install openSUSE in the vacant space after the NTFS partition and I’d watch to see that the partitioning that is suggested by the install program did not propose to muck about with the NTFS partition.
  8. Then I’d boot into the newly installed openSUSE and return the backed up /home files from the USB backup drive to the new /home partition

Yes. I like this approach.
We should just point out that the whole process can be quite time consuming :smiley:
And as with any work like this, there is an element of risk (data loss) - Hence the advice for backup.

@swerdna
I would probably do that too. Actually, I won’t since I’m not using Windows but I could imagine doing that. My suggestion was just to go around Windows without touching its partition at all (neither move nor resize). You know that #4 and specially #5 in your post include some risks of damaging the NTFS filesystem - although it should be ok in … let’s say 95% of the cases. If it’s possible, I would do the resizing if desired (step #5) under Windows. It’s a bit safer, I guess. Anyway the end result will be cleaner with the Windows partition on the front.

I would probably do that too. Actually, I won’t since I’m not using Windows but I could imagine doing that. My suggestion was just to go around Windows without touching its partition at all (neither move nor resize). You know that #4 and specially #5 in your post include some risks of damaging the NTFS filesystem - although it should be ok in … let’s say 95% of the cases. If it’s possible, I would do the resizing if desired (step #5) under Windows. It’s a bit safer, I guess. Anyway the end result will be cleaner with the Windows partition on the front.

Using Gparted to delete partitions is OK IMO; there will be no complaints from a running operating system if partitions are deleted from a live CD, not sure if windows will allow all that while windows is running. And Gparted can be used to restore the boot flag to NTFS at the same time. For these two things I like Gparted.

However where shrinking the NTFS partition is involved (that’s if OP wants to shrink it) I like the windows partitioner if windows is vista or win 7 but I like Gparted if windows is xp.

Thank you all for your great answers!

Perhaps the following would be best:

  1. Back up the entire Windows partition to an external harddrive
  2. Format internal harddrive, partition
  3. Copy over Windows and install Linux

Therefore I would like to know how to:

  1. backup windows to external hardrive without having to do this through any microsoft based programs (such as Norton Ghost, etc).

  2. how to partition the new drive (eg allocation of the SDA’s and recommended sizes, etc. I suppose that I could leave my Windows partition as it is in terms of space, meaning I dont want to resize it)

  3. how to restore the backed up Windows partition and where to actually instal Opensuse when the instalation program comes up?

Thanks guys