我需要最好为16.04的持久性活动Ubuntu,因为我需要如线程中所述恢复我的整个16.04加密硬盘,如何将自己添加回16.04加密HDD的sudo组中? 我在这里创建了一个新的持久性Live Ubuntu 16.04,其中包含一些与Videonauth结尾的错误。
sudo apt-get install gksu debootstrap
gksudo gparted
。使USBext4
留下1GB的可用内存,并为Linux Swap设置1GB;仅管理标志boot
。准备操作系统并在USB记忆棒中运行
sudo mkdir /mnt/stick sudo mount /dev/sdb1 /mnt/stick/ sudo debootstrap --arch=amd64 xenial /mnt/stick http://de.archive.ubuntu.com/ubuntu/ sudo mount -o bind /dev /mnt/stick/dev sudo mount -o bind /dev/pts /mnt/stick/dev/pts sudo mount -t sysfs /sys /mnt/stick/sys sudo mount -t proc /proc /mnt/stick/proc sudo cp /proc/mounts /mnt/stick/etc/mtab sudo cp /etc/resolv.conf /mnt/stick/etc/resolv.conf sudo chroot /mnt/stick/
提示看起来像
root@masi-CM6340:/#
。设置语言环境。%locale-gen en_US en_US.UTF-8 %dpkg-reconfigure locale dpkg-rekonfigure locales % two above commands cause a bug in gnome-terminal; choose here your locales and set environment en_US.UTF-8 dpkg-reconfigure keyboard-configuration localedef -i en_US -c -f UTF-8 en_US.UTF-8
apt-get install linux-image-generic
。你懂了/dev/sda [NotThisOne, your HDD], 2 /dev/sdb (31474 MB; ???) 2b - /dev/sdb1 (30398 MB; /)
。选择/dev/sdb1
和/dev/sdb
。在这里选择您喜欢的Linux内核。我保持Linux内核4.6最稳定,您可以按照本文末尾的说明进行下载。apt-get install vim wget
blkid
,复制到剪贴板vim /etc/fstab
。删除sda
行,因此只有两sdb
行。编辑它们以使其喜欢UUID="..." swap swap defaulst 0 0
和UUID="..." / ext4 defaults 0 1
。将以下内容粘贴到文件中
/etc/apt/sources.list
#deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://de.archive.ubuntu.com/ubuntu/ xenial main restricted # deb-src http://de.archive.ubuntu.com/ubuntu/ xenial main restricted ## Major bug fix updates produced after the final release of the ## distribution. deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates main restricted # deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## universe WILL NOT receive any review or updates from the Ubuntu security ## team. deb http://de.archive.ubuntu.com/ubuntu/ xenial universe # deb-src http://de.archive.ubuntu.com/ubuntu/ xenial universe deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates universe # deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb http://de.archive.ubuntu.com/ubuntu/ xenial multiverse # deb-src http://de.archive.ubuntu.com/ubuntu/ xenial multiverse deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates multiverse # deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates multiverse ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://de.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse # deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. deb http://archive.canonical.com/ubuntu xenial partner deb-src http://archive.canonical.com/ubuntu xenial partner deb http://security.ubuntu.com/ubuntu xenial-security main restricted # deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted deb http://security.ubuntu.com/ubuntu xenial-security universe # deb-src http://security.ubuntu.com/ubuntu xenial-security universe deb http://security.ubuntu.com/ubuntu xenial-security multiverse # deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
做
dpkg-divert --local --rename --add /sbin/initctl ln -s /bin/true /sbin/initctl apt-get update % Comment this out if ubuntu-desktop is wanted apt-get install ubuntu-desktop % Comment out if ubuntu-server is wanted % apt-get install ubuntu-server adduser --home /home/masi masi
masi
将现有组添加到usermod -aG adm,cdrom,sudo,dip,plugdev,lpadmin,sambashare masi
可以忽略的位置sambashare
。忽略驱动程序,因为USB记忆棒不适用于一台PC。
要恢复加密的HDD,请在
apt-get ecryptfs-utils schroot testdisk
其中testdisk
准备光盘的软件包中安装软件包,并在另两个软件包中恢复加密的Ubuntu 16.04整个光盘。sudo echo 'GRUB_DISABLE_OS_PROBER="true"' >> /etc/default/grub
;update-grub
完成安装。做
rm /sbin/initctl dpkg-divert --local --rename --remove /sbin/initctl
测试您的Persistent Live Ubuntu 16.04的安装[alpha]
启动新的Persistent Ubuntu。在终端中,执行
sudo true
。如果得到Unable to resolve host * Connection refused
,那就做# /ubuntu//q/59458/25388 sudo vim /etc/hostname masi sudo vim /etc/hosts 127.0.0.1 localhost.localdomain masi [...]
可能的麻烦:Ubuntu从$(inittramfs)$开始。做...
结果:USB启动Ubuntu桌面GUI和UI
- 您可以打开LibreOffice,Firefox,...
masi
在sudo组中;组正确。chroot
粘贴时正确设置了语言环境。- 如果您在gnome-terminal中有错误,即在GUI中打开它,请
sudo dpkg-rekonfigure locales
在TTY1中再次进行。它解决了案件。
报告给Videonauth的错误
进行测试时,请务必更新和升级系统:sudo apt-get update && sudo apt-get upgrade
。
- Ubuntu的Internet浏览器。启动它会使系统崩溃。鼠标只能工作,但不能将任何信号发送到TTY。
- 火狐浏览器。启动它会发出有关[配置文件存在]的警告,因此无法打开。临时修复
rm -r ~/.mozilla && rm -r ./.cache/mozilla
仅适用于一个会话。该问题在每次登录时仍然存在。更好的工作FIX: ,sudo mv -v /home/masi /home/masi_backup
,,sudo mkdir -v /home/masi
和因为主文件夹的一些所有权会导致错误。运行源代码的命令,您将获得以下差异sudo chown masi:masi /home/masi
sudo chmod 755 /home/masi
sudo reboot
/etc/hostname
/etc/hosts
一段时间后无法匹配- 有时,开始
(inittramsfs)
输出 vimdiff <(find /home/masi -printf "%P %u:%g %m\n" | sort) <(find /home/masi_backup -printf "%P %u:%g %m\n" | sort)
%LHS-file
.bash_history masi:masi 600
.cache/compizconfig-1/animation.pb masi:masi 664
.cache/compizconfig-1/commands.pb masi:masi 664
.cache/compizconfig-1/compiztoolbox.pb masi:masi 664
% here many files not existing in the RHS
%RHS-file (fresh installation)
.bash_history root:root 600
.bash_logout masi:masi 664
.bashrc masi:masi 644
.cache root:root 700
我不明白是哪个原因导致了错误。
升级到Linux内核4.6
按照此处的指示进行操作。Linux内核4.4中存在一个带有恢复/挂起的通用错误。升级到4.6可解决此问题,并使系统更好。
系统:14.04、16.04
Linux内核: 4.4-4.6