How does one clean a messy fstab ?

SYNass IT Ubuntu / Linux i-ubux at synass.net
Tue Apr 15 12:48:01 UTC 2008


Hi Neil
Thanks a lot for your efforts and patience to assist !
Very appreciated, however it is very hard for me to follow your high
level info !! ;-)
Again I reply direct into text below:

 
On Tue, 2008-04-15 at 09:25 +0200, Neil wrote:
> On Mon, Apr 14, 2008 at 11:13 PM, SYNass IT Ubuntu / Linux
> <i-ubux at synass.net> wrote:
> > Hi Neil,
> >  Thanks a lot for your effort and your extensive and interesting feedback !
> >  I need to learn, read, reread and unbderstand better !! ;-)
> >  Some quick answers go into the text below:
> >
> 
> You're welcom, glad to help, I had a time where I had to learn these things

;-)


> <snip>
> 
> >  >
> >  > Hi Svobi
> >  >
> >  > Are all of those lines in fstab commented out???? (# at the beginning
> >  > of the line. It means it will not be used) Or is this a poblem caused
> >  > in the copy?
> >
> >  Yes, all comment lines start with # !
> >
> >
> >
> >  > ALWAYS BACK THE FSTAB UP BEFORE EDITING. Your PC works, so back the
> >  > shit up before you start editing it. A "cp /etc/fstab
> >  > /etc/fstab.backup" would do just fine.
> >
> >  You are correct !
> >  I should do it more better !!
> >
> >
> >
> >
> >  > Before you reboot the PC you should make the directories you will be
> >  > using. If you take all my advices you should do this:
> >  > mkdir /media/WinC && mkdir /media/WinD && mkdir /media/test
> >  >
> >  > I'd advise to set
> >  > "# UUID=D2C47460C47448AD /media/sda1     ntfs
> >  > defaults,umask=007,gid=46  0       1" (most probably your windows C
> >  > disk)
> >  > to
> >  > "UUID=D2C47460C47448AD /media/WinC   ntfs    defaults,umask=007,gid=46
> >  >  0       1"
> >  > because sda1 is in windows recognised as C:/. This is not essential,
> >  > but may help to find your files. You should NOT do this if you use
> >  > virtualisation. I do not know if it causes problems, but it may.
> >  >
> >  > and
> >  > >> /dev/sdb6 / NTFS D: Data Windows Partition
> >  > # UUID=E1C68841C686923  ?       ntfs    ?       ?       ?
> >  > to
> >  > # /dev/sdb6 / NTFS D: Data Windows Partition
> >  > "UUID=E1C68841C686923  /media/WinD     ntfs    defaults       0       0"
> >  > The data partition in windows wasn't mounted. This results in the data
> >  > not being available
> >  >
> >  > and
> >  > # /dev/sda7 / FAT16 E: Data Exchange Partition (for tests only and 1GB)
> >  > # UUID=47F7-9B3D                        ?       vfat    ?       ?       ?
> >  > to
> >  > # /dev/sda7 / FAT16 E: Data Exchange Partition (for tests only and 1GB)
> >  > UUID=47F7-9B3D                        /media/test       vfat    noauto
> >  >       0       0
> >  > or
> >  > # /dev/sda7 / FAT16 E: Data Exchange Partition (for tests only and 1GB)
> >  > UUID=47F7-9B3D                        /media/test       vfat
> >  > defaults       0       0
> >
> >  Well, I need more time to understand this better !
> >  Will get back to this later !!
> >
> >
> >
> >  > Again, the disk wasn't mounted. If you do not want it to be mounted at
> >  > boot you should use the first (noauto) if you do want it to be mounted
> >  > you should use the second (default)
> >
> >  I am not clear what you mean with "disk wasn't mounted" !?
> >  On my desktop is an icon of the WIN C: partition and I have access to
> >  it ! ;-)
> 
> yes, and that was pobably the only one you could acces. Not your
> Windows - D partition and not your test partition.
> The moving of the windows C partition isn't needed, but reccomended.
> The icon on your desktop is a link to /media/sda1 . You can leave
> widows- C there if you like, but mounting it at /media/WinC is easier
> to remember.

You mean the partition name / label ?

My convention is like following:
LDnnn = LANdrive # = 142 for mine / 144 for my wife's and similar

WUnnn = Workstation's USB Drive or Stick and its unique numbers

WSnnn = Workstation # = 222 for mine / 22n for others 
WSnnnC1 = Workstation # and its 1st C: partition, ie WIN XPP
WSnnnC2 = Workstation # and its 2nd C: partition, ie OS/2
WSnnnD = Workstation # and its D: partition, here NTFS data partition
WSnnnE = Workstation # and its E: partition, here FAT32 test partition
WSnnnF = Workstation # and its F: partition, hereFAT16 test partition

