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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
12-15-2009, 11:19 PM
|
#1
|
Member
Registered: Aug 2008
Location: Tiruchirappalli, India
Distribution: UBUNTU 11.04
Posts: 368
Rep:
|
Question about fdisk command
Hi i am trying to do partition in my SD card. for that i tried
my device name is sdb1. but it says
Code:
ariem@ariem-desktop:/dev$ fdisk /dev/sdb1
Unable to open /dev/sdb1
I dont know what will be the problem. Please help me
|
|
|
12-15-2009, 11:25 PM
|
#2
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,251
|
/dev/sdb - fdisk deals with devices.
Probably need sudo on Ubuntu.
|
|
|
12-15-2009, 11:32 PM
|
#3
|
Member
Registered: Aug 2008
Location: Tiruchirappalli, India
Distribution: UBUNTU 11.04
Posts: 368
Original Poster
Rep:
|
Yes thank you. Now it works fine. I partitionaed my SD card. ANd it shows the out for "print the partition table" is
Code:
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1p1 1 4 8032+ 83 Linux
/dev/sdb1p2 5 11 14112 83 Linux
/dev/sdb1p3 12 956 1905120 83 Linux
Command (m for help):
Now in what file system this partitions are. And how to change the file system of each partition.
When i open /media/disk i am not seeing any partitioned part. Just it shows all the things. what is wrong?
|
|
|
12-15-2009, 11:44 PM
|
#4
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
"unable to open" means you need to be root---or use sudo.
Once you have the right privileges and try to do fdisk on a partition, THEN it will tell you--among other things--that there are no partitions. (I don't know what would happen if you attempted to create some.----On my system, it's acting like it is quite willing to try..... )
|
|
|
12-15-2009, 11:46 PM
|
#5
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
After creating partitions, you then have to create a filesystem on each one using mkfs. Then, you have to mount the partitions to use them.
|
|
|
12-15-2009, 11:50 PM
|
#6
|
Member
Registered: Aug 2008
Location: Tiruchirappalli, India
Distribution: UBUNTU 11.04
Posts: 368
Original Poster
Rep:
|
That command i know. But i am confused how to use that.
Sorry i partitioned only one partion into three. Now i partitoned the whole disk into three partition
Now i partitoned the whole disk. see the partition table
Code:
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 1 4 8032+ 83 Linux
/dev/sdb2 5 11 14112 83 Linux
/dev/sdb3 12 957 1907136 83 Linux
Now how to change the file system for each partion?
i want to change
first partition as RAW
Second partition as FAT32
Third as EXT3
What are the command i have to give change the file system of each partition. I am confused. Please help me
|
|
|
12-16-2009, 12:09 AM
|
#7
|
Member
Registered: Aug 2008
Location: Tiruchirappalli, India
Distribution: UBUNTU 11.04
Posts: 368
Original Poster
Rep:
|
I think i changed the file system sdc2 and sdc3 partitions. see the output. is this changed
Code:
root@ariem-desktop:/dev# mkfs.ext3 /dev/sdc3
mke2fs 1.41.4 (27-Jan-2009)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
119280 inodes, 476784 blocks
23839 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=490733568
15 block groups
32768 blocks per group, 32768 fragments per group
7952 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
root@ariem-desktop:/dev# mkfs.vfat /dev/sdc2
mkfs.vfat 3.0.1 (23 Nov 2008)
root@ariem-desktop:/dev#
But i am getting my disk in /media. just i am geeting my device names in /dev file system. why it is like this?is there any wrong?
|
|
|
12-16-2009, 12:09 AM
|
#8
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
To create filesystems on your partitions: "mkfs"
"man mkfs" for details
Is "RAW" a filesystem?? (Never seen that before)
|
|
|
12-16-2009, 12:14 AM
|
#9
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
Devices are in /dev
To access a device, you have to mount it. The typical locations are /mnt and /media, but you can pretty much mount a device anywhere you want.
Suppose you have sda3 (formatted with a standard filesystem) and you wnat to access it using a new node named "/media/mystick":
Code:
cd media
mkdir mystick
mount /dev/sda3 mystick
cd mystick
ls ## to see what's there
|
|
|
12-16-2009, 12:35 AM
|
#10
|
Member
Registered: Aug 2008
Location: Tiruchirappalli, India
Distribution: UBUNTU 11.04
Posts: 368
Original Poster
Rep:
|
Simple thing. Now i have 2Gb SD card. I want to make 3 partitions in that and i have to change the file system of each partition. 2nd partion as FAT32 and 3rd partion as EXT#. 1st partion no need to change the file system. now what are all the commands used to create and change the partition file system. Now my device name is /dev/sdd
|
|
|
12-16-2009, 08:13 AM
|
#11
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
Your question has already been answered here!!!
Did you look at the man page for "mkfs"?
|
|
|
12-16-2009, 08:29 AM
|
#12
|
Member
Registered: Oct 2008
Posts: 908
Rep:
|
Why don't you use gparted utility to create desired partitions.
In ubuntu you can run
$sudo apt-get install gparted
For fedora
#yum install gparted
Run gparted as superuser to see all devices & their corresponding filesystem detected that is
#gparted &
It would be another case if you insist on using basic commands.
Just trying to help.If you find this post useful then thank me by pressing thumbs up button.Thank You.
Last edited by sumeet inani; 12-16-2009 at 09:00 AM.
|
|
1 members found this post helpful.
|
12-16-2009, 08:50 AM
|
#13
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
At one point, the OP said that he already HAD partitions and just wanted to format with filesystems.
Regardless, this thread now contains complete instructions for partitioning AND formatting....
|
|
|
All times are GMT -5. The time now is 01:01 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|