How do I make changes to /etc/fstab permanent?

Booting, installing, newbie
Post Reply
Message
Author
penguinman007

How do I make changes to /etc/fstab permanent?

#1 Post by penguinman007 »

I have puppy on a USB stick.

Changes to /etc/fstab do not seem to be permanent.

I assume /etc/fstab resides in ram, and is compied from a permanent location.

I need to know where this permanent location is.

So I can modify fstab.


(I want to automagically mount a network drive on startup)

Penguinman007

Jesse
Posts: 466
Joined: Sun 08 May 2005, 16:07
Location: Auckland, NZ

#2 Post by Jesse »

the file /etc/fstab is usually hiding in you pup001 file.

/etc directory is a symlink to /root/.etc if you have a pup001 file mounted on /root

I guess that can change depending on what boot process is chosen, like if you choose a grub boot option that excludes what I've said above.

I'm fairly sure that there are options that make a filesystem mounted at boot time, distinct and seperate from a file system that is required to be mounted as part of the system, and seperate from those where the partition is not mounted at boot.

In the fstab file, I think the first number after the options means "mount at boot", and the second number somehow indicates the ordering or concurrency of sequence of mounting.
I don't know if Barrys scripts use "mount -a" which is how those are supposed to happen, in the standard linux/unix way of doing this sort of thing.

here are some pages I found that might help:

http://www.computerhope.com/unix/umount.htm
http://linux.about.com/od/commands/l/blcmdl8_mount.htm

Jesse

penguinman007

#3 Post by penguinman007 »

Thanks Jesse.

penguinman007

#4 Post by penguinman007 »

Changes to /root/.etc/fstab are not permanent.

When I edit this file, the changes are not present after re-boot.

So there must be a master location for this file (fstab) somewhere.

?

penguinman007

#5 Post by penguinman007 »

Changes to /root/.etc/fstab are not permanent.

When I edit this file, the changes are not present after re-boot.

So there must be a master location for this file (fstab) somewhere.

?

Bruce B

#6 Post by Bruce B »

penguinman007 wrote:Changes to /root/.etc/fstab are not permanent.

When I edit this file, the changes are not present after re-boot.

So there must be a master location for this file (fstab) somewhere.

?
I like to start with certain partitions mounted. I mount them in ~/.etc/rc.d/rc.local

I have a script I run to unmount them before I reboot.

thoughtjourney
Posts: 61
Joined: Thu 05 May 2005, 01:30
Location: Sutton, NSW

#7 Post by thoughtjourney »

I have a script I run to unmount them before I reboot.
Bruce, would you mind posting this script? I've had trouble properly umounting drives at shtdown, and would like to see what you have done differently to me :)

Thanks, heaps!
in the beginning was the Logos

http://thoughtjourney.aus.cc

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#8 Post by GuestToo »

/tmp/rc.reboot is run when Puppy shuts down ... Puppy 1.0.3 overwrites /etc/rc.d/rc.reboot now, so you can't edit it anymore (the changes will be overwritten)

you can copy /etc/rc.d/rc.reboot somewhere (maybe call it rc.myreboot) and edit the copy, and put a line in an init script like rc.local that copies rc.myreboot to /tmp/rc.reboot

Bruce B

#9 Post by Bruce B »

thoughtjourney wrote:
Bruce, would you mind posting this script? I've had trouble properly umounting drives at shtdown, and would like to see what you have done differently to me Thanks, heaps!
A script could be like this:

Code: Select all

#!/bin/sh
umount /dev/hda6
umount /dev/hdc1
Or it could be on the mount points

Code: Select all

#!/bin/sh
umount /mnt/hda6
umount /mnt/hdc1

Post Reply