Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15
Hi, this is my first question on this forum, although I've been around to read for a while. I just installed a fresh copy of Fedora 11 on my old ...
  1. #1
    Just Joined!
    Join Date
    Jul 2009
    Location
    Sherbrooke, QC
    Posts
    7

    Want to change media names



    Hi, this is my first question on this forum, although I've been around to read for a while.

    I just installed a fresh copy of Fedora 11 on my old win server 2003 machine. I have 2 x 250gig drives on this machine that are not the system drives. Fedora automounts them when I double click on them which is fine, but I would like them to automount as the system starts up and eventually make them available automatically to all other computers on the network.

    I was wondering how I could change the name of the 2 drives without wiping them. One never had a name on my 2003 server so when it mounts it's name is something like this: A6CC5216CC51E0DB. Is there a way for me to change these? I tried using the Palimpsest Disk Utility, but it always gives me an error :
    "fstype ntfs not supported" , So is there a way to change the label name even if it's ntfs? If not, can I easily convert to another filesystem without losing the data on the drives?

    Also when this is done, I assume I have to make an entry in the fstab to automount, is this correct?

    Thanks

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,308
    Hi and Welcome !

    First of all edit /etc/fstab file to automount partitions of both drives.
    Execute fdisk -l command in Terminal and post output here.
    Code:
    su -
    fdisk -l
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,485
    You can use the command: mkfs -L label /dev/sdxn
    where /dev/sdxn is the device name + partition, such as /dev/sdb1. If this gives you an error on your ntfs partition, you can use the command mkfs.ntfs instead. The advantage with using mkfs is that it can usually determine the type of file system on the partition and use the correct mkfs.type command under the covers, so if it is an ext2/ext3 or other file system type, it will deal with it appropriately.

    Once you have given them a label, you can add them to your /etc/fstab file to be automounted on bootup. Example:
    Code:
    LABEL=ntfs-1       /mnt/ntfs1             ntfs-3g    defaults        0 0
    LABEL=linux-1     /mnt/linux1            ext3        defaults        1 2
    Note that you need to create the mount point, which is the empty directory /mnt/ntfs1 or /mnt/linux1 in this example. Also note the last 2 fields that differ from the ntfs and ext3 file systems. They tell the system whether or not these file systems can be dumped and what order that fsck should be run on them at boot time. Since you don't want to run fsck on the ntfs file system, the value of the last entry is 0. I've never run fsck on an ntfs file system, and am not 100% sure that you can, which is why I suggest that it be set to zero here. In fact, I'd say that I'm about 80% sure that you cannot run fsck against an ntfs file system...

    Using labels are good since there are times when your system will happily assign different device id's to your drives, such as when you plug in a new external USB or esata drive.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. #4
    Just Joined!
    Join Date
    Jul 2009
    Location
    Sherbrooke, QC
    Posts
    7
    Thanks a lot! I'll give it a try when I get home tonight. I'll post my results in case others want the info.

  5. #5
    Just Joined!
    Join Date
    Jul 2009
    Location
    Sherbrooke, QC
    Posts
    7
    Quote Originally Posted by Rubberman View Post
    You can use the command: mkfs -L label /dev/sdxn
    where /dev/sdxn is the device name + partition, such as /dev/sdb1. If this gives you an error on your ntfs partition, you can use the command mkfs.ntfs instead. The advantage with using mkfs is that it can usually determine the type of file system on the partition and use the correct mkfs.type command under the covers, so if it is an ext2/ext3 or other file system type, it will deal with it appropriately.

    Uhm... I tried what you told me:


    Code:
    [root@fileserver etc]# mkfs -L BigGuy2 /dev/sdb
    mke2fs 1.41.4 (27-Jan-2009)
    /dev/sdb is entire device, not just one partition!
    Proceed anyway? (y,n) y
    Filesystem label=BigGuy2
    OS type: Linux
    Block size=4096 (log=2)
    Fragment size=4096 (log=2)
    15269888 inodes, 61049646 blocks
    3052482 blocks (5.00%) reserved for the super user
    First data block=0
    Maximum filesystem blocks=0
    1864 block groups
    32768 blocks per group, 32768 fragments per group
    8192 inodes per group
    Superblock backups stored on blocks: 
    	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
    	4096000, 7962624, 11239424, 20480000, 23887872
    
    Writing inode tables: done                            
    Writing superblocks and filesystem accounting information: 
    done
    
    This filesystem will be automatically checked every 39 mounts or
    180 days, whichever comes first.  Use tune2fs -c or -i to override.
    Then I couldn't mount the drive anymore, so I rebooted...
    Now I can mount the drive, the label is fine... but the disk is empty... as if my whole disk was wiped...

    I hope I'M doing something wrong and I didn't just lose 250 gigs of data...

  6. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,485
    You missed the part about the partition, and the warning you got told you about it... I think you are toast. This is what I said:
    You can use the command: mkfs -L label /dev/sdxn
    where /dev/sdxn is the device name + partition, such as /dev/sdb1.
    .
    .
    .
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  7. #7
    Linux Newbie rituraj.goswami's Avatar
    Join Date
    Aug 2008
    Location
    Guwahati
    Posts
    133
    good lord, why don't you read before you press yes. it's linux where you are responsible for your actions. and besides mkfs is basicall a commnad to make a filesystem. i hope you just have a backup. i think you should have followed "Rubberman" advise.
    There is nothing impossible, for everything is possible; the impossible only takes a bit longer than the possible.

  8. #8
    Just Joined!
    Join Date
    Jul 2009
    Location
    Sherbrooke, QC
    Posts
    7
    Quote Originally Posted by Rubberman View Post
    You missed the part about the partition, and the warning you got told you about it... I think you are toast.
    Hmmmm guess I missunderstood. Since there was only one partition I thought that's what I was supposed to do.

    No biggy, didn't have a backup but it's all movies, music and that sort of stuff, nothing I can't get back eventually. At least the device has a name now

    Thanks for the help,
    I'm going to get them to automount now.


    good lord, why don't you read before you press yes. it's linux where you are responsible for your actions.
    Don't worry I take responsibility, there's now way I would be mad at you guys for helping

  9. #9
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,679
    I was wondering how I could change the name of the 2 drives without wiping them.
    I don't know why anyone would suggest running mkfs.ntfs - this *WILL* wipe the file table and create a new NTFS filesystem.

  10. #10
    Just Joined!
    Join Date
    Jul 2009
    Location
    Sherbrooke, QC
    Posts
    7
    When my disk got wiped, it formatted to ext2. Is this a good fs for a disk that will only be used for storage? If not what fs should I use and how would I go about chainging it?

    Might as well change it right away now that it's empty.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •