LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   the grub package failed to install (using debian) (https://www.linuxquestions.org/questions/linux-software-2/the-grub-package-failed-to-install-using-debian-571071/)

mrj 07-20-2007 11:28 PM

the grub package failed to install (using debian)
 
Trying to install Debian on my pentium 4 system using the 386 DVD's I got the above error. The complete error message was: "The grub package failed to install into /target. Installing Grub as a boot loader is a required step. The install problem might however be unrelated to GRUB, so continuing the installation may be possible."
If anyone has encountered this problem or can make sense of this, your comments will be appreciated. Thanks. p.s. I tried to continue the installation but it failed.

jay73 07-21-2007 05:01 PM

What kind of filesystem did you choose? Which partitions did you create? How many disks have you got and where did you ask to have GRUB installed? I'm afraid that all questions are useless without providing this kind of information first.

mrj 07-22-2007 03:29 AM

When I installed, I chose to use a single partition. The installation system created an ext3 file system.
I have one SATA hard disk installed. As for where the installation system tried to install the grub package, the error message was: "The grub package failed to install into /target." I've done more research into this problem and found someone had an identical problem posted on this site on 02-09-07.I have studied the solution posted for this thread and have not yet been able to implement it. For example, the proposed solution was to copy the grub stage1 and stage2 files from a live disk to the /boot/grub directory on the hard disk. I typed part of the proposed solution:

sudo mkdir /mnt/hda1
sudo mount /dev/hda1 /mnt/hda1 <--------ERRORS
sudo mkdir /mnt/hda1/boot/grub
sudo cp -R /boot/grub/* /mnt/boot/grub
sudo grub
root (hd0,0)
setup (hd0)
quit

It says after the sudo mount (above) that either the /dev/hda1 or /mnt/hda1 is not a valid block device. Not only that, but using the KNOPPIX cd, any changes I make to the hard disk are not permanent it seems. Thanks for the response.

jay73 07-22-2007 07:42 AM

Well, I ran into a similar error when I was setting up Debian Etch. I always assumed that it was because I tried to place GRUB on an xfs partition (a notoriously bad combination) but there appears to be more to it.

What does Knoppix show when you type

fdisk -l

into a terminal?

Edit: I may have an idea what is wrong. Did you let the system do the partitioning for you instead of doing it manually? If so, it is more than likely that hda1 is a swap partition and that your boot partition is hda2 instead. Doing the fdisk -l should show whether I'm right or wrong.

mrj 07-23-2007 03:00 PM

The fdisk -l yields:
Disk /dev/sda: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 36296 291547588+ 83 Linux
/dev/sda2 36297 36481 1486012+ 5 Extended
/dev/sda5 36297 36481 1485981 82 Linux swap / Solaris
knoppix@0[/]$

jay73 07-23-2007 03:36 PM

Ah, now I see. Just look at the output of fdisk -l, it says: /dev/sda1 - not /dev/hda1. That's why your earlier attempts at mounting failed: you were using an incorrect identifier. Replace hda1 with sda1 and it should work just fine.

mrj 07-27-2007 02:38 PM

Well, I installed the first of the three Debian etch dvds, ignoring errors of the boot record installation (and just skipping that part of the installation). I then inserted the live KNOPPIX DVD and and typed: su. Then I typed: mount -orw /dev/sda1 /mnt/sda1. I then coppied all files from /KNOPPIX/lib/grub/i386-pc/* to /mnt/sda1/boot/grub/. Then I ran grub from the root prompt, typed > root (hd0,0) > setup (hd0) quit. Those grub commands I guess tell the system that I am interested in the first hard disk partition and to set itself up in the MBR (or hd0). Then I re-booted the system and at the grub prompt typed: >root (hd0,0) >kernel /boot/vmlinuz-2.16.18-4-686 root=/dev/sda1 ro >initrd /boot/initrd.img-2.6.18-4-686 >boot. Then I created a menu.lst file in the same grub directory and entered the commands that I just typed at the re-boot prompt above and saved it as a file so I wouldn't have to enter them again at the grub prompt during my next re-boot. I also in that same file had to enter a title command so GRUB will have that option listed when I re-boot. I did this by entering in the first line of that file: title Debian GNU/Linux, kernel 2.6.18-4-686. Incidentally, I know this is not going to make much sense to most of those reading this, but maybe, after also looking at the thread from 2-9-07 from the person who had the identical problem as myself, this will help. Now I have to load the last two debian 4.0 DVD's which I don't know how to do, so maybe someone knows how to do this? By the way, I decided on installing Debian 4.0 because it was said that this was a very thoroughly tested version of linux. Anyway, anyone who might know how to install the last of the three DVD's is welcome to give suggestions and thanks, jay73, for the help you have given.

jay73 07-28-2007 01:42 AM

http://www.debian.org/doc/manuals/ap...basico.en.html

See 2.4

mrj 07-31-2007 10:51 PM

I ran apt-cdrom as section 2.4 advised. I also ran aptitude update. When I ran just aptitude without any parameters, the screen lists New Packages, Not Installed Packages, Virtual Packages, and Tasks. When I select New Packages,press return, and select main it lists many packages. Are these packages installed? (They are listed under new packages, not under installed packages). I'm trying to figure out if and when my Debian system, consisting of the 3 DVD's, is installed, because the installation was anything but smooth.. I'd like to run GNOME, and it is listed under New Packages, but I don't know how to execute it. I don't see how the second and third DVD's could have been loaded on to the hard disk, because the apt-cdrom and aptitude update commands did not take that long to execute. So, I guess the immediate question is if GNOME is installed (and if not..how do I install it) and if the New Packages in the aptitude menu are installed. There doesn't seem to be that much documentation on debian 4.0. I was able to find a Debian GNU/Linux 3.1 Bible manual but I don't think it is that complete or thorough. If anyone knows where more complete documentation exist on it please let me know.

jay73 07-31-2007 11:03 PM

No, the dvds did not load onto the system. All that was loaded onto the system is the table of contents of those dvds. As soon as you try to install anything, you will be asked to supply the specified dvd.

You should be running gnome by default. Are you sure you aren't? If you have a bar both at the bottom and at the top of the screen, then you know you are.

Easy way to install packages without using the command line: install synaptic. Do it like this from the command line (ironic?): apt-get install synaptic. Or maybe synaptic was already installed? You can verify by checking the items under Systems > Administration. Any Synaptic Package Manager there? If so, you're set to go. If not, install as pointed out above. When you're done, you can open Synaptic and it will list all available packages in a GUI = a lot more convenient than reading endless lists from a terminal. Select what you need and click on apply. The rest should be self-evident.

And yes, that Debian Bible is a bit of a disappointment. I have the paper version sitting on my shelf and it's more propaganda than useful information. Really sad compared to the Fedora & Red Hat Bible and the Ubuntu Bible. No wonder that the Debian Bible seems a dead project while the other ones keep receiving updates. There are plenty of sources, though. A good place to start is the docs section at debian.org. Very thorough coverage of all that you need to know (and more). Other sources include yolinux.com (for Linux in general - huge site) and tldp.org. Debian-related docs can also be installed form the dvds.

mrj 08-01-2007 01:06 PM

The saga continues (trying to load Debian)
 
Gnome is definitely not running (I am in command mode) as I do not have any bars on the top or bottom of the screen.
Trying to load synaptic, I typed: 'apt-get install synaptic' and it responded with: 'Package sysnaptic is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only availabe from another source.' I also typed: 'apt-get install gnome' and it responded with: 'Reading package lists....Done, Builing dependency trees....Done E:couldn't find package gnome.' Remember, I did the apt-cdrom for both DVD2 and DVD3 prior to these attempts. Any suggestions?

jay73 08-01-2007 01:41 PM

You are using the command line? Have you got any graphical user interface at all? If all went well, Gnome should have been installed by default. Btw, may I ask why you downloaded all three dvds? It is so much easier installing the whole thing straight from the internet and since you'll never use all of the packages, you can save a lot of bandwith like that.

Anyway, from the sound of it, something is seriously wrong. You really shouldn't have to struggle like this - that's just not my experience.

mrj 08-05-2007 03:24 PM

Oh well, my solution for now is to use Fedora 7. Thanks for the help anyway.


All times are GMT -5. The time now is 06:29 PM.