I encountered the cannot find a device for /boot (is /dev mounted?)
error message in a VM I was working on. I have no idea if my solution will apply to you, or to anyone else.
My VM was failing to boot. Therefore, I booted into a rescue environment. The rescue environment was probably running on read-only media that was mounted on /
. As you can see below, I mounted the disk containing my broken desired host installation on /mnt
.
I surmised that grub-install
expects to run inside the host OS filesystem, and, furthermore, grub-install
expects to be able to see the mount of the root filesystem for that host.
So the trick was to first chroot
into the host OS, and then re-mount
the host OS on /
.
I did the following (which I am typing from memory, so it is possible there are errors).
# mount /dev/sdaN /mnt
# mount --rbind /dev /mnt/dev
# mount --rbind /proc /mnt/proc
# mount --rbind /sys /mnt/sys
# chroot /mnt bash
# mount /dev/sdaN /
# grub-install /dev/sda
I was then able to reboot the VM successfully. My host OS was Ubuntu 18.04, and the rescue environment was a version of Debian with a 4.x kernel.
I encountered the cannot find a device for /boot (is /dev mounted?)
error message in a VM I was working on. I have no idea if my solution will apply to you, or to anyone else.
My VM was failing to boot. Therefore, I booted into a rescue environment. The rescue environment was probably running on read-only media that was mounted on /
. As you can see below, I mounted the disk containing my broken desired host installation on /mnt
.
I surmised that grub-install
expects to run inside the host OS filesystem, and, furthermore, grub-install
expects to be able to see the mount of the root filesystem for that host.
So the trick was to first chroot
into the host OS, and then re-mount
the host OS on /
.
I did the following (which I am typing from memory, so it is possible there are errors).
# mount /dev/sdaN /mnt
# mount --rbind /dev /mnt/dev
# mount --rbind /proc /mnt/proc
# mount --rbind /sys /mnt/sys
# chroot /mnt bash
# mount /dev/sdaN /
# grub-install /dev/sda
I was then able to reboot the VM successfully. My host OS was Ubuntu 18.04, and the rescue environment was a version of Debian with a 4.x kernel.
This problem is most often seen during an apt-get update or similar.
Issues in chroot
Mostly this is caused by some issues when running in a chroot.
Before switching to the chroot, it’s necessary to mount at least the /dev and /proc directories.
However sometimes we’ve seen this issue even with these mounts properly configured.
In this example vm1 represens the device our system is running on; it could as easily have been /dev/sda1 or /dev/sdx4.
~ # mount /dev/vg0/vm1 /mnt/vm1 ~ # mount -o bind /dev /mnt/vm1/dev ~ # mount -o bind /dev/pts /mnt/vm1/dev/pts ~ # mount -o bind /proc /mnt/vm1/proc ~ # mount -o bind /run /mnt/vm1/run ~ # mount -o bind /sys /mnt/vm1/sys ~ # chroot /mnt/vm1 /bin/bash
Viewing grub-mkconfig Details
Run grub-mkconfig with debug spew to see details.
~ # sh -x /usr/sbin/grub-mkconfig -o /boot/grub/grub.cfg
Work Arounds
If grub-probe still fails for you, even if properly entering chroot there is one last-ditch work-around.
The purpose of grub-probe is to simply output the file-system type for /
.
So, in the worst case you can do this.
~ # mv /usr/sbin/grub-probe /usr/sbin/grub-probe.orig ~ # curl edoceo.com/pub/grub-probe.sh > /usr/sbin/grub-probe ~ # chmod 0755 /usr/sbin/grub-probe
Here we effectively replace the binary grub-probe with a shell script that simply echos a known good value.
Core of grub-probe
The grub-probe utility is a binary that does something like this.
- Examine
/proc/filesystems
- Examine
/boot/grub/device.map
- Probe
/dev/sd*
- Examine
/proc/devices
- Examine
/proc/self/mountinfo
From that information it will output the file-system type, device, file-system UUID which are fed to the grub-mkconfig
Are you trying to install GRUB with grub-install /dev/sda1
?
Since GRUB practically requires access to MBR and the unused space between the MBR and the first partition when installing for BIOS-style boot process, try grub-install /dev/sda
. If it still displays the same error message, just write your own /boot/grub/device.map
file. In your case, its contents could be just
(hd0) /dev/sda
(Ideally, you would use an appropriate /dev/disk/by-id/...
pathname in place of /dev/sda
, but that’s not mandatory.)
grub-install /dev/sda1
would attempt to embed GRUB’s boot block into PBR of partition sda1
instead of the MBR. Since most filesystems won’t have a fixed space for bootloader, GRUB’s boot block would have to point at /boot/grub/i386-pc/core.img
by physical disk location, which used to be a very seriously discouraged installation mode. Modern versions of GRUB might no longer support installing GRUB that way at all.
The problem is, the boot block code needs to be so small it won’t understand filesystems, so it reads the GRUB image using raw disk block numbers determined at GRUB installation time. For this to work, the GRUB core image needs to be placed somewhere where its physical location on disk is guaranteed to stay the same. From the OS viewpoint, /boot/grub/i386-pc/core.img
is a regular file, so a defragmentation tool or a smart filesystem driver might occasionally move it to a different physical location on-disk: that would cause a total boot failure.
When GRUB is installed to the actual Master Boot Record of a MBR-partitioned disk, the empty space between the MBR and the beginning of the first partition (almost 1 MB) is used for the GRUB core image. Since this place is outside any partitions, no filesystem driver or defragmenting tool is going to touch it. This is enough space to embed the GRUB core image, a filesystem driver and any other GRUB modules needed to access /boot
as a real filesystem. After loading these, GRUB will then be able to load additional modules (including normal.mod
) and its configuration file as regular files, by pathname.
Incidentally, if you wanted to boot the i386-pc version of GRUB from a GPT-partitioned disk, you would need a «biosboot» partition that is sized 1 MB and contains no filesystem: it is used to hold the GRUB core image, as the MBR-style space before the first partition will now be occupied by GPT partition table structures instead.
The empty space between the MBR and the beginning of the first partition is a historical remnant: back when disks still used C/H/S addressing, there was a convention to place the beginning of a partition always to the first sector of a track. Since MBR was the very first block of the disk (C/H/S address 0/0/1), that meant the earliest possible start of first partition would be C/H/S 0/1/1, and the rest of track #0 (= cylinder #0, head #0) would be left unused.
Roughly in the Windows XP era, as C/H/S addressing was no longer meaningful and data alignment on RAID arrays, enterprise storage systems and SSDs was becoming an important performance issue, the start-of-first-partition convention was changed: now the recommended place to start the first partition of the disk was at exactly 1 MiB from the beginning of the disk, or at the LBA block number #2048 (assuming classic 512-byte disk blocks).
Я пытался установить новую установку Ubuntu 12.04 рядом с моей старой установкой 10.10, и я столкнулся с проблемой. Мой компьютер, кажется, имеет привередливый BIOS и хочет загрузочный раздел размером менее 40 ГБ. Итак, когда я установил 10.10, я разделил систему на / boot на / dev / sda1 и / on /dev/sda6.
Когда я установил 12.04 LTS, я полностью забыл об этом, и теперь мне нужно переустановить GRUB. Но, похоже, я получаю ошибку.
mint@mint ~ $ sudo grub-install --root-directory=/mnt /dev/sda
grub-probe: error: cannot find a device for /boot (is /dev mounted?).
Installation finished. No error reported.
Я запускаю это с живого USB-устройства Linux Mint, которое у меня лежало, версия GRUB такая же, как и Ubuntu 12.04, я думаю.
Итак, я что-то упускаю или лучше перезапустить установку Ubuntu?
задан
3 January 2013 в 00:51
поделиться
1 ответ
Я столкнулся с сообщением об ошибке cannot find a device for /boot (is /dev mounted?)
на виртуальной машине, с которой я работал. Я понятия не имею, применимо ли мое решение к вам или кому-либо еще.
Я предположил, что grub-install
ожидает запуска внутри файловой системы ОС хоста и сможет увидеть монтирование корневой файловой системы этого хоста.
Я сделал следующее (что я печатаю по памяти, так что, возможно, есть ошибки).
# mount /dev/sdaN /mnt
# mount --rbind /dev /mnt/dev
# mount --rbind /proc /mnt/proc
# mount --rbind /sys /mnt/sys
# chroot /mnt bash
# mount /dev/sdaN /
# grub-install /dev/sdaN
Затем я смог успешно перезагрузить ВМ. Моей операционной системой была Ubuntu 18.04, а среда спасения была версией Debian с ядром 4.x.
ответ дан mpb
3 January 2013 в 00:51
поделиться
Другие вопросы по тегам:
Похожие вопросы:
- Forum
- The Ubuntu Forum Community
- Ubuntu Official Flavours Support
- Installation & Upgrades
- [SOLVED] update-grub error {cannot find device for /}
-
update-grub error {cannot find device for /}
Hello every1, I’ve been trying to install xubuntu on my Asus EEE 1101ha, which is known to present some problems due to lack of efficient poulsbo drivers. By following the instructions in the official documentation of Ubuntu, I managed to reach a working live CD environment and install Xubuntu. The next step I had to follow was to edit a grub text and then update grub for the changes to take effect {If I discarded this step, grub wouldn’t load, giving me an error message which I will mention if needed}. Unfortunately, when I used «sudo update-grub» to update it, the following error came up:
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
I mounted all the filesystems yet it didn’t help. I tried running grub-probe by double clicking it, but again it didn’t seem to run, nor was grub updated since it kept giving me the same error. I googled the error a bit, but although I tried a thing or two, it was no use. Any help would be appreciated.
-
Re: update-grub error {cannot find device for /}
It sounds like you’re trying to make the grub changes on your (Xubuntu-installed) filesystem from a LiveCD. Is that correct? Please do explain what was wrong in the first place requiring a change.
If you are indeed running update-grub from a live CD you’ll need to mount the virtual filesystems and chroot first:
Code:
# Mount root partition: sudo mount /dev/sdXY /mnt # /dev/sdXY is your root partition, e.g. /dev/sda1 # If you have a separate boot partition you'll need to mount it also: sudo mount /dev/sdYY /mnt/boot # Mount your virtual filesystems: for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done # Chroot sudo chroot /mnt
NOW you can do grub-install and update-grub and whatnot and it’ll operate on your installed system rather than the LiveCD.
-
Re: update-grub error {cannot find device for /}
Hey I’m was having the same problem with 32bit and trying to setup dual boot with xp (got 32bit working minus some drivers missing as a solo OS never dual) but have 4gb ram so wanted to use 64bit to utilize hardware n figured id just emulate xp if I have too, but while installing 64bit server or desktop, I cannot get around this error.
I was given a vaio vpcz11cgx/x, has dual solid state drives Im pretty sure it’s raid0. I’ve tried letting it auto setup on (striped drive) and errors on bootloader install. /dev/mapper is what shows up as default it, I’ve tried /dev/sda and the Ubuntu OS partition, blank partitions fat/ext/blank on beginning and end of disk =P. On manual partitions I’ve tried just ext4 n swap space as primary, I’ve left a 2gb primary partition to instal grub n put ext4 n swap in extended logical partition, also tried 2gb primary with ext as primary n swap on extended. I think my error due to either a raid config or partitioning… Lol or both
Also curious which has a more stability 64bit server or desktop. Thanx for help in advanced.
-
Re: update-grub error {cannot find device for /}
The virtual filesystems are not found. What do I do wrong? Sry, I’m kinda new to linux… heres what I type and what it returns:
Code:
xubuntu@xubuntu:~$ for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done mount: mount point /mnt/dev does not exist mount: mount point /mnt/dev/pts does not exist mount: mount point /mnt/proc does not exist mount: mount point /mnt/sys does not exist mount: mount point /mnt/run does not exist
I reinstalled Xubuntu in a single partition choosing the automatic installation option. The root partition is therefore /dev/sda1. What is there to be done then?
P.S. You guessed right, I’m using the console from a Live USB stick
-
Re: update-grub error {cannot find device for /}
The error message usually means the system partition was not mounted properly. Did you mount your real xubuntu partition (sda1) on /mnt before running the command?
You might try installing Boot Repair (see link in my sig line) from the LiveCD/USB Desktop and let it try to fix GRUB. If it can’t do it with the «Recommended repair» button there is an Advanced option that can take you through the ‘chroot’ method.
If neither of the Boot Repair options fixes things, it has an option to run a boot info script, which can provide us with information we need to give you more specific advice.
-
Re: update-grub error {cannot find device for /}
Nvm, although the update-grub didn’t work so the text file wasn’t modified, grub2 loads normally and I finally booted xubuntu from the hard disk installation. I hope grub keeps that way. I won’t label the thread as solved today, cause, I’m not still sure about how stable grub is. Furthermore, maybe Bluphx can get some help from here before I close it. Thanks again for your help guys, I hope someday I’ll be amongst you who offer help around here.
-
Re: update-grub error {cannot find device for /}
Yo thanx for the heads up, Im going to try to run the bootrepair program if this install doesn’t work. I’ve setup the partition in gpart before hand this time as:
ATARaid volume 0 238.48gb /dev/mapper/isw_bfdjejgiae
extended 238.48gb
ext4 200gb
unallocated 39gb
linux-swap 4.2gb
unallocated 4mbI have left 4mb on the end of the drive b/c all the other screens and my other computer that runs ubuntu fine has an extra 2mb on end of HD. I’ve also left 39gb floating between ext4 and swap b/c if i can get a working install I’d like a XP partition to dualboot or VM from.
All goes fine till very end of install n get a GRUB error and ask to reselect where to install boot. Default it tries /dev/mapper/, i’ve tried volume #’s and sda/b/ect.
Thanx again in advanced, ex apple genius so starting to learn the lingo n new ways of ubuntu.
-
Re: update-grub error {cannot find device for /}
Here I am again… ok, I don’t know how I did it, but it seems like grub tries to load from the live usb, even though I have already installed xubuntu on the hard disk. Here’s the case: If I try to load xubuntu from the hard disk without having the usb stick plugged, grub doesn’t load. If I plug the usb stick, grub loads normally and xubuntu boots from the hard disk {This means I can’t even boot from the live usb, yet I can’t boot from hard disk without it!}. So… please tell me some good news… I will keep you updated in case I successfully update grub and solve this nonsense
-
Re: update-grub error {cannot find device for /}
Well… I’ve done all I could. I followed all three steps of this guide: https://wiki.ubuntu.com/HardwareSupp…oCardsPoulsbo/
yet nothing changed. I still need the usb stick to boot. If I don’t use it, grub doesn’t start and I only see a flashing cursor. I believe that the problem lies in that grub tries to load from the usb stick instead of the hard disk. I came to this conclusion after I prompted:
sudo update-grub
in order to finish the third option given on the guide linked above, for as soon as I pressed enter the usb started flashing, indicating data transmission to the usb stick! I don’t believe its a coincidence. I prompted «sudo update-grub» while the console was running from the hard disk, but I believe that this commanded the update of the usb stick’s grub. When I removed the usb stick and retried using the update-grub command, the update was again completed successfully {Which means that after I removed the usb stick, the command now went for the hard disk’s grub… right? :O} Omg I know all this is confusing but, does anyone know some way to direct grub startup to the hard disk’s grub installation {In human terms: I want the .txt file where the grub boot path is written, so that I can modify it to lead grub to boot from the hard disk}? Or is it something else? Help!!!
-
Re: update-grub error {cannot find device for /}
Odys1,
Normally all that should be required is to change your boot drive’s MBR instructions to point to your Ubuntu partition rather than the external device. You do this with the ‘grub-install’ command.
Boot to your normal Ubuntu OS (even if it requires using the USB initially). After it boots, run the following command, using the correct drive letter. Just make sure the drive designation is what you think it is (sda, sdb, etc). You can run «sudo fdisk -l» to check first if necessary. Do NOT use the partition number:
Code:
sudo grub-install /dev/sda
The next time you boot just make sure the external is not inserted and the BIOS should look to the sda drive’s MBR for instructions on where the bootloader files are located.
Tags for this Thread
Bookmarks
Bookmarks
Posting Permissions
- Печать
Страницы: [1] 2 Все Вниз
Тема: Восстановление GRUB (Прочитано 4632 раз)
0 Пользователей и 1 Гость просматривают эту тему.
S9
Доброго вечера! Вообщем, обновил при очередном обновлении системы, также обновилось ядро. Т.к. на компе, помимо Ubuntu 12.04 стоит ещё и Windows 7, то в меню выбора системы, при загрузке компа было что то такого
Ubuntu, c Linux 3.2.0-25 generic
Ubuntu, c Linux 3.2.0-26 generic
Ubuntu, c Linux 3.2.0-26 generic (режим востановления)
Windows 7
Решил сделать то, что и всегда делал: убрать старое ядро из загрузчика GRUB (v 1.99)
Вроде сделал, как обычно, но теперь в окне выбора осей только винда….
В гугле только описаны критические случаи… т.е. когда, например, ничего не выбирается и т.д.
Как вернуть назад Ubuntu?
P.S. Сейчас зашел с Ubuntu 12.04 с помощью LiveCD…
Вот что получается, при попытки поставить GRUB с LiveCD…
Заранее спасибо!
« Последнее редактирование: 29 Июня 2012, 22:55:09 от S9 »
Burning on the flame
Played the waiting game
Легас
Бес труда и пальцем в носу не по ковыряешься и в Linuxe не разбирёси!!!
S9
Вот что сделал..
Сейчас перегружу комп и отпишусь о результате
Burning on the flame
Played the waiting game
rumit
S9
Мне не надо удалять старые ядра.. Мне надо добавить Ubuntu в список загружаемых осей.. А то там только винда осталась.. Вот и с неё пишу тут…((
P.S. Мои деяния из второго поста никаких деяний не дали…
Burning on the flame
Played the waiting game
MEXAHOTABOP
rumit
jura12
S9
Burning on the flame
Played the waiting game
MEXAHOTABOP
S9
Делал все, как написано в хелпе.
только на последнюю команду sudo update-grub —output=/mnt/boot/grub/grub.cfg
он пишет /usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
Это нормально?
P.S. Комп пока не перегружал
« Последнее редактирование: 30 Июня 2012, 16:46:53 от S9 »
Burning on the flame
Played the waiting game
MEXAHOTABOP
S9
На sudo update-grub пишет тоже самое ругательство /usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
Пользователь решил продолжить мысль 30 Июня 2012, 17:04:29:
ты не подмонтировал /dev
а как его подмонтировать?
Написать
sudo mount —bind /dev /mnt/dev ??
Пользователь решил продолжить мысль 30 Июня 2012, 17:07:13:
sudo mount —bind /dev /mnt/dev не помогает..
Пользователь решил продолжить мысль 30 Июня 2012, 17:36:35:
Вообщем, попробовал написать sudo mount /dev, получил вот что.
ubuntu@ubuntu:~$ sudo mount /dev
mount: udev already mounted or /dev busy
mount: according to mtab, udev is already mounted on /dev
ubuntu@ubuntu:~$
Сейчас ребут — и напишу о результате
Пользователь решил продолжить мысль 30 Июня 2012, 17:51:10:
Результат тот же: в окне загрузчика GRUB доступна только Windows 7…
« Последнее редактирование: 30 Июня 2012, 17:51:10 от S9 »
Burning on the flame
Played the waiting game
Легас
вариант 1.: в LiveCD —> в Gparted посмотри, активный ли раздел dev/sda8, если нет сделай активным — т.е. примонтируй и снова попробуй восстановить GRUB
вариант 2.: не очень приятный (подразумеваю о затёртости boot-раздела) — попытайся использовать режим восстановления
вариант 3,: если ничего не поможет, то только полная переустановка.
Бес труда и пальцем в носу не по ковыряешься и в Linuxe не разбирёси!!!
jura12
S9,
в моем способе надо system заменить на mnt или создать папку system.
- Печать
Страницы: [1] 2 Все Вверх
Для восстановления GRUB потребуется загрузочный диск или флешка с дистрибутивом Linux. Итак, вы загрузились в Live-режиме. Теперь нужно открыть терминал.
1.Нужно определить раздел диска, на котором был установлен GRUB fdisk -l
.
2.Например установлен в /dev/sda
, примонтируем корневой раздел, выполняем команду (вместо /dev/sda вы должны указать свой раздел):sudo mount /dev/sda /mnt
. Если для загрузчика у вас выделен отдельный раздел, то нужно примонтировать еще и его (вместо /dev/sdX укажите ваш boot-раздел):sudo mount /dev/sdX /mnt/boot
3.Посмотреть содержимое директории /mnt, чтобы убедиться, что мы примонтировали верный раздел:ls /mnt
.
4.Нужно создать ссылки на несколько директорий, к которым GRUB должен иметь доступ для обнаружения всех операционных систем. Для этого выполните команды:sudo mount --bind /dev /mnt/dev sudo mount --bind /dev/pts /mnt/dev/pts sudo mount --bind /proc /mnt/proc sudo mount --bind /sys /mnt/sys
.Если у вас используется UEFI, то еще нужно примонтировать EFI-раздел в директорию /mnt/boot/efi :sudo mount /dev/nvme0n1p1 /mnt/boot/efi
например…
5.Для генерации файла конфигурации GRUB используется команда update-grub
. Данная команда автоматически определяет файловые системы на вашем компьютере и генерирует новый файл конфигурации. Выполняем команду:sudo update-grub
.
Если вдруг утилита update-grub не определила ваш Windows ,то можно будет запустить update-grub повторно уже из вашей Linux-системы, когда вы в нее загрузитесь (мне это помогло и Windows определился).
6.Осталось выполнить установку GRUB на диск. Мы определили раздел на котором у нас установлен GRUB на первом шаге данного руководства. Это раздел /dev/sda.
Для установки GRUB используется команда grub-install
, которой нужно передать в качестве параметра диск, на который будет выполняться установка (в моем случае это диск /dev/sda
):grub-install /dev/sda
.
7.Выходим из окружения chroot: exit
.
8.Отмонтируем все разделы, которые мы примонтировали:sudo umount /mnt/sys sudo umount /mnt/proc sudo umount /mnt/dev/pts sudo umount /mnt/dev
. Если вы монтировали boot-раздел, то его тоже нужно отмонтировать:sudo umount /mnt/boot
.Если вы монтировали EFI-раздел, отмонтируем:sudo umount /mnt/boot/efi
.Отмонтируем корневой раздел:sudo umount /mnt
.
9.Перезагружаем компьютер:reboot
.
Если во время перезагрузки компьютера меню GRUB не появилось, то это еще не значит, что он не восстановился. Возможно, просто установлена нулевая задержка и меню не показывается. Чтобы показать меню GRUB нужно во время загрузки, после того, как появился логотип материнской платы:
удерживать клавишу Shift, если у вас классический BIOS
; нажать Esc, если у вас UEFI
.
Если у вас, при выполнении grub-update, не определился Windows и не был добавлен в меню GRUB, то уже загрузившись в вашу систему Linux (не LiveCD), откройте терминал и выполните:sudo grub-update
.
This problem is most often seen during an apt-get update or similar.
Issues in chroot
Mostly this is caused by some issues when running in a chroot.
Before switching to the chroot, it’s necessary to mount at least the /dev and /proc directories.
However sometimes we’ve seen this issue even with these mounts properly configured.
In this example vm1 represens the device our system is running on; it could as easily have been /dev/sda1 or /dev/sdx4.
~ # mount /dev/vg0/vm1 /mnt/vm1 ~ # mount -o bind /dev /mnt/vm1/dev ~ # mount -o bind /dev/pts /mnt/vm1/dev/pts ~ # mount -o bind /proc /mnt/vm1/proc ~ # mount -o bind /run /mnt/vm1/run ~ # mount -o bind /sys /mnt/vm1/sys ~ # chroot /mnt/vm1 /bin/bash
Viewing grub-mkconfig Details
Run grub-mkconfig with debug spew to see details.
~ # sh -x /usr/sbin/grub-mkconfig -o /boot/grub/grub.cfg
Work Arounds
If grub-probe still fails for you, even if properly entering chroot there is one last-ditch work-around.
The purpose of grub-probe is to simply output the file-system type for /
.
So, in the worst case you can do this.
~ # mv /usr/sbin/grub-probe /usr/sbin/grub-probe.orig ~ # curl edoceo.com/pub/grub-probe.sh > /usr/sbin/grub-probe ~ # chmod 0755 /usr/sbin/grub-probe
Here we effectively replace the binary grub-probe with a shell script that simply echos a known good value.
Core of grub-probe
The grub-probe utility is a binary that does something like this.
- Examine
/proc/filesystems
- Examine
/boot/grub/device.map
- Probe
/dev/sd*
- Examine
/proc/devices
- Examine
/proc/self/mountinfo
From that information it will output the file-system type, device, file-system UUID which are fed to the grub-mkconfig
Are you trying to install GRUB with grub-install /dev/sda1
?
Since GRUB practically requires access to MBR and the unused space between the MBR and the first partition when installing for BIOS-style boot process, try grub-install /dev/sda
. If it still displays the same error message, just write your own /boot/grub/device.map
file. In your case, its contents could be just
(hd0) /dev/sda
(Ideally, you would use an appropriate /dev/disk/by-id/...
pathname in place of /dev/sda
, but that’s not mandatory.)
grub-install /dev/sda1
would attempt to embed GRUB’s boot block into PBR of partition sda1
instead of the MBR. Since most filesystems won’t have a fixed space for bootloader, GRUB’s boot block would have to point at /boot/grub/i386-pc/core.img
by physical disk location, which used to be a very seriously discouraged installation mode. Modern versions of GRUB might no longer support installing GRUB that way at all.
The problem is, the boot block code needs to be so small it won’t understand filesystems, so it reads the GRUB image using raw disk block numbers determined at GRUB installation time. For this to work, the GRUB core image needs to be placed somewhere where its physical location on disk is guaranteed to stay the same. From the OS viewpoint, /boot/grub/i386-pc/core.img
is a regular file, so a defragmentation tool or a smart filesystem driver might occasionally move it to a different physical location on-disk: that would cause a total boot failure.
When GRUB is installed to the actual Master Boot Record of a MBR-partitioned disk, the empty space between the MBR and the beginning of the first partition (almost 1 MB) is used for the GRUB core image. Since this place is outside any partitions, no filesystem driver or defragmenting tool is going to touch it. This is enough space to embed the GRUB core image, a filesystem driver and any other GRUB modules needed to access /boot
as a real filesystem. After loading these, GRUB will then be able to load additional modules (including normal.mod
) and its configuration file as regular files, by pathname.
Incidentally, if you wanted to boot the i386-pc version of GRUB from a GPT-partitioned disk, you would need a «biosboot» partition that is sized 1 MB and contains no filesystem: it is used to hold the GRUB core image, as the MBR-style space before the first partition will now be occupied by GPT partition table structures instead.
The empty space between the MBR and the beginning of the first partition is a historical remnant: back when disks still used C/H/S addressing, there was a convention to place the beginning of a partition always to the first sector of a track. Since MBR was the very first block of the disk (C/H/S address 0/0/1), that meant the earliest possible start of first partition would be C/H/S 0/1/1, and the rest of track #0 (= cylinder #0, head #0) would be left unused.
Roughly in the Windows XP era, as C/H/S addressing was no longer meaningful and data alignment on RAID arrays, enterprise storage systems and SSDs was becoming an important performance issue, the start-of-first-partition convention was changed: now the recommended place to start the first partition of the disk was at exactly 1 MiB from the beginning of the disk, or at the LBA block number #2048 (assuming classic 512-byte disk blocks).
Содержание
- Thread: update-grub error
- update-grub error
- Re: update-grub error
- Re: update-grub error
- Re: update-grub error
- Re: update-grub error
- Re: update-grub error
- Re: update-grub error
- Re: update-grub error
- Re: update-grub error
- Re: update-grub error
- Grub2 не генерирует конфиг
- Grub probe error cannot find
Thread: update-grub error
Thread Tools
Display
update-grub error
Hello every1, I’ve been trying to install xubuntu on my Asus EEE 1101ha, which is known to present some problems due to lack of efficient poulsbo drivers. By following the instructions in the official documentation of Ubuntu, I managed to reach a working live CD environment and install Xubuntu. The next step I had to follow was to edit a grub text and then update grub for the changes to take effect . Unfortunately, when I used «sudo update-grub» to update it, the following error came up:
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
I mounted all the filesystems yet it didn’t help. I tried running grub-probe by double clicking it, but again it didn’t seem to run, nor was grub updated since it kept giving me the same error. I googled the error a bit, but although I tried a thing or two, it was no use. Any help would be appreciated.
Re: update-grub error
It sounds like you’re trying to make the grub changes on your (Xubuntu-installed) filesystem from a LiveCD. Is that correct? Please do explain what was wrong in the first place requiring a change.
If you are indeed running update-grub from a live CD you’ll need to mount the virtual filesystems and chroot first:
NOW you can do grub-install and update-grub and whatnot and it’ll operate on your installed system rather than the LiveCD.
Re: update-grub error
Hey I’m was having the same problem with 32bit and trying to setup dual boot with xp (got 32bit working minus some drivers missing as a solo OS never dual) but have 4gb ram so wanted to use 64bit to utilize hardware n figured id just emulate xp if I have too, but while installing 64bit server or desktop, I cannot get around this error.
I was given a vaio vpcz11cgx/x, has dual solid state drives Im pretty sure it’s raid0. I’ve tried letting it auto setup on (striped drive) and errors on bootloader install. /dev/mapper is what shows up as default it, I’ve tried /dev/sda and the Ubuntu OS partition, blank partitions fat/ext/blank on beginning and end of disk =P. On manual partitions I’ve tried just ext4 n swap space as primary, I’ve left a 2gb primary partition to instal grub n put ext4 n swap in extended logical partition, also tried 2gb primary with ext as primary n swap on extended. I think my error due to either a raid config or partitioning. Lol or both
Also curious which has a more stability 64bit server or desktop. Thanx for help in advanced.
Re: update-grub error
The virtual filesystems are not found. What do I do wrong? Sry, I’m kinda new to linux. heres what I type and what it returns:
I reinstalled Xubuntu in a single partition choosing the automatic installation option. The root partition is therefore /dev/sda1. What is there to be done then?
P.S. You guessed right, I’m using the console from a Live USB stick
Re: update-grub error
The error message usually means the system partition was not mounted properly. Did you mount your real xubuntu partition (sda1) on /mnt before running the command?
You might try installing Boot Repair (see link in my sig line) from the LiveCD/USB Desktop and let it try to fix GRUB. If it can’t do it with the «Recommended repair» button there is an Advanced option that can take you through the ‘chroot’ method.
If neither of the Boot Repair options fixes things, it has an option to run a boot info script, which can provide us with information we need to give you more specific advice.
Re: update-grub error
Nvm, although the update-grub didn’t work so the text file wasn’t modified, grub2 loads normally and I finally booted xubuntu from the hard disk installation. I hope grub keeps that way. I won’t label the thread as solved today, cause, I’m not still sure about how stable grub is. Furthermore, maybe Bluphx can get some help from here before I close it. Thanks again for your help guys, I hope someday I’ll be amongst you who offer help around here.
Re: update-grub error
Yo thanx for the heads up, Im going to try to run the bootrepair program if this install doesn’t work. I’ve setup the partition in gpart before hand this time as:
ATARaid volume 0 238.48gb /dev/mapper/isw_bfdjejgiae
extended 238.48gb
ext4 200gb
unallocated 39gb
linux-swap 4.2gb
unallocated 4mb
I have left 4mb on the end of the drive b/c all the other screens and my other computer that runs ubuntu fine has an extra 2mb on end of HD. I’ve also left 39gb floating between ext4 and swap b/c if i can get a working install I’d like a XP partition to dualboot or VM from.
All goes fine till very end of install n get a GRUB error and ask to reselect where to install boot. Default it tries /dev/mapper/, i’ve tried volume #’s and sda/b/ect.
Thanx again in advanced, ex apple genius so starting to learn the lingo n new ways of ubuntu.
Re: update-grub error
Here I am again. ok, I don’t know how I did it, but it seems like grub tries to load from the live usb, even though I have already installed xubuntu on the hard disk. Here’s the case: If I try to load xubuntu from the hard disk without having the usb stick plugged, grub doesn’t load. If I plug the usb stick, grub loads normally and xubuntu boots from the hard disk . So. please tell me some good news. I will keep you updated in case I successfully update grub and solve this nonsense
Re: update-grub error
yet nothing changed. I still need the usb stick to boot. If I don’t use it, grub doesn’t start and I only see a flashing cursor. I believe that the problem lies in that grub tries to load from the usb stick instead of the hard disk. I came to this conclusion after I prompted:
sudo update-grub
in order to finish the third option given on the guide linked above, for as soon as I pressed enter the usb started flashing, indicating data transmission to the usb stick! I don’t believe its a coincidence. I prompted «sudo update-grub» while the console was running from the hard disk, but I believe that this commanded the update of the usb stick’s grub. When I removed the usb stick and retried using the update-grub command, the update was again completed successfully Omg I know all this is confusing but, does anyone know some way to direct grub startup to the hard disk’s grub installation ? Or is it something else? Help.
Re: update-grub error
Normally all that should be required is to change your boot drive’s MBR instructions to point to your Ubuntu partition rather than the external device. You do this with the ‘grub-install’ command.
Boot to your normal Ubuntu OS (even if it requires using the USB initially). After it boots, run the following command, using the correct drive letter. Just make sure the drive designation is what you think it is (sda, sdb, etc). You can run «sudo fdisk -l» to check first if necessary. Do NOT use the partition number:
The next time you boot just make sure the external is not inserted and the BIOS should look to the sda drive’s MBR for instructions on where the bootloader files are located.
Источник
Grub2 не генерирует конфиг
При вызове grub2-mkconfig выходит сообщение Generating grub.cfg . а далее /usr/sbin/grub2-probe: error: cannot find a GRUB drive for . Check your device.map. Генерирую из-под LiveCD Ubuntu под chroot. /dev,/proc смонтирован.
cat /proc/mounts > /etc/mtab ?
Как вызываете grub2-mkconfig? Только не говорите, что без параметров.
Напиши руками, там 20 строчек.
grub2-mkconfig -o /boot/grub2/grub.cfg
Да пробовал я, он при загрузке опять на device.map ругается и ни в какую
Монтирую бут тоже из-под чрута, все равно говорит, проверьте device.map. Его в /boot/grub2 нету, grub2-install не создает его, в mtab бут есть
И чего вас всех потянуло на grub2 под gentoo? Есть же родной незамасканный grub.
Он нормально работал, просто систему на новый хард перенес
просто систему на новый хард перенес
А UUID`ы поменяли где надо?
просто систему на новый хард перенес
а grub-install нормально отработал?
попробуй grub-mkdevicemap перед генераций конфига
Нука, откачу-ка я граб на версию пониже
так плюнь на убунту, да запусти с харда через chroot
дык и так из-под chroot grub пускаю
каким образом chroot делал? в смысле /dev и /proc как монтировал? да и /sys тоже не помешал бы
$ cat /boot/grub/device.map
(hd0) /dev/sda
А что у тебя в этом файле?
проверьте device.map. Его в /boot/grub2 нету, grub2-install не создает его
Создай руками, там содержимое тривиально.
откатил граб, граб-инсталл создал device.map, но mkconfig конфиг все равно не генерирует. с конфигом в ручную не грузится, говорит мол no such device, перепроверил 10 раз, написано правильно
монтируй и /dev и /proc и /sys через -o bind
И чего вас всех потянуло на grub2 под gentoo? Есть же родной незамасканный grub.
Старый граб нифига не умеет. Ни EFI, ни GPT, ни LVM, ни btrfs и т.д.
Смонтировал /sys, сделал на всякий revdep-rebuild, он мне пересобрал udisks и после этого граб сделал конфиг. ОС загрузилась
У меня тоже была такая же (или похожая) проблема, но я не помню, как решал. ЕМНИП, граб ещё и не мог определить тип файловой системы FAT, которая в /boot/efi. Если используете бету граба 2.00, то лучше откатить на что-то постарее, хотя бы на 2.00_beta0, потому что со всеми бетами у меня были проблемы (там ещё и опечатка в grub-install есть, связанная с EFI).
а всё дело в хэндбуке, который не учит монтировать /sys
Источник
Grub probe error cannot find
/dev/sda is a 2TB HDD, currently only used by Windows but gonna partition this once this finally works
/dev/sdb1 Windows Recovery Partition NTFS
/dev/sdb2 EPS: contains Boot, gentoo, Microsoft and grub
/dev/sdb3 Windows C:/ NTFS
/dev/sdb4 bios_grub partition
/dev/sdb5 swap partition
/dev/sdb6 gentoo root ext4
Код: |
/dev/sdb2 /boot/efi vfat defaults,noatime 0,2 /dev/sdb5 none swap sw 0,0 /dev/sdb6 / ext4 noatime 0,1 |
Legacy mode is turned off on the motherboard, secure boot is turned off, I’ve checked to make sure the EFI partition is formatted for GPT. I’ve looked through the handbook and the separate page specifically for grub2 installation multiple times as well as scouring every forum post on the internet that mentioned this error or anything related to grub not finding the images and I’ve come up with nothing. Any help would be amazing, thanks
[Moderator edit: added [c ode] tags to preserve output layout. -Hu]
edit: Thank you, Mr moderator. Looks way prettier
Последний раз редактировалось: Dyspy (чт ноя 14, 2019 6:12 pm), всего редактировалось 2 раз(а) Вернуться к началу
Arvo
n00b
Зарегистрирован: 30 сен 2019
Сообщений: 9
Добавлено: ср окт 23, 2019 6:03 pm Заголовок сообщения: | ||
That’s really unfortunate. Hopefully we can resolve this issue! Have you run these commands in the host environment to provide the required files (example shows Gentoo mounted on /mnt/gentoo like in the Handbook):
Have you also mounted the Windows partitions already? Последний раз редактировалось: Arvo (ср окт 23, 2019 6:10 pm), всего редактировалось 1 раз |
Вернуться к началу
Dyspy
n00b
Зарегистрирован: 23 окт 2019
Сообщений: 7
Добавлено: ср окт 23, 2019 6:09 pm Заголовок сообщения: | |
I had mounted and bound udev yes, didn’t work |
Вернуться к началу
Arvo
n00b
Зарегистрирован: 30 сен 2019
Сообщений: 9
Добавлено: ср окт 23, 2019 6:42 pm Заголовок сообщения: | |
Does the error persist if you remove the usb drive which contains the installation cd? |
Вернуться к началу
Jaglover
Watchman
Зарегистрирован: 29 мая 2005
Сообщений: 8291
Откуда: Saint Amant, Acadiana
Добавлено: ср окт 23, 2019 7:55 pm Заголовок сообщения: | |
I have to say I do not multiboot, I do not have Windows and I do not use Grub. Meaning I’m not sure what exactly Windows does in your ESP partition and whether it can coexist with other bootloaders. Anyhow, if Grub install fails you can always set it up by hand. Copy its EFI executable next to Windows bootloader, this is the place where your motherboard firmware is looking for it and it may automagically appear in your EFI boot menu. If it does not — use efibootmgr to add it by hand. Then write a simple grub.cfg which loads your kernel and that’s it. _________________ My Gentoo installation notes. Please learn how to denote units correctly! |
Вернуться к началу
Dyspy
n00b
Зарегистрирован: 23 окт 2019
Сообщений: 7
Добавлено: чт окт 24, 2019 8:39 am Заголовок сообщения: | ||
So I am very certain it’s not a problem as I have seen a lot of people on the internet with EFI multiboot setups and it doesn’t appear to be a problem. Copying the EFI executable is unnecessary as grub does actually install and run fine and is already accessible from the EFI boot menu, it just can’t find either Linux or Windows. As for using efibootmgr, I already set it up using efibootmgr and it works, however this is pretty cumbersome to use and I wasn’t really looking for a workaround, I was looking on how to fix grub2, specifically the os-prober script. I appreciate the help anyways, though, thank you and I may end up writing a custom grub.cfg file with the menu entry. Edit: Just to make clear, I was not trying to install grub2 and setup efibootmgr at the same time, I am aware that can cause conflicts. I uninstalled grub2 and got the efibootmgr setup running, however, I would like to get just grub working. Последний раз редактировалось: Dyspy (чт окт 24, 2019 9:02 am), всего редактировалось 1 раз |
Вернуться к началу
Dyspy
n00b
Зарегистрирован: 23 окт 2019
Сообщений: 7
Добавлено: чт окт 24, 2019 8:42 am Заголовок сообщения: | ||
It does, unfortunately |
Вернуться к началу
Marlo
Veteran
Зарегистрирован: 26 июл 2003
Сообщений: 1591
Добавлено: чт окт 24, 2019 6:39 pm Заголовок сообщения: | ||||||||
Dyspy!
Never use the command in your configuration It will overwrite the MBR and can destroy your system! Stop! —> Read carefully and check them before you doing anything. Scroll down to: «On EFI systems for fixed disk install you have to mount EFI System Partition. » and read word by word: twice! After the chroot the mtab has to be renewed.
In your configuration, boot is a directory of root, without a separate partition. -> /boot. Connect /dev/sdb2 to /boot/efi
Grub wants to install with the command:
and then:
If you are unsure. Do not do anything. greetings |
Вернуться к началу
Dyspy
n00b
Зарегистрирован: 23 окт 2019
Сообщений: 7
Добавлено: пт ноя 08, 2019 1:23 pm Заголовок сообщения: | ||||||||||
I checked that /etc/mtab hadn’t been modified just in case and it hadn’t. Unfortunately, the error still exists |
Вернуться к началу
Jaglover
Watchman
Зарегистрирован: 29 мая 2005
Сообщений: 8291
Откуда: Saint Amant, Acadiana
Добавлено: пт ноя 08, 2019 6:18 pm Заголовок сообщения: | ||
I see some confusion here, efibootmgr is a tool to set up EFI Boot Manager in motherboard firmware. In case you want to use Grub2 in EFI mode efibootmgr must be available as dependency, Grub2 install scripts use it to configure EFI Boot Manager (the boot manager built into firmware). OTOH, you can use efibootmgr from a removable media to set up your EFI boot, and once you are done there is no need for it any more. I personally love simplicity, thus I boot my Gentoo directly from firmware without using any middlemen. I used efibootmgr to add another entry into firmware EFI Boot Manager for my backup kernel and that’s it. Now my box boots straight into Gentoo, unless I hit F11 during boot to access EFI Boot Manager menu, then I have choices to boot new or old kernel. |
Вернуться к началу
DONAHUE
Watchman
Зарегистрирован: 09 дек 2006
Сообщений: 7644
Откуда: Goose Creek SC
Добавлено: пт ноя 08, 2019 7:33 pm Заголовок сообщения: | ||||||||
Does this mean that you can boot and run the installed gentoo system (no chroot or install media involved)?
, mount or remount the EFI Systems Partition (ESP) read/write. Then use wgetpaste to collect and publish results of grub reruns, filesystem structure, disk structure as in:
I’ve been dual/multibooting since 2012. Running the commands above my terminal shows:
|
||||||||
Вернуться к началу | ||||||||
Dyspy n00b Зарегистрирован: 23 окт 2019 |
|
|||||||
Вернуться к началу | ||||||||
DONAHUE Watchman Зарегистрирован: 09 дек 2006 |
|
|||||||
Вернуться к началу | ||||||||
Вы не можете начинать темы
Вы не можете отвечать на сообщения
Вы не можете редактировать свои сообщения
Вы не можете удалять свои сообщения
Вы не можете голосовать в опросах
Copyright 2001-2023 Gentoo Foundation, Inc. Designed by Kyle Manna © 2003; Style derived from original subSilver theme. | Hosting by Gossamer Threads Inc. © | Powered by phpBB 2.0.23-gentoo-p11 © 2001, 2002 phpBB Group
Privacy Policy
Источник
Adblock
detector
- Печать
Страницы: [1] Вниз
Тема: проблема с grub после удаления ubuntu. HELP!!! (Прочитано 5558 раз)
0 Пользователей и 1 Гость просматривают эту тему.
mr.bl
Вчера поставил на ноутбук(Sony Vaio vpc-s13x9r) ubuntu-10.10-dvd-i386 (desktop), но оказалось что в ноутбуках сони какаято не стандартная матрица(или что то типо того), ну вообщем ubuntu отображжалась только на внешнем экране(на самом ноутбуке черный экран просто), я решил снести Ubuntu, запустил Windows 7 на нем Acronis и отформатировал раздел на котором была установлена Ubuntu…
После перезапуска высветилось:
error: no such partiton.
grub rescue>
как это исправить?!
p.s. Диска Windows 7 нету
зачем я только полез в линукс?…
лесной_зонтик
Способов много, к примеру
1. запустить livecd Ubuntu и закачать liveusb версию винды, залить на флешку и востановить с её помощью загрузчик.
2. опять же загрузится с livecd Ubuntu, в освободившемся месте создать раздел ext2 в несколько мегабайт.
подключить его.
выполнить sudo update-grub
sudo grub-install —root-directory=/точка_монтирования_созданного_раздела /dev/sda
после чего скопировать /boot/grub/grub.cfg в boot/grub/ на твоём созданном разделе.
перезагрузиться и зайти в винду, а там уже либо опять скачать винду и с ёё помощью окончательно восстановить загрузчик винды или поставить acronis os selector (вроде так завётся)
Моя мечта поставить на комп Linux, Unix, *BSD, Mac OS X, OpenSolaris, OS/2, Windows.
Не спрашивайте зачем. Сам не знаю
mr.bl
создать раздел ext2 в несколько мегабайт.
подключить его.
как?
выполнить sudo update-grub
как?
точка_монтирования_созданного_раздела
что это? типо емли винда на /media/D0FC7AA9FC7A898C и /dev/sda3 то будет так «sudo grub-install —root-directory=/тmedia/D0FC7AA9FC7A898C /dev/sda3» на линуксе сидел всего один раз до этого, поэтому хз как и что в нем %)
зачем я только полез в линукс?…
Phlya
создать раздел ext2 в несколько мегабайт.
подключить его.как?
выполнить sudo update-grub
как?
точка_монтирования_созданного_раздела
что это? типо емли винда на /media/D0FC7AA9FC7A898C и /dev/sda3 то будет так «sudo grub-install —root-directory=/тmedia/D0FC7AA9FC7A898C /dev/sda3» на линуксе сидел всего один раз до этого, поэтому хз как и что в нем %)
1) C помощью GParted, там все довольно понятно, как сделать.
2) В терминале пишете sudo update grub.
3) Нет, не винда, а созданный раздел ext2
Ubuntu 14.04 (Unity), MSI GE40
SidER
Вот ссылка
В этой статье описано несколько вариантов восстановления grub.
mr.bl
у меня нечего не получается,
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
ubuntu@ubuntu:~$ sudo update-grub
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
ubuntu@ubuntu:~$ sudo update-grub
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
ubuntu@ubuntu:~$ /boot sudo update-grub
bash: /boot: является директорией
ubuntu@ubuntu:~$ sudo update-grub /boot
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
ubuntu@ubuntu:~$ sudo update-grub
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
ubuntu@ubuntu:~$ sudo grub-install --root-directory=/grub /dev/sda5/usr/sbin/grub-probe: error: cannot find a device for /grub/boot/grub (is /dev mounted?).
ubuntu@ubuntu:~$ sudo GParted
sudo: GParted: command not found
ubuntu@ubuntu:~$ sudo grub-install --root-directory=/grub /dev/sda
/usr/sbin/grub-probe: error: cannot find a device for /grub/boot/grub (is /dev mounted?).
ubuntu@ubuntu:~$ sudo grub-install --root-directory=/grub /dev/sda
/usr/sbin/grub-probe: error: cannot find a device for /grub/boot/grub (is /dev mounted?).
ubuntu@ubuntu:~$ sudo grub-install --root-directory=/ /dev/sda
/usr/sbin/grub-probe: error: cannot find a device for //boot/grub (is /dev mounted?).
ubuntu@ubuntu:~$ clear
ubuntu@ubuntu:~$ sudo grub-install --root-directory=/dev/sda
install_device not specified.
Usage: grub-install [OPTION] install_device
Install GRUB on your drive.
-h, --help print this message and exit
-v, --version print the version information and exit
--modules=MODULES pre-load specified modules MODULES
--root-directory=DIR install GRUB images under the directory DIR
instead of the root directory
--grub-setup=FILE use FILE as grub-setup
--grub-mkimage=FILE use FILE as grub-mkimage
--grub-probe=FILE use FILE as grub-probe
--no-floppy do not probe any floppy drive
--recheck probe a device map even if it already exists
--force install even if problems are detected
--disk-module=MODULE disk module to use
INSTALL_DEVICE can be a GRUB device name or a system device filename.
grub-install copies GRUB images into /boot/grub (or /grub on NetBSD and
OpenBSD), and uses grub-setup to install grub into the boot sector.
If the --root-directory option is used, then grub-install will copy
images into the operating system installation rooted at that directory.
Report bugs to <bug-grub@gnu.org>.
ubuntu@ubuntu:~$ clear
ubuntu@ubuntu:~$ sudo grub-install --root-directory=/grub
> sudo grub-install --root-directory=/grub
/usr/sbin/grub-probe: error: cannot find a device for /grub/boot/grub (is /dev mounted?).
ubuntu@ubuntu:~$ sudo grub-install --root-directory=/grub /dev/sda
/usr/sbin/grub-probe: error: cannot find a device for /grub/boot/grub (is /dev mounted?).
ubuntu@ubuntu:~$ sudo mount /dev/sda5 /mnt
mount: специальное устройство /dev/sda5 не существует
ubuntu@ubuntu:~$ sudo mount /dev/sda4 /mnt
mount: специальное устройство /dev/sda4 не существует
ubuntu@ubuntu:~$ sudo mount /dev/sda3 /mnt
ubuntu@ubuntu:~$ sudo grub-install --root-directory=/tmp /dev/sda
/usr/sbin/grub-probe: error: cannot find a device for /tmp/boot/grub (is /dev mounted?).
ubuntu@ubuntu:~$ sudo grub-install --root-directory=/grub /dev/sdagrub
/usr/sbin/grub-probe: error: cannot find a device for /grub/boot/grub (is /dev mounted?).
ubuntu@ubuntu:~$ sudo grub-install --root-directory=/grub /dev/sda3
/usr/sbin/grub-probe: error: cannot find a device for /grub/boot/grub (is /dev mounted?).
ubuntu@ubuntu:~$ sudo fdisk -l
Диск /dev/sda: 500.1 ГБ, 500107862016 байт
255 heads, 63 sectors/track, 60801 cylinders
Units = цилиндры of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xb3ecb200
Устр-во Загр Начало Конец Блоки Id Система
/dev/sda1 1 1362 10936320 27 Неизвестный
/dev/sda2 * 1362 1375 102400 7 HPFS/NTFS
/dev/sda3 1375 60704 476562500 7 HPFS/NTFS
ubuntu@ubuntu:~$ ^C
ubuntu@ubuntu:~$
Пользователь решил продолжить мысль 14 Января 2011, 01:40:39:
Напишите пожалуйста как можно подробней все что мне надо сделать, как сделать и тд.
Windows распаложена /dev/sda3
« Последнее редактирование: 14 Января 2011, 01:40:39 от mr.bl »
зачем я только полез в линукс?…
лесной_зонтик
короче, дай вывод
sudo blkid
Моя мечта поставить на комп Linux, Unix, *BSD, Mac OS X, OpenSolaris, OS/2, Windows.
Не спрашивайте зачем. Сам не знаю
mr.bl
Способов много, к примеру
liveusb версию винды, залить на флешку и востановить с её помощью загрузчик.
а можно про этот способ поподробней? и если можно то скажите где скачать liveusb версию винды?
зачем я только полез в линукс?…
лесной_зонтик
Честно говоря, не знаю, т.к. не пользуюсь виндой, могу лишь предложить поискать в гугле.
Есть еще один способ, который я забыл, это опять поставить Ubuntu, а потом уже скачать обычный дистр винды и восстановить загрузчик. думаю для вас, это будет самый простой оптимальный способ.
Моя мечта поставить на комп Linux, Unix, *BSD, Mac OS X, OpenSolaris, OS/2, Windows.
Не спрашивайте зачем. Сам не знаю
FST
Способов много, к примеру
liveusb версию винды, залить на флешку и востановить с её помощью загрузчик.а можно про этот способ поподробней? и если можно то скажите где скачать liveusb версию винды?
В гугле поищи, есть выложенные, видал в сети.
pipe
Самый простой способ найти знакомого с windows или иметь под рукой комп с windows.
Дальше нужна будет флэшка 4 гиговая с файловой системой ntfs и образ любой windows.
На компьютер с windows устанавливается программа от microsoft, Windows 7 USB/DVD Download Tool, и с помощью ее заганяется образ на флэшку.
Если под рукой компьютер с Linux, то нужна флэшка опять таки на 4 гига в ntfs и образ windows 7, загоняем образ на флэшку с помощью команды:
dd if=/windows.iso of=/dev/sdX
Где windows.iso — это твой путь до образа windows 7, a sdx — флэшка.
mr.bl
кажется получилось
решение
запустил win7 live dvd запустил в нем cmd и ввел
bootrec.exe /fixmbr
перезагрузил комп, и винда начала запускатся
bootrec.exe /fixboot
всем спасибо!
зачем я только полез в линукс?…
Phlya
Самый простой способ найти знакомого с windows или иметь под рукой комп с windows.
Дальше нужна будет флэшка 4 гиговая с файловой системой ntfs и образ любой windows.
На компьютер с windows устанавливается программа от microsoft, Windows 7 USB/DVD Download Tool, и с помощью ее заганяется образ на флэшку.Если под рукой компьютер с Linux, то нужна флэшка опять таки на 4 гига в ntfs и образ windows 7, загоняем образ на флэшку с помощью команды:
dd if=/windows.iso of=/dev/sdX
Где windows.iso — это твой путь до образа windows 7, a sdx — флэшка.
Образ любой windows — только семерка, да ведь?
Ubuntu 14.04 (Unity), MSI GE40
Виктор Перестукин
1. В интернете есть iso-образы консоли восстановления Windows (12МБ);
2. В Linux есть программа ms-sys для восстановления загрузчика Windows. Правда deb-пакет ещё для ubuntu-6.06. Поддержка Windows 7 добавлена в ms-sys в 2009 году. Для ubuntu придётся самому компилировать.
pipe
Phlya, да опячатка, я там семерку забыл в конце
- Печать
Страницы: [1] Вверх