Results 1 to 9 of 9

Thread: Server on USB persistent with minimal writes

  1. #1
    Join Date
    Feb 2007
    Beans
    23

    Server on USB persistent with minimal writes

    I would like to create a USB Flash Drive with Ubuntu Server (SMB, FTP, BFS, DHCP, NFS etc) to run my NAS system (something like FreeNAS).

    I am able to get it bootable, however, I would like to keep the configurations persistent, but with minimal writes to the /tmp and other directories. (something like FreeNAS).

    I would like to boot from the drive and then run my NAS using raid5, hence, I am not able to put the OS on the drives (would not like to partition them).

    Can anyone point me to the right directions or have some suggestions?

  2. #2
    Join Date
    Jun 2007
    Location
    Lynne Valley, BC
    Beans
    2,573
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Server on USB persistent with minimal writes

    You should be able to make persistent partitions named casper-rw and home-rw.
    These will save changes from a persistent disk image install, (usb-creator, UNetbootin)
    Ext2 FS will work for these partitions.
    I think these partitions can reside on a second or third flash drive.

    I understand that a persistent disk image install writes to disk less often than a full install.

    You need to add " persistent" to the text.cfg file.

    Boot Live CD.
    Plug in flash drive.
    Start Partition Editor
    Create 1 GB FAT32 partition, (on the left side of the bar). (size is optional)
    Create a 1.5 GB ext3 partition to the right of this, labeled it "casper-rw". (ext2 and ext4 also work).
    Create a partition in the remaining space and label it "home-rw". (optional, creates a separate home partition)
    Close Partition Editor.
    Un-mount and re-mount flash drive.
    Start "Create a live usb startup disk", (usb-creator).
    Select "Discard on shutdown".
    Press "Make Startup Disk.
    When usb-creator finishes, run "gksu nautilus"
    Select disk / syslinux / text.cfg and added "persistent" as shown below:
    append noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.gz quiet splash --
    Shutdown, remove CD, reboot.

  3. #3
    Join Date
    Feb 2007
    Beans
    23

    Re: Server on USB persistent with minimal writes

    Thanks for the ideas on persistency.

    How about transfering some of the writeable directories to memory e.g. /tmp,/proc that only exist for the session?

  4. #4
    Join Date
    Jun 2007
    Location
    Lynne Valley, BC
    Beans
    2,573
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Server on USB persistent with minimal writes

    I was wondering about using Puppy Linux for a server, It only writes to disk at the end of a session or when instructed.

  5. #5
    Join Date
    Jun 2007
    Location
    Oklahoma City, OK
    Beans
    200
    Distro
    Kubuntu 10.04 Lucid Lynx

    Re: Server on USB persistent with minimal writes

    Quote Originally Posted by roddersg View Post
    Thanks for the ideas on persistency.

    How about transfering some of the writeable directories to memory e.g. /tmp,/proc that only exist for the session?
    /proc is already in memory

    for /tmp:

    http://megabytemorsels.blogspot.com/...in-ubuntu.html
    Te audire no possum. Musa sapientum fixa est in aure.

  6. #6
    Join Date
    Feb 2007
    Beans
    23

    Re: Server on USB persistent with minimal writes

    I found another posting in another thread which also helps in the movement of the directories to minimize writing: http://ubuntuforums.org/showthread.php?t=1101521.

    With new systems, we have plenty of RAM (In my case, I have 1 GB with an option to upgrade to 2 GB), can't we start moving some of the writeable directories there? Also, comparing what we have in FreeNAS we could have a location within the USB stick for writing of the changes.

  7. #7
    Join Date
    Jun 2007
    Location
    Oklahoma City, OK
    Beans
    200
    Distro
    Kubuntu 10.04 Lucid Lynx

    Re: Server on USB persistent with minimal writes

    Side tangent: You do know that you can boot from mdadm and LVM volumes?
    Te audire no possum. Musa sapientum fixa est in aure.

  8. #8
    Join Date
    Feb 2007
    Beans
    23

    Re: Server on USB persistent with minimal writes

    Thanks for your suggestions, especially the last one on booting from mdadm - this took the better part of a weekend for me, as after VMWare simulation, formatting the drives for RAID etc, grub would not boot.

    I found out later that the cause is my controller card SIL3116. Although RAID was not used from the card, I had used software raid and the system refused to boot (couldn't locate the necessary files)

    Still looking for that solution to boot Ubuntu Server from a thumb drive and the changeable portions on the Hard disk.

  9. #9
    Join Date
    Sep 2010
    Location
    Karnal HR India
    Beans
    134
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Server on USB persistent with minimal writes

    better way boot from server cd install the server on your flash drive
    use lvm
    make a raid 5 later

Tags for this Thread

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
  •