Showing posts with label Linux Mint. Show all posts
Showing posts with label Linux Mint. Show all posts

Wednesday, January 04, 2023

Getting 'You are in emergency mode. After logging in, type "journalctl -xb" to view system logs, "systemctl reboot" to reboot, "systemctl default" or "exit" to boot into default mode' after rebooting Linux Mint 21.1 Vera

On my Linux Mint 21.1 Vera machine, rebooting the machine would show the following early in the boot process

You are in emergency mode. After logging in, type "journalctl -xb" to view system logs, "systemctl reboot" to reboot, "systemctl default" or "exit" to boot into default mode.
Press Enter for maintenance
(or press Control-D to continue):

For my specific case this happended because I have a USB drive connected to the CPU. Removing the the USB drive and rebooting the machine allow me to continue with the boot process.

Friday, December 30, 2022

Install TightVNC server on Linux Mint 21.1 Vera

Install TightVNC server on Linux Mint 21.1 Vera

One of the options to manage VirtualBox GUI on a Linux host is via VNC server. Below is quick setup to get it up and running.
$: sudo apt install tightvncserver
It is handy to be able to maintain the same session when connecting to Linux, so let's install tmux, like so:
$: sudo apt install tmux
Once TightVNC server and tmux are installed, run the following to create a session:
$: tmux
$: tightvncserver -nolisten tcp :1 -geometry 1024x768
The above commands creates a new tmux session and runs a new VNC server with geometry of 1024x768 on port :1
In multiple cases, I have observed that the VNC session created was just a solid gray backgroun, no xterm, no nothing. As a work-around install XFCE4 like below
$: sudo apt install xfce4 xfce4-goodies
Then update ~/.vnc/xstartup like below.
#!/bin/sh

xrdb "$HOME/.Xresources"
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
# Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
/etc/X11/Xsession &
startxfce4 &

Sunday, December 25, 2022

Add hard drive into Linux Mint 21.1 Vera/Ubuntu/Debian

Add hard drive into Linux Mint 21.1 Vera/Ubuntu/Debian

This is a condensed version on how to add hard disk into Linux Mint/Ubuntu/Debian. First check hard drives in the system, like so:
$: sudo lshw -C disk
It should show (partial data only) like this:
*-disk:1
   description: ATA Disk
   product: WDC WD3200AAKX-0
   vendor: Western Digital
   physical id: 1
   bus info: scsi@1:0.0.0
   logical name: /dev/sdb
   version: 1H15
   serial: WD-WMC2E0871450
   size: 298GiB (320GB)
   capabilities: partitioned partitioned:dos
   configuration: ansiversion=5 logicalsectorsize=512 sectorsize=512 signature=e32ff1f9
Using parted, let's now configure the harddisk/partition
$: sudo parted /dev/sdb
In parted prompt, create a new GPT partition table
(parted) mklabel gpt
Change the default unit to GB
(parted) unit GB
Create one partition occupying all the space on the drive
(parted) mkpart primary ext4 0 100%
Check to verify the layout
(parted) print
It should show something like below:
Model: ATA WDC WD3200AAKX-0 (scsi)
Disk /dev/sdb: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End    Size   File system  Name     Flags
 1      0.00GB  320GB  320GB  ext4         primary
Save and quit parted
(parted) quit
Format the partition using ext4
$: sudo mkfs -t ext4 /dev/sdb1
Formatting process should show something like below:
mke2fs 1.46.5 (30-Dec-2021)
/dev/sdb1 contains a ext4 file system labelled 'VMs'
        last mounted on /mnt/b41faa95-6135-47f6-a24e-ed1909d6fc18 on Sun Dec 25 19:06:43 2022
Proceed anyway? (y,N) y
Creating filesystem with 78142464 4k blocks and 19537920 inodes
Filesystem UUID: 1b7f46da-9aa6-4c30-afec-d983f35a19d5
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616

Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks):
done
Writing superblocks and filesystem accounting information: done
Now let us create a mount point
$: sudo mkdir /mnt/vmdisk
Add an entry in fstab to automount the new partition
$: sudo vim /etc/fstab
Add a line entry in fstab like below
/dev/sdb1    /mnt/vmdisk   ext4    defaults     0        0
We should be able to use the partition without rebooting, so mount it manually for now.
$: sudo mount /mnt/vmdisk
Add directory to be writable by user
$: sudo mkdir /mnt/vmdisk/vms
Make the user named timus owner of the new folder
$: sudo chown -R timus:timus /mnt/vmdisk/vms
Refs:
https://help.ubuntu.com/community/InstallingANewHardDrive

Install VirtualBox 7.0.4 on Linux Mint 21.1 Vera

Install VirtualBox 7.0.4 on Linux Mint 21.1 Vera

▣ Download VirtualBox 7.0.4 from www.virtualbox.org, select Ubuntu 22.04.
▣ Once download is complete, open a terminal and run the following:
$: cd Downloads/
$: sudo dpkg -i virtualbox-7.0_7.0.4-154605~Ubuntu~jammy_amd64.deb
$: sudo apt -f install
$: sudo usermod -a -G vboxusers timus
Replace timus with the current user

Friday, January 22, 2016

The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?

After fixing items below related to MonoDevelop on Linux Mint 7.3, another error shows up:
http://8thstring.blogspot.com/2016/01/monodevelop-does-not-start-on-linux.html
http://8thstring.blogspot.com/2016/01/could-not-obtain-c-compiler-c-compiler.html

The type or namespace name `Gtk' could not be found. Are you missing an assembly reference?

To fix install gtk-sharp-2.0 libraries, like:
$: sudo apt-get install gtk-sharp2


Formatting code in Blogger

I have been using Github gists to share code and I have no plan of abandoning it. For smaller/one liners, I sometimes use div element with ...