Study at Cambridge
About the University
Research at Cambridge

IT Services

Department of Engineering

Log in with Raven
  • Home
  • About
    • IT Strategy
  • Services
    • Administrative and information systems
    • Audio-visual facilities
    • Central Computing System
    • Desktop services
    • Network and telephones
    • Printing services
    • Projects and system development
    • Server room facilities for research
    • User accounts and passwords
  • Support
    • IT Helpdesk
    • Computing help web pages
    • Divisional and research support
    • IT Administration
  • News
  • Blogs
  • People
  • Contact us
Home / Blogs / Centos 7 ro nfsroot DPO desktop

Centos 7 ro nfsroot DPO desktop

January 16, 2015 By John Sloan Leave a Comment

Overview

This is intended as a braindump of the steps I’ve taken to correctly configure a Centos 7 server and client machine to allow the latter to nfs mount it’s root partition ro from the former.  It’s currently evolving as I discover how to redo things I’ve done before with Centos 6.

Generating the initrd

Generate an initrd image with dracut.

--add

adds modules we need plus which are useful for debugging

--add-drivers

does what you might expect and will need to be expanded to cover all the network cards in the machines we have.  e1000e sufficies for the 760 I’m using to test with.

Sep 2017 – it seems that dracut now by default creates an initrd which is two cpio archives glued together.  What the purpose of the first microcode cpio archive is is unclear, but to get an initrd without one we now need to add the argument:

--no-early-microcode
  • dracut <initrd.img> --add "nfs network base ifcfg ssh-client debug" --add-drivers "e1000e" --no-early-microcode

Unpack that initrd

  • mkdir /tmp/initrd; cd /tmp/initrd; gunzip -c <initrd.img> | cpio -i

Create usr/lib/dracut/hooks/pre-pivot/98-cued.sh (the filename must fit the pattern NNtext.sh or it won’t get run)

  • find . | cpio --quiet -H newc -o | gzip -9 -n > <../newinitrd.img>

PXE configuration

label dpocentos7
kernel dpo/centos7/c7dpok
append initrd=dpo/centos7/c7dpoi root=nfs:129.169.10.180:/ ro rd.info rd.debug rd.shell

Where c7dpok is a link to a vmlinuz kernel and c7dpoi is the corresponding initrd

Server configuration.

Set up /etc/exports

edit /etc/sysconfig/nfs to fix the TCP/UDP ports for rpc.lockd (to 32803 which was the commented default for lockd/tcp)

  • systemctl enable nfs-server

Enable firewall holes:

  • firewall-cmd –permanent –add-service nfs
  • firewall-cmd –permanent –add-service rpc-bind
  • firewall-cmd –permanent –add-service mount
  • firewall-cmd –permanent –add-port=32803/udp
  • firewall-cmd –permanent –add-port=32803/tcp

Set up /etc/cued-prerotate (called from 98-cued.sh)

  • Preserving network config written by dracut into the /var and /etc partitions is necessary so that the dhcp lease doesn’t time out and lose network (causing the root partition to vanish and the client to hang completely)

Set up /etc/systemd/system/cued-postrotate.service (which gets enabled by cued-prerotate)

Set up /etc/cued-postrotate (called by systemd as defined by the service file above)

GDM configuration

Disable user list with:

  • /etc/dconf/db/gdm.d/01-login-screen

 

Desktop configuration I have decided to detail in a separate blog post.

Tagged With: DPO, Linux system

Leave a Reply Cancel reply

You must be logged in to post a comment.

IT Helpdesk

E-mail: helpdesk@eng.cam.ac.uk
Tel: 32686

  • Helpdesk enquiry form
  • Network connection request form
  • Feedback form

Recent news

AV Upgrades in LT0

September 29, 2016

AV Upgrade in Boardroom

September 1, 2016

AV Upgrades for Lent Term

January 12, 2016

ITX AV Expo 2015

November 3, 2015

LR4 AV System Upgrade

October 21, 2015

More News...

Recent blog posts

PaperCut Popup setup on Mac

October 25, 2017 By Anna Langley

AV Updates- Easter 2017

April 20, 2017 By Gavin MacKenzie

Security Awareness

June 14, 2016 By Caroline Blackmun

IMAP Issue still affects Outlook 2016

November 11, 2015 By Eleanor Blair

iscsi/CHAP notes

September 15, 2015 By John Sloan

More Blog Posts...

Contact

Engineering Department
Trumpington Street
Cambridge CB2 1PZ
United Kingdom (map)
Tel: +44 1223 748203
Fax: +44 1223 332662
E-mail: comp-admin@eng.cam.ac.uk

Information provided by:
webadmin@eng.cam.ac.uk

Privacy policy

Services

  • Administrative and information systems
  • Audio-visual facilities and support
  • Desktop services
  • Network and telephones
  • Linux System
  • Projects and system development
  • Server room facilities for research groups
  • User accounts and passwords

Support

  • IT Helpdesk
  • Computing help web pages
  • Divisional and research support
  • IT administration


© 2014 University of Cambridge

University A-Z
Contact the University
Freedom of information

About the University

How the University and Colleges work
Visiting the University
Maps
News
Jobs
Giving to Cambridge
Global Cambridge