A filesystem being mounted as either ext4 and ext3?

I came across a very interesting problem on my computer today when moving my Dropbox folder as Dropbox is dropping support for non-ext4 filesystems on Linux now. I wasted a lot of time on this as I always believed that this partition was in ext4. So I couldn't figure out why I couldn't get expected by following instructions.

I could mount a partition on my hard drive as either ext4 or ext3 format. Dropbox's daemon is not stupid. If the partition is mounted as ext3, it will complain.

So here is the details. If I do not specify the format, it will be mounted as an ext3 partition.

forrest@test:~$ sudo mount  /dev/sdd1 /mnt/test/
forrest@test:~$ mount | grep sdd1
/dev/sdd1 on /mnt/test type ext3 (rw,relatime,data=ordered)

If I specify the ext4 format, it will be mounted as an ext4 partition.

forrest@test:~$ sudo umount /dev/sdc1
forrest@test:~$ sudo mount -t ext4 /dev/sdd1 /mnt/test/
forrest@test:~$ mount | grep sdc1
/dev/sdd1 on /mnt/test type ext4 (rw,relatime,data=ordered)


I don't know why. But it confused me quite a bit.

My template to reject fundamentally flawed papers

From time to time, I am invited to review papers that are fundamentally flawed. Those papers are written so poorly that I can decide their fates in 1 minute. To save myself from typing again, below is a template. I will just copy and paste.

This paper is very poorly written.
1. Lack of background from the biology problem to the computing counterpart to help broader audiences understand the problem.
2. Equations without explanation of the variables used.
3. No clear distinction between previous work and the authors' contribution(s).
4. Typesetting making reading extremely difficult, e.g., lengthy English phrases in math/italic fonts.
5. Too many English problems.

Quick reference examples for Amazon AWS Glacier command line interface (CLI)

I do not use Amazon AWS Glacier very often. I backing up my files to Glacier every a few months. So I hate to check the manual all the time. Hence, this blog post.

Preparation


Make sure that you have the ~/.aws/config and ~/.aws/credentials configured. In terms of how to set up, look at here: http://docs.aws.amazon.com/cli/latest/userguide/cli-multiple-profiles.html

I would also assume that you are familiar with the terminology of AWS Glacier.

Listing vaults


In case that you forget what vaults you have in an AWS data center, do this:

aws glacier list-vaults  --account-id - --region us-east-2 --output table

Initiating a job for inventory retrieval


Basically if you wanna know what is in a vault, you do this.

aws glacier initiate-job --account-id - --vault-name myvault --region us-east-2 --job-parameters "{\"Type\": \"inventory-retrieval\", \"Format\":\"CSV\", \"Description\":\"what's in my Neuro vault?\"}"

For more details, refer to http://docs.aws.amazon.com/amazonglacier/latest/dev/api-initiate-job-post.html and http://docs.aws.amazon.com/cli/latest/reference/glacier/initiate-job.html

To my surprise, I don't need to specify which profile to use. The AWS CLI seems to automatically find the profile/credential that match the data center and vault name.

Listing jobs


Fetching the inventory is a job. In case the job ID is lost, here is the way to get it back.

aws glacier list-jobs --account-id - --region us-east-1 --vault-name myvault --output table

I always prefer table-format output.

Fetching job result


Either archive retrieval (download the file uploaded to the vault) or inventory retrieval is a job. You need to fetch the result after the job is done. Depending on the type of job, you will either get an inventory in the format specified (JSON by default) or the file uploaded to the vault. Be sure to specify the correct job ID.

aws glacier get-job-output --account-id - --region us-east-1 --job-id xxxyyyzzz --vault-name myvault data.txt

Deleting an archive


aws glacier delete-archive --account-id - --vault-name myvault --archive-id xxxyyyzzz

Friendship before mentorship


"You should run your startup like a cult" -- Peter Thiel, "Zero to One"

Short version: If you are a graduate student who do not want to become friends ever with your PhD advisor, then my lab is not a good place for your PhD study.

When it comes down to what graduate students to work with, I am very picky.

I believe that a graduate student and his/her advisor (note not a supervisor) should at least be friends. Otherwise, they shouldn't work together. Of course, there are many positions and professional relationships that are not like that. But I cannot work with people who just treat me as another piece of equipment.

By friend, I mean a person that you feel comfortable sharing the following information with:
1. I had a dog when I was 5. And the dog passed away tragically. (because you seek sympathy from a friend)
2. I broke up with my girlfriend last week. (because you seek support from a friend)
3. I got Nobel Prize in 2017! (because you share happiness with a friend, or you just wanna show off)

You don't have to be a friend with me right now. But if you anticipate that you cannot become a friend with me after a semester, maybe you shouldn't walk into my office and ask "Are you taking any graduate students?"

Tuning Grub 2, the bootloader

Below of some useful tips for Grub2, the open source bootloader. You are to edit the file /etc/default/grub. After you are done with any of the changes below, run
sudo grub-update
to apply the change.

1. Get rid of the submenu:

Add a line:
GRUB_DISABLE_SUBMENU=y

2. Set the default entry: https://help.ubuntu.com/community/Grub2/Submenus

3. If you want your Linux system to book into text mode/console/command line, just follow this http://ubuntuhandbook.org/index.php/2014/01/boot-into-text-console-ubuntu-linux-14-04/ Basically, you need to make the following changes.

3.1 Uncomment or enable the line GRUB_TERMINAL=console
3.2 Commend or disable the line GRUB_CMD_LINE_LINUX_DEFAULT="quiet splash" or whatever value on the right hand side of the equal sign.
3.3 Change GRUB_CMDLINE_LINUX=”” to GRUB_CMDLINE_LINUX=”text”

4. Leave you a timeout for changing Grub at system boot

Remember to always set a non-zero value for GRUB_TIMEOUT, e.g.,
GRUB_TIMEOUT=10
in case something goes wrong.

But it is not terribly bad if you mess up. Just mount the drive in which you Ubuntu is installed, go to /boot/grub/grub.cfg to edit the settings.