How To: Change default image store location

  • [B]O.S = UBUNTU 10.04LTS SERVER 64 Bits[/B]
    [B]EXTERNAL USB HDD = 500Go[/B]
    I suppose that you have an external hdd with the /dev/sdb if another it would be /dev/sdc …
    and would like to save your images to a new hdd with more spaces … Here’s how to do it

    1. [B][U]Log in Ubuntu as usual[/U][/B]
    2. [B][U]Go to Applications --> Terminal[/U][/B]
    3. [B][U]Su root and your password for root[/U][/B]
    4. [B][U]Type the following commands:[/U][/B]
      . sudo dmesg or
      . sudo fdisk -l
    5. [B][U]Partition on the /dev/sdb[/U][/B]
      . sudo fdisk /dev/sdb following these options (n ; p; enter ; enter ; t ; 83 ; w )
    6. [B][U]Now we need to format the filesystem[/U][/B]
      . sudo mkfs.ext4 /dev/sdb1
    7. [B][U]We need to rename the default /images/ directory created by FOG to /imagesold for example[/U][/B]
      . sudo mv /images/ /imagesold
    8. [U][B]Now we need to create a new directory named /images/ and mount it to your new hdd (sdb1) for example[/B][/U]
      . sudo mkdir /images
      . sudo mount /dev/sdb1 /images
    9. [U][B]If you have already saved some images on your old directory here’s how to copy them to your new directory (suppose that you have some images on your /imagesold/ directory and you want to copy them to your new directory called /images/ on the /dev/sdb[/B][/U]
      . sudo rsync -av --progress imagesold/ /images
    10. [U][B]We need to change the permissions on the /images/ directory as well[/B][/U]
      . sudo chmod -R 777 /images
    11. [U][B]Now we are going to mount automatically the new hdd using UUID[/B][/U]
      . sudo blkid
      . sudo vim /etc/fstab (use vim to edit and add your new UUID

    UUID = UUID_of_your_new_partition /images ext4 errors=remount-ro 0 1

    You should have your new partition mounted and working now, don’t forget to refresh your fog UI by using F5 on your keyboard (check your new hdd space for example: before it was 80Go now is arround 450Go depends on your new hdd capacity)