Installation of Ubuntu 18.04 LTS on solid state drive for fishfish
20180530~20180602
-
Followed instructions from this answer:
-
Shrunk /dev/sdf2 from 2.67 TiB to 851.93 GiB using GParted. The commands used by GParted are:
# Check file system on /dev/sdf2 to errors and (if possible) fix them e2fsck -f -y -v -C 0 '/dev/sdf2' # Shrink file system resize2fs -p '/dev/sdf2/' 893310976K
-
- Attempted to copy filesystem to new solid state drive with GParted.
- However, couldn’t figure out how to copy the Master Boot Record, so operation was aborted.
- Installed fresh Ubuntu 18.04 LTS on new solid state drive with a USB stick
- Booted the system from the USB stick, with both the solid state drive and the old filesystem inserted
- Double-clicked on Install Ubuntu 18.04 LTS on the desktop
- Chose English (US) for keyboard layout
- Chose Normal installation and Download updates while installing Ubuntu, but not “Install third-party software for graphics and Wi-Fi hardware and additional media formats” (default settings)
- Upon the message: “This computer currently has Ubuntu 16.04.4 LTS on it. What would you like to do?”, chose “Something Else”
- Under installation type, chose the solid state drive (identified with the Disks utility),
/dev/sdb ATA Crucial_CT1050MAX (1.1 TB)
for the “device for boot loader installation” - However, things got complicated, has the partitioning had to be manual. Therefore, system was rebooted with the old filesystem removed.
- This time, upon the message: “This computer currently has no deteting operating systems on it. What would you like to do?”, chose “Erase disk and install Ubuntu” and clicked “Continue” for “Write changes to disk”
- For “Where are you?” (time zone settings), maintained the default “New York”
- For “Who are you?” (user setting), used “Adam Lu” for “Your name” and “fishfish” for “Your computer’s name”
- After the “Installation Complete” message shows up, clicked “Restart Now”
- After reboot, clicked “Set Up Livepath”
- Set up Ubuntu Single Sign-On Account
- Updated Ubuntu and restarted
-
The
/etc/fstab
file-
Inserted other drives one by one and verified they were detected with the Disks utility. Rebooted and made sure they were still detected
-
Made directories (with root) for all the media drives:
sudo mkdir /media/shareX ... sudo mkdir /media/EEG_2016-
-
Modified the
/etc/fstab
file accordingly, consulting the previous setting backup_etc_fstab_fishfish.log
-
-
Set up the firewall (ufw)
-
By default the firewall is disabled:
sudo ufw status
shows:
Status: inactive
-
Enable the firewall:
sudo ufw enable
shows:
Firewall is active and enabled on system startup
-
-
Installed Webmin per these instructions:
-
Edited the file
/etc/apt/sources.list
sudo vi /etc/apt/sources.list
Added this line:
deb http://download.webmin.com/download/repository sarge contrib
-
Next, added the Webmin PGP key so that fishfish will trust the new repository:
wget http://www.webmin.com/jcameron-key.asc sudo apt-key add jcameron-key.asc
-
Next, updated repositories and install Webmin:
sudo apt-get update sudo apt-get install webmin
-
The file
jcameron-key.asc
is saved in `~/Settings_Linux/Upgrade
-
-
Rebooted and checked that all drives are mounted properly
-
Ran the following under /media/adamX/Settings_Linux:
bash setup_dotfiles.sh adam bash setup_binfiles
-
Installed SSH server per these instructions:
- Installed
tasksel
sudo apt install tasksel
- Used
tasksel
to install theopenssh-server
sudo tasksel install openssh-server
- Rebooted
- Installed
-
Network
-
Installed the
net-tools
package forifconfig
:sudo apt-get install net-tools
-
Ran
ifconfig
and discovered that the IP has changed to 128.143.17.146! -
Added IP addresses to the ufw firewall with
add_IP.sh
or withsudo ufw allow proto tcp from XXX.XXX.XX.XX to any port 10000
according to the file ufw_IPs_fishfish.md -
Used MobaXTerm to verify that ssh worked
-
Webmin was successfully accessed at https://128.143.17.146:10000/
-
Installed Samba server per these instructions:
-
Use
tasksel
to install thesamba-server
sudo tasksel install samba-server
-
On Webmin, clicked on Convert Users to convert existing Unix users to a Samba user
-
For each file share, changed Security and Access Control settings:
- Changed
Writable
to Yes - Add LabFolks and Collaborators to
Read only groups
orRead/write groups
- Added specific users to
Read only users
orRead/write users
- Changed
-
For each file share, changed File Permissions settings:
- Changed
New Unix file mode
to 775 - Changed
New Unix directory mode
to 775
- Changed
-
Changed User Synchronization settings
- Clicked Yes for all, including:
Add a Samba user when a Unix user is added
,Change the Samba user when a Unix user is changed
andDelete the Samba user when a Unix user is deleted
- Clicked Yes for all, including:
-
-
Updated User/Group settings with Webmin to be consistent with old fishfish
- Changed User ID for adam to 1006
- Added Group LabFolks with ID 1001
- Added Group Collaborators with ID 1004
- Added adam to Webmin users
- Changed root password to my password (not sure if there is a default password or not) by
sudo bash
, thenpasswd
- Added mark to Webmin users
- Added the rest of the users according the user ID in the old /etc/passwd file. Only the users in the file user_accounts_fishfish.md were added
- Made all user passwords the same as the lab computer password
- Created a script
setup_homedir.sh
under/media/adamX/Settings_Linux
and applied it to all users after logging in with the uniform password. - Clicked Yes for
Force change at next login?
for all users except adam
-
-
Set up desktop files
# Set up desktop files under /usr/share/applications bash setup_desktopfiles.sh # Set up desktop files under each home directory bash setup_all_desktopfiles.sh
-
Generated public keys:
-
Generated a public key for fishfish and placed it on chalkboard & rivanna with these instructions:
# Generate ssh public key ssh-keygen # Copy the public key to chalkboard ssh-copy-id -i ~/.ssh/id_rsa.pub adam@128.143.16.133 # Copy the public key to rivanna ssh-copy-id -i ~/.ssh/id_rsa.pub al4ng@rivanna.hpc.virginia.edu
-
Did the same for chalkboard on fishfish and rivanna
-
-
Created the folder
/home/Matlab
and restored everything from the lab GitHub site with commands such as:git clone https://github.com/blabuva/Marks_Functions.git
-
Updated settings for
combine_all_current_notebooks.sh
- Created the folders
/home/grads
,/home/undergrads
- Changed ownership to
adam:LabFolks
and permissions to775
- Created the folders
- Updated
/etc
files:- Used vimdiff to compare the current
/etc
files with those under~/Settings_Linux/backup_settings/old_fishfish
- Environmental variables are now updated in
/etc/bash.bashrc
- Used vimdiff to compare the current