-
Foundational Knowledge
Understanding and remembering:
- Information
- Ideas
- Application
- Skills
- Thinking (Critical, creative and practical thinking
- Managing projects
-
Integration
Connecting:
- Ideas
- People
- Realms of life
-
Human Dimension
Learning about:
- Oneself
- Others
-
Caring
Developing new:
- Feelings
- Interests
- Values
-
Learning How to Learn
- Becoming a better student
- Inquiring about a subject
- Self-directing learners
Monday, July 27, 2020
Fink's Taxonomy of Significant Learning
Fink (2013) proposes a taxonomy of significant learning that he synthesizes from decades of conversations with students and teachers on the topic of significant learning whose examples include, "learning how to learn, leadership and interpersonal skills, ethics, communication skills, character, tolerance, and the ability to adapt to change." (Fink, 2013)
This taxonomy has the following categories,
Saturday, June 20, 2020
Problem: Baseboard management controller cannot get IP address?
I have a computer system whose motherboard has ASRock Rack baseboard management controller (BMC) that allows me to interact with the system via the Intelligent Platform Management Interface (PMI). One day, I noticed that the BMC ceases to have an IP address assigned. This is obviously a problem since the system does not have a monitor directly connect to it, and the management console was at the time the only means for me to administrate the system fully.
Neither of the following I attempted resolved the issue,
Neither of the following I attempted resolved the issue,
- I unplug and re-plug the Ethernet cable to the Ethernet port of the BMC.
- I reboot the network gateway that runs the DHCP server to allocate the IP address to it.
- I shutdown the system, and reboot the system.
- Unplug the power cable from the system and plug the power cable back to the system
Friday, June 19, 2020
"git status" shows modifications, but "git diff" shows nothing
I encountered a strange problem about a git repository today, that is, when I do a
After a little bit digging, apparently a few others encountered the same problem as a Stack Overflow discussion indicates.
The cause of my case are two,
git status, git reports there are modifications. However, when I do a git diff, git reports no difference, like the following,
$ git status .
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git checkout -- ..." to discard changes in working directory)
modified: .gitignore
$ git diff
$
After a little bit digging, apparently a few others encountered the same problem as a Stack Overflow discussion indicates.
The cause of my case are two,
- Some files have different line endings from the version in the repository as a result that I was working on a Windows Subsystem for Linux and had the git's configuration property
core.autocrlfset asinput. I revealed the Windows line ending usingvim, as in the following,
$ vim -b .gitignore # Compiled class file^M *.class^M ^M # Log file^M *.log^M ^M # BlueJ files^M *.ctxt^M
where the^Mcharacters are the Windows line endings, i.e.,CR LF. I got rid of the line endings usingsed, as in,
sed -i -e s/^M// .gitignore
Note that we enter the line ending by pressingCRTL-V CRTRL-M
- The second issue is that some files have different permissions from those in the repository. Since I was using a Windows Subsystem for Linux on a Windows host, it is difficult for me to set the permissions identical to those in the repository. However, we can let
gitto ignore permission difference, i.e.,
git config --local core.filemode false
where I only did this for the repository. If we wish to do this for globally for all repositories, just issue the command without the--localoption.
Monday, June 1, 2020
Problem: Application Icon on Windows Taskbar Becomes White Square
I was using a Windows 10 system. I noticed somehow the icon of application on the taskbar became a white square, like this picture shows,
I figured out a solution to resolve this. That is to delete the thumbnail icon cache that we can find at
The system will rebuild the thumbnail cache and the thumbnails.
I figured out a solution to resolve this. That is to delete the thumbnail icon cache that we can find at
%LOCALAPPDATA%\Microsoft\Windows\Explorer, i.e.,- Open a Windows Command Prompt window
- Do the following from the command line on the Windows Command Prompt window
taskkill /F /IM explorer.exedel %LOCALAPPDATA%\Microsoft\Windows\Explorer\thumbcache_*.dbexplorer.exe
- Run the Disk Cleanup application, i.e.,
cleanmgr.exe - Uncheck everything using the user interface, and check "Thumbnails" (See the screen shot).
- Click OK to confirm
- Exit the Disk Cleanup application
The system will rebuild the thumbnail cache and the thumbnails.
Saturday, May 30, 2020
Problem: Keyboard Input Echoed Back to Serial Terminal using PuTTY to Linux System
I enabled the serial console on a Debian Linux system. I used PuTTY to connect to the serial console. However, I encountered a problem, i.e., any keyboard inputs were echoed back to the serial console. The following screen shot perhaps explains the problem, e.g., when I enter user name, the user name is echoed back again, and when I enter the password, by default, the terminal shouldn't show anything, but it echoes it back.
A Stack Overflow thread discusses a similar problem, and I linked it below,
The thread led me to experimenting the terminal setting in PuTTY. The default setting of the "Line discipline options" is "Auto" for "Local echo", and "Auto" for "Local line editing" shown in the screen capture below. When using these settings, I encountered the problem I described in the above.
My fiddling with the settings tells me that the solution is to check "Force off" for "Local echo", and "Force off" for "Local line editing" shown in the screen shot below,
Having made the setting changes, I saw that the problem went away. Well, we can see it from the screen shot below,
The thread led me to experimenting the terminal setting in PuTTY. The default setting of the "Line discipline options" is "Auto" for "Local echo", and "Auto" for "Local line editing" shown in the screen capture below. When using these settings, I encountered the problem I described in the above.
My fiddling with the settings tells me that the solution is to check "Force off" for "Local echo", and "Force off" for "Local line editing" shown in the screen shot below,
Having made the setting changes, I saw that the problem went away. Well, we can see it from the screen shot below,
Thursday, May 28, 2020
Adding new disk to a system? MBR Partition Table or GUID Partition Table?
I wanted to add a new virtual harddisk drive to a Debian Linux system on an Oracle VirtualBox virtual machine. A little bit planning goes a long way. One question we ought to ask is, what type of partition table should we choose?
For PCs, there are two types of partitions one can choose from,
To overcome this limitation, GPT uses 64-bit logical addresses. This arguably allows us to address the number of bytes of an astronomical scale.
Below we show 3 examples using these 3 tools to create a GPT.
For PCs, there are two types of partitions one can choose from,
- Master Boot Record Partition Table (MBR Partition Table, or MBR), and
- GUID Partition Table (GPT).
232*512=241=2*240=2 TB
To overcome this limitation, GPT uses 64-bit logical addresses. This arguably allows us to address the number of bytes of an astronomical scale.
Master Boot Record Partition Table
The complete process of adding a harddisk drive to a Debian Linux sytem using the MBR partition is as follows,- Look up the name the attached harddisk drive using lsblk
- Create an extended partition using the fdisk tool
- Create a logical partition on the extended partition using the fdisk tool
- Create a file system on the logical partition
- Mount the file system and use it
GUID Partition Table
There are a couple of tools we can use to create GUID partition tables, e.g.,fdisk. The new version of fdisk has GPT support. We can know whether the version installed in the system has the GPT support by viewing its manual page, e.g., the manual page of the version of fdisk on the Linux system I am using states,
"
fdisk is a dialog-driven program for creation and manipulation of partition tables. It understands GPT, MBR, Sun, SGI and BSD partition tables.
"-
gdisk. It is a tool much likefdisk. The manual page states that it is a
"GPT fdisk (aka gdisk) is a text-mode menu-driven program for creation and manipulation of partition tables.
" parted. This is a more powerful tool thanfdiskandgdisk.
Below we show 3 examples using these 3 tools to create a GPT.
Using fdisk
- Look up the name the attached harddisk drive using
lsblk - Create a GPT.
$ sudo fdisk /dev/sdb Welcome to fdisk (util-linux 2.33.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): m Help: GPT M enter protective/hybrid MBR Generic d delete a partition F list free unpartitioned space l list known partition types n add a new partition p print the partition table t change a partition type v verify the partition table i print information about a partition Misc m print this menu x extra functionality (experts only) Script I load disk layout from sfdisk script file O dump disk layout to sfdisk script file Save & Exit w write table to disk and exit q quit without saving changes Create a new label g create a new empty GPT partition table G create a new empty SGI (IRIX) partition table o create a new empty DOS partition table s create a new empty Sun partition table Command (m for help): g Created a new GPT disklabel (GUID: 08486B58-59CB-E849-B814-38DD8434D43C). Command (m for help): n Partition number (1-128, default 1): First sector (2048-32767966, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-32767966, default 32767966): Created a new partition 1 of type 'Linux filesystem' and of size 15.6 GiB. Partition #1 contains a ext4 signature. $ - Display partition information
$ sudo fdisk -l /dev/sdb Disk /dev/sdb: 15.6 GiB, 16777216000 bytes, 32768000 sectors Disk model: VBOX HARDDISK Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 85CF1437-0605-4C91-BE0C-F3B416BEA1D8 Device Start End Sectors Size Type /dev/sdb1 2048 32767966 32765919 15.6G Linux filesystem $ -
Make the system to re-load the partition tables
$ sudo partprobe $ - Mount the file system on the partition
$ sudo mount -t ext4 /dev/sdb1 /mnt $
Using gdisk
- Look up the name the attached harddisk drive using
lsblk - Create a GPT.
$ sudo gdisk /dev/sdb GPT fdisk (gdisk) version 1.0.3 Partition table scan: MBR: MBR only BSD: not present APM: not present GPT: not present *************************************************************** Found invalid GPT and valid MBR; converting MBR to GPT format in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by typing 'q' if you don't want to convert your MBR partitions to GPT format! *************************************************************** Command (? for help): ? b back up GPT data to a file c change a partition's name d delete a partition i show detailed information on a partition l list known partition types n add a new partition o create a new empty GUID partition table (GPT) p print the partition table q quit without saving changes r recovery and transformation options (experts only) s sort partitions t change a partition's type code v verify disk w write table to disk and exit x extra functionality (experts only) ? print this menu Command (? for help): n Partition number (1-128, default 1): First sector (34-32767966, default = 2048) or {+-}size{KMGTP}: Last sector (2048-32767966, default = 32767966) or {+-}size{KMGTP}: Current type is 'Linux filesystem' Hex code or GUID (L to show codes, Enter = 8300): Changed type of partition to 'Linux filesystem' Command (? for help): w Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!! Do you want to proceed? (Y/N): y OK; writing new GUID partition table (GPT) to /dev/sdb. Warning: The kernel is still using the old partition table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8) The operation has completed successfully. $ - Display partition information
$ sudo gdisk -l /dev/sdb GPT fdisk (gdisk) version 1.0.3 Partition table scan: MBR: protective BSD: not present APM: not present GPT: present Found valid GPT with protective MBR; using GPT. Disk /dev/sdb: 32768000 sectors, 15.6 GiB Model: VBOX HARDDISK Sector size (logical/physical): 512/512 bytes Disk identifier (GUID): 08486B58-59CB-E849-B814-38DD8434D43C Partition table holds up to 128 entries Main partition table begins at sector 2 and ends at sector 33 First usable sector is 2048, last usable sector is 32767966 Partitions will be aligned on 2048-sector boundaries Total free space is 0 sectors (0 bytes) Number Start (sector) End (sector) Size Code Name 1 2048 32767966 15.6 GiB 8300 $ -
Make the system to re-load the partition tables
$ sudo partprobe $ - Mount the file system on the partition
$ sudo mount -t ext4 /dev/sdb1 /mnt $
Using parted
- Look up the name the attached harddisk drive using
lsblk - Create a GPT.
$ sudo parted /dev/sdb GNU Parted 3.2 Using /dev/sdb Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) mklabel gpt Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want to continue? Yes/No? Yes (parted) mkpart primary 1 100% (parted) align-check optimal 1 1 aligned (parted) print Model: ATA VBOX HARDDISK (scsi) Disk /dev/sdb: 16.8GB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 1049kB 16.8GB 16.8GB primary (parted) quit Information: You may need to update /etc/fstab. . $ - Display partition information
$ sudo parted -l /dev/sdb ... Model: ATA VBOX HARDDISK (scsi) Disk /dev/sdb: 16.8GB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 1049kB 16.8GB 16.8GB ext4 primary $ -
Make the system to re-load the partition tables
$ sudo partprobe $ - Create an ext4 file system on the partition.
$ sudo mkfs -t ext4 /dev/sdb1 mke2fs 1.44.5 (15-Dec-2018) /dev/sdb1 contains a ext4 file system last mounted on Thu May 28 21:45:35 2020 Proceed anyway? (y,N) y Creating filesystem with 4095488 4k blocks and 1024000 inodes Filesystem UUID: 6b43a1a4-ab37-4788-acef-df13149f7bc6 Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208 Allocating group tables: done Writing inode tables: done Creating journal (16384 blocks): done Writing superblocks and filesystem accounting information: done $ - Mount the file system on the partition
$ sudo mount -t ext4 /dev/sdb1 /mnt $
parted is a more powerful tool. For instance, it has a align-check command. This is to check if partition satisfies some alignment constraint.Mouting File System using UUID
We can mount the file system using its UUID. Below is an example,- Display UUID
$ sudo blkid /dev/sdb1 /dev/sdb1: UUID="6b43a1a4-ab37-4788-acef-df13149f7bc6" TYPE="ext4" PARTLABEL="primary" PARTUUID="d9b95367-7e63-4789-9b6d-65ef8e7c61c0" $ - Mount the file system using its UUID
$ sudo mount --uuid=6b43a1a4-ab37-4788-acef-df13149f7bc6 /mnt $
Enabling Serial Console on Debian Linux
I wanted to enable the serial console on a Linux system. The system is a Debian Linux release 10 (a.k.a., "buster"). The official documentation has the following description about the serial console
"
"
It also states,
"
It is clearly that the documentation offers two solutions, using the systemd service or using the boot parameter. Perhaps, the former has the shortcoming that the serial console may not start if the systemd does not get a chance to run because we happen to have a boot problem. The preferred method, as suggested is to pass a boot parameter to the kernel. Since I have the grub boot loader installed, this becomes a simple two step approach,
I happened to back up the old
"
If you are booting with a serial console, generally the kernel will autodetect this. If you have a videocard (framebuffer) and a keyboard also attached to the computer which you wish to boot via serial console, you may have to pass theconsole=argument to the kernel, wheredevicedeviceis your serial device, which is usually something likettyS0.
You may need to specify parameters for the serial port, such as speed and parity, for instanceconsole=ttyS0,9600n8; other typical speeds may be 57600 or 115200. Be sure to specify this option after “---”, so that it is copied into the bootloader configuration for the installed system (if supported by the installer for the bootloader).
In order to ensure the terminal type used by the installer matches your terminal emulator, the parameterTERM=can be added. Note that the installer only supports the following terminal types:typelinux,bterm,ansi,vt102anddumb. The default for serial console indebian-installerisvt102. If you are using an IPMI console, or a virtualization tool which does not provide conversion into such terminals types itself, e.g. QEMU/KVM, you can start it inside a screen session. That will indeed perform translation into thescreenterminal type, which is very close tovt102.
"
It also states,
"
Those used to change inittab to enable/disable virtual or serial consoles will notice that that file is gone from clean installs. This is all managed through systemd directly now. For example, you can enable a serial console on COM1 with:systemctl enable serial-getty@ttyS0.service systemctl start serial-getty@ttyS0.service
However, it is generally preferable to add console=ttyS0 on the kernel commandline, since this also enables kernel output on reboots. This is done by adding the following to /etc/default/grub:GRUB_CMDLINE_LINUX="console=ttyS0"... and running update-grub. This will take effect only on the next reboot, however.
"
It is clearly that the documentation offers two solutions, using the systemd service or using the boot parameter. Perhaps, the former has the shortcoming that the serial console may not start if the systemd does not get a chance to run because we happen to have a boot problem. The preferred method, as suggested is to pass a boot parameter to the kernel. Since I have the grub boot loader installed, this becomes a simple two step approach,
- Edit
/etc/default/grubfile. In my case, replaceGRUB_CMDLINE_LINUX_DEFAULT="quiet"
byGRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0 console=tty0"
- Update the
grub.cfgfileupdate-grub -o /boot/grub/grub.cfg
I happened to back up the old
grub.cfg file. By comparing the old and new grub.cfg file, we can easily see the difference between the two files,
$ diff /boot/grub/grub.cfg /boot/grub/grub.cfg.bu01
diff /boot/grub/grub.cfg /boot/grub/grub.cfg.bu01
119c119
< linux /boot/vmlinuz-4.19.0-8-686 root=UUID=123456789 ro console=ttyS0 console=tty0
---
> linux /boot/vmlinuz-4.19.0-8-686 root=UUID=123456789 ro quiet
137c137
< linux /boot/vmlinuz-4.19.0-8-686 root=UUID=123456789 ro console=ttyS0 console=tty0
---
> linux /boot/vmlinuz-4.19.0-8-686 root=UUID=123456789 ro quiet
$
Subscribe to:
Posts (Atom)