WSnnn_UROOT804Beta = Workstation # and its root partition
SWAP has no label
WSnnn_UHOME = Workstation # and its home partititon

Hope it gotta not too longwinding ! ;-)
 

> I'd say your windows - D parttition is the most important to have on
> your desktop, since it is your data partition

Principally, YES !!! ;-)
Except under WINdoof !! ;-(


> The disk wasn't mounted means you couldn't acces it (exept with some
> low level commands like dd) There was no way you could use your data.
> setting a mount point and "default" solves that. Now the noauto option
> is meant for things like cdroms, but I know it can be used to leave
> partitions unavailable until you need them by typing (in the terminal
> / a text based TTY) sudo mount /media/test. I am unsure why but it
> seems some people prefer test disks that way, so I added it. If you
> like you can try it, if you hate what happened you can always change
> your fstab to "default".

At the moment I am having some problems to understand "mount" and 
I got to experience it when I tried to copy my present Ubuntu
7.10's /home data from 
my notebook to an external USB Drive and then back to into the new
created HOME 
partition on the notebook !

Could copy and copy back and identify the differences and 
later, having NO access anymore !' ;-(

This experiment also has to do how to transfer my old /home data into 
an own HOME partition.


> >  > The numbers in the last part of each entry are meant for the error
> >  > checks. I am not sure wether Linux can check your NTFS disks for
> >  > errors, so I'd advise you to use 0 (do not check).
> >
> >  Understood !
> >
> >
> >
> >  > The #'s are there to prevent the fstab read program from erroring
> >  > because it can't read the line.
> >
> >  OK, knew !
> >
> >
> >
> >  > I do not work with UUID's myself, always found the /dev/sd[a-z] quite
> >  > sufficient, but it seems the a-z can change at when a new drive is
> >  > added at a Sata or Pata port with a lower identifier (if a mater IDE
> >  > channel 1 drive is added this will always happen) so it may be better
> >  > to work with UUID's.
> >
> >  I see and the /dev/sd(a-z) are easier to keep than these endless UUID
> >  ID's !
> >  Generally I try to work not touching these sys data ...
> >  ... indeed need to learn and understand their functions and
> >  maintaining !!
> 
> The /dev/sda(a-z) names tend to change if you do not have the
> harddisks connected neatly at the place they should be. Start with
> PATA 1 master for the pata drives and SATA 1 for the sata drives.
> CDroms do not count.

Just experienced and learnt that I better place bootable partitions at
the 
very beginning of the logical partiton against my earlier idea to group
it by OS !?

From;
sda1 prim ntfs bootable C: WIN XPP (original manufacturer installation)
sda2 logical
sda5 log ntfs D: WIN data
sda6 log fat32 E: FAT32 test
sda7 log SWAP
sda8 log ext3 bootable ROOT Ubuntu 7.10
sda9 log ext3 HOME

I changed to:
sda1 prim ntfs bootable C: WIN XPP (original manufacturer installation)
sda2 logical
sda5 log ext3 bootable ROOT Ubuntu 7.10
sda6 log SWAP
sda7 log ext3 HOME
sda8 log ntfs D: WIN data
sda9 log fat32 E: FAT32 test

It will get a bit more complicated with OS/2 added too !! ;-)
Perhaps I need to consider installing OS/2 off the notebook HDD on the
USB drive and connect it when needed only !?


> On Tue, Apr 15, 2008 at 9:14 AM, PEDRO MACANAS VALVERDE
> <macanas_ped at gva.es> wrote:
> >
> >
> >
> > De: ubuntu-users-bounces at lists.ubuntu.com en nombre de thomas fisher
> > Enviado el: lun 14/04/2008 18:03
> > Para: ubuntu-users at lists.ubuntu.com
> > Asunto: Re: How does one clean a messy fstab ?
> >
> > I would use pmount that allow users to mount devices without touch fstab. A
> > good tool !.
> >
> >
> > Regards.
> > --
> >  ubuntu-users mailing list
> >  ubuntu-users at lists.ubuntu.com
> >  Modify settings or unsubscribe at:
> > https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
> >
> >
> I do not know the tool, but since you can set "user" at the options
> (in fstab) you must be able to choose whether the users can mount it. I
> actually am the only one using my PC and I do have the root pasword,
> so I never bothered.

As newbie: I have no experience to comment this. ;-D

So, finally I got down here and hope I haven't forgotten anything !
I also hope it will not be too boring and longwinding for you !!
Very glad and happy to have you and some more fellows helping me:
Once again thanks a lot and cheers
svobi





More information about the ubuntu-users mailing list