Usr sbin grub probe error cannot find a device for is dev mounted

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
  • Home
  • Forum
  • The Ubuntu Forum Community
  • Ubuntu Official Flavours Support
  • Installation & Upgrades
  • [SOLVED] update-grub error {cannot find device for /}

  1. 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.


  2. 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.


  3. Question 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.


  4. 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


  5. 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.


  6. 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.


  7. 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 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.


  8. 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


  9. 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!!!


  10. 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. Thread: update-grub error
  2. update-grub error
  3. Re: update-grub error
  4. Re: update-grub error
  5. Re: update-grub error
  6. Re: update-grub error
  7. Re: update-grub error
  8. Re: update-grub error
  9. Re: update-grub error
  10. Re: update-grub error
  11. Re: update-grub error
  12. Grub2 не генерирует конфиг
  13. 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):

Код:
root #mkdir -p /mnt/gentoo/run/udev
root #mount -o bind /run/udev /mnt/gentoo/run/udev
root #mount —make-rslave /mnt/gentoo/run/udev

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 Заголовок сообщения:
Jaglover писал(а):
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.

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 Заголовок сообщения:
Arvo писал(а):
Does the error persist if you remove the usb drive which contains the installation cd?

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.

Код:
cp /proc/mounts /etc/mtab

In your configuration, boot is a directory of root, without a separate partition. -> /boot.
In the directory of /boot a subdirectory «/boot/efi» has to be created.

Connect /dev/sdb2 to /boot/efi

Код:
mount -a
or
mount /dev/sdb2 /boot/efi

Grub wants to install with the command:

Код:
grub-install —efi-directory=/boot/efi

and then:

Код:
grub-mkconfig -o /boot/grub/grub.cfg

If you are unsure. Do not do anything.

greetings
Ma
_________________
——————————————————————
http://radio.garden/

Вернуться к началу

Dyspy
n00b

Зарегистрирован: 23 окт 2019
Сообщений: 7

Добавлено: пт ноя 08, 2019 1:23 pm Заголовок сообщения:
Marlo писал(а):
Dyspy!

Never use the command in your configuration

It will overwrite the MBR and can destroy your system!

I never actually said I ran grub-setup, only grub-install and grub-mkconfig. I’m not sure why you’re worried about this. Also, as I mentioned, the device is formatted with GPT Partitioning Scheme. The only MBR I could think of that would be present on the device would be the protective MBR on the GUID partitioning table though it’s pretty protected and is also redundant and exists for backwards compatibility.

After the chroot the mtab has to be renewed.

Код:
cp /proc/mounts /etc/mtab

In your configuration, boot is a directory of root, without a separate partition. -> /boot.
In the directory of /boot a subdirectory «/boot/efi» has to be created.

Connect /dev/sdb2 to /boot/efi

Код:
mount -a
or
mount /dev/sdb2 /boot/efi

Grub wants to install with the command:

Код:
grub-install —efi-directory=/boot/efi

and then:

Код:
grub-mkconfig -o /boot/grub/grub.cfg

If you are unsure. Do not do anything.

greetings
Ma

I checked that /etc/mtab hadn’t been modified just in case and it hadn’t.
Otherwise, everything else was exactly what I did for the initial install. I repeated the process again and, while running grub-mkconfig, I get the same device.map error.

Unfortunately, the error still exists

Вернуться к началу

Jaglover
Watchman

Зарегистрирован: 29 мая 2005
Сообщений: 8291
Откуда: Saint Amant, Acadiana

Добавлено: пт ноя 08, 2019 6:18 pm Заголовок сообщения:
Цитата:
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.

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.
You could boot your Windows and Gentoo the same way, without using any additional bootloders.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!

Вернуться к началу

DONAHUE
Watchman

Зарегистрирован: 09 дек 2006
Сообщений: 7644
Откуда: Goose Creek SC

Добавлено: пт ноя 08, 2019 7:33 pm Заголовок сообщения:
Dyspy писал(а):
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.

Does this mean that you can boot and run the installed gentoo system (no chroot or install media involved)?
If so, suggest you boot the installed gentoo system, run

