D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] auto creating fstab

 

On 30/09/10 11:05, Gordon Henderson wrote:
On Thu, 30 Sep 2010, tom wrote:

On 30/09/10 09:27, Gordon Henderson wrote:
On Thu, 30 Sep 2010, tom wrote:

I've got my system mounting drives as I want it
Many moons ago one could type mount -p>/etc/fstab to get the current settings to be setup on boot.
This not longer works
Any idea how to do that now?

mount -p is for mounting a device with an encryption passphrase..

I'd sort of suggest that blindly overwriting /etc/fstab is a bad idea though - especially if you have devices mounted after the system boots - because if they're not there at the next boot, you'll have issues...

mount on it's own will list the mounted filesystems, but not in a format suitable for /etc/fstab

I don't know of a way to list mounts in that format - it's never something that I've ever considered... I actually hand-craft my /etc/fstab at system build time and never bother with any sortof automounter, hardware detect bloatware... but then, I'm not afraid to hand-type a mount command...
Like I say - I've got my system mounted as I want it. Maybe I'm wrong about mount -p but I'm sure there was something that basically gave you fstab. I wouldnt overwrite without checking first either. I'm OK with hand typing - but these bloody UUIDs etc are a bit hard to check and even with cut and paste (only access over ssh) its a bit hairy.

What's a UUID? I seem to survive without them...

Extract from my desktops /etc/fstab:

/dev/fd0 /floppy auto user,noauto 0 0 /dev/cdrom /cdrom iso9660 ro,user,noauto 0 0 /dev/dvd /dvd iso9660 ro,user,noauto 0 0 /dev/sdb1 /camera msdos user,noauto 0 0 /dev/sdb /n900 vfat user,noauto 0 0

/dev/sda1        /       ext3    errors=remount-ro                0 1
/dev/sda2        none    swap    sw                               0 0
/dev/sda3        /usr    ext3    defaults,noatime,data=writeback  0 2
/dev/sda4        /var    ext3    defaults,noatime,data=writeback  0 2


Obviously I can't have my camera and phone plugged in at the same time, but that's not physicaly possible for my anyway due to the way I have an extension cable from the box...

If I plug in a usb-data key, it almost always looks like 'camera', so I just type mount /camera and it works.

But then, I don't have a fancy desktop/filemanager thing to wory about finding stuff and copying it to/from devices.

I know I'm old, boring and of a dying breed, but I do feel that my system is more "productive" to the way I work than anything else...

And as for build time - these sodding USB devices often arnt there at build time!

Same here - but I just edit them into fstab afterwards...

Gordon

But that can require several re-boots to get it right - and this machine is SLOOOOOOOOOW. I share out the USB drives and I'd like to just go 'use that' once I've got stuff sorted so when we get one of our regular power cuts I dont have to edit via SSH, or if fstab is borked pull the damn thing out of the cupboard and wire it up to monitor etc. I seem to remember there was a simple way of doing it - in my dreams perhaps ..
Tom te tom te tom

--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq