Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-12-2005, 08:15 AM   #1
Registered: Jan 2005
Posts: 55

Rep: Reputation: 15
Partition help

i have a partition for windows and another for linux
windows : hda1
i want to change hda1 into a ext2 filesystem.
can anyone give me a step by step guidance on how to use sfdisk?
i searched on the net and found this site
and follow its instruction to save in case i do something stupid
so i did this
sfdisk /dev/hdd -O

and got this msg

Checking that no-one is using this disk right now ...
BLKRRPART: Invalid argument

This disk is currently in use - repartitioning is probably a bad idea.
Umount all file systems, and swapoff all swap partitions on this disk.
Use the --no-reread flag to suppress this check.
Use the --force flag to overrule all checks.

so i am not very confident about carrying out this partition for i do not want to delete my other partition wrongly. someone pls help me.thks in advance!
Old 09-12-2005, 08:52 AM   #2
Registered: Jun 2005
Location: Oslo, Norway
Distribution: Slackware 11, Solaris 10, Solaris 9, Sourcemage 0.9.6
Posts: 322

Rep: Reputation: 31
First of all, are you root? If not, log in as root and:
umount /dev/hda1
Then pick a partitioning tool. I don't know anything about sfdisk, but it doesn't seem newbie friendly. Try cfdisk instead. It has a nice interface and it's easy to navigate.
Old 09-12-2005, 08:57 AM   #3
Registered: Dec 2003
Location: BC, Canada
Distribution: slack
Posts: 40

Rep: Reputation: 15
Do you want to get rid of windows? I ask this because as far as I know windows thinks it has to be the in the first partition of the first hard disc (/dev/hda1).

sfdisk /dev/hdd -O
/dev/hdd is usually your second cd drive, and can not be partitioned

I'm not sure about sfdisk as I don't use it try

man sfdisk
Old 09-13-2005, 12:04 AM   #4
Senior Member
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHL9;F1-10; CentOS4-5; DebianSarge-Squeeze
Posts: 1,151

Rep: Reputation: 46
Itachi: If you want to destroy your windows installation in hda1 and to reformat hda1 as ext2, then all you need to do is to unmount the partition and with root user privileges run:

mke2fs /dev/hda1

You probably really want an ext3, which would be:

mke2fs -j /dev/hda1

Then, fire up linux fdisk and change the hda1 partition type using fdisk command “t” to “linux” (type 83).

For more info about mke2fs, run:

man mke2fs
Old 09-13-2005, 02:02 AM   #5
Registered: Jan 2005
Posts: 55

Original Poster
Rep: Reputation: 15
Hi whathisname,
I followed ur instructions. not sure if i understood correctly but this is what i got.
can give me some more tips? pls..thks

[root@localhost Programs]# /sbin/fdisk -t /dev/hda1 83
/sbin/fdisk: invalid option -- t

Usage: fdisk [-b SSZ] [-u] DISK Change partition table
fdisk -l [-b SSZ] [-u] DISK List partition table(s)
fdisk -s PARTITION Give partition size(s) in blocks
fdisk -v Give fdisk version
Here DISK is something like /dev/hdb or /dev/sda
and PARTITION is something like /dev/hda7
-u: give Start and End in sector (instead of cylinder) units
-b 2048: (for certain MO disks) use 2048-byte sectors
Old 09-13-2005, 02:26 AM   #6
Registered: Sep 2005
Location: Canada
Distribution: openSUSE 8.0 - 11.00 Fedora 10
Posts: 71
Blog Entries: 1

Rep: Reputation: 15
As whatshisname said, you should've looked a little bit more into it, with the man mke2fs, or man :mke2fs, which you type in your address bar, or your terminal windows just in case you never used man before. And you can do the same for fdisk with man:fdisk . You use fdisk to format you partition, and then you use mke2fs to convert it to ext3 .
There is also cfdisk, what i use. (man:cfdisk)
If you just get into you terminalwindow and type cfdisk, your partitions will show up in the window, and you will have a choice to delete/convert into free space, you will see what i mean, that's if you have cfdisk, if you don't try to get it. It's not bad.
Good luck with it, oh and by the way, if you formad your hda1 partition, on your hard drive, which according to you holds windows, you will not be able to start windows anymore, and you will lose all the files that you have on the windows side. Just a heads up.
Old 09-13-2005, 09:07 AM   #7
Senior Member
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHL9;F1-10; CentOS4-5; DebianSarge-Squeeze
Posts: 1,151

Rep: Reputation: 46
Itachi: Start fdisk in the terminal like this:

fdisk /dev/hda

and then use the fdisk shell commands to change the partition type.

Be sure to write (“w”) the final setup to the disk. The changes only take effect if you write them to the disk.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Copy files from partition to partition too slow, SATA hard disk.What should I do£¿ Ryanlee SUSE / openSUSE 20 10-31-2005 07:30 AM
Deleted ntfs partition - added linux partition in its place - corrupt! eklhad Linux From Scratch 2 06-28-2005 01:31 AM
Partition mounting/KDE errors after creating Fat32 Partition BertBert Linux - General 1 07-07-2004 10:59 AM
Total partition size - User partition size is not equals to Free partition size navaneethanj Linux - General 5 06-14-2004 12:55 PM
Newbie Installing Debian3 on m68k w/250M Partition Needs help creating swap partition AppleMac Linux - Newbie 2 11-01-2002 08:45 AM > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration