LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 15
Partition help


hi,
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 http://www.die.net/doc/linux/man/man8/sfdisk.8.html
and follow its instruction to save in case i do something stupid
so i did this
sfdisk /dev/hdd -O hdd-partition-sectors.save

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
dinolinux
Member
 
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:
Code:
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
Wally68
Member
 
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).

Quote:
sfdisk /dev/hdd -O hdd-partition-sectors.save
/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

Code:
man sfdisk
 
Old 09-13-2005, 12:04 AM   #4
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
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
Itachi
Member
 
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
mattyoly
Member
 
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
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
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.
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:34 PM.

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