Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-14-2009, 07:57 AM   #1
LQ Guru
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
Issues with fstab-How not to screw it up?

Ok-I frequently install various distro's, and although most distro's auto-detect and auto-mount swap and whatever other partitions there are, I have found that the /etc/fstab does not "auto-update" itself.
Does anyone know why?
For example, Here is my /etc/fstab for SuperUbuntu 8.10-
proc            /proc           proc    defaults        0       0
UUID=b31c0d39-40e4-4263-9be5-9c1158dff74b /               ext3    relatime,errors=remount-ro 0       1
UUID=9613045c-15c2-4567-b859-d3ba7246b409 none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0
As you can see it's wayyy off!
So, I need to edit it, and do it right-but I also need to fix all the others as well.
This is why my swap never works.
Also, are there other files I need to edit?
Do I need to create mountpoints? I can access all drives by manually using point and click-but not thru xterm.
Here is my HD layout-
SDA-4=Extended (65GB)
SDA-5=GoboLinux (10.5GB)
SDA-6=Gentoo2008 (15GB)
SDA-7=Arch-'09 x86_64 (10GB)
SDA-8=Debian-Lenny (11GB)
SDA-10=FAT32-File-Storage (17.5GB)
Old 03-14-2009, 08:09 AM   #2
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 680Reputation: 680Reputation: 680Reputation: 680Reputation: 680Reputation: 680
You have many distro's and each one has its own /etc/fstab file. IMHO, it should be a static file, but Ubuntu treats it as a dynamic one. The dynamic file is /etc/mtab which lists the mounted partitions. You other partitions will do it this way. Even Ubuntu only modifies fstab for auto-mounted drives that are added. Changing your partitioning for another distro, may not be reflected when you run Ubuntu.

Consider using the UUID or Disk-by-id in your fstab and grub's /etc/boot/grub/menu.lst files. You are probably trying out different distro's and changing your partitioning scheme often. Doing so, if you delete a partition and create two partitions in it's place, the device nodes will change and you will need to make the changes in /etc/fstab. If you use the UUID of the filesystem, it will be a constant.

Run: "udevinfo -q env -n /dev/sda6" for example to obtain the uuid number for the 6th partition. Select the line that looks like "ID_FS_UUID=8ad26259-a8b0-4b2e-b9d1-af4bdacea3c4" and use the part starting with UUID in the first column of your fstab file. I.E. "UUID=8ad26259-a8b0-4b2e-b9d1-af4bdacea3c4". Now even if the after repartitioning a prior partition, the fstab entry doesn't need to be changed.


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
/etc/fstab issues whitshade Slackware 17 06-18-2006 06:45 AM
Whacky FSTAB issues?!?1 raid517 Linux - Software 2 10-05-2005 11:32 AM
fstab issues djljjm Linux - Newbie 2 04-11-2005 06:18 PM
/etc/fstab issues haldara Linux - Newbie 2 02-08-2005 02:53 PM
Mandrake 9.1 fstab Issues Celeron463 Linux - General 3 08-25-2003 11:37 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:40 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration