Results 1 to 5 of 5

Thread: device's physical location changes

  1. #1
    Join Date
    Apr 2007
    Beans
    26

    device's physical location changes

    Hello, so I'm trying to automount my Windows's partition. And it works...sometimes. The thing is the partition's location changes by itself (or maybe a change in settings causes it?). For example, it used to be /dev/sda6 but changed to /dev/sdf6, and this causes it to not mount. Due to this, I can't use Rhythmbox stably (it loses music since it can't find the old directory). Any suggestions? Thanks for reading!
    Last edited by dale_nx26; May 18th, 2008 at 10:11 PM.

  2. #2
    Join Date
    Apr 2007
    Beans
    26

    Re: device's physical location changes

    bump...

  3. #3
    Join Date
    Nov 2005
    Location
    Uppsala, Sweden
    Beans
    2,181
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: device's physical location changes

    Instead of using device nodes (/dev/sdxY), set up your /etc/fstab to use uuid's.

    To find out what uuid your drive have, first find out which device node it uses this boot:
    Code:
    sudo fdisk -l
    Then list the uuid's:
    Code:
    ls -la /dev/disk/by-uuid/
    That will give you a list with lines looking something like this:

    Code:
    lrwxrwxrwx 1 root root  10 2008-05-18 18:05 14a06299-44fd-4ed1-b410-7257dc712731 -> ../../hdc1
    lrwxrwxrwx 1 root root  10 2008-05-18 18:05 15764d6b-3184-4493-b05d-1a2e8e696441 -> ../../sdb3
    lrwxrwxrwx 1 root root  10 2008-05-18 18:05 8c2ac1b1-3989-4d21-9b61-f15efaba38f4 -> ../../sdb4
    lrwxrwxrwx 1 root root  10 2008-05-18 18:05 a04f0c57-2740-410e-9e82-ade225733fee -> ../../sdb1
    lrwxrwxrwx 1 root root  10 2008-05-18 18:05 e0e9bf70-6733-4528-8b01-1cc78c38690d -> ../../sdb2
    lrwxrwxrwx 1 root root  10 2008-05-18 18:05 f394b2f2-4d6e-40cc-a64a-9ffe04b63935 -> ../../sda1
    Copy the uuid (highlighted in blue) of the drive, and open up your fstab:
    Code:
    sudo gedit /etc/fstab
    Find the line for your drive:
    Code:
    /dev/sdb1 / ext3 defaults,errors=remount-ro,noatime,data=writeback 0 1
    and make it look something like this:
    Code:
    UUID=a04f0c57-2740-410e-9e82-ade225733fee / ext3 defaults,errors=remount-ro,noatime,data=writeback 0 1
    (just put "UUID=" followed by your unique uuid instead of "dev/sdxY" in the beginning of the line. Don't change anything else).

  4. #4
    Join Date
    Apr 2007
    Beans
    26

    Re: device's physical location changes

    Thank you. I haven't tried this yet, but I will when I get home from the place I am right now and report back.

  5. #5
    Join Date
    Apr 2007
    Beans
    26

    Re: device's physical location changes

    Hey, I think it definately works. Based on NTFS config tool and gparted, I can see the "node" has been changing while the partition is able to mount consistently every time I start Ubuntu. Hopefully it stays that way. Thank you very much! Another issue down, just a few more to go to make my Ubuntu perfect.
    Last edited by dale_nx26; May 19th, 2008 at 10:15 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •