[Sussex] Label and partition external hard drive
'Fay Zee'
sussex at eglug.org.uk
Tue Feb 22 18:57:34 UTC 2011
Thanks for replying Steve.
On 22 February 2011 17:47, Steven Dobson wrote:
> I use XFS (which was first developed by SGI, although there are
other
> filesystems like ext2/3/4, JFS and others) for which the command
is:
> # mkfs -t xfs -L
Having never used multiple-partitioned external disks, is it one
label for the disk or one per partition?
One partition is to share between Windows XP and Debian.
Do I assume this Windows partition will have to be the first on the
disk?
Should I go for ntfs or vfat?
$ man mkfs only mentions vfat, but googling came up with mkntfs.
$ man mkntfs shows there is a -n option which looks like a practice
step :-)
So assuming I've already created the partitions:
It's either: # mkfs -t vfat -L "eSATA-DS160" "/dev/sdf1"
Or: # mkntfs -L "eSATA-DS160" "/dev/sdf1"
The other two partitions are for Linux. I will probably go for ext3.
Is it: # mkfs -t ext3 -L "eSATA-DS160" "/dev/sdf2"
> The echo command doesn't look right to me. The quotes will be
> interrited by the command shell. What you are trying to do is
> add the line:
> ndrive x: file="/dev/sdf1"
> to the end of the file. You need to use the command:
> # echo -e "ndrive x: file="/dev/sdf1"" >>
/etc/mtools.conf
> The backslashes are important.
Actually the backslashes must have been removed by your mail client
in reply mode.
They are present in my original post:
# echo -e "ndrive x: file="/dev/sdf1"" >> /etc/mtools.conf
>> # mlabel ????????
>> I want to know how to view the label first.
> Having just tried it mlabel displays any label if there is one
before
> asking you want you want the new label to be.
> # mlabel r:
> Volume label is RedDisk (abbr=REDDIS~1àÀ¶)
> Enter the new volume label : RedFlash
> #
I ran into a problem here. # cat /etc/mtools.conf shows the final
line as: drive x: file="/dev/sdf1" but:
# mlabel x:
Result:
Initial byte of fat is not 0xff
Cannot initialize 'X:'
mlabel: Cannot initialize drive
> However the screen partitioning tool "cfdisk" will display the
partition
> table and any labels it finds there in:
>
> # cfdisk -P s /dev/sdc
>
> cfdisk (util-linux-ng
2.17.2)
>
> Disk
Drive: /dev/sdc
> Size: 1000275456
bytes, 1000 MB
> Heads: 64 Sectors per Track: 32
Cylinders: 953
>
> Name Flags Part Type FS Type [Label] Size
(MB)
> ------------------------------------------------------------
> sdc4 Boot Primary FAT16 [REDFLASH]
999.30
>
>
> [ Bootable ] [ Delete ] [ Help ] [ Maximize
] [ Print ]
> [ Quit ] [ Type ] [ Units ] [
Write ]
>
> Quit program without writing
partition table
>
>
(Thanks for including the last hint about quitting at that point.)
$ man cfdisk gives me plenty of info about geometry and zeroing the
first 512 bytes but it looks like there will be more to it since I
need Windows to access one of the partitions.
And without exact example commands I wouldn't have the confidence to
run anything.
The last time I attempted to label a disk was with the single hard
drive in my favourite PC of the time. I used a graphical tool, either
in Ubuntu or puupy live and the drive ended up corrupted. It was only
10 or 20GB and I had deliberately backed up my entire home directory
onto an external drive beforehand :-) so no harm done other than
needing to get a replacement disk.
> Then you can use "mkfs" to lay a filesystem down.
Yes, label and partition in one step, then format and build the fs in
the next step.
I think I've still got a way to go yet though.
But I'll document when I'm done.
Best Regards,
Fay
East Grinstead Linux User Group
www.eglugorg.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/sussex/attachments/20110222/44fba26c/attachment-0001.htm>
More information about the Sussex
mailing list