Formatting Windows partitions for Linux

Hi Forum,

I have been dual-booting Vista and openSUSE 11.2 until my SUSE install is fully functional and now and I want rid of Vista and to reclaim the space for Linux.

fdisk -l

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x28000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          31      248976   de  Dell Utility
/dev/sda2              32         293     2097152    7  HPFS/NTFS
Partition 2 does not end on cylinder boundary.
/dev/sda3             293       25859   205365244    7  HPFS/NTFS
/dev/sda4   *       25860       38913   104856255    f  W95 Ext'd (LBA)
/dev/sda5           25860       26121     2104483+  82  Linux swap / Solaris
/dev/sda6           26122       28732    20972826   83  Linux
/dev/sda7           28733       38913    81778851   83  Linux

sda2 and sda3 are the Vista partitions. sda2 is a recovery partition and sda3 is the main partition.

All data is safely copied from sda3 and now I want to reformat them for SUSE. I not bothered about partition resizing i.e. I am happy to just have the sda2/sda3 space available to SUSE and mount them somewhere.

  1. Do I need to do anything about the boot table first or can I just reformat sda2 & sda3?

  2. How should I format sda2/sda3? I’m guessing I need to unmount them and then format. Should I use ext4 or something else? Which command/tool should I use?

Many thanks indeed for your help…

It’s not a simple as all that. And I think you might find the details of what I mean rather perplexing.
I think you might be better leaving well alone.
But the simple solution, if you just need more space is to format the main windows partition and use it as a store partition. You can format it in Yast - Partitioner. It must be unmounted first. And be careful.

Thanks for the quick reply.

I only want the space to be available to Linux for installing software and storing data so reformatting using Yast - Partitioner should be fine I think?

However, please let me have all the details you think I’ll find perplexing - I’m happy to read all info! :slight_smile:

On reflection my Q1 was probably not relevant since even if I format sda3 the Vista entry in the boot table can remain and it will proaobly just complain that it can’t find an OS if I select Vista at boot-time…

As sda4 is your boot partition, there should not be a problem with creating a new fs on sda3.

Because you will loose your Vista you should remove the boot entry for it: Yast > System > Bootloader.

When your Vista partition is mounted on boot, that should be removed also. Unmount the partition and then remove te line from /etc/fstab (when you want help with this please show us* cat /etc/fstab*).

Then you can use YaST > System > Partitioning. I should make it ext4, let it mount by id (as the others are). Mount point is up to you, it depends very much on what you want to use the disk space for.

Here is my fstab:

cat /etc/fstab
/dev/disk/by-id/ata-WDC_WD3200BJKT-75F4T0_WD-WX80A69L1519-part5 swap swap defaults 0 0
/dev/disk/by-id/ata-WDC_WD3200BJKT-75F4T0_WD-WX80A69L1519-part6 / ext4 acl,user_xattr 1 1
/dev/disk/by-id/ata-WDC_WD3200BJKT-75F4T0_WD-WX80A69L1519-part7 /home ext4 acl,user_xattr 1 2
/dev/disk/by-id/ata-WDC_WD3200BJKT-75F4T0_WD-WX80A69L1519-part2 /windows/C ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_GB.UTF-8 0 0
/dev/disk/by-id/ata-WDC_WD3200BJKT-75F4T0_WD-WX80A69L1519-part3 /windows/D ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_GB.UTF-8 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0

So, my actions should be (in this order):

  1. unmount /windows/D
  2. Remove the relevant line in fstab.
  3. Use YaST > System > Partitioning to format sda3 in ext4 format mounting by id and with my choice of mount point.
  4. Remove boot entry for Vista in Yast > System > Bootloader.
  5. Reboot and pray…

Sound ok?

Many thanks for the fast help!

I should move 4) to the first place, but actualy it does not matter very much.

The reboot is only for testing. After you have done the other things, you are done (when you have confidence in yourself :wink: ).

Sounds like it’s going to plan so far.

When this goes flawless, we have one more Linux expert :wink:

Everything is working so many thanks for the help.

I had to take ownership of it once formatted and mounted so I could write to it but apart from that it went flawlessly. So, I guess I’m an expert now then? :wink:

Looks like it - Well done

Definitly. These are the things that teach somebody a lot. Not in the last place understanding and confidence.

Congrats :shake: