When being forced into GRUB rescue mode, run ls
and ls <one_partition>
to check available partitions and find the one that we should boot from [ref].
Then set prefix
& root
[ref]:
set root=(hdX,Y)
set prefix=(hdX,Y)/boot/grub
insmod normal
normal
To avoid doing this every time, it is recommened to use a live-USB/ISO to repair GRUB (usually only Desktop version can be in live-USB and easy to setup WIFI). (// it should be also ok to do this without USB if there is a nix system working on current HDD).
Then use boot-repair to repair the grub.
...
R IN WINDOWS
#
Download here and install.
R IN UBUNTU 18.04
#
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 && \
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/' && \
sudo apt update && \
sudo apt install -y r-base r-base-dev libcurl4-openssl-dev libssl-dev build-essential && \
sudo -i R # install packages as root, so all users can use.
Commonly used packages:
install.packages(c('devtools', 'digest', 'repr', 'IRdisplay', 'crayon', 'pbdZMQ', 'ggplot2', 'IRkernel', 'ggpubr'))
DigitalOcean
Optional: sudo chmod 777 /usr/local/lib/R/site-library
so anyone can install packages.
R IN UBUNTU 16.04
#
Option 1:
...
Make mount point:
Find the partition
Temp Mount
mount -t ntfs-3g /dev/sda4 /mnt/win
Easy Fstab Mount with All Permissions
1.find uuid:
2.add in fstab:
UUID=asdf1234 /mnt/win10c ntfs-3g defaults,windows_names,locale=en_US.utf8 0 0
For advanced permission control, see askubuntu
Tested in ubuntu deskop 16.
short url: s_force-text
SOLUTION
#
sudo cp /etc/default/grub /etc/default/grub.bak && \
sudo sed -ie 's/GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT="text"/g' /etc/default/grub && \
sudo sed -ie 's/GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX="text"/g' /etc/default/grub && \
sudo sed -ie 's/#GRUB_TERMINAL/GRUB_TERMINAL/g' /etc/default/grub && \
sudo update-grub && \
sudo systemctl enable multi-user.target --force && \
sudo systemctl set-default multi-user.target && \
sudo reboot
OBS: sometimes, by changing “multi-user.target” is enough, but sometimes we have to update grub. Have not dug into the reason.
RESULTS
#
Echo-ed results:
START X TEMPORARILY
#
To run desktop from pure terminal (on physical monitor): run service lightdm start
directly.
Note:
...
OBS 1: this works only for ubuntu server edition, not desktop version. tested in ubuntu 16 x64.
OBS 2: remember to change some parts to real values, near: # modify to real value !!!
OBS 3: my version need some files in .iso file: “10_linux” & “sources.list”.
Warn: the default ks.cfg partition settings will erase the entire disk, and use LVM.
See also:
Boot Partitions, Install Multi-OS
easy2boot
PREPARE, AS ROOT
#
sudo -s
...
Reconfig Locale
#
Option 1:
mkdir -p /var/lib/locales/supported.d/ && \
echo "en_GB.UTF-8 UTF-8" > /var/lib/locales/supported.d/gb && \
echo "zh_CN.UTF-8 UTF-8" > /var/lib/locales/supported.d/zh && \
echo "sv_SE.UTF-8 UTF-8" > /var/lib/locales/supported.d/se && \
locale-gen
Option 2:
dpkg-reconfigure locales
can use first character of locale-name to nevigate.
ref
See also:
Install
#
install ubuntu 2204 manually & turn off system updates (except security updates)
#
automaic / unattended installation of ubuntu
#
- http://askubuntu.com/questions/122505/how-do-i-create-a-completely-unattended-install-of-ubuntu
- Completely-Automatic-Unattended-Install-of-Ubuntu-Auto-system-config-kickstart
multi systems selection
#
multi-operating-system-installation
init after installation
#
linux-init
...
1. 开机自动运行
#
Linux 加载后, 它将初始化硬件和设备驱动, 然后运行第一个进程 init。init 根据配置
文件继续引导过程,启动其它进程。通常情况下,修改放置在
/etc/rc 或
/etc/rc.d 或
/etc/rc?.d
目录下的脚本文件,可以使 init 自动启动其它程序。例如:编辑
/etc/rc.d/rc.local 文件(该文件通常是系统最后启动的脚本),
在文件最末加上一行“xinit”或“startx”,可以在开机启动后直接进入 X-Window。
2. 登录自动运行
#
用户登录时,bash 先自动执行系统管理员建立的全局登录 script :
/ect/profile
然后 bash 在用户起始目录下按顺序查找三个特殊文件中的一个:
/.bash_profile、
/.bash_login、
/.profile,
但只执行最先找到的一个。因此,只需根据实际需要在上述文件中加入命令就可以实
现用户登录时自动运行某些程序(类似于 DOS 下的 Autoexec.bat)。
3. 退出自动运行
#
退出登录时,bash 自动执行个人的退出登录脚本
/.bash_logout。
例如,在/.bash_logout 中加入命令“tar -cvzf c.source.tgz *.c”,则在每次退出
登录时自动执行 “tar” 命令备份 *.c 文件。
4. 定时自动运行
#
Linux 有一个称为 crond 的守护程序,主要功能是周期性地检查 /var/spool/cron 目录
下的一组命令文件的内容,并在设定的时间执行这些文件中的命令。用户可以通过
crontab 命令来建立、修改、删除这些命令文件。
...