После переустановки Windows 7 на моем компьютере я получаю следующую ошибку при загрузке
bootmgr error
Я могу загрузиться в Windows, только если я отключу жесткий диск Linux, и я могу загрузиться в Linux, только если я нажму Esc , чтобы открыть BIOS и выбрать жесткий диск Linux.
Я пробовал использовать
update grub-install
, но это не помогло. Как мне вернуть grub к исходному состоянию с обеими ОС для загрузки из меню grub?
Ниже моя команда sudo update-grub:
$ sudo update-grub
[sudo] password for gin:
Generating grub.cfg ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-3.8.0-39-generic
Found initrd image: /boot/initrd.img-3.8.0-39-generic
Found linux image: /boot/vmlinuz-3.8.0-37-generic
Found initrd image: /boot/initrd.img-3.8.0-37-generic
Found linux image: /boot/vmlinuz-3.8.0-36-generic
Found initrd image: /boot/initrd.img-3.8.0-36-generic
Found linux image: /boot/vmlinuz-3.8.0-35-generic
Found initrd image: /boot/initrd.img-3.8.0-35-generic
Found linux image: /boot/vmlinuz-3.8.0-34-generic
Found initrd image: /boot/initrd.img-3.8.0-34-generic
Found linux image: /boot/vmlinuz-3.8.0-29-generic
Found initrd image: /boot/initrd.img-3.8.0-29-generic
Found memtest86+ image: /boot/memtest86+.bin
done
Ниже моя команда fdisk
$ sudo fdisk -l
[sudo] password for gin:
Disk /dev/sda: 120.0 GB, 120000000000 bytes
255 heads, 63 sectors/track, 14589 cylinders, total 234375000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000764a1
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 226250751 113124352 83 Linux
/dev/sda2 226252798 234373119 4060161 5 Extended
/dev/sda5 226252800 234373119 4060160 82 Linux swap / Solaris
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
256 heads, 63 sectors/track, 121126 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x8d19c4c4
Device Boot Start End Blocks Id System
/dev/sdb1 1 4294967295 2147483647+ ee GPT
Partition 1 does not start on physical sector boundary.
Disk /dev/sdg: 4009 MB, 4009754624 bytes
145 heads, 48 sectors/track, 1125 cylinders, total 7831552 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0004e24a
Device Boot Start End Blocks Id System
/dev/sdg1 * 48 7831551 3915752 7 HPFS/NTFS/exFAT
Disk /dev/mapper/cryptswap1: 4157 MB, 4157603840 bytes
255 heads, 63 sectors/track, 505 cylinders, total 8120320 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x45a3a931
Disk /dev/mapper/cryptswap1 doesn't contain a valid partition table
Моя первая попытка Как мне восстановить жратву? (Как вернуть Ubuntu после установки Windows?)
$ sudo mount /dev/sda /mnt
mount: /dev/sda already mounted or /mnt busy
gin@ger:~$ for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt$i"; done
mount: mount point /mnt/sys does not exist
mount: mount point /mnt/proc does not exist
mount: mount point /mnt/run does not exist
mount: mount point /mnt/dev does not exist
gin@ger:~$ sudo chroot /mnt
chroot: failed to run command `/bin/bash': No such file or directory
Ниже приведен мой порядок загрузки:
UEFI BOOT SOURCES
WINDOWS BOOT MANAGER
LEGACY BOOT SOURCES
HARD DRIVE
SATO0
SATO1
NETWORK CONTROLLER (REALTEK PXE B07 D00)
работают личинка обновления в терминале как корень. Вы найдете что-то в терминале, как:
"Найденный Windows 7 (загрузчик) на/dev/sdxX"
успех!
/etc/default/grub
. изменитесь GRUB_DEFAULT=0
на то, что Вы хотите. (0: означает первый объект в меню личинки; 1: означает второй объект в меню личинки. Можно найти меню личинки нажатием 'сдвигом' или клавишей со стрелкой вниз, в то время как Вы загружаете свою систему или проверяете /boot/grub/grub.cfg
в человечность) удачи!
Соедините свою начальную загрузку внешнего жесткого диска в Ubuntu, смонтируйте Ваш раздел Windows 7 и попытайтесь выполнить это в терминале
sudo личинка обновления
Для монтирования Вас, никакая потребность использовать терминал просто не открывает окна 7 разделов в наутилусе.