# Solved: how do I format a hard disc partition to ext4?



## aannoton

Hello, I have both Windows Vista and Kubuntu 9.10 and I have made a partition with Windows but not formatted it yet. How can I format it to ext4 so I can use it with Kubuntu?


----------



## Elvandil

Boot up a Linux live CD that supports it and use gparted or similar. Or use a bootable version of a partitioner.


----------



## itsjusme

aannoton said:


> Hello, I have both Windows Vista and Kubuntu 9.10 and I have made a partition with Windows but not formatted it yet. How can I format it to ext4 so I can use it with Kubuntu?


Kubuntu and Ubuntu both have the capability of formatting to ext4 with the Gparted partitioning tool with version 9.04 and up. From the installed Kubuntu desktop or live cd, go to : 
System>Administration>Gparted . It will read your partitions, select the one you want to format by highlighting it, selecting: Partition from the toolbar at the top, and select>Format to. Or you can right click the partition in the list and select : Format to from that menu. Puppy Linux version 4.3 and up will also format to ext4 with Gparted. I`m sure there are other versions that will, thats just the two i use most.


----------



## lotuseclat79

aannoton said:


> Hello, I have both Windows Vista and Kubuntu 9.10 and I have made a partition with Windows but not formatted it yet. How can I format it to ext4 so I can use it with Kubuntu?


Hi aannoton,

Welcome to TSG!

I found your question unique enough to draw the distinction between formatting a disk (there are two levels), and a partition with regard to dual-booting.

Ref: Hard Disk Basics.
1. Low-Level Formatting
This type of formatting writes normally zeros on the hard disk thus over-writing everything on the HDD and it also destroys any partitions. You should get a low-level formatting utility or a zero-fill utility from the HDD manufacturers' web site.

Low-level formatting is the process of outlining the positions of the tracks and sectors on the hard disk, and writing the control structures that define where the tracks and sectors are. This is often called a "true" formatting operation, because it really creates the physical format that defines where the data is stored on the disk. The first time that a low-level format ("LLF") is performed on a hard disk, the disk's platters start out empty. That's the last time the platters will be empty for the life of the drive. If an LLF is done on a disk with data on it already, the data is permanently erased and lost.

2. High-Level Formatting
This type of formatting prepares the HDD for an Operating System.

After low-level formatting is completed, the disk is only with tracks and sectors and nothing written on them. High-level formatting is the process of writing the file system structures on the disk that let the disk been used for storing programs and data. If you are using DOS, for example, the DOS FORMAT command performs this work, writing such structures as the master boot record and file allocation tables to the disk. High-level formatting is done after the hard disk has been partitioned, even if only one partition is to be used.

Note: If you only have one disk, and desire a dual-boot setup, it is useful to have two partitions, i.e. one for Windows and one for Linux - i.e. one would not reformat a Windows partition in order to install Linux (and retain the dual-boot setup) unless one is going to trash the Windows partition to no longer use it (after saving any important data, of course).

-- Tom


----------



## saikee

Two commands as the survival kit

(1) Ls /sbin/mk* produces


Code:


[email protected]:~$ ls /sbin/mk*
/sbin/mkdosfs   /sbin/mkfs.cramfs  /sbin/mkfs.ext4dev   /sbin/mkfs.vfat
/sbin/mke2fs    /sbin/mkfs.ext2    /sbin/mkfs.minix     /sbin/mkreiserfs
/sbin/mkfs      /sbin/mkfs.ext3    /sbin/mkfs.msdos     /sbin/mkswap
/sbin/mkfs.bfs [B][COLOR="Red"] /sbin/mkfs.ext4[/COLOR][/B]    /sbin/mkfs.reiserfs

clearly the command is to make filing system ext4 or mkfs.ext4. So how to use it is

(2) Man mkfs.ext4 to show the instruction how to use it.

It is no different to mkfs.ext2 or mkfs.ext2.

Example :


Code:


mkfs.ext4 -j /dev/sda3

By the way I am not aware Windows can create a partition in Linux. A Linux partition should always be created with Linux tools and has a Type No. 83. Vista can only create Fat32 (Type c) or NTFS (Type 7) partitions.


----------



## aannoton

Thank you guys; it was much easier than I imagined since I am new to Kubuntu and I just hadn't noticed "GParted". Now, though, I have another problem, I don't know if it should be a new topic.

I created an ext4 partition but I can't save anything on it nor create any new folder. When I enter it, it only has the Lost and Found folder and that's it.


----------



## saikee

You need to be in root or the owner to write on the partition in Kubuntu.

Try


Code:


sudo su

then supply the password and then copy a file into that partition.

You will learn Linux a lot better with a terminal.


----------



## aannoton

Ok thank you very much. I have started learning the basics on console commands!


----------

