Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I boot from a root filesystem (maybe squashfs or dd image)?
2017-10-02, 14:26
Post: #11
RE: How can I boot from a root filesystem (maybe squashfs or dd image)?
(2017-10-02 12:44)ajr Wrote:  Ubuntu Server 17.04 on both client and server. Also if you wouldn't mind showing me your NFS export and telling me how you installed the OS on NFS?

Start here:

https://help.ubuntu.com/community/Instal...OnNFSDrive

Helpful setup:
Code:
[root@centos-nfs ~]# cat /etc/exports
/srv/nfs/boot_$mynfsroot *(rw,sync,no_root_squash)

The NFS/iSCSI interfaces are on a private non-routable VLAN which is in DNS (example: nas1.private.${15} )... iPXE boots on a public interface and directs the vmlinuz/ initramfs to load from NFS on the private interface.

For Ubuntu with as desktop, you need to pay particular attention to the ToDos at the bottom on the referenced page: it is a really good idea to install on a regular harddisk and rsync / to NFS to get all of the bits needed for a working Desktop Xserver and Enlightenment/Gnome/KDE.

I prefer to boot the "donor system" with a live Distro of some kind, and mount the localdisk and rsync to the NFS filesystem:

Code:
rsync -a -e -k ssh --exclude=/proc/* --exclude=/sys/* /mnt/$localdiskroot $ip_of_server_hosting_image:/$path/$to/$directory

With a 1GbE network, the clone generally takes less than 5 minutes.

Swap can be placed on the NFS Mount.

I recommended setting "swappiness" to a very low value; Basically swapping only when the OS must.

Code:
mkdir /var/swap
touch /var/swap/swapfile.swp
dd if=/dev/zero of=/var/swap/swapfile.swp count=8589934 bs=1k
chmod 0600 /var/swap/swapfile.swp
mkswap /var/swap/swapfile.swp
swapon -a

Add the following line in /etc/fstab;

/var/swap/swapfile.swp      none     swap     defaults     0 0

"Thus far, you have been adrift within the sheltered harbor of my patience..."
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: How can I boot from a root filesystem (maybe squashfs or dd image)? - MultimediaMan - 2017-10-02 14:26



User(s) browsing this thread: 4 Guest(s)