![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.
|
|
Installation & Upgrades For questions about upgrading and installation of your new Ubuntu OS. |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
First Cup of Ubuntu
![]() Join Date: Jul 2007
Beans: 6
|
I am installing ubuntu-7.04-desktop-i386 and have trouble with grub-install.
The background is as follows. My cd reader is broken and I have used the instructions on https://help.ubuntu.com/community/In...tion/FromLinux to install from a disk partition. After rebooting, I've re-partitioned the disk, so I am currently running a system with two empty partitions (to become / and /home), and one partition containing the contents of the live cd. When I re-partitioned the disk, I removed the root partition of my previous Linux installation. Hence, there is currently no way to boot my system. This is obviously very risky - e.g., if I start an installation and it fails for whatever reason, my system will be unbootable forever. Therefore, I now ran grub-install, in order to get a bootable system before I start installation. However, I get the following error: $ grub-install /dev/sda1 Could not find device for /boot: Not found or not a block device. I've googled for this error message, but could not find any useful help (one advice was to run `grub-install --recheck /dev/sda1'. However, this gives the same error message.) Any help would be very appreciated! Sven Sandberg |
|
|
|
|
|
#2 |
|
Skinny Soy Caramel Ubuntu
![]() Join Date: Oct 2004
Location: Albuquerque New Mexico, U
Beans: 656
Ubuntu 9.10 Karmic Koala
|
Re: grub-install says "Could not find device for /boot: Not found or not a block devi
THis is the short version, but may do what you want.
Boot from the liveCD and open a terminal window. Do: Code:
sudo grub Code:
find /boot/grub/stage1 < the "1" is the number one (hdX,Y) where X and Y are numbers. Remember the values. Then: Code:
root (hdX,Y) Code:
setup (hd0) < the "0" is the number zero. Code:
quit Code:
exit
__________________
regards Last edited by rbmorse; July 19th, 2007 at 11:37 PM.. |
|
|
|
|
|
#3 | |
|
First Cup of Ubuntu
![]() Join Date: Dec 2007
Beans: 1
|
Re: grub-install says "Could not find device for /boot: Not found or not a block devi
Quote:
i recently had a similar problem resulting from trying to repartition my hard disk (2 partitions ntfs vista, 2 partitions ubuntu) and was almost at the point of launching the vista recovery wizard. thankfully the above instructions were enough. thanks again! |
|
|
|
|
|
|
#4 |
|
First Cup of Ubuntu
![]() Join Date: Jul 2007
Beans: 6
|
Thanks. My problem seems to be that I don't have a /boot/grub directory. The /boot/grub directory was removed when I re-partitioned the disk. Hence, the `find' command in the grub shell gives the error `file not found'. I have now read the grub documentation, which hints that I should copy image files to the partition I want to boot from, before running grub. Hence, I did this and then I did as you suggested:
Code:
mount /dev/sda1 /media/disk-1 mkdir /media/disk-1/boot mkdir /media/disk-1/boot/grub cp /usr/lib/grub/i386-pc/* /media/disk-1/boot/grub grub grub> root (hd0,0) grub> setup (hd0) Now, my concern is whether everything is done and whether I can be sure that my system is bootable again. (I do not want to take any risks, since my computer has no removable media. In other words, if there is any problem booting, I have to buy new hardware.) Please, can someone confirm that the commands above, at least in theory, should be enough to install grub from scratch on an empty partition? Many thanks Sven Sandberg |
|
|
|
|
|
#5 | |
|
Ubuntu addict and loving it
![]() Join Date: Jul 2005
Location: Hughenden, Australia
Beans: 4,089
Ubuntu 9.04 Jaunty Jackalope
|
Re: grub-install says "Could not find device for /boot: Not found or not a block devi
That looks like it should have been okay.
Here's what I would have used, Code:
mount /dev/sda1 /media/disk-1 mkdir /media/disk-1/boot cp -r /boot/grub /media/disk-1/boot grub grub> root (hd0,0) grub> setup (hd0) Code:
herman@badboy:~$ ls /usr/lib/grub/i386-pc/ e2fs_stage1_5 fat_stage1_5 jfs_stage1_5 minix_stage1_5 reiserfs_stage1_5 stage1 stage2 stage2_eltorito xfs_stage1_5 herman@badboy:~$ ls /boot/grub device.map fat_stage1_5 jfs_stage1_5 menu.lst~ reiserfs_stage1_5 stage2 xfs_stage1_5 default e2fs_stage1_5 installed-version menu.lst minix_stage1_5 stage1 Ubuntusplash.xpm.gz Quote:
__________________
Illustrated Dual Boot Site | GRUB Page | GRUB II Pages | LiLo Page | GAG Page | Super Grub Disk Page Last edited by Herman; July 20th, 2007 at 06:59 AM.. |
|
|
|
|
|
|
#6 | ||
|
First Cup of Ubuntu
![]() Join Date: Jul 2007
Beans: 6
|
Re: grub-install says "Could not find device for /boot: Not found or not a block devi
Thanks a lot.
Quote:
Also, I have no menu.lst (neither in /boot/grub nor in /usr/lib/grub/i386-pc): should I create one manually? Quote:
|
||
|
|
|
|
|
#7 | |
|
Ubuntu addict and loving it
![]() Join Date: Jul 2005
Location: Hughenden, Australia
Beans: 4,089
Ubuntu 9.04 Jaunty Jackalope
|
Re: grub-install says "Could not find device for /boot: Not found or not a block devi
Thanks for your patience, sorry for keeping you waiting.
You don't need a menu.lst file if you know how to boot from GRUB's Command Line Interface, but It could be easier if you do make a menu.lst file, the links's instructions do say how to edit the menu.lst file to boot the .iso partition, Quote:
I don't think you will need the other two files actually, just the menu.lst would be enough. If you give me some more time I'll test that for you in one of my computers and check if that works okay for me and let you know how I get along. Regards, Herman
__________________
Illustrated Dual Boot Site | GRUB Page | GRUB II Pages | LiLo Page | GAG Page | Super Grub Disk Page Last edited by Herman; July 20th, 2007 at 11:00 PM.. |
|
|
|
|
|
|
#8 |
|
Ubuntu addict and loving it
![]() Join Date: Jul 2005
Location: Hughenden, Australia
Beans: 4,089
Ubuntu 9.04 Jaunty Jackalope
|
Re: grub-install says "Could not find device for /boot: Not found or not a block devi
Well, I have done everything up to installing GRUB to MBR from the installer partition.
I have tried my own way first, I made a directory named grub in the /boot directory and tried grub-install /dev/hda, I got the same error message as you did in your first post. Then I tried what you did in the third post in this thread, but that didn't work in my laptop, it says: Error 15: File not found, referring to /boot/grub/stage1. I do have a /boot/grub/stage1 and also a /media/disk-1/boot/grub/stage1 file as well now. Have I missed something here? Anyway, now I'm now working at making a dedicated GRUB partition, I think that will work and I think that will be the recommended safety measure for you. The problem for me is I'm running these experiments in a laptop that already has some other partitons in it, so I have my installer in /dev/hda6, which is in an extended partition. I already have all the primary partitions I'm allowed and I can't unmount the extended partition to resize it to make room for the new dedicated GRUB partition with Gnome Partition Editor. If you can do so I think you should. Then copy the /boot/grub files to that and install GRUB to MBR from there. I'll have to cheat by rebooting and using GParted Live CD to make my new partition. Then I'll reboot into the installer partition and try installing GRUB to MBR from the new dedicated GRUB partition and check that our abbreviated menu.lst will work okay. I'll be back again shortly....
__________________
Illustrated Dual Boot Site | GRUB Page | GRUB II Pages | LiLo Page | GAG Page | Super Grub Disk Page |
|
|
|
|
|
#9 |
|
Ubuntu addict and loving it
![]() Join Date: Jul 2005
Location: Hughenden, Australia
Beans: 4,089
Ubuntu 9.04 Jaunty Jackalope
|
Re: grub-install says "Could not find device for /boot: Not found or not a block devi
Okay, I created a dedicated GRUB partition and have installed GRUB to MBR form it and added our abbreviated menu.lst file.
I have rebooted with it to test it and it works fine. I recommend you should definitely make a dedicated GRUB partition, about 100 mb of hard disk space would be more than enough. Mount it. Make a /boot directory in it and then make a /grub directory inside that. Then copy your GRUB files from /usr/lib/grub/i386 and then install GRUB to MBR from there. This will be important for you. While I was doing this testing I found that the installer, when rebooted, lost all it's files that I made in it before, as a Live CD would be expected to do. That means even if you were successful in copying the GRUB files within the installer partition and installing GRUB to MBR, when you reboot you will lose all your changes. You really need a dedicated GRUB partition if you want to be safe. I'll be back in a while in case you need more details. Just ask if you want extra help. I have updated my GRUB Page with improvements to this topic, How to make a dedicated GRUB partition in case that's any help. Regards, Herman
__________________
Illustrated Dual Boot Site | GRUB Page | GRUB II Pages | LiLo Page | GAG Page | Super Grub Disk Page Last edited by Herman; July 20th, 2007 at 10:27 PM.. |
|
|
|
|
|
#10 |
|
First Cup of Ubuntu
![]() Join Date: Jul 2007
Beans: 6
|
Re: grub-install says "Could not find device for /boot: Not found or not a block devi
Thanks a lot for your efforts! It makes me happy to see there are people like you out there to give a helping hand. I have now managed to reboot and install Ubuntu and everything works. What I finally did was to copy both /usr/lib/grub/i386-pc/* and /boot/grub/{default,device.map} to /media/disk-1/boot/grub, and then I ran grub as explained earlier in the thread. I created my own menu.lst using the grub documentation and https://help.ubuntu.com/community/In...tion/FromLinux . Upon rebooting, everything worked as expected.
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|