<html><body>Thanks for replying Steve.<br /><br />On 22 February 2011 17:47, Steven Dobson <steve@dobbo.org> wrote:<br />> I use XFS (which was first developed by SGI, although there are other<br />> filesystems like ext2/3/4, JFS and others) for which the command is:<br />> # mkfs -t xfs -L <label> <device><br /><br />Having never used multiple-partitioned external disks, is it one label for the disk or one per partition?<br /><br />One partition is to share between Windows XP and Debian.<br />Do I assume this Windows partition will have to be the first on the disk?<br />Should I go for ntfs or vfat?<br />$ man mkfs only mentions vfat, but googling came up with mkntfs.<br />$ man mkntfs shows there is a -n option which looks like a practice step :-)<br />So assuming I've already created the partitions:<br />It's either: # mkfs -t vfat -L "eSATA-DS160" "/dev/sdf1"<br />Or: # mkntfs -L "eSATA-DS160" "/dev/sdf1"<br /><br />The other two partitions are for Linux. I will probably go for ext3.<br />Is it: # mkfs -t ext3 -L "eSATA-DS160" "/dev/sdf2"<br /><br /><br />> The echo command doesn't look right to me. The quotes will be<br />> interrited by the command shell. What you are trying to do is<br />> add the line:<br />> ndrive x: file="/dev/sdf1"<br />> to the end of the file. You need to use the command:<br />> # echo -e "ndrive x: file=\"/dev/sdf1\"" >> /etc/mtools.conf<br />> The backslashes are important.<br /><br />Actually the backslashes must have been removed by your mail client in reply mode.<br />They are present in my original post:<br /><br /># echo -e "\ndrive x: file=\"/dev/sdf1\"" >> /etc/mtools.conf<br /><br /><br /><br />>> # mlabel ????????<br />>> I want to know how to view the label first.<br />> Having just tried it mlabel displays any label if there is one before<br />> asking you want you want the new label to be.<br />> # mlabel r:<br />> Volume label is RedDisk (abbr=REDDIS~1àÀ¶)<br />> Enter the new volume label : RedFlash<br />> #<br /><br />I ran into a problem here. # cat /etc/mtools.conf shows the final line as: drive x: file="/dev/sdf1" but:<br /># mlabel x:<br />Result:<br />Initial byte of fat is not 0xff<br />Cannot initialize 'X:'<br />mlabel: Cannot initialize drive<br /><br /><br /><br />> However the screen partitioning tool "cfdisk" will display the partition<br />> table and any labels it finds there in:<br />><br />> # cfdisk -P s /dev/sdc<br />><br />> cfdisk (util-linux-ng 2.17.2)<br />><br />> Disk Drive: /dev/sdc<br />> Size: 1000275456 bytes, 1000 MB<br />> Heads: 64 Sectors per Track: 32 Cylinders: 953<br />><br />> Name Flags Part Type FS Type [Label] Size (MB)<br />> ------------------------------------------------------------<br />> sdc4 Boot Primary FAT16 [REDFLASH] 999.30<br />><br />><br />> [ Bootable ] [ Delete ] [ Help ] [ Maximize ] [ Print ]<br />> [ Quit ] [ Type ] [ Units ] [ Write ]<br />><br />> Quit program without writing partition table<br />><br />> <I hit Q to quite the program at this point><br /><br />(Thanks for including the last hint about quitting at that point.)<br /><br />$ 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.<br />And without exact example commands I wouldn't have the confidence to run anything.<br /><br />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.<br /><br /><br />> Then you can use "mkfs" to lay a filesystem down.<br /><br />Yes, label and partition in one step, then format and build the fs in the next step.<br /><br />I think I've still got a way to go yet though.<br /><br />But I'll document when I'm done. <br /><br /><br /><br />Best Regards,<br />Fay<br />East Grinstead Linux User Group<br />www.eglug.org.uk<br /><br /></body></html>