Код:
emerge wgetpaste os-prober efivar

, 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:

Код:
fdisk -l | wgetpaste
mount | wgetpaste
os-prober | wgetpaste
grep -i CONFIG_EFI_VARS /usr/src/linux/.config
grub-install —efi-directory=/boot/efi —target=x86_64-efi
grub-mkconfig -o /boot/grub
tree /boot | wgetpaste
cat /boot/grub/grub.cfg | wgetpaste

I’ve been dual/multibooting since 2012. Running the commands above my terminal shows:

Код:
> fdisk -l | wgetpaste
mount | wgetpaste
os-prober | wgetpaste
grep -i CONFIG_EFI_VARS /usr/src/linux/.config
grub-install —efi-directory=/boot/efi —target=x86_64-efi
grub-mkconfig -o /boot/grub
tree /boot | wgetpaste
25 kB often tend to fail with dpaste. Use —verbose or —debug to see the
cat /boot/grub/grub.cfg | wgetpaste
If problem does not clear suggest you copy and post your terminal equivalent.
_________________
Defund the FCC.

Последний раз редактировалось: DONAHUE (чт ноя 14, 2019 7:30 pm), всего редактировалось 1 раз

Вернуться к началу
Dyspy
n00b

Зарегистрирован: 23 окт 2019
Сообщений: 7

Добавлено: чт ноя 14, 2019 6:11 pm Заголовок сообщения:
I deleted all the kernel images and system maps on the uefi partition and reinstalled them. I’d done this a few times before while trying to fix it and, for some reason, this one worked. Strangely enough, os-prober found windows as well this time despite not finding it before. Loads into Gentoo fine now. I’ll mark as solved
Вернуться к началу
DONAHUE
Watchman

Зарегистрирован: 09 дек 2006
Сообщений: 7644
Откуда: Goose Creek SC

Добавлено: чт ноя 14, 2019 7:39 pm Заголовок сообщения:
Best guesses: adding —target=x86_64-efi or mounting the ESP read write or sequence of commands was the magic. Grub sometimes says an error occurred so politely that it seems to report success.
_________________
Defund the FCC.
Вернуться к началу

Вы не можете начинать темы
Вы не можете отвечать на сообщения
Вы не можете редактировать свои сообщения
Вы не можете удалять свои сообщения
Вы не можете голосовать в опросах

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]   Вверх

I have 2 16gb usb sticks in a mirrored pool, and am trying to install grub to the mbr on one of the sticks. I have followed the instructions, but am getting an error when doing the zfs-grub install. I am using the latest Ubuntu 12.04 x64 live cd.

Here is the output of troubleshooting commands:

