我正在设置双引导无头 Linux/Windows 机器。我主要希望机器始终启动到 Ubuntu,除非偶尔需要在 Windows 中测试某些内容。
我已经安装了 Windows 和 Ubuntu,目前它每次都启动到 Ubuntu。我希望能够告诉它仅在下次启动时启动到 Windows,然后当我从 Windows 重新启动时让系统返回到启动 Ubuntu。
我找到了Grub Legacy - 第 4.3.1 节 - 仅启动一次,但我使用的是 Ubuntu 14.04 服务器,它具有较新版本的 grub。从我读到的内容来看,当我想启动到 Windows 时,我需要对/etc/default/grub和使用进行一些更改sudo grub-set-default。
我认为这些变化始于将其添加到/etc/default/grub:
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=false
Run Code Online (Sandbox Code Playgroud)
任何时候对/etc/default/grub我进行更改,我都知道我需要运行
sudo update-grub,这会导致:
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=false
Run Code Online (Sandbox Code Playgroud)
由于 Windows 是该列表中的第 7 个选项,我相信我会运行sudo grub-set-default 6(基于 0 的计数)-这是正确的,是否有不同的方法可以在系统启动后获取编号的启动选项列表?
另外,这些行是否/etc/default/grub足以实现这种行为,还是我需要添加额外的配置?
我最近习惯ntfsresize调整我的 ntfs 驱动器的大小。
然后我得到一个错误说:
Error mounting /dev/sda1 at /media/<user>/Win10: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000" "/dev/sda1" "/media/<user>/Win10"' exited with non-zero exit status 13: Failed to load runlist for $MFT/$DATA.
highest_vcn = 0xaa4a, last_vcn - 1 = 0x2387f
Failed to load $MFT: Input/output error
Failed to mount '/dev/sda1': Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. …Run Code Online (Sandbox Code Playgroud) boot ×2
dual-boot ×1
grub2 ×1
hard-drive ×1
mount ×1
ntfs ×1
partitioning ×1
windows ×1
windows-7 ×1