Is it possible to change the mount points without formatting the drive or reinstalling the OS?
David McGlone
david at dmcentral.net
Sun Jun 7 19:18:42 UTC 2009
On Sunday 07 June 2009 11:43:20 am steven vollom wrote:
> On Sunday 07 June 2009 08:52:16 am you wrote:
> (Trim)
>
> > Steven, I was going to edit your fstab file so you can see how it's done
> > by example. I will post mine at the bottom of this e-mail, so you can use
> > it as an example, but if you would post yours, I could show you how to
> > tailor it for your specific setup, so you can learn.
>
> (Trim)
>
> # /etc/fstab: static file system information.
> #
> # Use 'vol_id --uuid' to print the universally unique identifier for a
> # device; this may be used with UUID= as a more robust way to name devices
> # that works even if disks are added and removed. See fstab(5).
> #
> # <file system> <mount point> <type> <options> <dump> <pass>
> proc /proc proc defaults 0 0
> # / was on /dev/sda1 during installation
> UUID=6747e921-8b72-4f24-b6a8-c86c919d869a / ext3
> relatime,errors=remount-ro 0 1
> # swap was on /dev/sda3 during installation
> UUID=cc9ed070-52d6-41df-81f4-985108e1436d none swap sw
> 0 0
> /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
> /dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
Here is my fstab:
david at buddy:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'vol_id --uuid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/sda1 during installation
UUID=0fa7d0d9-9a63-4f29-929f-1d10cc8fc48c / ext3
relatime,errors=remount-ro 0 1
# /d was on /dev/sda5 during installation
UUID=8812-A612 /media/d vfat utf8,auto,user 0 1
# /develop was on /dev/sda6 during installation
UUID=8255-7C40 /media/develop vfat utf8,auto,user 0 1
# /home was on /dev/sda3 during installation
UUID=a37d4458-483d-46ee-a4e1-ec5d6a270d60 /home ext3 relatime
0 2
# swap was on /dev/sda2 during installation
UUID=97a2c1b2-8108-4a71-bacf-20ca1d2d1de4 none swap sw
0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
I only have 2 extra partitions that are separate from /home and /, I named
them "d" and "develop.
If I ever wanted to change my mount point for these partitions, say to /home/d
and /home/develop then first I would make 2 directories in my home directory
named "d" and "develop"
Then I would unmount the partitions I am going to move with this command:
sudo umount /media/d
sudo umount /media/develop
Then I would open my fstab file as root in kate or any text editor of your
choice and I would change these two lines:
# /d was on /dev/sda5 during installation
UUID=8812-A612 /media/d vfat utf8,auto,user 0 1
# /develop was on /dev/sda6 during installation
UUID=8255-7C40 /media/develop vfat utf8,auto,user 0 1
To read this:
# /d was on /dev/sda5 during installation
UUID=8812-A612 /home/david/d vfat utf8,auto,user 0 1
# /develop was on /dev/sda6 during installation
UUID=8255-7C40 /home/david/develop vfat utf8,auto,user 0 1
Finally re-mount your partitions using this command:
assuming you open a console that is already in your home directory:
sudo mount d
sudo mount develop
Thats it.
There is a shortcut to mount everything with 1 command, but I think your
better off breaking it down, to better understand before you start using
shortcuts.
Hope this better helps you understand the basics of fstab. Keep in mind I
tailored these entries to suit me, Other than the paths to the mount points,
the "auto" and "user" options are my choice and not the system. Your's will
probably read UID=47, GID=1000 or something similar. I recommend you keep
those settings because what I have. I don't think it is very safe for a
beginner.
--
Blessings,
David M.
http://www.dmcentral.net
More information about the kubuntu-users
mailing list