root@ubuntu:/# apt-get install —reinstall zfs-grub
Reading package lists… Done
Building dependency tree
Reading state information… Done
Note, selecting ‘grub-common’ instead of ‘zfs-grub’
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 1 not upgraded.
2 not fully installed or removed.
Need to get 0 B/2,356 kB of archives.
After this operation, 0 B of additional disk space will be used.
Can not write log, openpty() failed (/dev/pts not mounted?)
(Reading database … 43041 files and directories currently installed.)
Preparing to replace grub-common 1.99-21ubuntu3+zfs1 (using …/grub-common_1.99-21ubuntu3+zfs1_amd64.deb) …
Unpacking replacement grub-common …
Processing triggers for ureadahead …
Can not write log, openpty() failed (/dev/pts not mounted?)
Setting up grub-common (1.99-21ubuntu3+zfs1) …
Setting up grub-pc (1.99-21ubuntu3+zfs1) …
grub-probe: error: cannot find a device for / (is /dev mounted?).
grub-probe: error: cannot find a device for /boot (is /dev mounted?).
Installation finished. No error reported.
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
dpkg: error processing grub-pc (—configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of grub-gfxpayload-lists:
grub-gfxpayload-lists depends on grub-pc (>= 1.99~20101210-1ubuntu2); however:
Package grub-pc is not configured yet.
dpkg: error processing grub-gfxpayload-lists (—configure):
dependency problems — leaving unconfigured
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
Errors were encountered while processing:
grub-pc
grub-gfxpayload-lists
E: Sub-process /usr/bin/dpkg returned an error code (1)

root@ubuntu:/# grub-probe /
grub-probe: error: cannot find a device for / (is /dev mounted?).
root@ubuntu:/# ls /boot/grub/zfs*
/boot/grub/zfsinfo.mod /boot/grub/zfs.mod
root@ubuntu:/# update-initramfs -c -k all
update-initramfs: Generating /boot/initrd.img-3.2.0-23-generic
root@ubuntu:/# update-grub
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
root@ubuntu:/# grep boot=zfs /boot/grub/grub.cfg
root@ubuntu:/# grub-install $(readlink -f /dev/disk/by-id/usb-PNY_USB_2.0_FD_00000000327AA39B-0:0)
Installation finished. No error reported.
root@ubuntu:/# ls /dev
autofs network_latency sde9 tty14 tty53 ttyS5
block network_throughput sdf tty15 tty54 ttyS6
bsg null sdf1 tty16 tty55 ttyS7
btrfs-control oldmem sdf9 tty17 tty56 ttyS8
bus port sdg tty18 tty57 ttyS9
cdrom ppp sdg1 tty19 tty58 uinput
cdrw psaux sdg9 tty2 tty59 urandom
char ptmx sdh tty20 tty6 usb
console pts sdh1 tty21 tty60 usbmon0
core ram0 sdh2 tty22 tty61 usbmon1
cpu ram1 sdi tty23 tty62 usbmon2
cpu_dma_latency ram10 sdi1 tty24 tty63 usbmon3
disk ram11 sdi2 tty25 tty7 usbmon4
dri ram12 sdj tty26 tty8 usbmon5
dvd ram13 sdj1 tty27 tty9 usbmon6
dvdrw ram14 sdj2 tty28 ttyprintk usbmon7
ecryptfs ram15 sdj3 tty29 ttyS0 usbmon8
fb0 ram2 sdj5 tty3 ttyS1 v4l
fd ram3 sg0 tty30 ttyS10 vcs
full ram4 sg1 tty31 ttyS11 vcs1
fuse ram5 sg10 tty32 ttyS12 vcs2
fw0 ram6 sg2 tty33 ttyS13 vcs3
hidraw0 ram7 sg3 tty34 ttyS14 vcs4
hidraw1 ram8 sg4 tty35 ttyS15 vcs5
hidraw2 ram9 sg5 tty36 ttyS16 vcs6
hidraw3 random sg6 tty37 ttyS17 vcs7
hpet rfkill sg7 tty38 ttyS18 vcsa
input rtc sg8 tty39 ttyS19 vcsa1
kmsg rtc0 sg9 tty4 ttyS2 vcsa2
log sda shm tty40 ttyS20 vcsa3
loop0 sda1 snapshot tty41 ttyS21 vcsa4
loop1 sda9 snd tty42 ttyS22 vcsa5
loop2 sdb sr0 tty43 ttyS23 vcsa6
loop3 sdb1 stderr tty44 ttyS24 vcsa7
loop4 sdb9 stdin tty45 ttyS25 vga_arbiter
loop5 sdc stdout tty46 ttyS26 video0
loop6 sdc1 tty tty47 ttyS27 zero
loop7 sdc9 tty0 tty48 ttyS28 zfs
loop-control sdd tty1 tty49 ttyS29
mapper sdd1 tty10 tty5 ttyS3
mcelog sdd9 tty11 tty50 ttyS30
mem sde tty12 tty51 ttyS31
net sde1 tty13 tty52 ttyS4
root@ubuntu:/# ls /
bin dev home lib media opt root sbin srv tmp var
boot etc initrd.img lib64 mnt proc run selinux sys usr vmlinuz

Понравилась статья? Поделить с друзьями:
  • Valheim как изменить переносимый вес
  • Valheim как изменить ник
  • Usr local apache logs error log
  • Usr bin sudo input output error
  • Valheim как изменить ландшафт