LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 04-12-2010, 09:07 AM   #1
915086731
Member
 
Registered: Apr 2010
Posts: 125
Blog Entries: 5

Rep: Reputation: 2
Unhappy How can I change the label of one partition on linux without formatting it.


How can I change the label of one partition on linux without formatting it.
Ext, ntfs, fat32 and so on.
Like command: mkfs.vfat - n
It wll format the partition, and all content disappears.

Thanks! I am Chinese, and my English is poor。
 
Old 04-12-2010, 09:35 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
ext, ntfs, etc. are partition types, not labels. I do not think you can change the partition type without upsetting the formatting, but I am not sure. I don't have any disks where I can do the experiment.

If you have a disk with a filesystem and data, why would you want to change the partition type?
 
Old 04-12-2010, 09:43 AM   #3
Star_Gazer
Member
 
Registered: Aug 2009
Location: Virginia, United States
Distribution: openSUSE 11.2 KDE
Posts: 32

Rep: Reputation: 15
Quote:
Originally Posted by 915086731 View Post
How can I change the label of one partition on linux without formatting it.
Ext, ntfs, fat32 and so on.
Like command: mkfs.vfat - n
It wll format the partition, and all content disappears.

Thanks! I am Chinese, and my English is poor。
Code:
/sbin/e2label device [newlabel]
which will display, or change the label on a ext2, ext3, or ext4 filesystem located on device.

I do not know, or remember, which utility to use on vfat, ntfs, etc. systems.

If you have Gparted (Gnome Parition Editor) installed, you can use it to label other file systems.

Regards,
Clifton

Last edited by Star_Gazer; 04-12-2010 at 09:46 AM.
 
Old 04-12-2010, 09:44 AM   #4
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
I use Gparted to do this

I have done it several times with data on the given partition

Just open Gparted on drive as root

gparted /dev/sda

and then right-click the given partition and choose "label"

it maybe can corrupt data, but hasnt in my experience
 
Old 04-12-2010, 09:51 AM   #5
Sky.Crawler
LQ Newbie
 
Registered: Apr 2010
Posts: 21

Rep: Reputation: 3
If you want to relabel a system partition, I believe it has to be unmounted first.

Consider booting to the GParted Live CD to do this:

http://gparted.sourceforge.net/download.php
 
Old 04-13-2010, 02:45 AM   #6
915086731
Member
 
Registered: Apr 2010
Posts: 125
Blog Entries: 5

Original Poster
Rep: Reputation: 2
Thanks for everyone!

I am 江文, from 南昌。
 
  


Reply


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
Tool to change the label of a NTFS disk/partition lothario Linux - Software 3 11-04-2012 10:30 AM
change partition label w/o format gjo Linux - General 5 06-28-2005 01:50 PM
Formatting A Linux Partition thebear Linux - General 2 09-16-2003 05:26 PM


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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration