私は以前Windows 8を持っていたコンピュータにDebianをインストールしましたが(2つのハードドライブにはストレージハードドライブにDebianがインストールされています)、grubや他のものをロードせずにWindows 8から直接起動しました。起動時にWindowsとDebianを選択するにはどうすればよいですか?
答え1
@user11177 おそらく grub がありません。 UEFIを実行していますか?とにかく一度見てくださいここ。
To install grub:
Getting the System to Boot
Here is a terse summary. For details, see section 4.
1.
Boot your system using a "live CD" or "live DVD".
2.
Open a shell window and become root: sudo su
3.
For clarity, let’s discuss things using the shell variables $partition and $device. An example might be: partition=/dev/sda6 ; device=/dev/sda
4.
You need to know which partition holds the Linux system you want to boot. If you remember this, define $partition and $device accordingly, and skip to the next step. If you need to figure it out,
get a list of disk devices: ls /dev/sd? /dev/hd?
look at each such device: cfdisk $device or fdisk -l $device
Look at the partition sizes and partition labels to find the partition that you want to boot. Define $partition and $device accordingly.
5.
Create a mountpoint: install -d /mnt/radicula
6.
Mount the partition containing your Linux: mount $partition /mnt/radicula
7.
Reinstall grub: grub-install --root-directory=/mnt/radicula $device
Beware: You want to install grub on the device (e.g. /dev/sda). If you install it on the partition (e.g. /dev/sda6), the grub-install program won’t complain, but the results won’t be what you wanted.
That’s probably enough to get you going. If you want to give it a try, shut down the live CD system, eject the CD, and reboot in the normal way from your favorite device (/dev/sda in the example).
If you want to improve your chances, you can do a little more work before rebooting.
8.
If the Live CD system has a /boot directory, move it out of the way: mv /boot /xxxboot
9.
Put the target system’s boot directory in its place: ln -s /mnt/radicula/boot /
10.
Back up the existing grub control file, namely grub.cfg (for Grub Version 2) and/or menu.lst (for Grub Version 1). If both exist, back up both of them. cd /boot/grub ; cp grub.cfg grub.cfg#1 ; cp menu.lst menu.lst#1
11.
Update the grub control file: update-grub.
Note that in Grub Version 1, update-grub writes the file menu.lst, whereas in Grub Version 2, it invokes grub-mkconfig to write the file grub.cfg.
Now you really should be ready to shut own the Live CD system, remove the CD, and reboot in the normal way.